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
__i2c_bit_add_bus(struct i2c_adapter *adap, int (*add_adapter)(struct i2c_adapter *)) { struct i2c_algo_bit_data *bit_adap = adap->algo_data; int ret; if (bit_test) { ret = test_bus(adap); if (bit_test >= 2 && ret < 0) return -ENODEV; } /* register new adapter to i2c module... */ adap->algo = &i2...
false
false
false
false
false
0
show() { if( !d->sharedRenderer ) { //qDebug() << "No shared renderer set!"; return; } if( d->widget && d->widget->rect() != d->widgetRect ) { d->widgetRect = d->widget->rect(); d->scene->setSceneRect( d->widget->rect() ); d->view->setFixedSize( d->widget->siz...
false
false
false
false
false
0
gog_outlined_view_size_request (GogView *v, GogViewRequisition const *available, GogViewRequisition *req) { GogOutlinedObject *goo = GOG_OUTLINED_OBJECT (v->model); double outline = gog_renderer_line_size (v->renderer, goo->base.style->line.width); double is_outline_visible = go_style_is_outline_visib...
false
false
false
false
false
0
xc2028_get_frequency(struct dvb_frontend *fe, u32 *frequency) { struct xc2028_data *priv = fe->tuner_priv; int rc; tuner_dbg("%s called\n", __func__); rc = check_device_status(priv); if (rc < 0) return rc; *frequency = priv->frequency; return 0; }
false
false
false
false
false
0
oo_dash (GsfXMLIn *xin, xmlChar const **attrs) { OOParseState *state = (OOParseState *)xin->user_state; GOLineDashType t = GO_LINE_DOT; char const *name = NULL; gnm_float distance = 0., len_dot1 = 0., len_dot2 = 0.; int n_dots1 = 0, n_dots2 = 2; gboolean found_percent; for (; attrs != NULL && attrs[0] && attrs[...
false
false
false
false
false
0
window_configure_event_cb (GtkWidget *widget, GdkEventConfigure *event, WindowState *state) { if (!state->is_maximised && !state->is_fullscreen && (state->width != event->width || state->height != event->height)) { state->width = event->width; state-...
false
false
false
false
false
0
r200Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode ) { r200ContextPtr rmesa = R200_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint oldfallback = rmesa->radeon.Fallback; if (mode) { rmesa->radeon.Fallback |= bit; if (oldfallback == 0) { radeon_firevertices(&rmesa->radeon...
false
false
false
false
false
0
test_multiply_integer (void) { { gint a; a = -10; { gboolean _tmp0_; _tmp0_ = TRUE; while (TRUE) { gboolean _tmp1_; gint _tmp3_; _tmp1_ = _tmp0_; if (!_tmp1_) { gint _tmp2_; _tmp2_ = a; a = _tmp2_ + 1; } _tmp0_ = FALSE; _tmp3_ = a; if (!(_tmp3_ <= 10)) { ...
false
false
false
false
false
0
nxt200x_init(struct dvb_frontend* fe) { struct nxt200x_state* state = fe->demodulator_priv; int ret = 0; if (!state->initialised) { switch (state->demod_chip) { case NXT2002: ret = nxt2002_init(fe); break; case NXT2004: ret = nxt2004_init(fe); break; default: return -EINVAL; break...
false
false
false
false
false
0
AndAssign(BitString *bsl,BitString *bsr) { size_t len,i; if (bsl == NULL || bsr == NULL) { return NullPtrError("AndAssign"); } len = (bsl->count < bsr->count) ? bsl->count : bsr->count; len = BYTES_FROM_BITS(len); for (i=0; i<len;i++) { bsl->contents[i] &= bsr->contents[i]; } if (len&(CHAR_BIT-1)) { unsi...
false
false
false
false
false
0
htm_spr_reg_operand_1 (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) #line 242 "../../src/gcc/config/rs6000/predicates.md" { if (!TARGET_HTM) return 0; if (GET_CODE (op) == SUBREG) op = SUBREG_REG (op); if (!REG_P (op)) return 0; switch (REGNO (op)) { case TFHAR_REGNO: case TFI...
false
false
false
false
false
0
martchmp_sprite_callback(int *code, int *color, int *priority) { int c = *color; // Bit8 & 9 are effect attributes. It is not known whether the effects are generated by external logic. if ((c & 0x3ff) == 0x11f) *color = K055555_FULLSHADOW; else *color = sprite_colorbase | (c & 0x1f); if (oinprion &...
false
false
false
false
false
0
get_command(param_t *p, char *command, char *params, FILE *io) { int i, j; char line[MAXLINESIZE]; if (!get_line(p, line, io)) return FALSE; i = 0; while (isspace(line[i])) i++; if (line[i] == '$') strcpy(command, "$"); else { j = 0; while (line[i]...
true
true
false
false
true
1
get_value() { const char *result = NULL; int valid = section_valid(0); if (valid) result = cursor_.getValue(0); return result; }
false
false
false
false
false
0
eb_info_window_add_info(eb_account *remote_account, gchar *text, gint ignore_bg, gint ignore_fg, gint ignore_font) { gchar msg[1024]; gchar *valid_end; strncpy(msg, text, 1023); if (!g_utf8_validate(msg, -1, (const gchar **)&valid_end)) { *valid_end = '\0'; strncat(msg, _ ("<font color=red> (Invalid U...
false
false
false
false
false
0
set_indent(size, delete) register int size; int delete; { int oldstate = State; register int c; State = INSERT; /* don't want REPLACE for State */ curwin->w_cursor.col = 0; if (delete) /* delete old indent */ { while ((c = gchar_cursor()), iswhite(c)) (void)delchar(FALSE); } if (!curbuf->b_p_e...
false
false
false
false
false
0
cursorKeyEvent(Qt::KeyboardModifiers modifiers) { if (m_dragEnd || m_dragCurve) return; InfoGraphicsView * infoGraphicsView = InfoGraphicsView::getInfoGraphicsView(this);; if (infoGraphicsView) { QPoint p = infoGraphicsView->mapFromGlobal(QCursor::pos()); QPointF r = infoGraphicsView->mapToScene(p); // DebugD...
false
false
false
false
false
0
accumulate_thread(void *arg) { struct VSM_data *vd = arg; int i; for (;;) { i = VSL_Dispatch(vd, h_hist, vd); if (i < 0) break; if (i == 0) usleep(50000); } return (arg); }
false
false
false
false
false
0
hexdump(char *buffer, int len) { int i; FILE *fp = stdout; for(i = 0; i < len; i++){ if(i != 0){ if(i % 16 == 0){ fprintf(fp, "\n"); }else{ fprintf(fp, " "); } } fprintf(fp, "0x%02x", buffer[i] & 0xff); }...
false
false
false
false
false
0
__txn_remrem(env, txn, name) ENV *env; DB_TXN *txn; const char *name; { TXN_EVENT *e, *next_e; for (e = TAILQ_FIRST(&txn->events); e != NULL; e = next_e) { next_e = TAILQ_NEXT(e, links); if (e->op != TXN_REMOVE || strcmp(name, e->u.r.name) != 0) continue; TAILQ_REMOVE(&txn->events, e, links); __os_free...
false
false
false
false
false
0
ktest_equal_sam_challenge_2_body(krb5_sam_challenge_2_body *ref, krb5_sam_challenge_2_body *var) { int p = TRUE; if (ref == var) return TRUE; else if (ref == NULL || var == NULL) return FALSE; p = p && scalar_equal(sam_type); p = p && scalar_equal(sam_flags); p =...
false
false
false
false
false
0
send_apathetic_reply(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int command, int ts, unsigned char seqno, int sockfd, struct iax_ie_data *ied) { struct { struct ast_iax2_full_hdr f; struct iax_ie_data ied; } data; size_t size = sizeof(struct ast_iax2_full_hdr); if (ied) { siz...
false
true
false
false
false
1
gg_pubdir50_new(int type) { gg_pubdir50_t res = malloc(sizeof(struct gg_pubdir50_s)); gg_debug(GG_DEBUG_FUNCTION, "** gg_pubdir50_new(%d);\n", type); if (!res) { gg_debug(GG_DEBUG_MISC, "// gg_pubdir50_new() out of memory\n"); return NULL; } memset(res, 0, sizeof(struct gg_pubdir50_s)); res->type = type; ...
false
false
false
false
false
0
xattr_unlink(struct inode *dir, struct dentry *dentry) { int error; BUG_ON(!mutex_is_locked(&dir->i_mutex)); mutex_lock_nested(&d_inode(dentry)->i_mutex, I_MUTEX_CHILD); error = dir->i_op->unlink(dir, dentry); mutex_unlock(&d_inode(dentry)->i_mutex); if (!error) d_delete(dentry); return error; }
false
false
false
false
false
0
strhash_get_next (StringHashPtr hash, char **key_return, int *keylen_return, void **data_return) { if (!hash || !key_return || !keylen_return || !data_return) return 0; for (; hash->next_idx < HASH_SIZE; hash->next_idx++) { if (hash->next_item == NULL) hash->next_item = hash->hash_table[hash->ne...
false
false
false
false
false
0
gst_flups_demux_scan_backward_ts (GstFluPSDemux * demux, guint64 * pos, SCAN_MODE mode, guint64 * rts, gint limit) { GstFlowReturn ret = GST_FLOW_OK; GstBuffer *buffer; guint64 offset = *pos; gboolean found = FALSE; guint64 ts = 0; guint scan_sz = (mode == SCAN_SCR ? SCAN_SCR_SZ : SCAN_PTS_SZ); guint ...
false
false
false
false
false
0
ItemValuesMatch ( const XMP_Node * leftNode, const XMP_Node * rightNode ) { const XMP_OptionBits leftForm = leftNode->options & kXMP_PropCompositeMask; const XMP_OptionBits rightForm = leftNode->options & kXMP_PropCompositeMask; if ( leftForm != rightForm ) return false; if ( leftForm == 0 ) { // Simple no...
false
false
false
false
false
0
qzerof(float x) { const float *p,*q; float s,r,z; int32_t ix; GET_FLOAT_WORD(ix,x); ix &= 0x7fffffff; if(ix>=0x41000000) {p = qR8; q= qS8;} else if(ix>=0x409173eb){p = qR5; q= qS5;} else if(ix>=0x4036d917){p = qR3; q= qS3;} else {p = qR2; q= qS2;} /* ix>=0x40000000 */ z = one/(x*x); r =...
false
false
false
false
false
0
irmo_change_atom_length(IrmoChangeAtom *atom) { IrmoObject *obj = atom->object; IrmoClass *klass = obj->objclass; size_t len; unsigned int i; len = 0; // object class len += 1; // object id len += 2; // leading b...
false
false
false
false
false
0
clutter_model_real_get_n_columns (ClutterModel *model) { ClutterModelPrivate *priv = model->priv; if (priv->n_columns < 0) return 0; return priv->n_columns; }
false
false
false
false
false
0
main_hall_campaign_cheat() { char *ret = popup_input(0, XSTR("Enter mission name.\n\n* This will destroy all legitimate progress in this campaign. *", 1605)); // yay if (ret != NULL) { mission_campaign_jump_to_mission(ret); } }
false
false
false
false
false
0
gr_opengl_cleanup(int minimize) { if ( !GL_initted ) { return; } if ( !Fred_running ) { gr_reset_clip(); gr_clear(); gr_flip(); gr_clear(); gr_flip(); gr_clear(); } GL_initted = false; opengl_tcache_flush(); #ifdef _WIN32 HWND wnd = (HWND)os_get_window(); if (GL_render_context) { if ( !wgl...
false
false
false
false
false
0
initCIELabConversion(TIFFRGBAImage* img) { static const char module[] = "initCIELabConversion"; float *whitePoint; float refWhite[3]; if (!img->cielab) { img->cielab = (TIFFCIELabToRGB *) _TIFFmalloc(sizeof(TIFFCIELabToRGB)); if (!img->cielab) { TIFFErrorExt(img->tif->tif_clientdata, m...
false
false
false
false
false
0
clGetPlatformIDs( cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms) { DEBUG("clGetPlatformIDs called\n"); if( ((num_entries == 0) && (platforms != NULL)) || ((num_platforms == NULL) && (platforms == NULL)) ) return CL_INVALID_VALUE; if(platforms){ platforms[0]...
false
false
false
false
false
0
recompute_score(void) { int obj; tscore-=objscore; objscore=0; nounloop(obj) if (noun[obj].points && !noun[obj].unused && ( visible(obj+first_noun) || is_within(obj+first_noun,treas_room,0) ) ) objscore+=noun[obj].points; creatloop(obj) if (!creature[obj].unused && creature[obj].points ...
false
false
false
false
false
0
dumpHeightMap(){ int i,j,k=0; float init_scale_factor = 0.5; int center_factor = (this->side_size-1)/2; for (j=0; j<this->side_size; j++){ for (i=0; i<this->side_size; i++){ cout << i << ", " << j << ": " << terrain[i][j] << "\t\t\t"; } cout << endl; } }
false
false
false
false
false
0
read_flag (cpp_reader *pfile, unsigned int last) { const cpp_token *token = _cpp_lex_token (pfile); if (token->type == CPP_NUMBER && token->val.str.len == 1) { unsigned int flag = token->val.str.text[0] - '0'; if (flag > last && flag <= 4 && (flag != 4 || last == 3) && (flag != 2 || last == ...
false
false
false
false
false
0
pdf_array_put(pdf_obj *obj, int i, pdf_obj *item) { RESOLVE(obj); if (!obj) return; /* Can't warn :( */ if (obj->kind != PDF_ARRAY) fz_warn(obj->ctx, "assert: not an array (%s)", pdf_objkindstr(obj)); else if (i < 0) fz_warn(obj->ctx, "assert: index %d < 0", i); else if (i >= obj->u.a.len) fz_warn(obj->ct...
false
false
false
false
false
0
group_delete_group (rp_group *g) { if (list_empty (&(g->mapped_windows)) && list_empty (&(g->unmapped_windows))) { /* don't delete the last group */ if (list_size (&rp_groups) == 1) return GROUP_DELETE_LAST_GROUP; /* we can safely delete the group */ if (g == rp_current_grou...
false
false
false
false
false
0
append(NOTICE& n) { if (!remove_dups(n)) { return false; } if (notices.empty()) { n.seqno = 1; } else { n.seqno = notices.front().seqno + 1; } if (log_flags.notice_debug) { msg_printf(0, MSG_INFO, "[notice] appending notice %d: %s", n.seqno...
false
false
false
false
false
0
ScaleMatrix(Float scale, unsigned int matrixIndex) { /* check for no scaling */ if( scale == 1.0 ) { return; } unsigned int i; unsigned int j; for( i = 0; i < m_Order; i++ ) { for( j = 0; j < m_Order; j++ ) { this->SetMatrixValue(i, j, scale * GetMatrixValue(i, j, matrixIndex)...
false
false
false
false
false
0
ParsePercentageChunk() { Discreet3DS::Chunk chunk; ReadChunk(&chunk); if (Discreet3DS::CHUNK_PERCENTF == chunk.Flag) return stream->GetF4(); else if (Discreet3DS::CHUNK_PERCENTW == chunk.Flag) return (float)((uint16_t)stream->GetI2()) / (float)0xFFFF; return get_qnan(); }
false
false
false
false
false
0
reason(Solver& s, Literal p, LitVec& r) { assert(active_ != NOT_ACTIVE); Literal x; uint32 stop = !isWeight() ? up_ : s.reasonData(p); assert(stop <= up_); for (uint32 i = undoStart(); i != stop; ++i) { UndoInfo u = undo_[i]; // Consider only lits that are relevant to the active constraint if (u.constraint()...
false
false
false
false
false
0
QuestAccept_npc_dashel_stonefist(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT8) { pCreature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_COMBAT_STOP | TEMPFACTION_RESTORE_RESPAWN); pCreature->AI()->AttackStart(pPlaye...
false
false
false
false
false
0
srcId(const ValueRef *src, const int pos) { code[pos / 32] |= (src ? SDATA(*src).id : GK110_GPR_ZERO) << (pos % 32); }
false
false
false
false
false
0
cik_irq_init(struct radeon_device *rdev) { int ret = 0; int rb_bufsz; u32 interrupt_cntl, ih_cntl, ih_rb_cntl; /* allocate ring */ ret = r600_ih_ring_alloc(rdev); if (ret) return ret; /* disable irqs */ cik_disable_interrupts(rdev); /* init rlc */ ret = cik_rlc_resume(rdev); if (ret) { r600_ih_ring_fi...
false
false
false
false
false
0
invalidate_tex_image_error_check(struct gl_context *ctx, GLuint texture, GLint level, const char *name) { /* The GL_ARB_invalidate_subdata spec says: * * "If <texture> is zero or is not the name of a texture, the error * INVALID_VALUE is generated." * * Th...
false
false
false
false
false
0
luffa3_close(sph_luffa224_context *sc, unsigned ub, unsigned n, void *dst, unsigned out_size_w32) { unsigned char *buf, *out; size_t ptr; unsigned z; int i; DECL_STATE3 buf = sc->buf; ptr = sc->ptr; z = 0x80 >> n; buf[ptr ++] = ((ub & -z) | z) & 0xFF; memset(buf + ptr, 0, (sizeof sc->buf) - ptr); READ_STAT...
false
false
false
false
false
0
xmms_xform_this_peek (xmms_xform_t *xform, gpointer buf, gint siz, xmms_error_t *err) { while (xform->buffered < siz) { gint res; if (xform->buffered + READ_CHUNK > xform->buffersize) { xform->buffersize *= 2; xform->buffer = g_realloc (xform->buffer, xform->buffersize); } res = x...
false
false
false
false
false
0
hook( GameMap& gamemap ) { gamemap.tasks = new TaskContainer( &gamemap ); }
false
false
false
false
false
0
check(char *a) { int i; int divisors[] = {2,3,5,7,11,13,17}; for (i = 1; i < 8; i++) { int n = a[i]*100 + a[i+1]*10 + a[i+2]; if (n % divisors[i-1] != 0) { return false; } } return true; }
false
false
false
false
false
0
flatten(Scope *sc) { Statements *a = statement ? statement->flatten(sc) : NULL; if (a) { for (size_t i = 0; i < a->dim; i++) { Statement *s = (*a)[i]; s = new DebugStatement(loc, s); (*a)[i] = s; } } return a; }
false
false
false
false
false
0
EvaluateParams(PreparedStatement *pstmt, List *params, const char *queryString, EState *estate) { Oid *param_types = pstmt->plansource->param_types; int num_params = pstmt->plansource->num_params; int nparams = list_length(params); ParseState *pstate; ParamListInfo paramLI; List *exprstates; Lis...
false
false
false
false
false
0
timer_in(int us, timer_cb cb, void *arg) { struct timer *t = xmalloc(sizeof(*t)); struct timer *p = &_state.s_timers; int s; memset(t, 0, sizeof(*t)); t->t_cb = cb; t->t_arg = arg; t->t_tv = _state.s_now; t->t_tv.tv_usec += us; s = t->t_tv.tv_usec / (1000 * 1000); t->t_tv.tv_sec += s; t->t_tv.tv_usec ...
false
false
false
false
false
0
GC_ignore_self_finalize_mark_proc(p) ptr_t p; { hdr * hhdr = HDR(p); word descr = hhdr -> hb_descr; ptr_t q, r; ptr_t scan_limit; ptr_t target_limit = p + WORDS_TO_BYTES(hhdr -> hb_sz) - 1; if ((descr & GC_DS_TAGS) == GC_DS_LENGTH) { scan_limit = p + descr - sizeof(word); } else ...
false
false
false
false
false
0
load_identity_key(void) { file_status_t status = file_status(identity_key_file); FILE *f; if (make_new_id) { open_file_t *open_file = NULL; RSA *key; if (status != FN_NOENT) { log_err(LD_GENERAL, "--create-identity-key was specified, but %s " "already exists.", identity_key_file);...
false
false
false
false
true
1
svg_post_process_href(GF_SVG_Parser *parser, XMLRI *iri) { GF_Err e; /*keep data when encoding*/ if ( !(parser->load->flags & GF_SM_LOAD_FOR_PLAYBACK)) return; /*unresolved, queue it...*/ if ((iri->type==XMLRI_ELEMENTID) && !iri->target && iri->string) { gf_list_add(parser->defered_hrefs, iri); } if (iri->typ...
false
false
false
false
false
0
cg_state_place(const cst_item *p) { float start, end; int this; start = (float)ffeature_int(p,"R:mcep_link.parent.daughter1.frame_number"); end = (float)ffeature_int(p,"R:mcep_link.parent.daughtern.frame_number"); this = item_feat_int(p,"frame_number"); if ((end-start) == 0.0) return flo...
false
false
false
false
false
0
vprbrd_gpiob_direction_input(struct gpio_chip *chip, unsigned offset) { int ret; struct vprbrd_gpio *gpio = container_of(chip, struct vprbrd_gpio, gpiob); struct vprbrd *vb = gpio->vb; gpio->gpiob_out &= ~(1 << offset); mutex_lock(&vb->lock); ret = vprbrd_gpiob_setdir(vb, offset, 0); mutex_unlock(&vb->...
false
false
false
false
false
0
qr_eq_cost(const Operand* op0, const Operand* op1, const Operand* op2) { int cost; int eq_int_cost, eq_real_cost, eq_double_cost; int eq_logical_cost, eq_char_cost; #ifdef OUTPUT_TBL_OP_NAME printf("operator name: %s\n",ope_cost_tbl[EQ].operator_name); #endif eq_int_cost = ...
false
false
false
false
false
0
ocrdma_set_create_qp_ird_cmd(struct ocrdma_create_qp_req *cmd, struct ocrdma_qp *qp) { struct ocrdma_pd *pd = qp->pd; struct ocrdma_dev *dev = get_ocrdma_dev(pd->ibpd.device); struct pci_dev *pdev = dev->nic_info.pdev; dma_addr_t pa = 0; int ird_page_size = dev->attr.ird_page_size; int ird_q_len = dev->attr....
false
false
false
false
false
0
SetFormula(string molFormula) { string attr = "Formula"; OBPairData *dp = (OBPairData *) GetData(attr); if (dp == NULL) { dp = new OBPairData; dp->SetAttribute(attr); } dp->SetValue(molFormula); // typically file input, but this needs to be revisited dp->SetOrigin(...
false
false
false
false
false
0
getRB(uint32_t insn) { if (!getMBlazeRegisterFromNumbering((insn>>11)&0x1F)) return UNSUPPORTED; return getMBlazeRegisterFromNumbering((insn>>11)&0x1F); }
false
false
false
false
false
0
sscop_idle_exp(void *user) { SSCOP_DSC *dsc = user; diag(COMPONENT,DIAG_DEBUG,"Timer IDLE has expired"); dsc->timer_idle = NULL; START_TIMER(noresp); sscop_common_exp(user); }
false
false
false
false
false
0
riello_comm_setup(const char *port) { BYTE length; upsdebugx(2, "set baudrate 9600"); ser_set_speed(upsfd, device_path, B9600); upsdebugx(2, "try to detect SENTR"); riello_init_serial(); bufOut[0] = 192; ser_send_buf(upsfd, bufOut, 1); riello_serialcomm(&bufIn[0], DEV_RIELLOSENTRY); if (buf_ptr_length == ...
false
false
false
false
false
0
long_add(PyLongObject *v, PyLongObject *w) { PyLongObject *a, *b, *z; CONVERT_BINOP((PyObject *)v, (PyObject *)w, &a, &b); if (a->ob_size < 0) { if (b->ob_size < 0) { z = x_add(a, b); if (z != NULL && z->ob_size != 0) z->ob_size = -(z->ob_size); } ...
false
false
false
false
false
0
new_fileinfo(int fd) { int oldsize = G__.fileinfo_count; int newsize = oldsize; int i; if (fd < oldsize) return &G__.fileinfo[fd]; newsize *= 2; if (newsize <= fd) newsize = fd + 20; G__.fileinfo = G_realloc(G__.fileinfo, newsize * sizeof(struct fileinfo)); /* Mark all cell files a...
false
false
false
false
false
0
uiherror(struct uih_context *c) { if (noiselevel < ERRORS) return; if (!gc) { uih_printmessages(c); } else uih_error(gc, uih->errstring); }
false
false
false
false
false
0
server_create(void) { gypsy_device_create_failed = FALSE; DEBUG(GYPSY_SERVER": Create"); dbus_g_proxy_begin_call(server_proxy, "Create", server_create_notify, NULL, NULL, G_TYPE_STRING, gypsy_device, G_TYPE_INVALID); }
false
false
false
false
false
0
jitter_buffer_ctl(JitterBuffer *jitter, int request, void *ptr) { int count, i; switch(request) { case JITTER_BUFFER_SET_MARGIN: jitter->buffer_margin = *(spx_int32_t*)ptr; break; case JITTER_BUFFER_GET_MARGIN: *(spx_int32_t*)ptr = jitter->buffer_margin; break; ...
false
false
false
false
false
0
replace_rvalue(ir_rvalue **rvalue) { if (!*rvalue) return; ir_dereference *deref = (*rvalue)->as_dereference(); if (!deref) return; replace_deref(&deref); *rvalue = deref; }
false
false
false
false
false
0
cli_cmd_peer_probe_cbk (struct cli_state *state, struct cli_cmd_word *word, const char **words, int wordcount) { int ret = -1; rpc_clnt_procedure_t *proc = NULL; call_frame_t *frame = NULL; dict_t *dict = NULL; ...
true
true
false
false
false
1
lookup_or_create_assertion_key (GkmAssertion *assertion) { GBytes *key; key = lookup_assertion_key (assertion); if (key == NULL) { key = create_assertion_key (gkm_assertion_get_purpose (assertion), gkm_assertion_get_peer (assertion)); g_object_set_qdata_full (G_OBJECT (assertion), ...
false
false
false
false
false
0
dirvote_add_signatures(const char *detached_signatures_body, const char *source, const char **msg) { if (pending_consensuses[FLAV_NS].consensus) { log_notice(LD_DIR, "Got a signature from %s. " "Adding it to the pending consensus.", source); ...
false
false
false
false
false
0
mouseMoveEvent(QMouseEvent *e) { // Drag color object if (!(e->buttons() & Qt::LeftButton)) return; KColorMimeData::createDrag(d->color, this)->start(); }
false
false
false
false
false
0
L80__WINDOW_OPEN__dwtrans() {register object *base=vs_base; register object *sup=base+VM80; VC80 vs_check; {object V395; V395=(base[0]); vs_top=sup; goto TTL; TTL:; base[1]= (((object)VV[5])->s.s_dbind); base[2]= CMPcadr((V395)); vs_top=(vs_base=base+1)+2; (void) (*Lnk204)(); vs_top=sup; base[1]= (((object)...
false
false
false
false
false
0
line_end(int point) { char *nl = strchr(rl_line_buffer + point, '\n'); if (!nl) return rl_end; return nl - rl_line_buffer; }
false
false
false
false
false
0
top_down_code (NODE_T * code_p) { NODE_T *edoc_p = top_down_series (NEXT (code_p)); if (edoc_p == NO_NODE || ISNT (edoc_p, EDOC_SYMBOL)) { diagnostic_node (A68_SYNTAX_ERROR, code_p, ERROR_KEYWORD); longjmp (top_down_crash_exit, 1); return (NO_NODE); } else { make_sub (code_p, edoc_p, CODE_SYMBOL);...
false
false
false
false
false
0
mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin, unsigned int flags, struct irq_alloc_info *info) { int irq; bool legacy = false; struct irq_alloc_info tmp; struct mp_chip_data *data; struct irq_domain *domain = mp_ioapic_irqdomain(ioapic); if (!domain) return -ENOSYS; if (idx >= 0 && test_bi...
false
false
false
false
false
0
setDifference (Tree A, Tree B) { if (isNil(A)) return A; if (isNil(B)) return A; if (hd(A) == hd(B)) return setDifference(tl(A),tl(B)); if (hd(A) < hd(B)) return cons(hd(A), setDifference(tl(A),B)); /* (hd(A) > hd(B)*/ return setDifference(A,tl(B)); }
false
false
false
false
false
0
ddf_ImplicitLinearity(ddf_MatrixPtr M, ddf_rowrange itest, ddf_Arow certificate, ddf_ErrorType *error) /* 092 */ { /* Checks whether the row itest is implicit linearity for the representation. All linearity rows are not checked and considered non implicit linearity (ddf_FALSE). This code works for both...
false
false
false
false
false
0
attach_phase_attrs (Agraph_t * g, int maxphase) { Agsym_t* rk = agnodeattr(g,"rank",""); Agsym_t* order = agnodeattr(g,"order",""); Agnode_t* n; char buf[BUFSIZ]; for (n = agfstnode(g); n; n = agnxtnode(g,n)) { if (maxphase >= 1) { sprintf(buf, "%d", ND_rank(n)); ag_xset(n,rk,buf); } i...
true
true
false
false
false
1
handle_conic_to (FT_Vector *control, FT_Vector *to, void *data) { struct QefFT2_Outline_Decompose_Extra_ *extra = data; double x = QEFFT2_NUM(to->x), y = QEFFT2_NUM(to->y); double cx = QEFFT2_NUM(control->x), cy = QEFFT2_NUM(control->y); QEFFT2_CALL_PREP QEFFT2_PUSH_DNUM(x) QEFFT2_PUSH_DNUM(y) ...
false
false
false
false
false
0
output_50 (rtx *operands ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED) { { if (find_reg_note (insn, REG_UNUSED, operands[3])) return "divxs.b\t%X2,%T0"; else return "divxs.b\t%X2,%T0\n\tmov.b\t%t0,%s3"; } }
false
false
false
false
false
0
list_truncate(List *list, int new_size) { ListCell *cell; int n; if (new_size <= 0) return NIL; /* truncate to zero length */ /* If asked to effectively extend the list, do nothing */ if (new_size >= list_length(list)) return list; n = 1; foreach(cell, list) { if (n == new_size) { cell->nex...
false
false
false
false
false
0
NextFrame() { if (!IsPlaying()) return -1; if (lockThreads("NextFrame") == 0) { drawFrame(); unlockThreads(); } return 0; }
false
false
false
false
false
0
cirrusfb_sync(struct fb_info *info) { struct cirrusfb_info *cinfo = info->par; if (!is_laguna(cinfo)) { while (vga_rgfx(cinfo->regbase, CL_GR31) & 0x03) cpu_relax(); } return 0; }
false
false
false
false
false
0
requestPixmap( quint32 id, bool faceUp ) { if ( !theme.isValid() || !currentCardSize.isValid() ) return QPixmap(); QString elementId = q->elementName( id, faceUp ); QHash<QString,CardElementData> & index = faceUp ? frontIndex : backIndex; QHash<QString,CardElementData>::iterator it = index.fin...
false
false
false
false
false
0
keyRemove(Key *key) { if (!key) return -1; key->flags |= KEY_FLAG_REMOVE; key->flags |= KEY_FLAG_SYNC; return 1; }
false
false
false
false
false
0
winfilteradd(GtkFileChooser *dialog, const char *name, const char *pattern) { gchar **patterns; gint i; GtkFileFilter *filter = gtk_file_filter_new(); gtk_file_filter_set_name(filter, name); patterns = g_strsplit(pattern, ";", -1); for(i = 0; patterns[i] != NULL; i++) gtk_fil...
false
false
false
false
false
0
AdjustLayout() { // Try to modify the layout as little as possible - but if that's // impossible, redo the layout as necessary. int row = -1; int i, j; for(i=0; i<(int)mChildArray.GetCount(); i++) { if (mRowArray[i] > row) { row = mRowArray[i]; bool success = ExpandRow(row); ...
false
false
false
false
false
0
sysioctl(fd, arequest, arg) I fd; A arequest; I arg; { unsigned long request; #ifdef LEXABUG { static int init = 1; if (init) init = initIoctlTable(); } #endif if (SymbolToEnum(IoctlEnums, arequest, &request)) { (void)pa((V)arequest); q = ERR_DOMAIN; R 0; } else R (I)ioctl((int)f...
false
false
false
false
false
0
geneve_create_sock(struct net *net, bool ipv6, __be16 port, u32 flags) { struct socket *sock; struct udp_port_cfg udp_conf; int err; memset(&udp_conf, 0, sizeof(udp_conf)); if (ipv6) { udp_conf.family = AF_INET6; udp_conf.ipv6_v6only = 1; udp_conf.use_udp6_rx_checksums = !(flags & GENEVE_F_UDP_...
false
false
false
false
false
0
cr_input_set_end_of_line (CRInput * a_this, gboolean a_eol) { g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR); PRIVATE (a_this)->end_of_line = a_eol; return CR_OK; }
false
false
false
false
false
0
reserve_memtype(u64 start, u64 end, enum page_cache_mode req_type, enum page_cache_mode *new_type) { struct memtype *new; enum page_cache_mode actual_type; int is_range_ram; int err = 0; BUG_ON(start >= end); /* end is exclusive */ if (!pat_enabled()) { /* This is identical to page table setting without...
false
false
false
false
false
0
p_hdf_init (PyObject *self, PyObject *args) { HDF *hdf = NULL; NEOERR *err; err = hdf_init (&hdf); if (err) return p_neo_error (err); return p_hdf_to_object (hdf, 1); }
false
false
false
false
false
0
get_glob_token() { if (peeked_) { // un-peek cur_ = tok_.str; peeked_ = false; } read_token(true); return tok_; }
false
false
false
false
false
0
_list_delete_feature (void *feature_entry) { struct features_record *feature_ptr = (struct features_record *) feature_entry; xassert(feature_ptr); xassert(feature_ptr->magic == FEATURE_MAGIC); xfree (feature_ptr->name); FREE_NULL_BITMAP (feature_ptr->node_bitmap); xfree (feature_ptr); }
false
false
false
false
false
0
gretl_bundle_get_data (gretl_bundle *bundle, const char *key, GretlType *type, int *size, int *err) { void *ret = NULL; if (bundle == NULL) { if (err != NULL) { *err = E_DATA; } } else { gpointer p = g_hash_table_lookup(bundle->ht, key); if (p != NULL) { bundled_item *item = p; ...
false
false
false
false
false
0
eb_read_all(file, buffer, length) int file; char *buffer; size_t length; { char *buffer_p = buffer; ssize_t rest_length = length; ssize_t n; while (0 < rest_length) { errno = 0; n = read(file, buffer_p, (size_t)rest_length); if (n < 0) { if (errno == EINT...
false
false
false
false
false
0