functionSource stringlengths 20 97.4k | CWE-119 bool 2
classes | CWE-120 bool 2
classes | CWE-469 bool 2
classes | CWE-476 bool 2
classes | CWE-other bool 2
classes | combine int64 0 1 |
|---|---|---|---|---|---|---|
build_rdma_recv(struct c4iw_qp *qhp, union t4_recv_wr *wqe,
struct ib_recv_wr *wr, u8 *len16)
{
int ret;
ret = build_isgl((__be64 *)qhp->wq.rq.queue,
(__be64 *)&qhp->wq.rq.queue[qhp->wq.rq.size],
&wqe->recv.isgl, wr->sg_list, wr->num_sge, NULL);
if (ret)
return ret;
*len16 = DIV_ROUND_UP(sizeof wqe... | false | false | false | false | false | 0 |
info( char *msg,...)
{
va_list ap;
va_start(ap, msg);
if(! quiet)
{
fprintf(stdout, "\n");
vfprintf(stdout, msg, ap);
va_end(ap);
}
} | false | false | false | false | false | 0 |
appendGameToDataBase(QModelIndex index, int gameIndex)
{
// Make sure the drop occured on a cell!
if(index.isValid())
{
QString path = m_filterModel->data(m_filterModel->index(index.row(), DBLV_PATH)).toString();
emit requestAppendGame(path, gameIndex);
}
} | false | false | false | false | false | 0 |
jbg_dec_getwidth(const struct jbg_dec_state *s)
{
if (s->d < 0)
return 0;
if (iindex[s->order & 7][LAYER] == 0) {
if (s->ii[0] < 1)
return 0;
else
return jbg_ceil_half(s->xd, s->d - (s->ii[0] - 1));
}
return s->xd;
} | false | false | false | false | false | 0 |
alt_buffer_read(alt_buffer_t *buffer, uint8 *data, unsigned int length, unsigned int *seqn, unsigned int *ackn)
{
int consumed_bytes;
unsigned int *pos, temp_pos;
unsigned int read_more_bytes;
unsigned int read_bytes, r;
uint8 *temp;
printf("A\n");
if (!buffer || !data) {
return BUFFER_ERROR;
}
... | false | false | false | false | false | 0 |
translate_layout()
{
/* Read the workspace. */
int total = 0;
for ( int w = 0; w < 7; ++w ) {
int i = translate_pile(deal->stack[w], W[w], 52);
Wp[w] = &W[w][i - 1];
Wlen[w] = i;
total += i;
}
int i = translate_pile( deal->waste, W[7], 52 );
Wp[7] = &W[7][i-1];
... | false | false | false | false | false | 0 |
main(int argc, char* argv[]) { /* execution begins here 8-) */
str_init(); /* initialize per-thread string management */
main_initialize(argc>1 ? argv[1] : NULL, argc>2 ? argv[2] : NULL);
main_execute();
return 0; /* success */
} | false | false | false | false | false | 0 |
ue_report (struct prog_ctx *ctx)
{
struct edac_totals tot;
if (edac_error_totals (ctx->edac, &tot) < 0) {
log_fatal (1, "Unable to get EDAC error totals: %s\n",
edac_strerror (ctx->edac));
}
if (!ctx->quiet || tot.ue_total)
fprintf (stdout, "UE: %u\n", tot.ue_total)... | false | false | false | false | false | 0 |
gfs_cell_reset (FttCell * cell, GfsVariable * v)
{
g_return_if_fail (cell != NULL);
g_return_if_fail (v != NULL);
GFS_VARIABLE (cell, v->i) = 0.;
} | false | false | false | false | false | 0 |
HandleTaxiNodeStatusQueryOpcode(WorldPacket& recv_data)
{
DEBUG_LOG("WORLD: Received opcode CMSG_TAXINODE_STATUS_QUERY");
ObjectGuid guid;
recv_data >> guid;
SendTaxiStatus(guid);
} | false | false | false | false | false | 0 |
psgen_polyline(GVJ_t * job, pointf * A, int n)
{
int j;
if (job->obj->pencolor.u.HSVA[3] > .5) {
ps_set_pen_style(job);
ps_set_color(job, &(job->obj->pencolor));
gvputs(job, "newpath ");
gvprintpointf(job, A[0]);
gvputs(job, " moveto\n");
for (j = 1; j < n; j++) {
gvprintpointf(... | false | false | false | false | false | 0 |
bfa_lps_send_logout(struct bfa_lps_s *lps)
{
struct bfi_lps_logout_req_s *m;
m = bfa_reqq_next(lps->bfa, lps->reqq);
WARN_ON(!m);
bfi_h2i_set(m->mh, BFI_MC_LPS, BFI_LPS_H2I_LOGOUT_REQ,
bfa_fn_lpu(lps->bfa));
m->fw_tag = lps->fw_tag;
m->port_name = lps->pwwn;
bfa_reqq_produce(lps->bfa, lps->reqq, m->mh);
} | false | false | false | false | false | 0 |
isthisnonword(MMIOT *f, int i)
{
return isthisspace(f, i) || ispunct(peek(f,i));
} | false | false | false | false | false | 0 |
vidioc_decoder_cmd(struct file *file, void *priv,
struct v4l2_decoder_cmd *cmd)
{
struct s5p_mfc_ctx *ctx = fh_to_ctx(priv);
struct s5p_mfc_dev *dev = ctx->dev;
struct s5p_mfc_buf *buf;
unsigned long flags;
switch (cmd->cmd) {
case V4L2_DEC_CMD_STOP:
if (cmd->flags != 0)
return -EINVAL;
if (!ctx... | false | false | false | false | false | 0 |
_splitLeaf( HashTable hashTable, int bucketNum, Leaf leaf )
{
Leaf leaf0, leaf1;
int mask;
int i, count;
HashElement elt, elt0;
Leaf which;
int slot, start, bit;
int knt0, knt1;
elt0 = leaf->elements[ 0 ];
for ( i = 1; i < LEAF_LEN; i++ ) {
elt = leaf->elements[ i ];
... | false | false | false | false | false | 0 |
addMeshBoundaryElement(
int bndr_tag, meshElementCode el_code,
int ext_parent1_id, int ext_parent2_id,
const int* ext_node_ids,
bool& is_added_to_bndr)
{
BodyElement* be = model->getBoundaryByTag(bn... | false | false | false | false | false | 0 |
__saved_frame_copy (struct saved_frames *frames, int64_t callid,
struct saved_frame *saved_frame)
{
struct saved_frame *tmp = NULL;
int ret = -1;
if (!saved_frame) {
ret = 0;
goto out;
}
list_for_each_entry (tmp, &frames... | false | false | false | false | false | 0 |
opt_root(b)
struct block **b;
{
struct slist *tmp, *s;
s = (*b)->stmts;
(*b)->stmts = 0;
while (BPF_CLASS((*b)->s.code) == BPF_JMP && JT(*b) == JF(*b))
*b = JT(*b);
tmp = (*b)->stmts;
if (tmp != 0)
sappend(s, tmp);
(*b)->stmts = s;
/*
* If the root node is a return, then there is no
* point executin... | false | false | false | false | false | 0 |
rb_str_sub_bang(argc, argv, str)
int argc;
VALUE *argv;
VALUE str;
{
VALUE pat, repl, match;
struct re_registers *regs;
int iter = 0;
int tainted = 0;
long plen;
if (argc == 1 && rb_block_given_p()) {
iter = 1;
}
else if (argc == 2) {
repl = argv[1];
StringValue(repl);
i... | false | false | false | false | false | 0 |
being_attacked(int attackNationRecno)
{
if( nation_array.is_deleted(attackNationRecno) || attackNationRecno==nation_recno )
return;
//--- if it is an accidential attack (e.g. bullets attack with spreading damages) ---//
Nation* attackNation = nation_array[attackNationRecno];
if( attackNation->get_relation(nati... | false | false | false | false | false | 0 |
mult_puzzle_shuffle (MultPuzzleChar* symbolList, int symbolList_length1) {
{
gint i;
i = 0;
{
gboolean _tmp0_;
_tmp0_ = TRUE;
while (TRUE) {
gint32 _tmp1_;
gint spot;
gint j = 0;
if (!_tmp0_) {
i++;
}
_tmp0_ = FALSE;
if (!(i < 10)) {
break;
}
_tmp1_ = g_rand... | false | false | false | false | false | 0 |
findSpecial (char *number, int *s, int *c)
{
int i,j,l;
l=strlen(number);
for (i=0; i<nService; i++)
for(j=0; j<Service[i].nCode; j++)
if(strmatch(Service[i].Codes[j], number)>=l)
{
*s = i;
*c = j;
return i+1; /* must be > 0 for 1. Service */
}
return 0;
} | false | false | false | false | false | 0 |
ccss_selector_serialize_specificity (ccss_selector_t const *self,
GString *specificity)
{
g_return_if_fail (self);
g_return_if_fail (specificity);
g_string_append_printf (specificity, "%d,%d,%d,%d,%d,%d,%d",
self->importance,
self->precedence,
self->a,
self->b,
self->c,
self-... | false | false | false | false | false | 0 |
setActiveNavigator( QAction *navigatorAction )
{
DEBUG_BLOCK
if( navigatorAction == m_standardNavigatorAction )
{
AmarokConfig::setTrackProgression( AmarokConfig::EnumTrackProgression::Normal );
setIcon( m_standardNavigatorAction->icon() );
}
else if ( navigatorAction == m_onlyQueueN... | false | false | false | false | false | 0 |
statusbar_update_state(DebugState state)
{
static DebugState last_state = DS_INACTIVE;
if (thread_state == THREAD_AT_ASSEMBLER)
state = DS_EXTRA_1;
if (state != last_state)
{
static const char *const states[] = { N_("Busy"), N_("Ready"), N_("Debug"),
N_("Hang"), N_("Assem"), N_("Load"), NULL };
guint i;
... | false | false | false | false | false | 0 |
dcc_did_connect (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
{
int er;
#ifdef WIN32
if (condition & G_IO_ERR)
{
int len;
/* find the last errno for this socket */
len = sizeof (er);
getsockopt (dcc->sok, SOL_SOCKET, SO_ERROR, (char *)&er, &len);
EMIT_SIGNAL (XP_TE_DCCCONFAIL, dcc->serv-... | false | false | false | false | false | 0 |
getidname(int idnumber) const
{
if (idnumber<nvars)
return vararray[idnumber];
else
{
printf("Error in getidname: idnumber %d is larger than nvars %d\n",
idnumber, nvars);
return 0;
}
} | false | false | false | false | false | 0 |
Write(std::ostream& os, const char* filename, const TreeValue* contents, const TreeValue* writeoptions, const MotionFileFormatList& formatlist /*=MotionFileFormatListAll()*/) throw(MotionFileException)
{
// ensure write options non-NULL
TreeCompound emptyoptions;
if (writeoptions == NULL)
{
writeoptio... | false | false | false | false | false | 0 |
DumpStringMap ( const XMP_StringMap & map, XMP_StringPtr label, XMP_TextOutputProc outProc, void * refCon )
{
XMP_Status status;
XMP_cStringMapPos currPos;
XMP_cStringMapPos endPos = map.end();
size_t maxLen = 0;
for ( currPos = map.begin(); currPos != endPos; ++currPos ) {
size_t currLen = currPos->first.si... | false | false | false | false | false | 0 |
folder_item_want_synchronise_func(FolderItem *item, gpointer data)
{
WantSyncData *want_sync_data = (WantSyncData *)data;
if (want_sync_data->folder == NULL || item->folder == want_sync_data->folder) {
if (item->prefs->offlinesync && item->folder->klass->synchronise)
want_sync_data->want_sync |= TRUE;
}
} | false | false | false | false | false | 0 |
print_fderives (void)
{
int i;
rule_number r;
fprintf (stderr, "FDERIVES\n");
for (i = ntokens; i < nsyms; i++)
{
bitset_iterator iter;
fprintf (stderr, " %s derives\n", symbols[i]->tag);
BITSET_FOR_EACH (iter, FDERIVES (i), r, 0)
{
fprintf (stderr, " %3d ", r);
... | false | false | false | false | false | 0 |
tile_city(const struct tile *ptile)
{
struct city *pcity = ptile->worked;
if (NULL != pcity && is_city_center(pcity, ptile)) {
return pcity;
}
return NULL;
} | false | false | false | false | false | 0 |
mpi_montmul( mpi *A, const mpi *B, const mpi *N, t_uint mm, const mpi *T )
{
size_t i, n, m;
t_uint u0, u1, *d;
memset( T->p, 0, T->n * ciL );
d = T->p;
n = N->n;
m = ( B->n < n ) ? B->n : n;
for( i = 0; i < n; i++ )
{
/*
* T = (T + u0*B + u1*N) / 2^biL
*/
... | false | false | false | false | false | 0 |
brcmstb_gpio_sanity_check_banks(struct device *dev,
struct device_node *np, struct resource *res)
{
int res_num_banks = resource_size(res) / GIO_BANK_SIZE;
int num_banks =
of_property_count_u32_elems(np, "brcm,gpio-bank-widths");
if (res_num_banks != num_banks) {
dev_err(dev, "Mismatch in banks: res had %d, b... | false | false | false | false | false | 0 |
eaplist_free(rlm_eap_t *inst)
{
EAP_HANDLER *node, *next;
for (node = inst->session_head; node != NULL; node = next) {
next = node->next;
eap_handler_free(inst, node);
}
inst->session_head = inst->session_tail = NULL;
} | false | false | false | false | false | 0 |
setOptions(Void) /* change command line options from Hugs command line */
{
String s;
if ((s=readFilename())!=0) {
do {
if (!processOption(s)) {
ERRMSG(0) "Option string must begin with `+' or `-'"
EEND;
}
} while ((s=readFilename())!=0);
#if USE_REGISTRY
writeRegString("Options", optio... | false | false | false | false | false | 0 |
makeStringToIgnoreCase(wchar_t *string, int len){
int i;
// Attempts to transform every letter/character of given string
for(i = 0; i < len; i++){
string[i] = makeToIgnoreCase(string[i]);
}
return string;
} | false | false | false | false | false | 0 |
cattle_tape_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
CattleTape *self = CATTLE_TAPE (object);
gchar t_char;
g_return_if_fail (!self->priv->disposed);
switch (property_id) {
ca... | false | false | false | false | false | 0 |
zip_new_info_node(gx_device_xps *xps_dev, const char *filename)
{
gx_device *dev = (gx_device *)xps_dev;
gs_memory_t *mem = dev->memory;
/* NB should use GC */
gx_device_xps_zinfo_t *info =
(gx_device_xps_zinfo_t *)gs_alloc_bytes(mem->non_gc_memory, sizeof(gx_device_xps_zinfo_t), "zinfo");
... | false | false | false | false | false | 0 |
diplo_dialog_returnkey(GtkWidget *w, gpointer data)
{
struct Diplomacy_dialog *pdialog = (struct Diplomacy_dialog *) data;
struct player *pgiver =
(struct player *) g_object_get_data(G_OBJECT(w), "plr");
int amount = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(w));
if (amount >= 0 && amount <= pgi... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
AbstractPictureService *_t = static_cast<AbstractPictureService *>(_o);
switch (_id) {
case 0: _t->searchStarted(); break;
... | false | false | false | false | false | 0 |
zend_mm_safe_error(zend_mm_heap *heap,
const char *format,
size_t limit,
#if ZEND_DEBUG
const char *filename,
uint lineno,
#endif
size_t size)
{
if (heap->reserve) {
_zend_mm_free_int(heap, heap->reserve ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC);
heap->reserve = NULL;
}
if (heap->overflow == 0) {
const c... | false | false | false | false | true | 1 |
gen7_edp_signal_levels(uint8_t train_set)
{
int signal_levels = train_set & (DP_TRAIN_VOLTAGE_SWING_MASK |
DP_TRAIN_PRE_EMPHASIS_MASK);
switch (signal_levels) {
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_0:
return EDP_LINK_TRAIN_400MV_0DB_IVB;
case DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAI... | false | false | false | false | false | 0 |
kdb_lsmod(int argc, const char **argv)
{
struct module *mod;
if (argc != 0)
return KDB_ARGCOUNT;
kdb_printf("Module Size modstruct Used by\n");
list_for_each_entry(mod, kdb_modules, list) {
if (mod->state == MODULE_STATE_UNFORMED)
continue;
kdb_printf("%-20s%8u 0x%p ", mod->name,
... | false | false | false | false | false | 0 |
operator<<(mrpt::utils::CStream &out,const mrpt::math::TObject2D &o) {
out<<static_cast<uint16_t>(o.getType());
switch (o.getType()) {
case GEOMETRIC_TYPE_POINT: {
TPoint2D p;
o.getPoint(p);
return out<<p;
};
case GEOMETRIC_TYPE_SEGMENT: {
TSegment2D s;
o.getSegment(s);
return out<<s;
};
c... | false | false | false | false | false | 0 |
find_cmd_rcvr(ipmi_smi_t intf,
unsigned char netfn,
unsigned char cmd,
unsigned char chan)
{
struct cmd_rcvr *rcvr;
list_for_each_entry_rcu(rcvr, &intf->cmd_rcvrs, link) {
if ((rcvr->netfn == netfn) && (rcvr->cmd == cmd)
&& (rcvr->chans & (1 << chan)))
return rcvr;
}
retu... | false | false | false | false | false | 0 |
prop_get_double_or(const char *name, double default_value)
{
const char *prop = prop_get(name);
double val;
return (prop && sscanf(prop, "%lg", &val)) ? val : default_value;
} | false | false | false | false | false | 0 |
expand(char *to_buffer) const {
int count = 0;
int i;
char *org_to_buffer = to_buffer;
for (i=0; i<AWT_MAX_CODONS; i++) {
if (codon[i]) {
build_codon(i, to_buffer);
to_buffer += 3;
count++;
}
}
#if defined(DEBUG) && 0
to_buffer[0] = 0;
pr... | false | false | false | false | false | 0 |
ht_bit_index_default(const gx_ht_order *porder, uint index, gs_int_point *ppt)
{
const gx_ht_bit *phtb = &((const gx_ht_bit *)porder->bit_data)[index];
uint offset = phtb->offset;
int bit = 0;
while (!(((const byte *)&phtb->mask)[bit >> 3] & (0x80 >> (bit & 7))))
++bit;
ppt->x = (offset % p... | false | false | false | false | false | 0 |
RangeTree_find_internal(RangeTree *rt,
gint x_start, gint x_length,
gint y_start, gint y_length,
RangeTree_ReportFunc rtrf, gpointer user_data){
gboolean found = FALSE;
RangeTree_Rectangle r;
g_assert(x_length >= 0);
g_assert(y_length >= 0);
... | false | false | false | false | false | 0 |
io_stats_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *buf,
struct iatt *preparent, struct iatt *postparent, dict_t *xdata)
{
UPDATE_PROFILE_STATS (frame, SYMLINK);
... | false | false | false | false | false | 0 |
removeMessages(const std::vector<size_t> &messages,
callback &cb)
{
if (!ready(cb))
return;
if (smap)
{
installForegroundTask(new smapNoopExpunge(messages, cb,
*this));
return;
}
if (!hasCapability("UIDPLUS"))
{
mail::generic::genericRemoveMessages(this, messages, cb);
return;
}
imapUI... | false | false | false | false | false | 0 |
popup_setup(ObFocusCyclePopup *p, gboolean create_targets,
gboolean refresh_targets, gboolean linear)
{
gint maxwidth, n;
GList *it;
GList *rtargets; /* old targets for refresh */
GList *rtlast;
gboolean change;
if (refresh_targets) {
rtargets = p->targets;
... | false | false | false | false | false | 0 |
nv04_update_arb(struct drm_device *dev, int VClk, int bpp,
int *burst, int *lwm)
{
struct nouveau_drm *drm = nouveau_drm(dev);
struct nvif_object *device = &nouveau_drm(dev)->device.object;
struct nv_fifo_info fifo_data;
struct nv_sim_state sim_data;
int MClk = nouveau_hw_get_clock(dev, PLL_MEMORY);
int NVClk =... | false | false | false | false | false | 0 |
analyze(tEventPtr event, long, int, int) {
// AnalysisHandler::analyze(event, ieve, loop, state);
// Rotate to CMS, extract final state particles and call analyze(particles).
// find the Z
Lorentz5Momentum p1, p2, ppair;
bool foundphotons = false;
set<tcPPtr> particles;
event->selectFinalState(inserter... | false | false | false | false | false | 0 |
visit(ir_dereference_variable *ir)
{
if (hash_table_find(locals, ir->var) == NULL) {
/* The non-function variable must be a global, so try to find the
* variable in the shader's symbol table. If the variable is not
* found, then it's a global that *MUST* be defined in the original
* shader.
*/
... | false | false | false | false | false | 0 |
qlt_24xx_send_task_mgmt_ctio(struct scsi_qla_host *ha,
struct qla_tgt_mgmt_cmd *mcmd, uint32_t resp_code)
{
struct atio_from_isp *atio = &mcmd->orig_iocb.atio;
struct ctio7_to_24xx *ctio;
uint16_t temp;
ql_dbg(ql_dbg_tgt, ha, 0xe008,
"Sending task mgmt CTIO7 (ha=%p, atio=%p, resp_code=%x\n",
ha, atio, r... | false | false | false | false | false | 0 |
ntb_slice_allocator_init(struct ntb_slice_allocator *allocator,
size_t size,
size_t alignment)
{
allocator->element_size = MAX(size, sizeof (struct ntb_slice));
allocator->element_alignment = alignment;
allocator->magazine = NULL;
ntb_sla... | false | false | false | false | false | 0 |
ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
LoadInst *LI, DIBuilder &Builder) {
DIVariable DIVar(DDI->getVariable());
if (!DIVar.Verify())
return false;
Instruction *DbgVal =
Builder.insertDbgValueIntrinsic(LI->getOperand(0), 0,
... | false | false | false | false | false | 0 |
on_close_clicked(GtkButton *button, gpointer user_data) {
if (rsync_pid) {
if (paused) kill(rsync_pid, SIGCONT);
kill(rsync_pid, SIGTERM);
gtk_widget_set_sensitive((GtkWidget*) gtk_builder_get_object(builder, "button_pause"), FALSE);
} else {
if (more) on_play_clicked(NULL, NULL); //on_rsync_show(NULL, NULL)... | false | false | false | false | false | 0 |
test_family_h5repart_opens(void)
{
hid_t file=(-1), fapl=(-1);
/* open 1st file(single member file) with correct family size(20000 byte) */
if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
goto error;
if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT)<0)
goto error;... | false | false | false | false | false | 0 |
main(int argc, char* argv[])
{
if (argc < 4) {
usage(argv[0]);
return 1;
}
// Get options:
int c;
int hexflag = 0;
while((c = getopt(argc,argv,"x")) != -1) {
switch(c) {
case 'x':
hexflag = 1;
break;
case '?':
{
usage(argv[0]);
return 1;
}
}
}
i... | false | false | false | false | false | 0 |
mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (!m_owner->isSelected()) {
event->ignore();
return;
}
InfoGraphicsView *infographics = InfoGraphicsView::getInfoGraphicsView(this);
if (infographics != NULL && infographics->spaceBarIsPressed()) {
m_spaceBarWasPressed = true;
event->ignore();
return;
... | false | false | false | false | false | 0 |
get_next_block(vfile *vf, union block *blk)
{
int res;
res = find_next_block(vf, blk);
if(res < 0)
return res;
if(res == 0) {
av_log(AVLOG_WARNING, "TAR: Broken archive");
return -EIO;
}
return 0;
} | false | false | false | false | false | 0 |
script_handler_es_statement(spif_charptr_t *params)
{
char *tmp;
if (params && *params) {
tmp = spiftool_join(" ", params);
ns_statement(TermWin.screen, tmp);
FREE(tmp);
} else {
ns_statement(TermWin.screen, NULL);
}
} | false | false | false | false | false | 0 |
soap_float2s(struct soap *soap, float n)
{ char *s;
if (soap_isnan((double)n))
return "NaN";
if (soap_ispinff(n))
return "INF";
if (soap_isninff(n))
return "-INF";
s = soap->tmpbuf;
#if defined(HAVE_SPRINTF_L)
sprintf_l(s, soap->c_locale, soap->float_format, n);
#else
sprintf(s, soap->float_form... | false | false | false | false | false | 0 |
set_up_extended_ref_temp (tree decl, tree expr, VEC(tree,gc) **cleanups,
tree *initp)
{
tree init;
tree type;
tree var;
/* Create the temporary variable. */
type = TREE_TYPE (expr);
var = make_temporary_var_for_ref_to_temp (decl, type);
layout_decl (var, 0);
/* If the rvalue is the result of a fu... | false | false | false | false | true | 1 |
cb_gnm_so_path_changed (GnmSOPath const *sop,
G_GNUC_UNUSED GParamSpec *pspec,
GnmSOPathView *group)
{
GList *ptr = GOC_GROUP (group)->children;
for (; ptr && ptr->data; ptr = ptr->next)
if (GOC_IS_PATH (ptr->data))
cb_gnm_so_path_style_changed (GOC_ITEM (ptr->data), sop);
if (sop->text != NULL && *s... | false | false | false | false | false | 0 |
print_XML_Text_expanding_links(const string& text, size_t lineNo) {
size_t found = text.find("LINK{", 0);
if (found != string::npos) {
size_t inside_link = found+5;
size_t close = text.find('}', inside_link);
if (close != string::npos) {
string link_target = text.substr(in... | false | false | false | false | false | 0 |
sca3000_ring_buf_data_available(struct iio_buffer *r)
{
return r->stufftoread ? r->watermark : 0;
} | false | false | false | false | false | 0 |
__isns_attr_list_resize(isns_attr_list_t *list, unsigned int count)
{
unsigned int max;
max = (list->ial_count + 15) & ~15;
if (count < max)
return;
count = (count + 15) & ~15;
list->ial_data = isns_realloc(list->ial_data, count * sizeof(isns_attr_t *));
if (!list->ial_data)
isns_fatal("Out of memory!\n");
... | false | false | false | false | false | 0 |
games_scores_dialog_set_style (GamesScoresDialog *self,
GamesScoreStyle style)
{
gchar *header;
self->_priv->style = style;
switch (style) {
case GAMES_SCORES_STYLE_TIME_DESCENDING:
case GAMES_SCORES_STYLE_TIME_ASCENDING:
header = "Time";
break;
case GAMES_SCORES_STYLE_PLAIN_DESCENDING:
c... | false | false | false | false | false | 0 |
hwloc_linux_foreach_proc_tid(hwloc_topology_t topology,
pid_t pid, hwloc_linux_foreach_proc_tid_cb_t cb,
void *data)
{
char taskdir_path[128];
DIR *taskdir;
pid_t *tids, *newtids;
unsigned i, nr, newnr, failed = 0, failed_errno = 0;
unsigned retrynr = 0;
int err;
if (pid)
snprintf(tas... | false | false | false | false | false | 0 |
on_entry_changed (int idx_)
{
trace_with_mask("ColorsSelectorUI::on_entry_changed",GUITRACE);
m_centry [idx_].m_button->set_color (
Gdk::Color (m_centry [idx_].m_entry->get_text ()));
} | false | false | false | false | false | 0 |
qabort_scan(struct orinoco_private *priv)
{
struct orinoco_scan_data *sd;
unsigned long flags;
sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
if (!sd)
return;
sd->len = -1; /* Abort */
spin_lock_irqsave(&priv->scan_lock, flags);
list_add_tail(&sd->list, &priv->scan_list);
spin_unlock_irqrestore(&priv->scan_lock, f... | false | false | false | false | false | 0 |
PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
{
FILE *fp;
char pgpassfile[MAXPGPATH];
struct stat stat_buf;
char *passfile_env;
#define LINELEN NAMEDATALEN*5
char buf[LINELEN];
if (dbname == NULL || strlen(dbname) == 0)
return NULL;
if (username == NULL || strlen(usernam... | false | false | false | false | false | 0 |
PackUINT32BE(len);
b->Put(str,len);
} | false | false | false | false | false | 0 |
extract_range_from_ssa_name (value_range_t *vr, tree var)
{
value_range_t *var_vr = get_value_range (var);
if (var_vr->type != VR_UNDEFINED && var_vr->type != VR_VARYING)
copy_value_range (vr, var_vr);
else
set_value_range (vr, VR_RANGE, var, var, NULL);
add_equivalence (&vr->equiv, var);
} | false | false | false | false | false | 0 |
Term_mark(int x, int y)
{
byte *old_aa = Term->old->a[y];
wchar_t *old_cc = Term->old->c[y];
byte *old_taa = Term->old->ta[y];
wchar_t *old_tcc = Term->old->tc[y];
old_aa[x] = Term->attr_blank;
old_cc[x] = Term->char_blank;
old_taa[x] = Term->attr_blank;
old_tcc[x] = Term->char_blank;
/* Check for new min/ma... | false | false | false | false | false | 0 |
svc_wait(const char *svc)
{
char file[PATH_MAX];
int fd;
bool forever = false;
RC_STRINGLIST *keywords;
struct timespec interval, timeout, warn;
/* Some services don't have a timeout, like fsck */
keywords = rc_deptree_depend(deptree, svc, "keyword");
if (rc_stringlist_find(keywords, "-timeout") ||
rc_str... | false | false | false | false | false | 0 |
clear()
{
qDeleteAll( m_lstSubMenus );
m_lstSubMenus.clear();
for ( QList<QAction *>::iterator it = m_actions.begin(), end = m_actions.end() ;
it != end ; ++it )
{
m_parentMenu->removeAction(*it);
delete *it;
}
m_parentMenu->clear();
m_actions.clear();
} | false | false | false | false | false | 0 |
evaluate(Request* request){
Request* req = request;
req->setAttributeFactory(attrfactory);
//req->make_request();
EvaluationCtx * evalctx = NULL;
evalctx = new XACMLEvaluationCtx(req);
//evaluate the request based on policy
if(evalctx)
return evaluate(evalctx);
return NULL;
} | false | false | false | false | false | 0 |
free_rx_slot(struct dln2_dev *dln2, u16 handle, int slot)
{
struct dln2_mod_rx_slots *rxs;
struct urb *urb = NULL;
unsigned long flags;
struct dln2_rx_context *rxc;
rxs = &dln2->mod_rx_slots[handle];
spin_lock_irqsave(&rxs->lock, flags);
clear_bit(slot, rxs->bmap);
rxc = &rxs->slots[slot];
rxc->in_use = fa... | false | false | false | false | false | 0 |
capi_message2cmsg(_cmsg * cmsg, _cbyte * msg)
{
memset(cmsg, 0, sizeof(_cmsg));
cmsg->m = msg;
cmsg->l = 8;
cmsg->p = 0;
byteTRcpy(cmsg->m + 4, &cmsg->Command);
byteTRcpy(cmsg->m + 5, &cmsg->Subcommand);
cmsg->par = cpars[command_2_index(cmsg->Command, cmsg->Subcommand)];
message_2_pars(cmsg);
if ( cmsg->C... | false | false | false | false | false | 0 |
state(_state_t s)
{
switch(s)
{
case notuse:
if(object)
{
gengine->free_obj(object);
object = NULL;
}
break;
case reserved:
case moving:
if(bank >= 0)
{
if(!object)
object = gengine->get_obj(ek->layer);
if(!object)
break;
if(s == moving)
cs_obj_show(object);
else
... | false | false | false | false | false | 0 |
drm_dp_update_port(struct drm_dp_mst_branch *mstb,
struct drm_dp_connection_status_notify *conn_stat)
{
struct drm_dp_mst_port *port;
int old_pdt;
int old_ddps;
bool dowork = false;
port = drm_dp_get_port(mstb, conn_stat->port_number);
if (!port)
return;
old_ddps = port->ddps;
old_pdt = port->pdt;
... | false | false | false | false | false | 0 |
start_record_layout (tree t)
{
record_layout_info rli = XNEW (struct record_layout_info_s);
rli->t = t;
/* If the type has a minimum specified alignment (via an attribute
declaration, for example) use it -- otherwise, start with a
one-byte alignment. */
rli->record_align = MAX (BITS_PER_UNIT, TYPE_... | false | false | false | false | false | 0 |
old_gameport_measure_speed(struct gameport *gameport)
{
#if defined(__i386__)
unsigned int i, t, t1, t2, t3, tx;
unsigned long flags;
if (gameport_open(gameport, NULL, GAMEPORT_MODE_RAW))
return 0;
tx = 1 << 30;
for(i = 0; i < 50; i++) {
local_irq_save(flags);
GET_TIME(t1);
for (t = 0; t < 50; t++) gam... | false | false | false | false | false | 0 |
turn_report_allocation_set(void *a, turn_time_t lifetime, int refresh)
{
if(a) {
ts_ur_super_session *ss = (ts_ur_super_session*)(((allocation*)a)->owner);
if(ss) {
const char* status="new";
if(refresh)
status="refreshed";
turn_turnserver *server = (turn_turnserver*)ss->server;
if(server) {
ioa... | true | true | false | false | false | 1 |
extract_glyphptr(const Substitute &s, uint8_t t) throw ()
{
switch (t) {
case T_GLYPH:
return const_cast<Glyph *>(&s.gid);
case T_GLYPHS:
return &s.gids[1];
default:
return 0;
}
} | false | false | false | false | false | 0 |
d_name (di)
struct d_info *di;
{
char peek = d_peek_char (di);
struct demangle_component *dc;
switch (peek)
{
case 'N':
return d_nested_name (di);
case 'Z':
return d_local_name (di);
case 'S':
{
int subst;
if (d_peek_next_char (di) != 't')
{
dc = d_substitution... | false | false | false | false | false | 0 |
get_method_type_param (MonoImage *m, guint32 blob_signature, MonoGenericContainer *container)
{
GString *res = g_string_new ("");
const char *ptr = mono_metadata_blob_heap (m, blob_signature);
int param_count;
int i = 0;
char *s;
mono_metadata_decode_value (ptr, &ptr);
ptr++;
param_count = mono_metadata_decod... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
char client[120];
char **eargv;
int i, j, k;
/* char *xterm_pre[] = { "-title", Name, "-name", Name, NULL }; */
/* x-terminal-emulator options. */
char *xterm_pre[] = { "-T", Name, NULL };
char *xterm_post[] = { "-e", NULL, NULL };
int clpid;
/* Why is this not just put in the ... | true | true | true | false | true | 1 |
tp_message_get_supersedes (TpMessage *self)
{
const gchar *token;
g_return_val_if_fail (TP_IS_MESSAGE (self), NULL);
token = tp_asv_get_string (tp_message_peek (self, 0), "supersedes");
if (tp_str_empty (token))
return NULL;
else
return token;
} | false | false | false | false | false | 0 |
parse_fieldlist (char *firstchar, FILE *fp) {
List_T fieldlist = NULL;
char Buffer[LINELENGTH], *fieldname, *p;
while ((*firstchar = fgetc(fp)) != '>') {
Buffer[0] = *firstchar;
fgets(&(Buffer[1]),LINELENGTH-1,fp);
if ((p = rindex(Buffer,'\n')) == NULL) {
fprintf(stderr,"Line %s exceeds maximum... | true | true | false | false | true | 1 |
xmt_new_parser(GF_SceneLoader *load)
{
GF_XMTParser *parser;
if ((load->type==GF_SM_LOAD_XSR) && !load->ctx) return NULL;
GF_SAFEALLOC(parser, GF_XMTParser);
parser->nodes = gf_list_new();
parser->descriptors = gf_list_new();
parser->od_links = gf_list_new();
parser->esd_links = gf_list_new();
parser->def_nodes... | false | false | false | true | false | 1 |
_pager_popup_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Event_Key *ev;
ev = event;
if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON;
if (!strcmp(ev->key, "Up"))
_pager_popup_desk_switch(0, -1);
else if (!strcmp(ev->key, "Down"))
_pager_popup_desk_... | false | false | false | false | false | 0 |
isListening() const
{
return d->backend && d->backend->state == AbstractConnectionBackend::Listening;
} | false | false | false | false | false | 0 |
logout(mailsession * session)
{
struct maildir * md;
check_folder(session);
md = get_maildir_session(session);
if (md == NULL)
return MAIL_ERROR_BAD_STATE;
maildir_free(md);
get_data(session)->md_session = NULL;
return MAIL_NO_ERROR;
} | false | false | false | false | false | 0 |
gst_auto_convert_load_factories (GstAutoConvert * autoconvert)
{
GList *all_factories;
GList *out_factories;
all_factories =
gst_registry_feature_filter (gst_registry_get (),
gst_auto_convert_default_filter_func, FALSE, NULL);
all_factories = g_list_sort (all_factories, (GCompareFunc) compare_rank... | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.