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
dbAllocDmapLev(struct bmap * bmp, struct dmap * dp, int nblocks, int l2nb, s64 * results) { s64 blkno; int leafidx, rc; /* can't be more than a dmaps worth of blocks */ assert(l2nb <= L2BPERDMAP); /* search the tree within the dmap page for sufficient * free space. if sufficient free space is found, d...
false
false
false
false
false
0
method_31(const int *account, int *weight) { number2Array("1234567890", weight); int result = algo03(11, weight, false, account, 0, 9); // no rest after division by modulus (in algo03)? // then the the result will be 0! (as it is... removed next two lines // as there is no further calculation /...
false
false
false
false
false
0
strnbrk (const char* str, size_t n, const char* brk) { for (; n > 0; ++str, --n) { if (strchr (brk, *str)) { return str; } } return NULL; }
false
false
false
false
false
0
ajDomNodePrintNode(const AjPDomNode node) { if(!node) { ajFmtPrint("Node was null\n"); return; } ajFmtPrint("\nName=%S,Value=%S,", node->name, node->value); ajFmtPrint("\n\tType=%d", node->type); ajFmtPrint(",Parentnode->name=%S,Firstchild->name=%S", node->paren...
false
false
false
false
false
0
AddPathFromEnd(const Vector<CodeEntry*>& path) { ProfileNode* node = root_; for (CodeEntry** entry = path.start() + path.length() - 1; entry != path.start() - 1; --entry) { if (*entry != NULL) { node = node->FindOrAddChild(*entry); } } node->IncrementSelfTicks(); }
false
false
false
false
false
0
retrieve_tied_hash(pTHX_ stcxt_t *cxt, const char *cname) { SV *tv; SV *sv; TRACEME(("retrieve_tied_hash (#%d)", cxt->tagnum)); tv = NEWSV(10002, 0); SEEN(tv, cname, 0); /* Will return if tv is null */ sv = retrieve(aTHX_ cxt, 0); /* Retrieve <object> */ if (!sv) return (SV *) 0; /* Failed */ sv_upgrad...
false
false
false
false
false
0
mb862xx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct mb862xxfb_par *par = adap->algo_data; struct i2c_msg *m; int addr; int i = 0, err = 0; dev_dbg(par->dev, "%s: %d msgs\n", __func__, num); for (i = 0; i < num; i++) { m = &msgs[i]; if (!m->len) { dev_dbg(par->dev, "%s: null ...
false
false
false
false
false
0
MergeCmdLineResources(XrmDatabase *pdb, XrmOptionDescList opts, int num_opts, char *name, int *pargc, char **argv, Bool fNoDefaults) { if (!name) return; if (opts && num_opts > 0) XrmParseCommand(pdb, opts, num_opts, name, pargc, argv); if (!fNoDefaults) XrmParseCommand(pdb, default_opts, ...
false
false
false
false
false
0
equalizer_get(v29_rx_state_t *s) { int i; int p; complexf_t z; complexf_t z1; /* Get the next equalized value. */ z = complex_setf(0.0f, 0.0f); p = s->eq_step - 1; for (i = 0; i < V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN; i++) { p = (p - 1) & V29_EQUALIZER_MASK; ...
false
false
false
false
false
0
sig_session_restore_server(IRC_SERVER_REC *server, CONFIG_NODE *node) { GSList *tmp; if (!IS_IRC_SERVER(server)) return; if (server->real_address == NULL) server->real_address = g_strdup(config_node_get_str(node, "real_address", NULL)); server->userhost = g_strdup(config_node_get_str(node, "...
false
false
false
false
false
0
atl2_free_irq(struct atl2_adapter *adapter) { struct net_device *netdev = adapter->netdev; free_irq(adapter->pdev->irq, netdev); #ifdef CONFIG_PCI_MSI if (adapter->have_msi) pci_disable_msi(adapter->pdev); #endif }
false
false
false
false
false
0
gst_value_serialize (const GValue * value) { guint i, len; GValue s_val = { 0 }; GstValueTable *table, *best; gchar *s; GType type; g_return_val_if_fail (G_IS_VALUE (value), NULL); type = G_VALUE_TYPE (value); best = gst_value_hash_lookup_type (type); if (G_UNLIKELY (!best || !best->serialize)) { ...
false
false
false
false
false
0
m41t80_probe(struct i2c_client *client, const struct i2c_device_id *id) { int rc = 0; struct rtc_device *rtc = NULL; struct rtc_time tm; struct m41t80_data *clientdata = NULL; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C | I2C_FUNC_SMBUS_BYTE_DATA)) return -ENODEV; clientdata = devm_...
false
false
false
false
false
0
read_keys(void) { int i,j,k; char buffer[1024]; FILE* keysyms=fopen("keysym.h","r"); memset(keys,0,0x400*sizeof(char*)); if(!keysyms) return; while(!feof(keysyms)) { fgets(buffer,1024,keysyms); if(!strncmp(buffer,"#define XK_",strlen("#define XK_"))) { for(i=strlen("#define...
true
true
false
false
true
1
gimmix_strcrep (char *string, char c1, char c2) { char *ptr = NULL; ptr = string; while (*ptr!=0) { if (*ptr == c1) *ptr = c2; ptr++; } return; }
false
false
false
false
false
0
reg_range_find(const int *range, int c) { while (*range) { if (c >= range[1] && c <= (range[0] + range[1] - 1)) { return 1; } range += 2; } return 0; }
false
false
false
false
false
0
st_gyro_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct iio_dev *indio_dev; struct st_sensor_data *gdata; int err; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*gdata)); if (!indio_dev) return -ENOMEM; gdata = iio_priv(indio_dev); st_sensors_of_i2c_probe(client, ...
false
false
false
false
false
0
wvariance (GPtrArray * array, guint num_elements, gdouble wmean) { analysis_element_t * element; gdouble wsumofsquares = 0 ; gdouble Wa = 0; gdouble Wb = 0; gdouble wi; gdouble delta; gdouble factor; guint i; if (num_elements < 2) return NAN; /* find the weight sum of the squares */ /* computes ...
false
false
false
false
false
0
GCheckBoxFit(GCheckBox *gl) { int as=0, ds, ld; GRect outer, inner, needed; int iwidth, iheight; needed.x = needed.y = 0; needed.width = needed.height = 1; if ( gl->on!=NULL && gl->on->image!=NULL ) { if (( iwidth = GImageGetScaledWidth(gl->g.base,gl->on->image))>needed.width ) needed.wid...
false
false
false
false
false
0
nextUp_f(double d) { float result = d; if ( ((double) result) >=d) return result; return nextafterf_custom(result, result + 1000000); }
false
false
false
false
false
0
csi_J(struct vc_data *vc, int vpar) { unsigned int count; unsigned short * start; switch (vpar) { case 0: /* erase from cursor to end of display */ count = (vc->vc_scr_end - vc->vc_pos) >> 1; start = (unsigned short *)vc->vc_pos; break; case 1: /* erase from start to cursor */ count = ((vc->vc_pos -...
false
false
false
false
false
0
create_new_cle(int seq1, int seq2, int dir, int loc1, int loc2) { cand_list_element * new_cle = malloc(sizeof(*new_cle)); if (seq1 < seq2) { new_cle->cand1 = seq1; new_cle->cand2 = seq2; new_cle->loc1 = loc1; new_cle->loc2 = loc2; } else { new_cle->cand2 = seq1; new_cle->cand1 = seq2; new_cle->loc2 ...
false
false
false
false
false
0
Do_CSI(MSTextEditorTypes::InsertContext *cx, int n, int *p, int F) { switch (F) { case VPB: // Not implemented // break; case VPR: // Not implemented // break; case SGR: if (n == 0) selectGraphicRendition(cx, 0); else while (--n >= 0) selectGraphicRendition(cx, *p++...
false
false
false
false
false
0
set_to_current_cb (GtkWidget *widget, DialogData *data) { GthFileSource *file_source; file_source = gth_main_get_file_source (gth_browser_get_location (data->browser)); if (GTH_IS_FILE_SOURCE_VFS (file_source)) { GFile *gio_file; char *uri; gio_file = gth_file_source_to_gio_file (file_source, gth_brow...
false
false
false
false
false
0
kdb_common_init_state(struct kgdb_state *ks) { kdb_initial_cpu = atomic_read(&kgdb_active); kdb_current_task = kgdb_info[ks->cpu].task; kdb_current_regs = kgdb_info[ks->cpu].debuggerinfo; return 0; }
false
false
false
false
false
0
as_pg_get_wckeys(pgsql_conn_t *pg_conn, uid_t uid, slurmdb_wckey_cond_t *wckey_cond) { char *cond = NULL; List wckey_list = NULL; int is_admin; slurmdb_user_rec_t user; if (check_db_connection(pg_conn) != SLURM_SUCCESS) return NULL; if (check_user_op(pg_conn, uid, PRIVATE_DATA_USERS, &is_admin, &user) != S...
false
false
false
true
false
1
keybindings_set_group(GeanyKeyGroup *group, const gchar *section_name, const gchar *label, gsize count, GeanyKeyGroupCallback callback) { g_return_val_if_fail(section_name, NULL); g_return_val_if_fail(count, NULL); /* prevent conflict with core bindings */ g_return_val_if_fail(!g_str_equal(section_name, keybindi...
false
false
false
false
false
0
gui_confirm(char *title, char *text, int defaultyes, char *entity) { if (!gui_ask_maybe(title, text, entity, 2, defaultyes ? 0 : 1, yesno)) return 1; return 0; }
false
false
false
false
false
0
ar5008_hw_attach_phy_ops(struct ath_hw *ah) { struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); static const u32 ar5416_cca_regs[6] = { AR_PHY_CCA, AR_PHY_CH1_CCA, AR_PHY_CH2_CCA, AR_PHY_EXT_CCA, AR_PHY_CH1_EXT_CCA, AR_PHY_CH2_EXT_CCA }; int ret; ret = ar5008_hw_rf_alloc_ext_banks(ah); ...
false
false
false
false
false
0
copy_declaration_context (dw_die_ref unit, dw_die_ref die) { dw_die_ref decl; dw_die_ref new_decl; dw_die_ref orig_parent = NULL; decl = get_AT_ref (die, DW_AT_specification); if (decl == NULL) decl = die; else { unsigned ix; dw_die_ref c; dw_attr_ref a; /* The original DIE...
false
false
false
false
false
0
dump_nested(const char *parent) { Nested *n,*n1; Node *ret = 0; n = nested_list; if (!parent) { nested_list = 0; return 0; } while (n) { Node *retx; SwigType *nt; /* Token replace the name of the parent class */ Replace(n->code, "$classname", parent, DOH_REPLACE_ANY); /* Fix up ...
false
false
false
false
false
0
clutter_paint_volume_get_depth (const ClutterPaintVolume *pv) { g_return_val_if_fail (pv != NULL, 0.0); if (pv->is_empty) return 0; else if (!pv->is_axis_aligned) { ClutterPaintVolume tmp; float depth; _clutter_paint_volume_copy_static (pv, &tmp); _clutter_paint_volume_axis_align ...
false
false
false
false
false
0
do_callback_withbuf(json_parser *parser, int type) { if (!parser->callback) return 0; parser->buffer[parser->buffer_offset] = '\0'; return (*parser->callback)(parser->userdata, type, parser->buffer, parser->buffer_offset); }
false
false
false
false
false
0
Blox_MakeActive(edict_t * ent) { vec3_t start, end, endp, offset; vec3_t forward, right, up, angles; trace_t tr; float bd = 0, d; int i; /* if we are dragging a block, don't mind */ if(ent->blox && ent->blox->think == Blox_MoveThink) { Blox_Lock(ent); return; } VectorAdd(ent->client->v_angle, ent->clien...
false
false
false
false
false
0
krb5_ldap_get_value(LDAP *ld, LDAPMessage *ent, char *attribute, int *retval) { char **values=NULL; *retval = 0; values=ldap_get_values(ld, ent, attribute); if (values != NULL) { if (values[0] != NULL) *retval = atoi(values[0]); ldap_value_free(valu...
false
false
false
false
false
0
bf_unsave(char *lrc_url) { char fn[BUFLEN]; url2fn(lrc_url, fn); if (loglevel > 1) logit(LOG_DEBUG, "bf_unsave: Removing bloom filter: %s", fn); unlink(fn); }
false
false
false
false
false
0
gwy_3d_window_button_press(GtkWidget *widget, GdkEventButton *event) { Gwy3DWindow *gwy3dwindow; gwy3dwindow = GWY_3D_WINDOW(widget); if (event->type != GDK_BUTTON_PRESS || event->window != gwy3dwindow->resize_grip) return FALSE; if (event->button == 1) ...
false
false
false
false
false
0
createFrame(quint32 frameClass) { if (frameClass == Frame::NoFrame) return 0; else if (frameClass == Frame::StandardFrame2) return new StandardFrame2(); else if (frameClass == Frame::StandardFrame) return new StandardFrame(); else if (frameClass == Frame::HeartFrame) retu...
false
false
false
false
false
0
init_omega_for_ddr_1 (struct data_reference *dra, struct data_reference *drb, struct data_dependence_relation *ddr, omega_pb pb, bool *maybe_dependent) { unsigned i; int ineq; struct loop *loopi; unsigned nb_loops = DDR_NB_LOOPS (ddr); /* Insert an equality per subscript. */ for (i = 0; i ...
false
false
false
false
false
0
gnm_solver_has_solution (GnmSolver *solver) { if (solver->result == NULL) return FALSE; switch (solver->result->quality) { case GNM_SOLVER_RESULT_NONE: case GNM_SOLVER_RESULT_INFEASIBLE: case GNM_SOLVER_RESULT_UNBOUNDED: default: return FALSE; case GNM_SOLVER_RESULT_FEASIBLE: case GNM_SOLVER_RESULT_OPTIMAL...
false
false
false
false
false
0
load_queues (BognorQueueManager *manager) { BognorQueueManagerPrivate *priv; char *bognor_queue_dir; GDir *dir; priv = manager->priv; /* Ensure the correct dir is in place */ bognor_queue_dir = g_build_filename (g_get_home_dir (), ".bognor-regis", NULL)...
false
false
false
false
false
0
aoecmd_ata_rsp ( struct aoe_command *aoecmd, const void *data, size_t len, const void *ll_source __unused ) { struct aoe_device *aoedev = aoecmd->aoedev; struct ata_cmd *command = &aoecmd->command; const struct aoehdr *aoehdr = data; const struct aoeata *aoeata = &aoehdr->payload[0].ata; size_t data_len; ...
false
false
false
false
false
0
matewnck_tasklist_set_icon_loader (MatewnckTasklist *tasklist, MatewnckLoadIconFunction load_icon_func, void *data, GDestroyNotify free_data_func) { g_return_if_fail (MATEWNCK_IS_TASKLIST (task...
false
false
false
false
false
0
Agent2Type(char *name) /* convert abstract data type names: int, ilist etc */ { int i; Debug("Agent2Type(%s)\n",name); for (i = 0; i < (int)cf_notype; i++) { if (name && strcmp(CF_AGENTTYPES[i],name)==0) { break; } } return (enum cfagenttype)i; }
false
false
false
false
false
0
SetExportFile(const char* mainFile) { this->MainImportFile = mainFile; this->FileDir = cmSystemTools::GetFilenamePath(this->MainImportFile); this->FileBase = cmSystemTools::GetFilenameWithoutLastExtension(this->MainImportFile); this->FileExt = cmSystemTools::GetFilenameLastExtension(this->MainImport...
false
false
false
false
false
0
IntersectPoint(TEdge &edge1, TEdge &edge2, IntPoint &ip, bool UseFullInt64Range) { double b1, b2; if (SlopesEqual(edge1, edge2, UseFullInt64Range)) return false; else if (NEAR_ZERO(edge1.dx)) { ip.X = edge1.xbot; if (NEAR_EQUAL(edge2.dx, HORIZONTAL)) { ip.Y = edge2.ybot; } else { ...
false
false
false
false
false
0
on_popup_menu_action_join_clients(GtkWidget * menuitem, gpointer canvas_context) { struct client * client1_ptr; struct client * client2_ptr; if (!canvas_get_two_selected_modules(canvas_ptr->canvas, (void **)&client1_ptr, (void **)&client2_ptr)) { return; } if (!graph_proxy_join(canvas_ptr->graph, clie...
false
false
false
false
false
0
_rotate_test_reset(Gesture_Info *gesture) { Rotate_Type *st; EINA_SAFETY_ON_NULL_RETURN(gesture); if (!gesture->data) return; ELM_GESTURE_LAYER_DATA_GET(gesture->obj, sd); st = gesture->data; memset(st, 0, sizeof(Rotate_Type)); st->info.base_angle = ELM_GESTURE_NEGATIVE_ANGLE; st->rotate_angu...
false
false
false
false
false
0
xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id, unsigned int ep_index, unsigned int stream_id) { __le32 __iomem *db_addr = &xhci->dba->doorbell[slot_id]; struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; unsigned int ep_state = ep->ep_state; /* Don't ring the doorbell for this...
false
false
false
false
false
0
keyPressEvent(QKeyEvent* event) { QTextEdit::keyPressEvent(event); if (event->key() == Qt::Key_Insert) { setOverwriteMode(!overwriteMode()); } else { // Play sound effect int key = event->key(); if (!(event->modifiers().testFlag(Qt::ControlModifier)) && !(event->modifiers().testFlag(Qt::AltModi...
false
false
false
false
false
0
tca6507_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on, unsigned long *delay_off) { struct tca6507_led *led = container_of(led_cdev, struct tca6507_led, led_cdev); if (*delay_on == 0) led->on_dflt = 1; else if (delay_on != &led_cdev->blink_delay_on) led->on_dflt = 0...
false
false
false
false
false
0
__glXExtensionsCtrScreen(struct glx_screen * psc) { if (psc->ext_list_first_time) { psc->ext_list_first_time = GL_FALSE; (void) memcpy(psc->direct_support, direct_glx_support, sizeof(direct_glx_support)); } }
false
true
false
false
false
1
ai_build_neighbor_firm(int firmId, int firmRaceId) { short buildXLoc, buildYLoc; Nation* nationPtr = nation_array[nation_recno]; if( !nationPtr->find_best_firm_loc(firmId, loc_x1, loc_y1, buildXLoc, buildYLoc) ) { no_neighbor_space = 1; return 0; } nationPtr->add_action(buildXLoc, buildYLoc, loc_x1, loc_y1,...
false
false
false
false
false
0
axis_type_check(const char *s) throw (ParserError) { int type = axis_type(s); if (type == GLE_AXIS_ALL) { ostringstream err; err << "can't infer axis type (x, y, ...) from expression '" << s << "'; "; err << "try, e.g., 'x" << s << "'"; g_throw_parser_error(err.str()); } return type; }
false
false
false
false
false
0
str_cat5s(str* s, const char* a, const char* b, const char* c, const char* d, const char* e) { char* ptr; unsigned alen = strlen(a); unsigned blen = strlen(b); unsigned clen = strlen(c); unsigned dlen = strlen(d); unsigned elen = strlen(e); if (!str_realloc(s, s->len+alen+blen+clen+dlen+elen)) retu...
false
true
false
false
false
1
get_protocol_info_cb (GUPnPServiceProxy *cm, GUPnPServiceProxyAction *action, gpointer user_data) { gchar *sink_protocol_info; const gchar *udn; GError *error; udn = gupnp_service_info_get_udn (GUPNP_SERVICE_INF...
false
false
false
false
false
0
a11y_bus_free (void *data) { if (data == a11y_bus) { a11y_bus = NULL; dbus_connection_free_data_slot (&a11y_dbus_slot); } }
false
false
false
false
false
0
ComputeLiveOut(HBasicBlock* block) { // Compute live out for the given block, except not including backward // successor edges. BitVector* live_out = new BitVector(next_virtual_register_); // Process all successor blocks. for (HSuccessorIterator it(block->end()); !it.Done(); it.Advance()) { // Add values...
false
false
false
false
false
0
read_data_field(GwyDataField *dfield, EZDSection *section) { gdouble *data; gdouble q, z0; guint i, j; gint xres, yres; g_assert(section->data); xres = section->xres; yres = section->yres; gwy_data_field_resample(dfield, xres, yres, GWY_INTERPOLATION_NONE); data = gw...
false
false
false
false
false
0
_HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st, HB_Stream stream, HB_UShort lookup_type ) { switch ( lookup_type ) { case HB_GPOS_LOOKUP_SINGLE: return Load_SinglePos ( st, stream ); case HB_GPOS_LOOKUP_PAIR: return Load_PairPos ( st, stream ); case HB_GPOS_LOOKUP_CURSIVE: return L...
false
false
false
false
false
0
preprocess() { // process xs:include recursively // NOTE: includes are context sensitive (take context info), so keep including for (vector<xs__include>::iterator in = include.begin(); in != include.end(); ++in) { (*in).preprocess(*this); // read schema and recurse over <include> if ((*in).schemaPtr()) ...
false
false
false
false
false
0
count_common_libs(int str1, int str2) { int all_libs1[MAXLIBS], *libs1; int liberties1, liberties2; int commonlibs = 0; int k, n, tmp; ASSERT_ON_BOARD1(str1); ASSERT_ON_BOARD1(str2); ASSERT1(IS_STONE(board[str1]), str1); ASSERT1(IS_STONE(board[str2]), str2); n = string_number[str1]; liberties1...
false
false
false
false
false
0
mark_row( GtkTreeModel *model, int row ) { GtkTreeIter iter; GtkTreePath *path; path = gtk_tree_path_new_from_indices( row, -1 ); if( !gtk_tree_model_get_iter( model, &iter, path ) ) { gtk_tree_path_free( path ); return; } gtk_tree_path_free( path ); gtk_list_store_set( GTK_LIST_STORE( mod...
false
false
false
false
false
0
ui_set_fullscreen(void) { if (ui_prefs.fullscreen) { gtk_window_fullscreen(GTK_WINDOW(main_widgets.window)); } else { gtk_window_unfullscreen(GTK_WINDOW(main_widgets.window)); } }
false
false
false
false
false
0
word_end(int pos) const { // FIXME: character is ucs-4 while (pos < length() && (isalnum(char_at(pos)) || char_at(pos) == '_')) { pos = next_char(pos); } return pos; }
false
false
false
false
false
0
iwl_mvm_stat_iterator(void *_data, u8 *mac, struct ieee80211_vif *vif) { struct iwl_mvm_stat_data *data = _data; struct iwl_mvm *mvm = data->mvm; int sig = -data->beacon_filter_average_energy; int last_event; int thold = vif->bss_conf.cqm_rssi_thold; int hyst = vif->bss_conf.cqm_rssi_hyst; u16 id = le32_to...
false
false
false
false
false
0
ajFileIsStdin(const AjPFile file) { if(!file) return ajFalse; if(file->fp == stdin) return ajTrue; return ajFalse; }
false
false
false
false
false
0
remFlag(std::string s) { if (!copyOnWrite()) return false; if (b->km) libmail_kwmClearName(b->km, s.c_str()); return true; }
false
false
false
false
false
0
nsslist_cleanup(void *arg) { struct list_head *nsslist = (struct list_head *) arg; if (!list_empty(nsslist)) free_sources(nsslist); return; }
false
false
false
false
false
0
post_post_garbage_hack( httpd_conn* hc ) { char buf[2]; /* If we are in a sub-process, turn on no-delay mode in case we ** previously cleared it. */ if ( sub_process ) httpd_set_ndelay( hc->conn_fd ); /* And read up to 2 bytes. */ (void) read( hc->conn_fd, buf, sizeof(buf) ); }
true
true
false
false
true
1
kthread_stop(struct task_struct *k) { struct kthread *kthread; int ret; trace_sched_kthread_stop(k); get_task_struct(k); kthread = to_live_kthread(k); if (kthread) { set_bit(KTHREAD_SHOULD_STOP, &kthread->flags); __kthread_unpark(k, kthread); wake_up_process(k); wait_for_completion(&kthread->exited); }...
false
false
false
false
false
0
examine_braces(void) { chunk_t *pc; chunk_t *prev; pc = chunk_get_tail(); while (pc != NULL) { prev = chunk_get_prev_type(pc, CT_BRACE_OPEN, -1); if ((pc->type == CT_BRACE_OPEN) && ((pc->flags & PCF_IN_PREPROC) == 0)) { if ((((pc->parent_type == CT_IF) || ...
false
false
false
false
false
0
add_card(snd_config_t *config, snd_config_t *rw_config, struct hint_list *list, int card) { int err, ok; snd_config_t *conf, *n; snd_config_iterator_t i, next; const char *str; char ctl_name[16]; snd_ctl_card_info_t *info; int device, max_device = 0; snd_ctl_card_info_alloca(&info); list->info = info; err =...
true
true
false
false
false
1
node_insert_right (Node *node) { Node *new = node_new (); if ((!node) || (node->right)) { free (new); return 0; } new->left = node; node->right = new; return new; }
false
false
false
false
false
0
get_file_name(file_num, file_group) int file_num; int file_group; { FileList *this_list; this_list = get_file_list(file_group); if (this_list == NULL) { sprintf(ErrorBuffer, "get_file_name(): Bad file group, unable to return a file name\n"); ErrorReport(PROGRAM_ERR_LVL); return NULL...
false
false
false
false
false
0
zzip_entry_fopen(ZZIP_ENTRY * entry, int takeover) { if (! entry) return 0; if (! takeover) { ZZIP_ENTRY *found = malloc(sizeof(*entry)); if (! found) return 0; memcpy(found, entry, sizeof(*entry)); /* prescan_copy */ found->tail = malloc(found->tailallo...
false
false
false
false
true
1
prt_real_bits(real, precision, pinteger, pfraction) double real; int precision; int *pinteger; int *pfraction; { int i; int integer; float fraction; integer = (int)real; fraction = (float)(real - integer); if (real < (double)integer) fraction = -fraction; ...
false
false
false
false
false
0
gx_ht_install(gs_state * pgs, const gs_halftone * pht, gx_device_halftone * pdht) { gs_memory_t *mem = pht->rc.memory; gs_halftone *old_ht = pgs->halftone; gs_halftone *new_ht; int code; pdht->num_dev_comp = pgs->device->color_info.num_components; if (old_ht != 0 && old_ht->rc.mem...
false
false
false
false
false
0
read_mac(char *ifname, char *mac_addr) { int _sock, res; struct ifreq ifr; macstr_t mac_addr_buf; memset (&ifr,0,sizeof(struct ifreq)); /* Dummy socket, just to make ioctls with */ _sock=socket(PF_INET, SOCK_DGRAM, 0); strcpy(ifr.ifr_name, ifname); res = ioctl(_sock,SIOCGIFHWADDR,&ifr); if (res<0) {...
false
false
false
false
false
0
GetPhysicalAddressFromEeprom(void) { libcec_configuration config; config.Clear(); if (m_communication) m_communication->GetConfiguration(config); return config.iPhysicalAddress; }
false
false
false
false
false
0
ins_start_select(c) int c; { if (km_startsel) switch (c) { case K_KHOME: case K_KEND: case K_PAGEUP: case K_KPAGEUP: case K_PAGEDOWN: case K_KPAGEDOWN: # ifdef MACOS case K_LEFT: case K_RIGHT: case K_UP: case K_DOWN: case K_END: case K_HOME: # endif...
false
false
false
false
false
0
dbg_ostream(const dbg_ostream &rhs) : std::ostream(&dbg_buf), streams(rhs.streams), dbg_buf(streams) {}
false
false
false
false
false
0
key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data) { switch (event->keyval) { case GDK_Escape: gtk_main_quit(); break; case GDK_space: MB_pressed = TRUE; return FALSE; break; default: return FALSE; break; } return TRUE; }
false
false
false
false
false
0
create_graphs(Dt_t* chans) { Dt_t* lp; Dtlink_t* l1; Dtlink_t* l2; channel* cp; for (l1 = dtflatten (chans); l1; l1 = dtlink(chans,l1)) { lp = ((chanItem*)l1)->chans; for (l2 = dtflatten (lp); l2; l2 = dtlink(lp,l2)) { cp = (channel*)l2; cp->G = make_graph (cp->cnt); } } }
false
false
false
false
false
0
vtkWrapPython_GetSizesForArrays( FILE *fp, FunctionInfo *theFunc, int is_vtkobject) { int i, j, n; const char *ndnt; const char *mtwo; /* the indentation amount */ ndnt = (is_vtkobject ? " " : ""); n = vtkWrap_CountWrappedArgs(theFunc); j = (is_vtkobject ? 1 : 0); for (i = 0; i < n; i++) { ...
false
false
false
false
false
0
Perl_do_seek(pTHX_ GV *gv, Off_t pos, int whence) { dVAR; IO *const io = GvIO(gv); PerlIO *fp; if (io && (fp = IoIFP(io))) { #ifdef ULTRIX_STDIO_BOTCH if (PerlIO_eof(fp)) (void)PerlIO_seek(fp, 0L, 2); /* ultrix 1.2 workaround */ #endif return PerlIO_seek(fp, pos, whence) >= 0; } report_e...
false
false
false
false
false
0
is_same_ess(struct wlan_bssid_ex *a, struct wlan_bssid_ex *b) { return (a->Ssid.SsidLength == b->Ssid.SsidLength) && !memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength); }
false
false
false
false
false
0
crc32_be(uint32_t crc, unsigned char const *p, int len) { # if CRC_BE_BITS == 8 const uint32_t *b =(uint32_t *)p; const uint32_t *tab = crc32table_be; # ifdef __LITTLE_ENDIAN # define DO_CRC(x) crc = tab[ (crc ^ (x)) & 255 ] ^ (crc>>8) # else # define DO_CRC(x) crc = tab[ ((crc >> 24) ^ (x)) & 255] ^ (cr...
false
false
false
false
true
1
object() const { const shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : shared_ptr<Model::ModelPrivate>(); return m ? m->nodeByID(d->objectID) : NodePtr( LiteralPtr( new Literal() ) ); }
false
false
false
false
false
0
create_buf(double floor, long lookahead) { sample_type *buf = (sample_type *) malloc(lookahead * sizeof(sample_type)); int i; for (i = 0; i < lookahead; i++) buf[i] = (sample_type) floor; return buf; }
false
false
false
false
false
0
uih_alloctables(uih_context * c) { c->zengine = zoom_filter.getinstance(&zoom_filter); if (c->zengine == NULL) return; c->fcontext = make_fractalc(0, c->image->pixelwidth * c->image->width, c->image->pixelheight * c->image->height); uih_updatemenus(c, "periodicity") uih_updatemenus(c, "in0") ...
false
false
false
false
false
0
git_filebuf_cleanup(git_filebuf *file) { if (file->fd >= 0) gitfo_close(file->fd); if (file->path_lock && gitfo_exists(file->path_lock) == GIT_SUCCESS) gitfo_unlink(file->path_lock); if (file->digest) git_hash_free_ctx(file->digest); free(file->buffer); free(file->z_buf); deflateEnd(&file->zs); free(f...
false
false
false
false
false
0
soap_out__ns3__commingtotown(struct soap *soap, const char *tag, int id, const _ns3__commingtotown *a, const char *type) { if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE__ns3__commingtotown), type)) return soap->error; soap_element_result(soap, "ns3:days"); if (soap_out_int(soap, "ns...
false
false
false
false
false
0
fl_pclose( FILE * stream ) { PIDList *cur, *last; int fd; if ( ! stream || ( fd = fileno( stream ) ) < 0 ) return -1; fclose( stream ); for ( last = 0, cur = pidlist; cur && cur->fd_user != fd; last = cur, cur = last->next ) /* empty */ ; if ( ! cur ) ...
false
false
false
false
false
0
cmaes_SetMean(cmaes_t *t, const double *xmean) /* * Distribution mean could be changed before SamplePopulation(). * This might lead to unexpected behaviour if done repeatedly. */ { int i, N=t->sp.N; if (t->state >= 1 && t->state < 3) FATAL("cmaes_SetMean: mean cannot be set inbetween the calls of ", ...
false
false
false
false
false
0
intel_dp_info(struct seq_file *m, struct intel_connector *intel_connector) { struct intel_encoder *intel_encoder = intel_connector->encoder; struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base); seq_printf(m, "\tDPCD rev: %x\n", intel_dp->dpcd[DP_DPCD_REV]); seq_printf(m, "\taudio support: %s\n",...
false
false
false
false
false
0
exist_artifact(int otyp, const char *name) { const struct artifact *a; bool *arex; if (otyp && *name) { for (a = artilist+1,arex = artiexist+1; a->otyp; a++,arex++) { if ((int) a->otyp == otyp && !strcmp(a->name, name)) { return *arex; ...
false
false
false
false
false
0
ScriptableServiceGenre( const QStringList & resultRow ) : ServiceGenre( resultRow ) , ScriptableServiceMetaItem( 3 ) {}
false
false
false
false
false
0
frame_cb (CoglOnscreen *onscreen, CoglFrameEvent event, CoglFrameInfo *info, void *user_data) { ClutterStageCogl *stage_cogl = user_data; if (event == COGL_FRAME_EVENT_SYNC) { /* Early versions of the swap_event implementation in Mesa * deliver BufferSwapCom...
false
false
false
false
false
0
ecore_imf_context_del(Ecore_IMF_Context *ctx) { Ecore_IMF_Func_Node *fn; if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, "ecore_imf_context_del"); return; } if (ctx->klass->del) ctx->klass->del(ctx); if (ctx-...
false
false
false
false
false
0