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
e_modapi_init(E_Module *m) { char buf[4096]; #ifdef HAVE_ENOTIFY e_notification_init(); #endif conf_edd = E_CONFIG_DD_NEW("Battery_Config", Config); #undef T #undef D #define T Config #define D conf_edd E_CONFIG_VAL(D, T, poll_interval, INT); E_CONFIG_VAL(D, T, alert, INT); E_CONFIG_VAL(D, T, alert_...
false
false
false
false
false
0
ntru_rand_device_init(NtruRandContext *rand_ctx, struct NtruRandGen *rand_gen, char *filename) { int rand_fd = open(filename, O_RDONLY); if (rand_fd >= 0) { /* save rand_fd in rand_ctx->state */ int *fd_ptr = malloc(sizeof(int)); if (fd_ptr == NULL) return 0; *fd_ptr ...
false
false
false
false
false
0
reverseCnts(Aword adr) #else static void reverseCnts(adr) Aword adr; #endif { CntElem *e = (CntElem *) &memory[adr]; if (adr != 0 && !endOfTable(e)) { reverseTable(adr, sizeof(CntElem)); while (!endOfTable(e)) { reverseLims(e->lims); reverseStms(e->header); reverseStms(e->empty); ...
false
false
false
false
false
0
multiplyCheckOverflow(int a, int b, int *result) { #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) return __builtin_mul_overflow(a, b, result); #else if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits return true; *result = a * b; retur...
false
false
false
false
false
0
InndHisWrite(const char *key, time_t arrived, time_t posted, time_t expires, TOKEN *token) { bool r = HISwrite(History, key, arrived, posted, expires, token); if (r != true) IOError("history write", errno); return r; }
false
false
false
false
false
0
main(int argc,char * argv[]) { if(!Init_program(argc,argv)) { Program_shutdown(); return 0; } Main_handler(); Program_shutdown(); return 0; }
false
false
false
false
false
0
initio_unlink_busy_scb(struct initio_host * host, struct scsi_ctrl_blk * scb) { struct scsi_ctrl_blk *tmp, *prev; #if DEBUG_QUEUE printk("unlink busy SCB %p; ", scb); #endif prev = tmp = host->first_busy; while (tmp != NULL) { if (scb == tmp) { /* Unlink this SCB */ if (tmp == host->first_busy) ...
false
false
false
false
false
0
cnic_close_prep(struct cnic_sock *csk) { clear_bit(SK_F_CONNECT_START, &csk->flags); smp_mb__after_atomic(); if (test_and_clear_bit(SK_F_OFFLD_COMPLETE, &csk->flags)) { while (test_and_set_bit(SK_F_OFFLD_SCHED, &csk->flags)) msleep(1); return 1; } return 0; }
false
false
false
false
false
0
so_call_sync_thread(threadinfo_t *threadinfo_p) { printf_ddd("Debug3: so_call_exec_thread(): thread_num == %i; threadinfo_p == %p; i_p->pthread %p; thread %p\n", threadinfo_p->thread_num, threadinfo_p, threadinfo_p->pthread, pthread_self()); options_t *options_p = threadinfo_p->options_p; int n = threadinfo_p...
false
false
false
false
false
0
encryptInPlace(ThreefishKey_t* key, const uint64_t* chain, uint64_t* plain_text, const uint64_t num_blocks) { pd2("encryptInPlace(key:%lu, chain:%lu, plain_text:%lu, num_blocks:%lu)\n", key->key[0], chain[0], plain_text[0], num_blocks); switch(key->sta...
false
false
false
false
false
0
svg_curveto(gx_device_vector *vdev, floatp x0, floatp y0, floatp x1, floatp y1, floatp x2, floatp y2, floatp x3, floatp y3, gx_path_type_t type) { gx_device_svg *svg = (gx_device_svg *)vdev; char line[SVG_LINESIZE]; /* hack single-page output */ if (svg->page_count) return...
true
true
false
false
false
1
lambda_delete(spot) int spot; /* in list */ { int value = lambda_list[spot].value; if ( lambda_list[spot].prev ) lambda_list[spot].prev->next = lambda_list[spot].next; else { lambda_heads[value] = lambda_list[spot].next; if ( (lambda_heads[value] == NULL) && (value == lambdamax) ) { /* reset lambdamax...
false
false
false
false
false
0
mailimf_cfws_parse(const char * message, size_t length, size_t * indx) { size_t cur_token; int has_comment; int r; cur_token = * indx; has_comment = FALSE; while (1) { r = mailimf_cfws_fws_comment_parse(message, length, &cur_token); if (r != MAILIMF_NO_ERROR) { if (r == MAILIMF_ERRO...
false
false
false
false
false
0
role_axis_line_can_add (GogObject const *parent) { GogChart *chart = GOG_AXIS_BASE (parent)->chart; GogAxisSet axis_set = gog_chart_get_axis_set (chart); if (axis_set == GOG_AXIS_SET_XY || (axis_set == GOG_AXIS_SET_RADAR && gog_axis_get_atype (GOG_AXIS (parent)) == GOG_AXIS_RADIAL)) return TRUE; retu...
false
false
false
false
false
0
test_new (Fixture *f, gconstpointer data) { g_assert (EVD_IS_WEBSOCKET_CLIENT (f->ws_client)); g_assert (EVD_IS_TRANSPORT (f->ws_client)); g_assert (EVD_IS_WEBSOCKET_SERVER (f->ws_server)); g_assert (EVD_IS_WEB_SERVICE (f->ws_server)); g_assert (EVD_IS_TRANSPORT (f->ws_server)); }
false
false
false
false
false
0
List_getLastValue(List * list) { ListNode * node; if(list == NULL) return NULL; node = list->lastNode; if(node == NULL) return NULL; return node->data; }
false
false
false
false
false
0
gt_get_icao_cc(const char* country, const char* shortname) { static char res[3]; gt_country_code_t* x = &gt_country_codes[0]; if ((country == NULL) || (*country == '\0')) { const char* test; if (shortname == NULL) { return NULL; } switch (strlen(shortname)) { case 3: strncpy(res, ...
true
true
false
false
false
1
nfs3_fh_resolve_validate_dirdepth (nfs3_call_state_t *cs) { int ret = 1; if (!cs) return 0; /* This condition will generally never be hit because the * hash-matching scheme will prevent us from going into a * directory that is not part of the hash-array. ...
false
false
false
false
false
0
CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify the "strcat" function prototype. FunctionType *FT = Callee->getFunctionType(); if (FT->getNumParams() != 2 || FT->getReturnType() != B.getInt8PtrTy() || FT->getParamType(0) != FT->getReturnType() || FT->getPara...
false
false
false
false
false
0
OnCreatureEnterCombat(Creature* pCreature) { if (pCreature->GetEntry() == NPC_GRETHOK_CONTROLLER) { SetData(TYPE_RAZORGORE, IN_PROGRESS); m_uiDefenseTimer = 40000; } }
false
false
false
false
false
0
set_mime_html(ostream &strm, ObjectType type, EncodingType enc, const time_t last_modified, const string &protocol) { strm << "HTTP/1.0 200 OK" << CRLF; strm << "XDODS-Server: " << DVR<< CRLF; strm << "XOPeNDAP-Server: " << DVR<< CRLF; if (protocol == "") strm << "XDAP: " << DAP_PROTOC...
false
false
false
false
false
0
ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba, u8 *desc_buf, int len) { u32 icc_level = 0; if (!hba->vreg_info.vcc || !hba->vreg_info.vccq || !hba->vreg_info.vccq2) { dev_err(hba->dev, "%s: Regulator capability was not set, actvIccLevel=%d", __func__, icc_level); goto out; } ...
false
false
false
false
false
0
esl_scorematrix_Clone(const ESL_SCOREMATRIX *S) { ESL_SCOREMATRIX *dup = NULL; if ((dup = esl_scorematrix_Create(S->abc_r)) == NULL) return NULL; if (esl_scorematrix_Copy(S, dup) != eslOK) { esl_scorematrix_Destroy(dup); return NULL; } return dup; }
false
false
false
false
false
0
__ata_sff_interrupt(int irq, void *dev_instance, unsigned int (*port_intr)(struct ata_port *, struct ata_queued_cmd *)) { struct ata_host *host = dev_instance; bool retried = false; unsigned int i; unsigned int handled, idle, polling; unsigned long flags; /* TODO: make _irqsave conditional on x86 PCI IDE legacy...
false
false
false
false
false
0
isOlder(const UT_UUID &u) const { if((m_uuid.time_high_and_version & 0xFFF) < (u.m_uuid.time_high_and_version & 0xFFF)) return true; else if((m_uuid.time_high_and_version & 0xFFF) > (u.m_uuid.time_high_and_version & 0xFFF)) return false; if(m_uuid.time_mid < u.m_uuid.time_mid) return true; else if(m_uuid.ti...
false
false
false
false
false
0
soap_in__wsrm__SequenceAcknowledgement_AcknowledgementRange(struct soap *soap, const char *tag, struct _wsrm__SequenceAcknowledgement_AcknowledgementRange *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct _wsrm__SequenceAcknowledgement_AcknowledgementRange *)soap_id_ent...
false
false
false
false
false
0
flite_voice_add_lex_addenda(cst_voice *v, const cst_string *lexfile) { /* Add addenda in lexfile to current voice */ cst_lexicon *lex; const cst_val *lex_addenda = NULL; cst_val *new_addenda; lex = val_lexicon(feat_val(v->features,"lexicon")); if (feat_present(v->features, "lex_addenda")) lex_...
false
false
false
false
false
0
IsCheckListboxItemChecked(const wxString& name, unsigned int item) { wxWizardPage* page = m_pWizard->GetCurrentPage(); if (page) { wxCheckListBox* clb = dynamic_cast<wxCheckListBox*>(page->FindWindowByName(name, page)); if (clb) return clb->IsChecked(item); } return false...
false
false
false
false
false
0
snd_pcm_oss_get_caps1(struct snd_pcm_substream *substream, int res) { if (substream == NULL) { res &= ~DSP_CAP_DUPLEX; return res; } #ifdef DSP_CAP_MULTI if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) if (substream->pstr->substream_count > 1) res |= DSP_CAP_MULTI; #endif /* DSP_CAP_REALTIME is set al...
false
false
false
false
false
0
audio_getdevs(char *indevlist, int *nindevs, char *outdevlist, int *noutdevs, int *canmulti, int *cancallback, int maxndev, int devdescsize) { audio_init(); *cancallback = 0; /* may be overridden by specific API implementation */ #ifdef USEAPI_PORTAUDIO if (sys_audioapi == API_PORTAUDIO) {...
false
true
false
false
false
1
keystroke(const Event& e) { StrEditDialogImpl& i = *impl_; char c; if (e.mapkey(&c, 1) != 0) { if (c == '\r') { i.accept(); } else if (c == '') { i.cancel(); } else i.editor_->keystroke(e); } }
false
false
false
false
false
0
sw_service_flickr_initable (GInitable *initable, GCancellable *cancellable, GError **error) { SwServiceFlickr *flickr = SW_SERVICE_FLICKR (initable); SwServiceFlickrPrivate *priv = flickr->priv; const char *key = NULL, *secret = NULL; if (priv->in...
false
false
false
false
false
0
zx_el_desc_lookup(int tok) { struct zx_el_desc* ed; if (tok == ZX_TOK_NOT_FOUND) return 0; if (!IN_RANGE(tok & ZX_TOK_TOK_MASK, 0, zx__ELEM_MAX)) { ERR("out of range token 0x%06x", tok); return 0; } for (ed = zx_el_tab[tok & ZX_TOK_TOK_MASK].n; ed; ed = ed->n) if (ed->tok == tok) return ...
false
false
false
false
false
0
operator<<(std::ostream &os, const ModuleDescription &module) { os << "Title: " << module.GetTitle() << std::endl; os << "Category: " << module.GetCategory() << std::endl; os << "Index: " << module.GetIndex() << std::endl; os << "Description: " << module.GetDescription() << std::endl; os << "Version: " << mod...
false
false
false
false
false
0
memicmp( const char *a, const char *b, size_t n ) { for( ; n; n--, a++, b++ ) if( *a != *b && toupper(*(const byte*)a) != toupper(*(const byte*)b) ) return *(const byte *)a - *(const byte*)b; return 0; }
false
false
false
false
false
0
tw9910_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) { struct i2c_client *client = v4l2_get_subdevdata(sd); struct tw9910_priv *priv = to_tw9910(client); a->bounds.left = 0; a->bounds.top = 0; if (priv->norm & V4L2_STD_NTSC) { a->bounds.width = 640; a->bounds.height = 480; } else { a->bounds...
false
false
false
false
false
0
XzCheck_Final(CXzCheck *p, Byte *digest) { switch (p->mode) { case XZ_CHECK_CRC32: SetUi32(digest, CRC_GET_DIGEST(p->crc)); break; case XZ_CHECK_CRC64: { int i; UInt64 v = CRC64_GET_DIGEST(p->crc64); for (i = 0; i < 8; i++, v >>= 8) digest[i] = (Byte)(v ...
false
false
false
false
false
0
gwy_shader_init(GwyShader *shader) { shader->update_policy = GTK_UPDATE_CONTINUOUS; GTK_WIDGET_SET_FLAGS(shader, GTK_CAN_FOCUS | GTK_NO_WINDOW); }
false
false
false
false
false
0
add_stage_number(int delta) { if (current_stage_number + delta <= 0) { fprintf(stderr, "add_stage_number: trying to let stage_number negative, " "assuming 1 instead\n"); current_stage_number = 1; } else { current_stage_number += delta; } return current_stage_number; }
false
false
false
false
false
0
test_timeout(struct at_state_t *at_state) { if (!at_state->timer_expires) return 0; if (--at_state->timer_expires) { gig_dbg(DEBUG_MCMD, "decreased timer of %p to %lu", at_state, at_state->timer_expires); return 0; } gigaset_add_event(at_state->cs, at_state, EV_TIMEOUT, NULL, at_state->timer_index, ...
false
false
false
false
false
0
dell_led_init(void) { int error = 0; if (!wmi_has_guid(DELL_LED_BIOS_GUID) && !wmi_has_guid(DELL_APP_GUID)) return -ENODEV; if (wmi_has_guid(DELL_APP_GUID)) error = dell_micmute_led_init(); if (wmi_has_guid(DELL_LED_BIOS_GUID)) { error = led_off(); if (error != 0) return -ENODEV; error = led_classd...
false
false
false
false
false
0
page_mkclean(struct page *page) { int cleaned = 0; struct address_space *mapping; struct rmap_walk_control rwc = { .arg = (void *)&cleaned, .rmap_one = page_mkclean_one, .invalid_vma = invalid_mkclean_vma, }; BUG_ON(!PageLocked(page)); if (!page_mapped(page)) return 0; mapping = page_mapping(page); i...
false
false
false
false
false
0
dev_rom_init(vm_instance_t *vm,char *name,m_uint64_t paddr,m_uint32_t len, m_uint8_t *rom_data,ssize_t rom_data_size) { struct rom_data *d; /* allocate the private data structure */ if (!(d = malloc(sizeof(*d)))) { fprintf(stderr,"ROM: unable to create device.\n"); return(-1); ...
false
false
false
false
false
0
json_utf8_to_utf16(unsigned short *utf16, char utf8[], int len) /* {{{ */ { size_t pos = 0, us; int j, status; if (utf16) { /* really convert the utf8 string */ for (j=0 ; pos < len ; j++) { us = php_next_utf8_char((const unsigned char *)utf8, len, &pos, &status); if (status != SUCCESS) { return -1; ...
false
false
false
false
false
0
try_ioctlpath(const char *path, unsigned long ioctlnum, int entrypoint) { int fd, ret, saved_errno; fd = open(path, O_RDWR); if (fd < 0) return 1; switch (entrypoint) { case LINUX_PROC_POINT: { struct procdata data = { 0, 0, 0, 0, AFSCALL_PIOCTL }; data.param2 = (unsigned long)VIOCGETTOK; ret =...
false
false
false
false
false
0
ExtraHeaders(const Buffer &buf) { if ( extra_headers ) { delete[] extra_headers; extra_headers=0; } extra_headersptr=0; if (!buf.Length()) return; extra_headers=new char[buf.Length()+1]; if (!extra_headers) outofmem(); memcpy(extra_headers, (const char *)buf, buf.Length()); extra_headers[buf.Length()]=0; ...
false
false
false
false
false
0
gt_suftabparts_rc_minindex_raw( unsigned int part, const GtSuftabparts_rc *suftabparts_rc) { GtCodetype minindex; gt_assert(suftabparts_rc != NULL && part < suftabparts_rc->numofparts); minindex = (part == 0) ? 0 : suftabparts_rc->components[part-1].nextidx + 1; if (suftabparts_rc->fct != NULL) { ret...
false
false
false
false
false
0
load_keyfile (GESFormatter * keyfile_formatter, GESTimeline * timeline) { GKeyFile *kf; GError *error = NULL; gboolean ret = TRUE; gchar **groups; gsize n_groups, i; GESTimelineLayer *cur_layer = NULL; gchar *data; gsize length; kf = g_key_file_new (); data = ges_formatter_get_data (keyfile_formatt...
false
false
false
false
false
0
ringbuf_pushcp(Ringbuf *rb, void *memaddr, size_t size){ int full = ringbuf_isfull(rb); if (!full){ rb->keys[rb->write] = calloc(1, size); memcpy(rb->keys[rb->write], memaddr, size); rb->write++; rb->write %= rb->num_keys; rb->fill++; } return !full; }
false
false
false
false
false
0
DrawPolygon(const std::vector<std::pair<double,double> > &points) { m_ofs << "<polygon points=\""; std::vector<std::pair<double,double> >::const_iterator i; for (i = points.begin(); i != points.end(); ++i) m_ofs << i->first << ' ' << i->second << ' '; m_ofs << "\""; m_ofs << " stroke-width...
false
false
false
false
false
0
do_link(FILE * f, char *line) { Port *lport, *rport; Node *lnode, *rnode; char *orig = 0; char *lnodeid = 0; char *rnodeid = 0; char *s = line, name[NAMELEN], *sp; int lportnum = -1, rportnum = -1; // parse local if (strsep(&s, "\"")) orig = strsep(&s, "\""); lnodeid = expand_name(orig, name, &sp); if (!...
false
false
false
false
false
0
ensure_there_are_changes_to_stash( git_repository *repo, bool include_untracked_files, bool include_ignored_files) { int error; git_status_options opts; memset(&opts, 0, sizeof(opts)); opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR; if (include_untracked_files) opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED |...
false
false
false
false
false
0
bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size) { void *res; if ((nmemb | size) >= HALF_BFD_SIZE_TYPE && size != 0 && nmemb > ~(bfd_size_type) 0 / size) { bfd_set_error (bfd_error_no_memory); return NULL; } size *= nmemb; res = bfd_alloc (abfd, size); if (re...
false
false
false
false
false
0
dsgw_emit_converts_to (char* charset) { const char* target; if (emit_converter != NULL) { ucnv_close (emit_converter); emit_converter = NULL; } if (charset) charset = choose_charset (charset); if (charset && *charset) { target = charset; } else { target = ISO_8859_1_ENCODING; } if ( ...
false
false
false
false
false
0
cl_host_alias_list_append_host(cl_raw_list_t* list_p, char* local_resolved_name, char* alias_name, int lock_list) { cl_host_alias_list_elem_t* new_elem = NULL; int ret_val; char* help = NULL; if (list_p == NULL || local_resolved_name == NULL || alias_name == NULL ) { return CL_RETVAL_PARAMS; } ...
false
false
false
false
false
0
ocfs2_dlm_init_debug(struct ocfs2_super *osb) { int ret = 0; struct ocfs2_dlm_debug *dlm_debug = osb->osb_dlm_debug; dlm_debug->d_locking_state = debugfs_create_file("locking_state", S_IFREG|S_IRUSR, osb->osb_debug_root, osb, &ocfs2_dlm_debug_fops); if (!dlm_debug->d_locking_state) ...
false
false
false
false
false
0
LCL_NotifyExternalTimeStep(struct timeval *raw, struct timeval *cooked, double offset, double dispersion) { ChangeListEntry *ptr; /* Dispatch to all handlers */ for (ptr = change_list.next; ptr != &change_list; ptr = ptr->next) { (ptr->handler)(raw, cooked, 0.0, offset, 1, ptr->anything); } lcl_Invo...
false
false
false
false
false
0
__ecereMethod_ProjectView_DebugStepOver(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int skip) { struct ProjectView * __ecerePointer_ProjectView = (struct ProjectView *)(this ? (((char *)this) + __ecereClass_ProjectView->offset) : 0); struct __ecereNameSpace__ecere__com__Instance * compiler = __ecereM...
false
false
false
true
false
1
validate_rename(tentry *clean, tentry *data, int *deleteoldrdn) { if (!*entry_dn(clean)) { puts("Error: Cannot rename ROOT_DSE."); return -1; } if (!*entry_dn(data)) { puts("Error: Cannot replace ROOT_DSE."); return -1; } if (frob_rdn(clean, entry_dn(clean), FROB_RDN_CHECK) == -1) { puts("Error: Old RDN ...
false
false
false
false
false
0
Term_mousepress(int x, int y, char button) { /* Store the char, advance the queue */ Term->key_queue[Term->key_head].type = EVT_MOUSE; Term->key_queue[Term->key_head].mouse.x = x; Term->key_queue[Term->key_head].mouse.y = y; Term->key_queue[Term->key_head].mouse.button = button; Term->key_head++; /* Ci...
false
false
false
false
false
0
EffectDummyCreature_spell_boss_majordomo(Unit* /*pCaster*/, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { if (uiSpellId != SPELL_TELEPORT_SELF || uiEffIndex != EFFECT_INDEX_0) { return false; } pCreatureTarget->SetFlag(UNIT_NPC_FL...
false
false
false
false
false
0
_ecore_file_monitor_poll_checking(Ecore_File_Monitor *em, char *name) { Ecore_File *l; EINA_INLIST_FOREACH(em->files, l) { if (!strcmp(l->name, name)) return 1; } return 0; }
false
false
false
false
false
0
ClassIDMapToCode( void *theEnv, char *fileName, int fileID, FILE *headerFP, int imageID, int maxIndices, int *fileCount) { FILE *classIDMapFile = NULL; int classIDMapArrayCount, classIDMapArrayVersion = 1; classIDMapFile = OpenFileIfNeeded(theEnv,classIDMapFile,fileName,fileID,imageID,f...
false
false
false
false
false
0
farcstdx(field_t *field1, field_t field2, const double rconst1, const double divisor) { size_t i, len; int nwpv = field1->nwpv; const int grid1 = field1->grid; const double missval1 = field1->missval; double *array1 = field1->ptr; const int grid2 = field2.grid; if ( nwpv != 2 ...
false
false
false
false
false
0
sumo_apply_state_adjust_rules(struct radeon_device *rdev, struct radeon_ps *new_rps, struct radeon_ps *old_rps) { struct sumo_ps *ps = sumo_get_ps(new_rps); struct sumo_ps *current_ps = sumo_get_ps(old_rps); struct sumo_power_info *pi = sumo_get_pi(rdev); u32 min_voltage = 0; /* ??? */ u32 min_sclk =...
false
false
false
false
false
0
renderBitmapEx(int frame, int x, int y, int w, int h, int sx, int sy) { int nx = 0, ny = 0; if( !emp_should_blit_gauge() ) { return; } emp_hud_jitter(&x, &y); gr_set_bitmap(frame); if( gr_screen.rendering_to_texture != -1 ) { gr_set_screen_scale(canvas_w, canvas_h, target_w, target_h); } else { if ...
false
false
false
false
false
0
perform(vector<string> &l, string &result) { int retval = 0; if ((l.size() == 0) && mainWindow) mainWindow->show(); else if (l.size() > 0) { if (cmp_nocase(l[0], "toolbar") == 0) { toolbar_cb(0,0); } else if (cmp_nocase(l[0], "print") == 0) { if (!titleBox) ...
false
false
false
false
false
0
checkrepeated (FuncState *fs, Labellist *ll, TString *label) { int i; for (i = fs->bl->firstlabel; i < ll->n; i++) { if (eqstr(label, ll->arr[i].name)) { const char *msg = luaO_pushfstring(fs->ls->L, "label '%s' already defined on line %d", getstr(label)...
false
false
false
false
false
0
default_event_handler( GuiWidget *widget, GuiEvent *event ) { switch ( event->type ) { case GUI_DESTROY: break; case GUI_DRAW: /* display surface */ stk_surface_blit( widget->surface, 0,0,-1,-1, stk_display, ...
false
false
false
false
false
0
light_rotate(light * l) { switch( l->type ) { case LT_DIRECTIONAL: // Rotate the light direction into local coodinates vm_vec_rotate(&l->local_vec, &l->vec, &Light_matrix ); break; case LT_POINT: { vec3d tempv; // Rotate the point into local coordinates vm_vec_sub(&tempv, &l->vec, &Light_base )...
false
false
false
false
false
0
port() const { if (d->invalid()) return 0; switch (d->addr.generic->sa_family) { case AF_INET: return ntohs(d->addr.in->sin_port); #ifdef AF_INET6 case AF_INET6: return ntohs(d->addr.in6->sin6_port); #endif } return 0; }
false
false
false
false
false
0
bq24257_hw_init(struct bq24257_device *bq) { int ret; int i; struct bq24257_state state; const struct { int field; u32 value; } init_data[] = { {F_ICHG, bq->init_data.ichg}, {F_VBAT, bq->init_data.vbat}, {F_ITERM, bq->init_data.iterm}, {F_VOVP, bq->init_data.vovp}, {F_VINDPM, bq->init_data.vindpm}, ...
false
false
false
false
false
0
nvkm_pmu_pgob(struct nvkm_pmu *pmu, bool enable) { if (pmu && pmu->func->pgob) pmu->func->pgob(pmu, enable); }
false
false
false
false
false
0
lookup_system_name (const char *name) { int i; for (i = 0; system_table[i].name != NULL; ++i) { if (strcasecmp (name, system_table[i].name) == 0) { return system_table[i].node; } } return cb_error_node; }
false
false
false
false
false
0
setText(DOMStringImpl *text, bool force) { if (!force && str == text) return; setTextInternal(text); }
false
false
false
false
false
0
mtrr_file_add(unsigned long base, unsigned long size, unsigned int type, bool increment, struct file *file, int page) { unsigned int *fcount = FILE_FCOUNT(file); int reg, max; max = num_var_ranges; if (fcount == NULL) { fcount = kzalloc(max * sizeof *fcount, GFP_KERNEL); if (!fcount) return -ENOMEM; ...
false
false
false
false
false
0
dsgw_emit_confirm (const char* frame, const char* yes, const char* no, const char* windowOptions, int enquote, const char* format, ...) { if (!windowOptions) windowOptions = defaultWindowOptions; dsgw_emits (" cw = window.open ('', 'confirmWindow', "); dsgw_quote_emits (QUOTATION_JAVASCRIPT, windowOpti...
false
false
false
false
false
0
splitFileName(const std::wstring &fileName, std::wstring &name, std::wstring &ext, std::wstring &lang, std::wstring &country) { int pos = fileName.find_last_of(L'.'); if (pos <= 0) { ext = L""; name = fileName; } else { name = fileName.substr(0, pos); ext = fileName.s...
false
false
false
false
false
0
heat_neumann_res2(const EL_INFO *el_info, int face, const REAL_D *Lambda, REAL det, const struct heat_est_data *data) { int i, j, iq, dim = el_info->mesh->dim; REAL lambda[N_LAMBDA], n_A_grd_uh, val; REAL_D normal, grd_uh, A_grd_uh; const QUAD *quad = data->q...
false
false
false
false
false
0
__do_dmpvars_baseline(char *keyws) { __cur_sofs = 0; if (__dv_outlinpos != 0) { addch_('\n'); __exprline[__cur_sofs] = '\0'; dv_wr(FALSE); } if (!__dv_time_emitted) { sprintf(__xs2, "#%s\n", to_dvtimstr(__xs, __simtime)); __adds(__xs2); __dv_time_emitted = TRUE; dv_wr(FALSE); } __add...
false
false
false
false
false
0
fi_extend_chunklist(fileinfo_t *fi, filesize_t size) { struct dl_file_chunk *fc; g_assert(fi->size < size); fc = dl_file_chunk_alloc(); fc->from = fi->size; fc->to = size; fc->status = DL_CHUNK_EMPTY; eslist_append(&fi->chunklist, fc); /* * Don't remove/re-insert `fi' from hash tables: when this routine is...
false
false
false
false
false
0
mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c) { mp_err res; ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG); if((res = mp_mul(a, b, c)) != MP_OKAY) return res; if((res = mp_mod(c, m, c)) != MP_OKAY) return res; return MP_OKAY; }
false
false
false
false
false
0
vocgobj(voccxdef *ctx, char *cmd[], int typelist[], int cur, int *next, int complain, vocoldef *nounlist, int multi, int chkact, int *no_match) { int cnt; int outcnt = 0; int i; int again = FALSE; int lastcur; vocoldef *tmplist; ...
false
false
false
false
false
0
jedec_reset(u32 base, struct map_info *map, struct cfi_private *cfi) { /* Reset */ /* after checking the datasheets for SST, MACRONIX and ATMEL * (oh and incidentaly the jedec spec - 3.5.3.3) the reset * sequence is *supposed* to be 0xaa at 0x5555, 0x55 at * 0x2aaa, 0xF0 at 0x5555 this will not affect the AMD ...
false
false
false
false
false
0
exchange_secret_keys (GoaKerberosProvider *self, const char *password, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *operation_result; GcrSe...
false
false
false
false
false
0
ladish_find_app_by_pid(pid_t pid, ladish_graph_handle * graph_ptr) { struct app_find_context context; context.pid = pid; context.app = NULL; context.graph = NULL; ladish_studio_iterate_virtual_graphs(&context, lookup_app_in_supervisor); if (context.app == NULL) { /* app not found */ ASSERT(context....
false
false
false
false
false
0
jl_len(const void *item) { struct jlnode *n; int count=0; for(n = (struct jlnode *) _jl_hash_get(item);n;n=n->next) count++; return count-1; }
false
false
false
false
false
0
set_masterbias_qc_structure(xsh_pre * master, cpl_parameterlist* parameters) { cpl_parameter* p=NULL; int ref_x=-1; int ref_y=-1; int ref_llx=0; int ref_lly=0; int ref_urx=0; int ref_ury=0; int sx=0; int sy=0; //int dlevel=0; sx=cpl_image_get_size_x(master->data); sy=cpl_image_get_size_y(mas...
false
false
false
false
false
0
Set(MYSQL_RES *res) { // Discard and free any previous result if (result) Free(); result=res; Refresh(); }
false
false
false
false
false
0
header() { static int ino; int inode = ++ino; if (name == "TRAILER!!!") inode = 0; deeper->fputs("070701"); // magic number hex8(inode); // inode hex8(0100644); // mode hex8(0); // uid hex8(0); // gid hex8(1); // nlinks hex8(mtime); // mtime hex8(length); // size hex8(0...
false
false
false
false
false
0
PopulateOrExchange(ShuttleGui & S) { wxTextCtrl *w; S.SetBorder(2); S.StartStatic(_("Effects Preview")); { S.StartThreeColumn(); { w = S.TieNumericTextBox(_("&Length of preview:"), wxT("/AudioIO/EffectsPreviewLen"), 6.0...
false
false
false
false
false
0
gda_data_proxy_get_attributes_at (GdaDataModel *model, gint col, gint row) { GdaValueAttribute attrs; GdaDataProxy *proxy; g_return_val_if_fail (GDA_IS_DATA_PROXY (model), FALSE); proxy = (GdaDataProxy*) model; g_return_val_if_fail (proxy->priv, FALSE); gda_mutex_lock (proxy->priv->mutex); attrs = gda_data_pro...
false
false
false
false
false
0
png_image_write_to_stdio(png_imagep image, FILE *file, int convert_to_8bit, const void *buffer, png_int_32 row_stride, const void *colormap) { /* Write the image to the given (FILE*). */ if (image != NULL && image->version == PNG_IMAGE_VERSION) { if (file != NULL) { if (png_image_write_...
false
false
false
false
false
0
vsxxxaa_smells_like_packet(struct vsxxxaa *mouse, unsigned char type, size_t len) { return mouse->count >= len && MATCH_PACKET_TYPE(mouse->buf[0], type); }
false
false
false
false
false
0
mayShootRay(const int incomingPosition) const { if (m_tutorial->isVisible() && !m_tutorial->mayShootRay(incomingPosition)) return false; else return true; }
false
false
false
false
false
0
mpeg2ps_stream_read_next_pes_buffer (mpeg2ps_stream_t *sptr) { u16 pes_len; Bool have_ts; if (search_for_next_pes_header(sptr, &pes_len, &have_ts, NULL) == 0) { return 0; } copy_bytes_to_pes_buffer(sptr, pes_len); return 1; }
false
false
false
false
false
0
imFileLineBufferInit(imFile* ifile) { ifile->line_buffer_size = imImageLineSize(ifile->width, ifile->file_color_mode, ifile->file_data_type); if (ifile->switch_type && (ifile->file_data_type == IM_FLOAT || ifile->file_data_type == IM_CFLOAT)) ifile->line_buffer_extra += ifile->line_buffer_size; // double the s...
false
false
false
false
false
0
cgid_maint(int reason, void *data, apr_wait_t status) { apr_proc_t *proc = data; int mpm_state; int stopping; switch (reason) { case APR_OC_REASON_DEATH: apr_proc_other_child_unregister(data); /* If apache is not terminating or restarting, * restart the cgid...
false
false
false
false
false
0
sysfs_get_dev (struct sysfs_device * dev, char * buff, size_t len) { char *attr; attr = sysfs_attr_get_value(dev->devpath, "dev"); if (!attr) { condlog(3, "%s: no 'dev' attribute in sysfs", dev->kernel); return 1; } if (strlcpy(buff, attr, len) != strlen(attr)) { condlog(3, "%s: overflow in 'dev' attribute"...
false
false
false
false
false
0
chatnet_destroy(CHATNET_REC *chatnet) { g_return_if_fail(IS_CHATNET(chatnet)); chatnets = g_slist_remove(chatnets, chatnet); signal_emit("chatnet destroyed", 1, chatnet); g_free_not_null(chatnet->nick); g_free_not_null(chatnet->username); g_free_not_null(chatnet->realname); g_free_not_null(chatnet->own_host); ...
false
false
false
false
false
0