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
d_def_21_(fortint * outputArray, unsigned char * gribSection1) { /* // Decodes ECMWF local definition 21 (from byte 41 onwards) from // gribSection1 into integer array values in outputArray. // // inputArray[0] corresponds to KSEC1(37) in the description at // http://www.ecmwf.int/publications/manuals/libraries/gribex/...
false
false
false
false
false
0
reopenid(FILEID id, char *mode, char *name) { FILEIO *fiop; /* file structure */ FILE *fp; struct stat sbuf; int i; /* firewall */ if ((id == FILEID_STDIN) || (id == FILEID_STDOUT) || (id == FILEID_STDERR)) { math_error("Cannot freopen stdin, stdout, or stderr"); /*NOTREACHED*/ } /* reopen the file ...
false
false
false
true
false
1
connect(const string &foreign_addr, uint16_t foreign_port) { // resolve name hostent *foreign_host; if( (foreign_host = gethostbyname(foreign_addr.c_str())) == NULL ) { //TODO: throw exception } si_other.sin_addr.s_addr = *((uint32_t*)foreign_host->h_addr_list[0]); si_other.sin_port = htons(foreign_port); ...
false
false
false
true
false
1
qofCustomerSetAddr (GncCustomer *cust, QofInstance *addr_ent) { GncAddress *addr; if (!cust || !addr_ent) { return; } addr = (GncAddress*)addr_ent; if (addr == cust->addr) { return; } if (cust->addr != NULL) { gncAddressBeginEdit(cust->addr); gncA...
false
false
false
false
false
0
servlist_favchan_add (ircnet *net, char *channel) { int pos; char *name; char *key; if (strchr (channel, ',') != NULL) { pos = (int) (strchr (channel, ',') - channel); name = g_strndup (channel, pos); key = g_strdup (channel + pos + 1); } else { name = g_strdup (channel); key = NULL; } net->favcha...
false
false
false
false
false
0
remove_one_note(struct notes_tree *t, const char *name, unsigned flag) { int status; unsigned char sha1[20]; if (get_sha1(name, sha1)) return error(_("Failed to resolve '%s' as a valid ref."), name); status = remove_note(t, sha1); if (status) fprintf(stderr, _("Object %s has no note\n"), name); else fprintf...
true
true
true
false
false
1
sco_cb(GIOChannel *chan, GIOCondition cond, struct audio_device *device) { if (cond & G_IO_NVAL) return FALSE; error("Audio connection got disconnected"); pending_connect_finalize(device); headset_set_state(device, HEADSET_STATE_CONNECTED); return FALSE; }
false
false
false
false
false
0
or_handshake_state_free(or_handshake_state_t *state) { if (!state) return; crypto_digest_free(state->digest_sent); crypto_digest_free(state->digest_received); tor_cert_free(state->auth_cert); tor_cert_free(state->id_cert); memset(state, 0xBE, sizeof(or_handshake_state_t)); tor_free(state); }
false
false
false
false
false
0
boxes_vnc_display_real_set_enable_inputs (BoxesDisplay* base, GtkWidget* widget, gboolean enable) { BoxesVncDisplay * self; GtkWidget* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; #line 109 "/extra-data/checkout/gnome/gnome-boxes/src/vnc-display.vala" self = (BoxesVncDisplay*) base; #line 109 "/extra-data/checkout/gnome...
false
false
false
false
false
0
RecalculatePositions( int width, int height ) { int propgridY = 0; int propgridBottomY = height; // Toolbar at the top. #if wxUSE_TOOLBAR if ( m_pToolbar ) { // Use default tool bar height instead and let the control decide the // most appropriate height by itself, based on tool bit...
false
false
false
false
false
0
checkTypeIndex(const std::string &type) const { size_t n = possibleTypes.size(); for (size_t i=0;i<n;i++) if (!os::_strcmpi(type.c_str(),possibleTypes[i].c_str())) return int(i); // Found: return -1; // Not found }
false
false
false
false
false
0
check_high_warn_limit(GkrellmAlert *alert, gfloat value) { GkrellmTrigger *trigger = &alert->high; if (value < trigger->warn_limit) { trigger->warn_delay = alert->delay; return FALSE; } if (trigger->warn_delay == 0) return TRUE; trigger->warn_delay -= 1; return FALSE; }
false
false
false
false
false
0
viafb_get_gamma_support_state(int bpp, unsigned int *support_state) { if (bpp == 8) *support_state = None_Device; else *support_state = CRT_Device | DVI_Device | LCD_Device; }
false
false
false
false
false
0
parse_general_features(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) { const struct bdb_general_features *general; general = find_section(bdb, BDB_GENERAL_FEATURES); if (!general) return; dev_priv->vbt.int_tv_support = general->int_tv_support; /* int_crt_support can't be trusted on ...
false
false
false
false
false
0
write_prompt() { if (!_cmdFILE.back().get_interactive()) return; // Write prompt if reading from keyboard if (_first == true) { extern bool _no_startup_message; if (!_no_startup_message) show_startup_msg(); _first = false; } #ifndef HAVE_LIBREADLINE gr_textput(_prompt.c_str()); #endif }
false
false
false
false
false
0
jisx0213_init(void) { static int initialized = 0; if (!initialized && ( jisx0208_init() || IMPORT_MAP(jp, jisx0213_bmp, &jisx0213_bmp_encmap, NULL) || IMPORT_MAP(jp, jisx0213_1_bmp, NULL, &...
false
false
false
false
false
0
ipw_qos_association(struct ipw_priv *priv, struct libipw_network *network) { int err = 0; struct libipw_qos_data *qos_data = NULL; struct libipw_qos_data ibss_data = { .supported = 1, .active = 1, }; switch (priv->ieee->iw_mode) { case IW_MODE_ADHOC: BUG_ON(!(network->capability & WLAN_CAPABILITY...
false
false
false
false
false
0
host_int_disconnect(struct host_if_drv *hif_drv, u16 u16ReasonCode) { s32 result = 0; struct host_if_msg msg; if (!hif_drv) { PRINT_ER("Driver is null\n"); return -EFAULT; } memset(&msg, 0, sizeof(struct host_if_msg)); msg.id = HOST_IF_MSG_DISCONNECT; msg.drv = hif_drv; result = wilc_mq_send(&hif_msg_q,...
false
false
false
false
false
0
gfm_client_compound_fd_op(struct gfm_connection *gfm_server, gfarm_int32_t fd, gfarm_error_t (*request_op)(struct gfm_connection *, void *), gfarm_error_t (*result_op)(struct gfm_connection *, void *), void (*cleanup_op)(struct gfm_connection *, void *), void *closure) { gfarm_error_t e; if ((e = gfm_client_comp...
false
false
false
false
false
0
ipv6_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip, struct sockaddr_tcpip *st_src __unused, struct sockaddr_tcpip *st_dest, struct net_device *netdev, uint16_t *trans_csum ) { struct sockaddr_in6 *dest = ( struct sockaddr_in6* ) st_dest; struct in6_addr next_hop; struc...
false
false
false
false
false
0
gst_audio_clock_reset (GstAudioClock * clock, GstClockTime time) { GstClockTimeDiff time_offset; if (clock->last_time >= time) time_offset = clock->last_time - time; else time_offset = -(time - clock->last_time); clock->time_offset = time_offset; GST_DEBUG_OBJECT (clock, "reset clock to %" GS...
false
false
false
false
false
0
extract1(char *line, enum gfield ntype, char *separators, int copypfx) { char *cp, *nbuf; struct name *top, *np, *t; if (line == NULL || *line == '\0') return NULL; top = NULL; np = NULL; cp = line; nbuf = ac_alloc(strlen(line) + 1); while ((cp = yankword(cp, nbuf, separators, copypfx)) != NULL) { t = nall...
false
false
false
false
false
0
DoClassMethodDeclImpl() { if (!IsAttached() || !m_InitDone) return -1; EditorManager* edMan = Manager::Get()->GetEditorManager(); cbEditor* ed = edMan->GetBuiltinActiveEditor(); if (!ed) return -3; FileType ft = FileTypeOf(ed->GetShortName()); if ( ft != ftHeader && ft != ftSou...
false
false
false
false
false
0
det(const Vector u, const Vector & v) { assert(u.dimension()==2); assert(v.dimension()==2); return( u[0] * v[1] - u[1] * v[0] ); }
false
false
false
false
false
0
gst_inter_video_src_create (GstBaseSrc * src, guint64 offset, guint size, GstBuffer ** buf) { GstInterVideoSrc *intervideosrc = GST_INTER_VIDEO_SRC (src); GstBuffer *buffer; GST_DEBUG_OBJECT (intervideosrc, "create"); buffer = NULL; g_mutex_lock (&intervideosrc->surface->mutex); if (intervideosrc->su...
false
false
false
false
false
0
ssd_ram_read_4k(struct ssd_device *dev, void *buf, size_t length, loff_t ofs, int ctrl_idx) { struct ssd_ram_op_msg *msg; dma_addr_t buf_dma; size_t len = length; loff_t ofs_w = ofs; int ret = 0; if (ctrl_idx >= dev->hw_info.nr_ctrl || (uint64_t)(ofs + length) > dev->hw_info.ram_size || !length || length > de...
false
false
false
false
false
0
is_empty(char *inStr, int strLen) { int i; if( !strLen ) strLen = strlen(inStr); for( i=0 ; i<strLen ; i++ ) { if( inStr[i] != ' ' ) return 0; } return 1; }
false
false
false
false
false
0
option_get(option_list_t* list, const char* prefix, int n, const char** name) { while (list && strcmp(list->prefix, prefix)) { list = list->next; } if (list) { if (name) *name = prefix; return list->getter ? list->getter(list->object, n, name) : 0; } else { return N...
false
false
false
false
false
0
CDB___crdel_fileopen_recover(dbenv, dbtp, lsnp, redo, info) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; int redo; void *info; { __crdel_fileopen_args *argp; DBMETA ondisk; DB_FH fh; ssize_t nr; int do_unlink, ret; u_int32_t b, mb, io; char *real_name; COMPQUIET(info, NULL); real_name = NULL; REC_PRINT(CDB_...
false
false
false
false
false
0
display_all_diskio(void) { struct iter i; unsigned long gendisk; char buf0[BUFSIZE]; char buf1[BUFSIZE]; char buf2[BUFSIZE]; char buf3[BUFSIZE]; char buf4[BUFSIZE]; char buf5[BUFSIZE]; init_iter(&i); fprintf(fp, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", "MAJOR", space(MINSPACE), mkstring(buf0, VADDR_PRLEN +...
false
false
false
false
false
0
parse_fetch_recurse_submodules_arg(const char *opt, const char *arg) { switch (git_config_maybe_bool(opt, arg)) { case 1: return RECURSE_SUBMODULES_ON; case 0: return RECURSE_SUBMODULES_OFF; default: if (!strcmp(arg, "on-demand")) return RECURSE_SUBMODULES_ON_DEMAND; die("bad %s argument: %s", opt, arg);...
false
false
false
false
false
0
e_cert_trust_has_user (CERTCertTrust *trust, PRBool checkSSL, PRBool checkEmail, PRBool checkObjSign) { if (checkSSL && !e_cert_trust_has_trust ( trust->sslFlags, CERTDB_USER)) return PR_FALSE; if (checkEmail && !e_cert_trust_has_trust ( trus...
false
false
false
false
false
0
gate_handle_loop2 (void) { if (optimize > 0 && (flag_move_loop_invariants || flag_unswitch_loops || flag_peel_loops || flag_unroll_loops #ifdef HAVE_doloop_end || (flag_branch_on_count_reg && HAVE_doloop_end) #endif )) return true; else { /* No longer preserve loops, remove them no...
false
false
false
false
false
0
getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx) { ModRefInfo Result = MRI_ModRef; for (const auto &AA : AAs) { Result = ModRefInfo(Result & AA->getArgModRefInfo(CS, ArgIdx)); // Early-exit the moment we reach the bottom of the lattice. if (Result == MRI_NoModRef) return Result; } re...
false
false
false
false
false
0
irmo_sendatom_nullify(IrmoSendAtom *atom) { if (atom->klass->destructor != NULL) { atom->klass->destructor(atom); } atom->klass = &irmo_null_atom; }
false
false
false
false
false
0
ffl2c(int lval, /* I - value to be converted to a string */ char *cval, /* O - character string representation of the value */ int *status) /* IO - error status ) */ /* convert logical value to a null-terminated formatted string. If the input value == 0, then the output character is the let...
false
false
false
false
false
0
ccss_style_destroy (ccss_style_t *self) { g_return_if_fail (self && self->properties); if (self->stylesheet) { ccss_stylesheet_destroy (self->stylesheet), self->stylesheet = NULL; } g_hash_table_destroy (self->properties), self->properties = NULL; #ifdef CCSS_DEBUG g_hash_table_destroy (self->selectors), self-...
false
false
false
false
false
0
findEiffelTags (void) { tokenInfo *const token = newToken (); exception_t exception; exception = (exception_t) (setjmp (Exception)); while (exception == ExceptionNone) { findKeyword (token, KEYWORD_class); parseClass (token); } deleteToken (token); }
false
false
false
false
false
0
img_hash_handle_queue(struct img_hash_dev *hdev, struct ahash_request *req) { struct crypto_async_request *async_req, *backlog; struct img_hash_request_ctx *ctx; unsigned long flags; int err = 0, res = 0; spin_lock_irqsave(&hdev->lock, flags); if (req) res = ahash_enqueue_request(&hdev->queue, req); if...
false
false
false
false
false
0
ExecInitValuesScan(ValuesScan *node, EState *estate, int eflags) { ValuesScanState *scanstate; RangeTblEntry *rte; TupleDesc tupdesc; ListCell *vtl; int i; PlanState *planstate; /* * ValuesScan should not have any children. */ Assert(outerPlan(node) == NULL); Assert(innerPlan(node) == NULL); /* *...
false
false
false
false
false
0
IsExtremum(SplinePoint *sp,int xdir) { SplinePoint *psp, *nsp; real val = (&sp->me.x)[xdir]; if (sp->next == NULL || sp->prev == NULL ) return( false ); psp = sp->prev->from; nsp = sp->next->to; return ((val < (&psp->me.x)[xdir] && val < (&nsp->me.x)[xdir]) || (val > (&psp->me.x)[xdir] && val...
false
false
false
false
false
0
linked_list_size(struct linked_list *list) { unsigned int ret; ret = 0; while (list) { if (list->value) ret++; list = list->next; } return ret; }
false
false
false
false
false
0
refreshFilter() { // Manage virtual patients QHash<int, QString> where; if (!settings()->value(Core::Constants::S_ALLOW_VIRTUAL_DATA, true).toBool()) where.insert(Constants::IDENTITY_ISVIRTUAL, "=0"); // All users share the same patients // where.insert(Constants:...
false
false
false
false
false
0
test_getset(const hid_t dxpl_id_c_to_f) { int row; int col; float windchillFfloatread[ROWS][COLS]; const char *simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */ const char *c_to_f = "(9/5.0)*x + 32"; char *ptrgetTest = NULL; TESTING("H5Pget_data_tran...
false
false
false
false
false
0
pk11_encrypt(PK11SymKey *symKey, CK_MECHANISM_TYPE mechType, SECItem *param, SECItem *input, SECItem **output) { PK11Context *ctxt = NULL; SECStatus rv = SECSuccess; if (*output) { SECITEM_FreeItem(*output,PR_TRUE); } *output = SECITEM_AllocItem(NULL, NULL, input->len+20 /*slop*/); if (!*outp...
false
false
false
false
false
0
key_matches(struct tdb_context *tdb, const struct tdb_used_record *rec, tdb_off_t off, const struct tdb_data *key) { tdb_bool_err ret = false; const char *rkey; if (rec_key_length(rec) != key->dsize) { tdb->stats.compare_wrong_keylen++; return ret; } rkey = tdb_access_read(tdb, off + sizeof(*rec)...
false
false
false
false
false
0
gm_world_apply_trigger(GmWorld *world, GmTrigger *trigger, gchar const *text, regmatch_t *matches, gint nummatches) { GList *item; GmTriggerData *data; gint i, nargs; gchar **spawn_args, *tmp; #ifdef HAVE_RUBY gchar *argstr; #endif for (item = trigger->actions; item; item = item->next) { data = (GmTrigger...
false
false
false
false
false
0
_int_is(char* test_name, int i1, int i2, char *file, int linenum) { _ok(test_name, (i1==i2), file, linenum, ""); if (i1!=i2) { printf("# got: %d\n", i1); printf("# expected: %d\n", i2); } }
false
false
false
false
false
0
OpenIntoRel(QueryDesc *queryDesc) { IntoClause *into = queryDesc->plannedstmt->intoClause; EState *estate = queryDesc->estate; Relation intoRelationDesc; char *intoName; Oid namespaceId; Oid tablespaceId; Datum reloptions; AclResult aclresult; Oid intoRelationId; TupleDesc tupdesc; DR_intorel *m...
false
false
false
false
false
0
New(const Arguments& args) { HandleScope scope; String::Utf8Value type(args[0]->ToString()); Parser *parser; if (0 == strcasecmp(*type, "request")) { parser = new Parser(HTTP_REQUEST); } else if (0 == strcasecmp(*type, "response")) { parser = new Parser(HTTP_RESPONSE); } else { ...
false
false
false
false
false
0
failoveronly(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group) { if (param == NULL || *param == '\0') { message(io_data, MSG_MISBOOL, 0, NULL, isjson); return; } *param = tolower(*param); if (*param != 't' && *param != 'f') { message(io_data, MSG_INVB...
false
false
false
false
false
0
clone() { Environment* env = new Environment(m_outer, m_scoped); env->m_ret_val = m_ret_val; env->m_ret_addr = m_ret_addr; if (m_temp) env->m_temp = m_temp->clone(); env->m_data.reserve(m_data.size()); for (size_t i = 0, size = m_data.size(); i < size; ++i) env->pushValue(m_data[i]->clone()); return env...
false
false
false
false
false
0
IsPlaying (NPObject *npobj, NPIdentifier /* name */, const NPVariant */*args */, uint32_t argCount, NPVariant *result) { log_debug(__PRETTY_FUNCTION__); GnashPluginScriptObject *gpso = (GnashPluginScriptObject *)npobj; if (argCount == 0) { std::vector<std::string> iargs; s...
false
false
false
false
false
0
search_results_identify_dupes(const gnutella_node_t *n, gnet_results_set_t *rs, hostiles_flags_t *hostile) { htable_t *ht = htable_create(HASH_KEY_SELF, 0); GSList *sl; unsigned dups = 0; /* Look for identical file index */ GM_SLIST_FOREACH(rs->records, sl) { gnet_record_t *rc; const void *key; rc = sl->d...
false
false
false
false
false
0
agp_open(struct inode *inode, struct file *file) { int minor = iminor(inode); struct agp_file_private *priv; struct agp_client *client; if (minor != AGPGART_MINOR) return -ENXIO; mutex_lock(&(agp_fe.agp_mutex)); priv = kzalloc(sizeof(struct agp_file_private), GFP_KERNEL); if (priv == NULL) { mutex_unlock(...
false
false
false
false
false
0
check1(HashMap<String, int> &h, ErrorHandler *errh) { CHECK(h.size() == 4); CHECK(!h.empty()); char x[4] = "\0\0\0"; int n = 0; for (HashMap<String, int>::const_iterator i = h.begin(); i.live(); i++) { CHECK(i.value() >= 1 && i.value() <= 4); CHECK(x[i.value() - 1] == 0); x[i.value() - 1] = 1; ...
false
false
false
false
false
0
add_cat(int field, int cat, int newrec) { int type, i, ret; static struct line_pnts *Points = NULL; static struct line_cats *Cats = NULL; char buf[1000]; G_debug(2, "add_cat() last_cat_line = %d, field = %d, cat = %d, newrec = %d", last_cat_line, field, cat, newrec); if (Points == NU...
false
false
false
false
false
0
duplicate (const char *str) { char *result = NULL; if (str != NULL) { result = (char*) malloc (strlen (str) + 1); if (result == NULL) perror (NULL); else strcpy (result, str); } return result; }
false
false
false
false
false
0
_e_smart_cb_slide_animator(void *data) { E_Smart_Data *sd; double t; sd = data; t = (ecore_loop_time_get() - sd->slide_start) / sd->slide_time; if (t > 1.0) t = 1.0; t = 1.0 - t; t = 1.0 - (t * t * t * t); /* more t's - more curve */ if (t > 1.0) t = 1.0; sd->pos = sd->slide_start_pos + (t *...
false
false
false
false
false
0
onKeyRelease(FXObject*,FXSelector sel,void* ptr){ if(isEnabled()){ FXTRACE((200,"%s::onKeyRelease %p keysym=0x%04x state=%04x\n",getClassName(),this,((FXEvent*)ptr)->code,((FXEvent*)ptr)->state)); if(target && target->tryHandle(this,FXSEL(SEL_KEYRELEASE,message),ptr)) return 1; if(pane && pane->shown() &&...
false
false
false
false
false
0
update_cycle_counting(void) { /* modify the timer to go off */ if ((SR & 0x8000) && mips3.cpr[0][COP0_Compare] != 0xffffffff) { UINT32 count = (activecpu_gettotalcycles64() - mips3.count_zero_time) / 2; UINT32 compare = mips3.cpr[0][COP0_Compare]; UINT32 cyclesleft = compare - count; double newtime =...
false
false
false
false
false
0
meta_tile_preview_new (int screen_number) { MetaTilePreview *preview; GdkScreen *screen; GtkStyleContext *context; GtkWidgetPath *path; guchar selection_alpha = 0xFF; screen = gdk_display_get_screen (gdk_display_get_default (), screen_number); preview = g_new (MetaTilePreview, 1); preview->previ...
false
false
false
false
false
0
relay_check_streams (relay_server *to_start, relay_server *to_free, int skip_timer) { relay_server *relay; while (to_free) { if (to_free->source) { if (to_free->running) { /* relay has been removed from xml, shut down active relay */ ...
false
false
false
false
false
0
_clutter_context_peek_shader_stack (void) { ClutterMainContext *context = _clutter_context_get_default (); if (context->shaders != NULL) return context->shaders->data; return NULL; }
false
false
false
false
false
0
mgopengl_v4fcloser(HPoint3 *p) { HPoint3 tp; HPoint3 *cp = &_mgc->cpos; HPt3Coord wn = _mgc->zfnudge * p->w; if(!(_mgc->has & HAS_CPOS)) { mg_findcam(); } if (cp->w != 0.0) { wn /= cp->w; } tp.x = p->x + wn * cp->x; tp.y = p->y + wn * cp->y; tp.z = p->z + wn * cp->z; tp.w = p->w + wn;...
false
false
false
false
false
0
GetAllAffectedVars(VarsContainer& res_cont) { if (searching) return; searching = true; body->GetAllAffectedVars(res_cont); searching = false; }
false
false
false
false
false
0
fc_fcp_cleanup_cmd(struct fc_fcp_pkt *fsp, int error) { struct fc_lport *lport = fsp->lp; if (fsp->seq_ptr) { lport->tt.exch_done(fsp->seq_ptr); fsp->seq_ptr = NULL; } fsp->status_code = error; }
false
false
false
false
false
0
nfs3_fh_build_child_fh (struct nfs3_fh *parent, struct iatt *newstat, struct nfs3_fh *newfh) { if ((!parent) || (!newstat) || (!newfh)) return -1; nfs3_fh_init (newfh, newstat); uuid_copy (newfh->exportid, parent->exportid); return 0; }
false
false
false
false
false
0
sprint_realloc_double(u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const netsnmp_variable_list * var, const struct enum_list *enums, const char *hint, const char *units) { if ((var->type != ASN_OPAQUE_DO...
false
true
false
false
false
1
evd_http_connection_on_read_headers (EvdHttpConnection *self, GString *buf) { GSimpleAsyncResult *res; gpointer source_tag; if (self->priv->async_result == NULL) return; g_io_stream_clear_pending (G_IO_STREAM (self)); res = self->priv->async_result; self...
false
false
false
false
false
0
set_variable_list(int var, char **lvalue, int write_it, EditWhich which) { char ***alval; int i; struct variable *v = &ps_global->vars[var]; PINERC_S *prc; if(!v->is_user || !v->is_list) panic1("BOTCH: Trying to set non-user or non-list variable %s", v->name); ...
false
false
false
false
true
1
pk_backend_spawn_finalize (GObject *object) { PkBackendSpawn *backend_spawn; g_return_if_fail (PK_IS_BACKEND_SPAWN (object)); backend_spawn = PK_BACKEND_SPAWN (object); if (backend_spawn->priv->kill_id > 0) g_source_remove (backend_spawn->priv->kill_id); g_free (backend_spawn->priv->name); g_object_unref (b...
false
false
false
false
false
0
unity_ratings_filter_real_update (UnityFilter* base, GVariant* properties) { UnityRatingsFilter * self; GVariantIter* iter = NULL; GVariant* _tmp0_ = NULL; self = (UnityRatingsFilter*) base; g_return_if_fail (properties != NULL); _tmp0_ = properties; g_variant_get (_tmp0_, "a{sv}", &iter, NULL); { gint i = 0;...
false
false
false
false
false
0
LLVMGetDiagInfoDescription(LLVMDiagnosticInfoRef DI) { std::string MsgStorage; raw_string_ostream Stream(MsgStorage); DiagnosticPrinterRawOStream DP(Stream); unwrap(DI)->print(DP); Stream.flush(); return LLVMCreateMessage(MsgStorage.c_str()); }
false
false
false
false
false
0
log_info(const char *buf, ...) { va_list vl; if (s_log == NULL) _log_open_default(); if (s_log && (verbose >= VERB_INFO)) { _log_timestamp(); fprintf(s_log, PREFIX_INFO); va_start(vl, buf); vfprintf(s_log, buf, vl); va_end(vl); fprintf(s_log, END_LINE_STR); fflush(s_log); } va_start(vl, buf); vsy...
false
false
false
false
true
1
setInitialMeshH(double mesh_h) { strstream strm; strm << mesh_h << ends; sendCommandToGui(theInterp,"Interface::setInitialMeshH", strm.str()); }
false
false
false
false
false
0
GMT_set_xy_domain (double wesn_extended[], struct GRD_HEADER *h) { double off; /* Sets the domain boundaries to be used to determine if x,y coordinates * are outside the domain of a grid. If gridline-registered then the * domain is extended by 0.5 the grid interval. Note that points with * x == x_max and y ==...
false
false
false
false
false
0
bit_shuffle(int n) { srandom(time(NULL)); uint64_t r = 0; int i; for (i = 0; i < n; i+=2) { if (random() * 2 >= RAND_MAX) { r |= (1ULL<<i); r &= ~(1ULL<<(i+1)); } else { r |= 1ULL<<(i+1); } } return r; }
false
false
false
false
false
0
cx2341x_try_ctrl(struct v4l2_ctrl *ctrl) { struct cx2341x_handler *hdl = to_cxhdl(ctrl); s32 val = ctrl->val; switch (ctrl->id) { case V4L2_CID_MPEG_VIDEO_B_FRAMES: { /* video gop cluster */ int b = val + 1; int gop = hdl->video_gop_size->val; gop = b * ((gop + b - 1) / b); /* Max GOP size = 34 */ wh...
false
false
false
false
false
0
gmpc_metaimage_meta_callback (GmpcMetaWatcher * gmv, mpd_Song * song, MetaDataType type, MetaDataResult ret, MetaData * met, gpointer data) { #line 1174 "gmpc-metaimage.c" #define __GOB_FUNCTION__ "Gmpc:MetaImage::meta_callback" { #line 488 "gmpc-metaimage.gob" Self *self = data; if(!song || !self || ...
false
false
false
false
false
0
evt_def_changed(GtkWidget *wid, gpointer user) { P_CmdSeq *page = user; CmdRow *row; GtkTreeIter riter; const gchar *def; if((row = cmdrow_get_selected(page, &riter)) == NULL) return; if((def = gtk_entry_get_text(GTK_ENTRY(wid))) != NULL) { csq_cmdrow_set_def(row, def); gtk_list_store_set(page->dstore, ...
false
false
false
false
false
0
list_photos_ready_cb (SoupSession *session, SoupMessage *msg, gpointer user_data) { PicasaWebService *self = user_data; GSimpleAsyncResult *result; SoupBuffer *body; DomDocument *doc; GError *error = NULL; result = _web_service_get_result (WEB_SERVICE (self)); i...
false
false
false
false
false
0
source_selector_build_model (ESourceSelector *selector) { ESourceRegistry *registry; GQueue queue = G_QUEUE_INIT; GHashTable *source_index; GtkTreeView *tree_view; GtkTreeSelection *selection; GtkTreeModel *model; ESource *selected; const gchar *extension_name; GNode *root; tree_view = GTK_TREE_VIEW (selecto...
false
false
false
false
false
0
c_kernelnames (state_t * s) { int knamectr; char **knames = vocabulary_get_knames (s->resmgr, &knamectr); int seeker = 0; if (NULL == s) { sciprintf("console.c: c_kernelnames NULL passed for parameter s\n"); return -1; } if (!knames) { sciprintf ("No kernel name table found!\n"); return ...
false
false
false
false
false
0
heapify(heap_t *heap, int i) { int l, r, smallest; heap_node_t *nodes; heap_node_t tmp_node; nodes = heap->nodes; l = left(i); r = right(i); if ((l <= heap->size) && (nodes[l].offset < nodes[i].offset)) smallest = l; else smallest = i; if ((r <= heap->size) && (nodes[r].offset ...
false
false
false
false
false
0
au_open(audio_output_t *ao) { if(ao->format < 0) ao->format = MPG123_ENC_SIGNED_16; if(ao->format & MPG123_ENC_FLOAT) { error("AU file support for float values not there yet"); return -1; } flipendian = 0; if(ao->rate < 0) ao->rate = 44100; if(ao->channels < 0) ao->channels = 2; switch(ao->format) { ...
false
false
false
false
false
0
isDateValid(const unsigned int /*year*/, const unsigned int month, const unsigned int day) { /* this very simple validity check might be enhanced in the future */ return (month >= 1) && (month <= 12) && (day >= 1) && (day <= 31); }
false
false
false
false
false
0
beam_collide_missile(obj_pair *pair) { beam *b; mc_info test_collide; int model_num; // bogus if(pair == NULL){ return 0; } // get the beam Assert(pair->a->instance >= 0); Assert(pair->a->type == OBJ_BEAM); Assert(Beams[pair->a->instance].objnum == OBJ_INDEX(pair->a)); b = &Beams[pair->a->instance]; ...
false
false
false
false
false
0
find_in_dynamic_libpath(const char *basename) { const char *p; size_t baselen; AssertArg(basename != NULL); AssertArg(first_dir_separator(basename) == NULL); AssertState(Dynamic_library_path != NULL); p = Dynamic_library_path; if (strlen(p) == 0) return NULL; baselen = strlen(basename); for (;;) { si...
false
false
false
false
false
0
toLvalue(Scope *sc, Expression *ex) { PtrExp *e; // convert (econd ? e1 : e2) to *(econd ? &e1 : &e2) e = new PtrExp(loc, this, type); e1 = e1->addressOf(sc); e2 = e2->addressOf(sc); typeCombine(sc); type = e2->type; return e; }
false
false
false
false
false
0
g_pkcs11_pin_get_value (GTlsPassword *password, gsize *length) { GPkcs11Pin *self = G_PKCS11_PIN (password); if (!self->priv->pin) { if (length) *length = 0; return NULL; } return p11_kit_pin_get_value (self->priv->pin, length); }
false
false
false
false
false
0
ChatRemoveFriend(CFriend * toremove) { #ifndef AMULE_DAEMON if (theApp->amuledlg->m_chatwnd) { theApp->amuledlg->m_chatwnd->RemoveFriend(toremove); } #endif delete toremove; }
false
false
false
false
false
0
preserve_subexpressions_p () { rtx insn; if (flag_expensive_optimizations) return 1; if (optimize == 0 || cfun == 0 || cfun->stmt == 0 || loop_stack == 0) return 0; insn = get_last_insn_anywhere (); return (insn && (INSN_UID (insn) - INSN_UID (loop_stack->data.loop.start_label) < n_non_f...
false
false
false
false
false
0
cryptd_enqueue_request(struct cryptd_queue *queue, struct crypto_async_request *request) { int cpu, err; struct cryptd_cpu_queue *cpu_queue; cpu = get_cpu(); cpu_queue = this_cpu_ptr(queue->cpu_queue); err = crypto_enqueue_request(&cpu_queue->queue, request); queue_work_on(cpu, kcrypto_wq, &cpu_queue->work...
false
false
false
false
false
0
dump_gimple_assign (pretty_printer *buffer, gimple gs, int spc, int flags) { if (flags & TDF_RAW) { tree arg1 = NULL; tree arg2 = NULL; tree arg3 = NULL; switch (gimple_num_ops (gs)) { case 4: arg3 = gimple_assign_rhs3 (gs); case 3: arg2 = gimple_assign_rhs2 (gs); case 2: arg1...
false
false
false
false
false
0
GetVisibleCategory() { wxListbook* lb = XRCCTRL(*this, "nbMain", wxListbook); size_t page = lb->GetSelection(); switch (page) { case 0: return XRCCTRL(*this, "cmbProjectCategories", wxChoice); // projects case 1: return XRCCTRL(*this, "cmbTargetCategories", wxChoice); // targets ...
false
false
false
false
false
0
operator=(const Transliterator& other) { ID = other.ID; // NUL-terminate the ID string ID.getTerminatedBuffer(); maximumContextLength = other.maximumContextLength; adoptFilter((other.filter == 0) ? 0 : (UnicodeFilter*) other.filter->clone()); return *this; }
false
false
false
false
false
0
nvm_init_sysblock(struct nvm_dev *dev, struct nvm_sb_info *info) { struct ppa_addr sysblk_ppas[MAX_SYSBLKS]; struct sysblk_scan s; int ret; /* * 1. select master blocks and select first available blks * 2. get bad block list * 3. mark MAX_SYSBLKS block as host-based device allocated. * 4. write and verify ...
false
false
false
false
false
0
acceptPcdata(const Location &startLocation) { if (currentElement().tryTransitionPcdata()) return; // Need to test here since implying tags may turn off pcdataRecovering. if (pcdataRecovering()) return; IList<Undo> undoList; IList<Event> eventList; unsigned startImpliedCount = 0; unsigned attribute...
false
false
false
false
false
0
getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret) { switch (s->sock_family) { #if defined(AF_UNIX) case AF_UNIX: { *len_ret = sizeof (struct sockaddr_un); return 1; } #endif /* AF_UNIX */ #if defined(AF_NETLINK) case AF_NETLINK: { *len_ret = sizeof (stru...
false
false
false
false
false
0