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
draw_trail_real (int c, a_dir8_pair s, a_pixel* dest, unsigned char fixe) { const a_sprite *spr; int d = 0; if (fixe) { if (s & 1) d = player[c].d.h.l / 5462; else d = player[c].d.h.l / 6554; } spr = trails[s][d]; draw_sprglenz_custom (spr, dest, glenz[c + 2]); }
false
false
false
false
false
0
pty_check(int argc, VALUE *argv, VALUE self) { VALUE pid, exc; pid_t cpid; int status; rb_scan_args(argc, argv, "11", &pid, &exc); cpid = rb_waitpid(NUM2PIDT(pid), &status, WNOHANG|WUNTRACED); if (cpid == -1 || cpid == 0) return Qnil; if (!RTEST(exc)) return rb_last_status_get(); raise...
false
false
false
false
false
0
delete_range_handler (GtkTextBuffer *buffer, GtkTextIter *start, GtkTextIter *end, GtkSourceUndoManagerDefault *um) { GtkSourceUndoAction undo_action; GtkTextIter insert_iter; GtkTextIter selstart; GtkTex...
false
false
false
false
false
0
geda_list_remove( GedaList *list, gpointer item ) { if (g_list_find(list->glist, item) == NULL) return; list->glist = g_list_remove(list->glist, item); g_signal_emit( list, geda_list_signals[ CHANGED ], 0 ); }
false
false
false
false
false
0
set_ext_copy(int *copy_type, const char *arg) { if (!strcasecmp(arg, "none")) *copy_type = EXT_COPY_NONE; else if (!strcasecmp(arg, "copy")) *copy_type = EXT_COPY_ADD; else if (!strcasecmp(arg, "copyall")) *copy_type = EXT_COPY_ALL; else return 0; return 1; }
false
false
false
false
false
0
gkrellm_panel_button_signals_connect(GkrellmPanel *p) { /* I want DecalButton event handlers to be called before any monitor | handlers, but DecalButtons will be recreated at theme changes and | thus its handlers will be after panel handlers. So, connect to | "event" which is called first, and check for the rig...
false
false
false
false
false
0
rtx_for_function_call (tree fndecl, tree addr) { rtx funexp; /* Get the function to call, in the form of RTL. */ if (fndecl) { if (!TREE_USED (fndecl) && fndecl != current_function_decl) TREE_USED (fndecl) = 1; /* Get a SYMBOL_REF rtx for the function address. */ funexp = XEXP (DECL_RTL...
false
false
false
false
false
0
makeSequence(Node *e) { if (Sequence != e->type) { Node *node= newNode(Sequence); assert(e); assert(!e->any.next); node->sequence.first= node->sequence.last= e; return node; } return e; }
false
false
false
false
false
0
dumpChanG (channel* cp, int v) { int k; intitem* ip; Dt_t* adj; if (cp->cnt < 2) return; fprintf (stderr, "channel %d (%f,%f)\n", v, cp->p.p1, cp->p.p2); for (k=0;k<cp->cnt;k++) { adj = cp->G->vertices[k].adj_list; if (dtsize(adj) == 0) continue; putSeg (stderr, cp->seg_list[k]); fputs (" -...
false
false
false
false
false
0
armedf_scan(UINT32 col,UINT32 row,UINT32 num_cols,UINT32 num_rows) { /* col: 0..63; row: 0..31 */ switch( scroll_type ) { case 1: /* armed formation */ return col*32+row; case 3: /* legion */ return (col&0x1f)*32+row+0x400*(col/32); default: return 32*(31-row)+(col&0x1f)+0x400*(col/32); } }
false
false
false
false
false
0
___mkd_freefootnotes(MMIOT *f) { int i; if ( f->footnotes ) { for (i=0; i < S(*f->footnotes); i++) ___mkd_freefootnote( &T(*f->footnotes)[i] ); DELETE(*f->footnotes); free(f->footnotes); } }
false
false
false
false
false
0
canvas_update_scrollbar(AmitkCanvas * canvas, AmitkPoint center, amide_real_t thickness) { AmitkCorners view_corner; amide_real_t upper, lower; amide_real_t min_voxel_size; AmitkPoint zp_start; GList * volumes; GList * data_sets; /* sanity checks */ if (canvas->study == NULL) return; /* make valgr...
false
false
false
false
false
0
init_command_data() { int cmd_counter; int i; extern int map(char ch); for (cmd_counter = 0; cmd_counter < CMD_NUM; cmd_counter++) { command_list[cmd_counter].head = command_head[cmd_counter]; command_list[cmd_counter].doit = NULL; } // end of for for (i = 0; i < USED_CHAR_NUM; i++) command_index[i] = -1...
false
false
false
false
false
0
buffer_size( CoreSurface *surface, CoreSurfaceBuffer *buffer, bool video ) { int i, mem = 0; CoreSurfaceAllocation *allocation; fusion_vector_foreach (allocation, i, buffer->allocs) { int size = allocation->size; if (allocation->flags & CSALF_ONEFORALL) ...
false
false
false
false
false
0
connman_provider_set_immutable(struct connman_provider *provider, connman_bool_t immutable) { if (provider == NULL) return -EINVAL; if (provider->vpn_service == NULL) return -ESRCH; return __connman_service_set_immutable(provider->vpn_service, immutable); }
false
false
false
false
false
0
find_first_not_of(const FXchar* set,FXint n,FXint pos) const { register FXint len=length(); register FXint p=pos; if(p<0) p=0; while(p<len){ register FXint c=str[p]; register FXint i=n; while(--i>=0){ if(set[i]==c) goto x; } return p; x: p++; } return -1; }
false
false
false
false
false
0
i40e_aq_get_vsi_params(struct i40e_hw *hw, struct i40e_vsi_context *vsi_ctx, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; struct i40e_aqc_add_get_update_vsi *cmd = (struct i40e_aqc_add_get_update_vsi *)&desc.params.raw; struct i40e_aqc_add_get_update_vsi_completion *resp = (struc...
false
false
false
false
false
0
_http_get_redirected_uri(char *url, char **data, int *bytesRead) { int status = HTTP_SUCCESS; LDAPDebug( LDAP_DEBUG_PLUGIN, "--> _http_get_redirected_uri -- BEGIN\n",0,0,0); status = http_impl_get_redirected_uri(url, data, bytesRead); LDAPDebug( LDAP_DEBUG_PLUGIN, "<-- _http_get_redirected_uri -- END\n",0,0,0); ...
false
false
false
false
false
0
myri10ge_suspend(struct pci_dev *pdev, pm_message_t state) { struct myri10ge_priv *mgp; struct net_device *netdev; mgp = pci_get_drvdata(pdev); if (mgp == NULL) return -EINVAL; netdev = mgp->dev; netif_device_detach(netdev); if (netif_running(netdev)) { netdev_info(netdev, "closing\n"); rtnl_lock(); my...
false
false
false
false
false
0
markers_remove_breakpoint(breakpoint *bp) { static int breakpoint_markers[] = { M_BP_ENABLED, M_BP_DISABLED, M_BP_CONDITIONAL }; GeanyDocument *doc = document_find_by_filename(bp->file); if (doc) { int markers = scintilla_send_message(doc->editor->sci, SCI_MARKERGET, bp->line - 1, (long)NULL); int marke...
false
false
false
false
false
0
__db_stream_size(dbs, size, flags) DB_STREAM *dbs; db_off_t *size; u_int32_t flags; { int ret; if ((ret = __db_fchk(dbs->dbc->env, "DB_STREAM->size", flags, 0)) != 0) return (ret); *size = dbs->file_size; return (0); }
false
false
false
false
false
0
isValidContact(const Vec3& p) const { bool res=true; // check vs. Edges vector<Edge2D*>::const_iterator eiter=m_edges.begin(); while((eiter!=m_edges.end())&&(res)){ res=!((*eiter)->dist(p).first); eiter++; } return res; }
false
false
false
false
false
0
cb_iter_unary_neg (GnmValueIter const *v_iter, GnmValue *res) { GnmValue const *v = v_iter->v; GnmValue *tmp = NULL; if (VALUE_IS_EMPTY (v)) tmp = value_new_int (0); else if (VALUE_IS_ERROR (v)) tmp = value_dup (v); else if (VALUE_IS_STRING (v)) { GnmValue *conv = format_match_number ( value_peek_string ...
false
false
false
false
false
0
handle_active_stripes(struct r5conf *conf, int group, struct r5worker *worker, struct list_head *temp_inactive_list) { struct stripe_head *batch[MAX_STRIPE_BATCH], *sh; int i, batch_size = 0, hash; bool release_inactive = false; while (batch_size < MAX_STRIPE_BATCH && (sh = __get_priority_stripe(conf,...
false
false
false
false
false
0
getNodeByPath(const XMLString& path) const { XMLString::const_iterator it = path.begin(); if (it != path.end() && *it == '/') { ++it; if (it != path.end() && *it == '/') { ++it; XMLString name; while (it != path.end() && *it != '/' && *it != '@' && *it != '[') name += *it++; if (it != path.end() &...
false
false
false
false
false
0
gconf_cell_renderer_render (GtkCellRenderer *cell, cairo_t *cr, GtkWidget *widget, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) { GConfCellRenderer *cellvalue; char *tmp_str; cellvalue = GCONF_CELL_RENDERER (cell); if (cellvalu...
false
false
false
false
false
0
parse_pairs(const vector<string>& strings) { string_pairs pairs; for (vector<string>::const_iterator pair = strings.begin(); pair != strings.end(); ++pair) { std::string::size_type found = pair->find(':'); if (found == pair->npos || pair->length() < 3) continue; ...
false
false
false
false
false
0
setActiveGlobalShortcutNoEnable(const KShortcut &cut) { globalShortcut = cut; emit q->globalShortcutChanged(cut.primary()); }
false
false
false
false
false
0
sqliteResultSetOfSelect(Parse *pParse, char *zTabName, Select *pSelect){ Table *pTab; int i, j; ExprList *pEList; Column *aCol; if( fillInColumnList(pParse, pSelect) ){ return 0; } pTab = sqliteMalloc( sizeof(Table) ); if( pTab==0 ){ return 0; } pTab->zName = zTabName ? sqliteStrDup(zTabNam...
false
false
false
false
false
0
mdct512(int32_t *out, int16_t *in) { int i, re, im, re1, im1; int16_t rot[N]; IComplex x[N/4]; /* shift to simplify computations */ for(i=0;i<N/4;i++) rot[i] = -in[i + 3*N/4]; for(i=N/4;i<N;i++) rot[i] = in[i - N/4]; /* pre rotation */ for(i=0;i<N/4;i++) { re = ...
false
false
false
false
false
0
SPF_debugv(const char *file, int line, const char *format, va_list ap) { char errmsg[SPF_SYSLOG_SIZE]; if (SPF_debug_handler == NULL) return; vsnprintf(errmsg, sizeof(errmsg), format, ap); SPF_debug_handler(file, line, errmsg); }
false
false
false
false
false
0
translateMove( const MOVE &m ) { // this is tricky as we need to want to build the "meta moves" PatPile *frompile = 0; if ( m.from < 8 ) frompile = deal->store[m.from]; else frompile = deal->freecell[m.from-8]; KCard *card = frompile->at( frompile->count() - m.card_index - 1); ...
false
false
false
false
false
0
intervalBegin(const RideFileInterval &interval) const { RideFilePoint p; p.secs = interval.start; QVector<RideFilePoint*>::const_iterator i = std::lower_bound( dataPoints_.begin(), dataPoints_.end(), &p, ComparePointSecs()); if (i == dataPoints_.end()) return dataPoints_.size()-1; in...
false
false
false
false
false
0
pcmcia_request_irq(struct pcmcia_device *p_dev, irq_handler_t handler) { int ret; if (!p_dev->irq) return -EINVAL; ret = request_irq(p_dev->irq, handler, IRQF_SHARED, p_dev->devname, p_dev->priv); if (!ret) p_dev->_irq = 1; return ret; }
false
false
false
false
false
0
prcWrite(pfPrcHelper* prc) { prc->writeSimpleTag("plOneShotCallbacks"); for (size_t i=0; i<fCallbacks.getSize(); i++) { prc->startTag("Callback"); prc->writeParam("Marker", fCallbacks[i].fMarker); prc->writeParam("User", fCallbacks[i].fUser); prc->endTag(); fCallbacks[i]....
false
false
false
false
false
0
memory_bm_free(struct memory_bitmap *bm, int clear_nosave_free) { struct mem_zone_bm_rtree *zone; list_for_each_entry(zone, &bm->zones, list) free_zone_bm_rtree(zone, clear_nosave_free); free_list_of_pages(bm->p_list, clear_nosave_free); INIT_LIST_HEAD(&bm->zones); }
false
false
false
false
false
0
Type_vcgt_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n) { cmsToneCurve** OldCurves = (cmsToneCurve**) Ptr; cmsToneCurve** NewCurves; NewCurves = ( cmsToneCurve**) _cmsCalloc(self ->ContextID, 3, sizeof(cmsToneCurve*)); if (NewCurves == NULL) return NULL; NewCurves[...
false
false
false
false
false
0
forceCommandPropagation(redisClient *c, int flags) { if (flags & REDIS_PROPAGATE_REPL) c->flags |= REDIS_FORCE_REPL; if (flags & REDIS_PROPAGATE_AOF) c->flags |= REDIS_FORCE_AOF; }
false
false
false
false
false
0
maildir_prepare_opts( store_t *gctx, int opts ) { if (opts & OPEN_SETFLAGS) opts |= OPEN_OLD; if (opts & OPEN_EXPUNGE) opts |= OPEN_OLD|OPEN_NEW|OPEN_FLAGS; gctx->opts = opts; }
false
false
false
false
false
0
totem_cmml_convert_msecs_to_str (gint64 time_msecs) { gint32 hours, minutes, seconds; if (G_UNLIKELY (time_msecs < 0)) hours = minutes = seconds = 0; else { hours = time_msecs / MSECS_IN_HOUR; minutes = (time_msecs % MSECS_IN_HOUR) / MSECS_IN_MINUTE; seconds = (time_msecs % MSECS_IN_MINUTE) / MSECS_IN_SECO...
false
false
false
false
false
0
tablejump_p (insn) rtx insn; { rtx table; return (GET_CODE (insn) == JUMP_INSN && JUMP_LABEL (insn) && NEXT_INSN (JUMP_LABEL (insn)) && (table = next_active_insn (JUMP_LABEL (insn))) && GET_CODE (table) == JUMP_INSN && (GET_CODE (PATTERN (table)) == ADDR_VEC ...
false
false
false
false
false
0
errorTypeCondToCode(int t, int c) { Q_UNUSED(t); for(int n = 0; errorCodeTable[n].cond; ++n) { if(c == errorCodeTable[n].cond) return errorCodeTable[n].code; } return 0; }
false
false
false
false
false
0
gdk_pixbuf__ico_image_begin_load(GdkPixbufModuleSizeFunc size_func, GdkPixbufModulePreparedFunc prepared_func, GdkPixbufModuleUpdatedFunc updated_func, gpointer user_data, GError **error) { struct ico_progressive_state *context; context = g_...
false
false
false
false
false
0
EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) { EVP_PKEY_CTX *rctx; if (!pctx->pmeth || !pctx->pmeth->copy) return NULL; #ifndef OPENSSL_NO_ENGINE /* Make sure it's safe to copy a pkey context using an ENGINE */ if (pctx->engine && !ENGINE_init(pctx->engine)) { EVPerr(EVP_F_EVP_PKEY_CTX_DUP,ERR_R_ENGINE_LIB); retur...
false
false
false
false
false
0
HtmlHash(htmlPtr, zName) void *htmlPtr; const char *zName; { int h = 0; char c; while ((c = *zName) != 0) { if (isupper(c)) { c = tolower(c); } h = h << 5 ^ h ^ c; zName++; } if (h < 0) { h = -h; } return h % HTML_MARKUP_HASH_SIZE; ...
false
false
false
false
false
0
git_diff_file_content__init_from_raw( git_diff_file_content *fc, git_repository *repo, const git_diff_options *opts, const char *buf, size_t buflen, git_diff_file *as_file) { memset(fc, 0, sizeof(*fc)); fc->repo = repo; fc->file = as_file; if (!buf) { fc->flags |= GIT_DIFF_FLAG__NO_DATA; } else { fc->fl...
false
false
false
false
false
0
trigger_get(uid_t uid, trigger_info_msg_t *msg) { trigger_info_msg_t *resp_data; ListIterator trig_iter; trigger_info_t *trig_out; trig_mgr_info_t *trig_in; int recs_written = 0; slurm_mutex_lock(&trigger_mutex); if (trigger_list == NULL) trigger_list = list_create(_trig_del); _dump_trigger_msg("trigger_get...
false
false
false
false
false
0
create_dialog (void) { int i = 0; for (i = 0; i < pipeline_editors_count; i++) { init_pipeline_editor (builder, pipeline_editors + i); } main_window = GTK_DIALOG (WID ("gst_properties_dialog")); if (!main_window) { /* Fatal error */ GtkWidget *dialog; dialog = gtk_message_dialog_new (NULL, G...
false
false
false
false
false
0
http_layer_data_generator_datastream_create_body( const void* input , short* state ) { // unpack the data const http_layer_input_t* const http_layer_input = ( const http_layer_input_t* ) input; ENABLE_GENERATOR(); BEGIN_CORO( *state ) { memset( buffer...
false
false
false
false
false
0
add_dir (GSList **pl, const char *dir, const char *base_dir) { char *dirc = NULL; if (g_path_is_absolute (dir)) dirc = g_strdup (dir); else dirc = g_build_filename (base_dir, dir, NULL); *pl = g_slist_prepend (*pl, dirc); }
false
false
false
false
false
0
bcm5421_read_link(struct mii_phy* phy) { u32 phy_reg; int mode; /* find out in what mode we are */ sungem_phy_write(phy, MII_NCONFIG, 0x1000); phy_reg = sungem_phy_read(phy, MII_NCONFIG); mode = (phy_reg & BCM5421_MODE_MASK ) >> 5; if ( mode == BCM54XX_COPPER) return bcm54xx_read_link(phy); phy->speed = S...
false
false
false
false
false
0
acpi_free_pnp_ids(struct acpi_device_pnp *pnp) { struct acpi_hardware_id *id, *tmp; list_for_each_entry_safe(id, tmp, &pnp->ids, list) { kfree_const(id->id); kfree(id); } kfree(pnp->unique_id); }
false
false
false
false
false
0
get_info(char *device_name, int proc_interface) { struct list *rval = NULL; struct file_list *list = proc_interface ? proc_list : sys_list; int i, n = (proc_interface ? sizeof(proc_list) : sizeof(sys_list)) / sizeof(struct file_list); char *filename = malloc(strlen(device_name) + strlen("/energy_full_de...
false
false
false
false
false
0
gda_server_provider_get_server_version (GdaServerProvider *provider, GdaConnection *cnc) { const gchar *retval; g_return_val_if_fail (GDA_IS_SERVER_PROVIDER (provider), NULL); g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL); g_return_val_if_fail (CLASS (provider)->get_server_version != NULL, NULL); gda_locka...
false
false
false
false
false
0
initialize_transfer_screen(void) { int iface_nmbr; /* interface number */ /* Add screen */ sock_send_string(sock, "screen_add NT\n"); /* Set screen name */ sock_send_string(sock, "screen_set NT name {Transfer}\n"); /* Add title to screen */ sock_send_string(sock, "widget_add NT title title\n"); if ((iface_...
false
false
false
false
false
0
addname(const u_char *msg, size_t msglen, const u_char **pp, const char *origin, char **buf, size_t *buflen) { size_t newlen, save_buflen = *buflen; char *save_buf = *buf; int n; n = dn_expand(msg, msg + msglen, *pp, *buf, *buflen); if (n < 0) goto enospc; /*%< Guess. */ newlen = prune_origin(*buf, origin); ...
false
false
false
false
false
0
ia32_modrm_decode( unsigned char *buf, unsigned int buf_len, x86_op_t *op, x86_insn_t *insn, size_t gen_regs ) { /* create address expression and/or fill operand based on value of * ModR/M byte. Calls sib_decode as appropriate. * flags specifies whether Reg or mod+R/M fields are being decoded * return...
false
false
false
false
false
0
RelevantBundle(char *agent,char *blocktype) { struct Item *ip; if (strcmp(agent,CF_AGENTTYPES[cf_common]) == 0 || strcmp(CF_COMMONC,P.blocktype) == 0) { return true; } /* Here are some additional bundle types handled by cfAgent */ ip = SplitString("edit_line,edit_xml",','); if (strcmp(agent,CF_AGENTTYPES...
true
true
false
false
false
1
getCatalystVersion(int *first, int *second) { FILE *fp = NULL; fp = popen(SHELL_COMMAND, "r"); if (!fp) return false; fscanf(fp, "String: %d.%d", first, second); if (pclose(fp) != 0) return false; return true; }
false
false
false
false
false
0
read_line(tls_state *tls) { char *line = NULL; int n; if (tls->input == NULL) tls->input = xmalloc(tls->input_size); do { if ((line = buffer_read_line(tls->input_buffer)) != NULL) { debug("Received complete line from %s", tls->peer); free(tls->input); tls->input = NULL; tls->input_size = 0; brea...
false
false
false
false
false
0
hb_synthesize_glyph_classes (hb_ot_shape_context_t *c) { unsigned int count = c->buffer->len; hb_glyph_info_t *info = c->buffer->info; for (unsigned int i = 0; i < count; i++) _hb_glyph_info_set_glyph_props (&info[i], _hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGOR...
false
false
false
false
false
0
prsubj(struct imap_refmsgtable *p) { struct imap_subjlookup *s; int i; for (i=0; i<sizeof(p->subjtable)/sizeof(p->subjtable[0]); i++) for (s=p->subjtable[i]; s; s=s->nextsubj) printf("subject(%s)=<%s>\n", s->subj, s->msg->msgid ? s->msg->msgid:""); printf("\n\n"); }
false
false
false
false
false
0
updateFont() { int i,j; j=panes.size(); for(i=0;i<j;i++) panes[i]->updateFont(); }
false
false
false
false
false
0
bnx2x_vlan_mac_del_all(struct bnx2x *bp, struct bnx2x_vlan_mac_obj *o, unsigned long *vlan_mac_flags, unsigned long *ramrod_flags) { struct bnx2x_vlan_mac_registry_elem *pos = NULL; struct bnx2x_vlan_mac_ramrod_params p; struct bnx2x_exe_queue_obj *exeq = &o->exe_queue; struct bnx2x_exeq_elem *exe...
false
true
false
false
false
1
DF(double val) { static u8 tmp[16]; if (val < 99.995) { sprintf(tmp, "%0.02f", val); return tmp; } if (val < 999.95) { sprintf(tmp, "%0.01f", val); return tmp; } return DI((u64)val); }
false
false
false
false
false
0
gda_data_model_dir_get_n_rows (GdaDataModel *model) { GdaDataModelDir *imodel = (GdaDataModelDir *) model; g_return_val_if_fail (GDA_IS_DATA_MODEL_DIR (imodel), 0); g_return_val_if_fail (imodel->priv != NULL, 0); return imodel->priv->rows->len; }
false
false
false
false
false
0
x264_cabac_field_decoding_flag( x264_t *h, x264_cabac_t *cb ) { int ctx = 0; ctx += h->mb.field_decoding_flag & !!h->mb.i_mb_x; ctx += (h->mb.i_mb_top_mbpair_xy >= 0 && h->mb.slice_table[h->mb.i_mb_top_mbpair_xy] == h->sh.i_first_mb && h->mb.field[h->mb.i_mb_top_mbpair_xy]); x26...
false
false
false
false
false
0
skfp_send_pkt(struct sk_buff *skb, struct net_device *dev) { struct s_smc *smc = netdev_priv(dev); skfddi_priv *bp = &smc->os; pr_debug("skfp_send_pkt\n"); /* * Verify that incoming transmit request is OK * * Note: The packet size check is consistent with other * Linux device driv...
false
false
false
false
false
0
textui_cmd_suicide(void) { /* Flush input */ flush(); /* Verify Retirement */ if (p_ptr->total_winner) { /* Verify */ if (!get_check("Do you want to retire? ")) return; } /* Verify Suicide */ else { struct keypress ch; /* Verify */ if (!get_check("Do you really want to commit suicide? ")) return; ...
false
false
false
false
false
0
sis900_mdio_reset(long mdio_addr) { int i; for (i = 31; i >= 0; i--) { outl(MDDIR | MDIO, mdio_addr); sis900_mdio_delay(); outl(MDDIR | MDIO | MDC, mdio_addr); sis900_mdio_delay(); } return; }
false
false
false
false
false
0
SocketClient_create(gchar *host, gint port){ register SocketClient *client = g_new(SocketClient, 1); struct sockaddr_in server; struct hostent *hp = gethostbyname(host); register gchar *reply; if(!hp){ perror("lookup up hostname"); exit(1); } client->connection = SocketCo...
false
false
false
false
false
0
construct_arrayinfo(Block *block_head) { Block *bpt; bpt = block_head; while(bpt != NULL){ if(bpt->dlg_sb_flg && bpt->kind == SB) { bpt = bpt->next; continue; } if(bpt->inner != NULL){ construct_arrayinfo(bpt->inner); } if(bpt->acc_block != NULL){ c...
false
false
false
false
false
0
distancePtSeg(const int x, const int z, const int px, const int pz, const int qx, const int qz) { /* float pqx = (float)(qx - px); float pqy = (float)(qy - py); float pqz = (float)(qz - pz); float dx = (float)(x - px); float dy = (float)(y - py); ...
false
false
false
false
false
0
atom_stsz_add_entry (AtomSTSZ * stsz, guint32 nsamples, guint32 size) { guint32 i; stsz->table_size += nsamples; if (stsz->sample_size != 0) { /* it is constant size, we don't need entries */ return; } for (i = 0; i < nsamples; i++) { atom_array_append (&stsz->entries, size, 1024); } }
false
false
false
false
false
0
gs_is_affix(const char *string, const char *affix) { while(*affix) { if(*string!=*affix) return 0; string++; affix++; } return 1; }
false
false
false
false
false
0
fso_gsm_plus_cmgl_issue (FsoGsmPlusCMGL* self, FsoGsmPlusCMGLMode mode) { gchar* result = NULL; FsoGsmPlusCMGLMode _tmp0_ = 0; FsoGsmPlusCMGLMode _tmp1_ = 0; gchar* _tmp2_ = NULL; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = mode; _vala_assert (_tmp0_ != FSO_GSM_PLUS_CMGL_MODE_INVALID, "mode != Mode.INVAL...
false
false
false
false
false
0
DeleteChan(struct ChanInfo *chanptr) { struct NickInfo *nptr; struct AutoKick *ak; struct ChanAccess *ca; struct Channel *chptr; struct f_users *fdrs; int hashv; #ifdef MEMOSERVICES struct MemoInfo *mi; #endif if (chanptr == NULL) return; hashv = CSHashChan(chanptr->name); #ifdef MEMOSERVICES /* check...
false
false
false
false
true
1
gretl_stddev (int t1, int t2, const double *x) { double xx = gretl_variance(t1, t2, x); return (na(xx))? xx : sqrt(xx); }
false
false
false
false
false
0
cx_sensor(struct gspca_dev*gspca_dev) { int i = 0; int length; const __u8 *ptsensor = cxsensor; reg_w(gspca_dev, 0x0020, reg20, 8); reg_w(gspca_dev, 0x0028, reg28, 8); reg_w(gspca_dev, 0x0010, reg10, 2); reg_w_val(gspca_dev, 0x0092, 0x03); switch (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv) { c...
false
false
false
false
false
0
setUniforms(const GLProgUniforms &uniforms, const bool usingShadow) const { if (!usingShadow) { glUniform3fv(m_program.getUniformID(UNIFORM_LIGHTPOS), 1, (GLfloat*)&uniforms.m_lightPos); glUniform3fv(m_program.getUniformID(UNIFORM_LIGHTRAD), 1, (GLfloat*)&uniforms.m_lightRad); glUniform3fv(m_program.getUniformI...
false
false
false
false
false
0
req_get_addhandler_exts(requestobject *self, PyObject *args) { char *exts = get_addhandler_extensions(self->request_rec); if (exts) return PyString_FromString(exts); else return PyString_FromString(""); }
false
false
false
false
false
0
get_dr32_drotx(ROT_MATRIX_TYPE type) { if(m_rot_matrix_type == Rotation_matrix::math) { return cos(m_angle_math_rotX) * cos(m_angle_math_rotZ) + (-sin(m_angle_math_rotX)) * sin(m_angle_math_rotY) * sin(m_angle_math_rotZ); } if(m_rot_matrix_type == Rotation_matrix::geodetic) { return ...
false
false
false
false
false
0
set_log_action(int mod, int level, int action) { // normal if (mod >= 0) { logfunc_t *logfn = io->get_logfn(mod); logfn->setonoff(level, action); return; } // if called with mod<0 loop over all int nmod = get_n_log_modules (); for (mod=0; mod<nmod; mod++) set_log_action(mod, level, action); ...
false
false
false
false
false
0
GetUnusedWatch(void) { int i; WatchInfo * info; WatchInfo * theWatch = NULL; for(i = 0; i < watchListLength; i++) { info = &watchList[i]; if(info->numElements == 0) { theWatch = info; break; } } if(!theWatch) { AddWatchBefore(watchListLength); theWatch = &watchList...
false
false
false
false
false
0
CLASS_get_next_sorted_symbol(CLASS *class, int *index) { CLASS_DESC_SYMBOL *old = NULL; CLASS_DESC_SYMBOL *cur; for(;;) { if (*index >= class->n_desc) return NULL; cur = &class->table[class->sort[*index]]; if (*index > 0) old = &class->table[class->sort[*index - 1]]; (*index)++; if (!cur->d...
false
false
false
false
false
0
nfs3_set_ds_client(struct nfs_client *mds_clp, const struct sockaddr *ds_addr, int ds_addrlen, int ds_proto, unsigned int ds_timeo, unsigned int ds_retrans, rpc_authflavor_t au_flavor) { struct nfs_client_initdata cl_init = { .addr = ds_addr, .addrlen = ds_addrlen, .nfs_mod = &nfs_v3, .proto = ds_proto, ...
false
false
false
false
false
0
StartThread(void *data) { Thread *thread = static_cast<Thread *>(data); PThreadPrivateData *pd = static_cast<PThreadPrivateData *>(thread->_prvData); if (pd->cpunum>=0) { #if defined(__sgi) pthread_setrunon_np( pd->cpunum ); #elif defined(HAVE_PTHREAD_SETAFFIN...
false
false
false
false
false
0
_refresh () { XAP_Module * pModule = 0; GtkTreeSelection * selection; GtkTreeIter iter; GtkTreeModel * model; if (XAP_ModuleManager::instance().enumModules()->size()) { selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_list) ); if (selection && gtk_tree_selection_get_selected (selection, &model, &i...
false
false
false
false
false
0
SwitchToModel(EModel *AModel) { if (Model != AModel) { if (Model) FocusChange(0); AModel->Prev->Next = AModel->Next; AModel->Next->Prev = AModel->Prev; if (Model) { AModel->Next = Model; AModel->Prev = Model->Prev; AModel->Prev->Next ...
false
false
false
true
false
1
StartInobjectSlackTracking(Map* map) { ASSERT(!IsInobjectSlackTrackingInProgress()); // Only initiate the tracking the first time. if (live_objects_may_exist()) return; set_live_objects_may_exist(true); // No tracking during the snapshot construction phase. if (Serializer::enabled()) return; if (map->u...
false
false
false
false
false
0
mime_global_eol(lua_State *L) { int ctx = luaL_checkint(L, 1); size_t isize = 0; const char *input = luaL_optlstring(L, 2, NULL, &isize); const char *last = input + isize; const char *marker = luaL_optstring(L, 3, CRLF); luaL_Buffer buffer; luaL_buffinit(L, &buffer); /* end of input blac...
false
false
false
false
false
0
delete_pattern(int pos, long int rflags) { PAT_LINE_S *tpatline; int i; PAT_STATE pstate; if(!any_patterns(rflags, &pstate)) return(1); for(i = 0, tpatline = (*cur_pat_h)->patlinehead; i < pos && tpatline; tpatline = tpatline->next, i++); if(i != pos) return(1); if(tpatline == (*cur_pat_...
false
false
false
false
false
0
setfreelist(int i, unsigned int f, unsigned int l) { if (i < 17) { freelist[i].first = f; freelist[i].last = l; } }
false
false
false
false
false
0
cifs_convert_path_to_utf16(const char *from, struct cifs_sb_info *cifs_sb) { int len; const char *start_of_path; __le16 *to; int map_type; if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SFM_CHR) map_type = SFM_MAP_UNI_RSVD; else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR) map_type = SFU_MAP_UNI_R...
false
false
false
false
false
0
add_actions (GladeWindow *window, GladeWidget *widget, GList *actions) { GtkToolbar *bar = GTK_TOOLBAR (window->priv->toolbar); GtkToolItem *item = gtk_separator_tool_item_new (); gint n = 0; GList *l; gtk_toolbar_insert (bar, item, -1); gtk_widget_show (GTK_WIDGET (item)); if (window->priv->actions_sta...
false
false
false
false
false
0
ConstructComment(const cmCustomCommand& cc, const char* default_comment) { // Check for a comment provided with the command. if(cc.GetComment()) { return cc.GetComment(); } // Construct a reasonable default comment if possible. if(!cc.GetOutputs().empty()) { ...
false
false
false
false
false
0
array_dimensions_are_loop_invariant( Def_use_table *array, Block *loop ) { Operand *array_sub_opt = array->opt->inner; Quadruple *array_qpt = array->qpt; if (array_sub_opt == NULL) return TRUE; return is_loop_invariable_operand(array_sub_opt, array_qpt, loop, TRUE); }
false
false
false
false
false
0
GetNextFeature() { OGRFeature *poFeature; if (poReader) { while(TRUE) { if ( nFeatureArrayIndex == nFeatureArraySize) { nFeatureArrayIndex = nFeatureArraySize = 0; if (poReader->GetNextFeature() == FALSE) return N...
false
false
false
false
false
0
clip_right_or_top(GLint *srcX0, GLint *srcX1, GLint *dstX0, GLint *dstX1, GLint maxValue) { GLfloat t, bias; if (*dstX1 > maxValue) { /* X1 outside right edge */ ASSERT(*dstX0 < maxValue); /* X0 should be inside right edge */ t = (GLfloat) (maxValue - *dstX0)...
false
false
false
false
false
0
addMeshElement(int elem_id, short direction) { if ( meshData == NULL ) return 0; if (meshData->meshElementIds == NULL) allocateMeshElements(meshData->maxNofMeshElements); if (meshData->nofMeshElements == meshData->maxNofMeshElements) reallocateMeshElements(); meshData->meshElementDirs[meshData->n...
false
false
false
true
false
1