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
childLoadFailure( khtml::ChildFrame *child ) { child->m_bCompleted = true; if ( child->m_partContainerElement ) child->m_partContainerElement.data()->partLoadingErrorNotify(); checkCompleted(); }
false
false
false
false
false
0
xusbatm_bind(struct usbatm_data *usbatm, struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *usb_dev = interface_to_usbdev(intf); int drv_ix = id - xusbatm_usb_ids; int rx_alt = rx_altsetting[drv_ix]; int tx_alt = tx_altsetting[drv_ix]; struct usb_interface *rx_intf = xusbatm_find_i...
false
false
false
false
false
0
pine_smtp_verbose_out(char *s) { #ifdef _WINDOWS LPTSTR slpt; #endif if(verbose_send_output && s){ char *p, last = '\0'; for(p = s; *p; p++) if(*p == '\015') *p = ' '; else last = *p; #ifdef _WINDOWS /* * The stream is opened in Unicode mode, so we need to fix the * argument to fputs. ...
false
false
false
false
false
0
closeOtherTabs(int index) { if (-1 == index) return; for (int i = count() - 1; i > index; --i) closeTab(i); for (int i = index - 1; i >= 0; --i) closeTab(i); }
false
false
false
false
false
0
write_file (const char *filename, const char *data) { FILE *fh; fh = fopen (filename, "w"); if (!fh) { perror ("fopen"); return -1; } if (fputs (data, fh) <= 0) return -1; if (fclose (fh) != 0) return -1; return 0; }
false
false
false
false
false
0
begin_update(struct view *view) { if (opt_cmd[0]) { string_copy(view->cmd, opt_cmd); opt_cmd[0] = 0; /* When running random commands, initially show the * command in the title. However, it maybe later be * overwritten if a commit line is selected. */ if (view == VIEW(REQ_VIEW_PAGER)) string_copy(view-...
false
false
false
false
false
0
xfs_iomap_write_delay( xfs_inode_t *ip, xfs_off_t offset, size_t count, xfs_bmbt_irec_t *ret_imap) { xfs_mount_t *mp = ip->i_mount; xfs_fileoff_t offset_fsb; xfs_fileoff_t last_fsb; xfs_off_t aligned_offset; xfs_fileoff_t ioalign; xfs_extlen_t extsz; int nimaps; xfs_bmbt_irec_t imap[XFS_WRITE_IMAPS]; int...
false
false
false
false
false
0
xmlnode_get_namespace(xmlnode *node) { xmlNs **ns; gint i; gchar *res = NULL; if (!(ns = xmlGetNsList(node->doc, node->node))) { return NULL; } for (i = 0; ns[i]; i ++) { if (!ns[i]->prefix) { res = g_strdup((gchar *)ns[i]->href); } xmlFreeNs(n...
false
false
false
false
false
0
eet_data_node_write_cipher(Eet_File *ef, const char *name, const char *cipher_key, Eet_Node *node, int comp) { Eet_Dictionary *ed; void *data_enc; int size; int val; ed = eet_dictionar...
false
false
false
false
false
0
read_trailer(int fd, struct exec_trailer *trail) { lseek(fd, (long) -TRAILER_SIZE, SEEK_END); if (read(fd, (char *) trail, TRAILER_SIZE) < TRAILER_SIZE) return BAD_BYTECODE; fixup_endianness_trailer(&trail->num_sections); if (strncmp(trail->magic, EXEC_MAGIC, 12) == 0) return 0; else return BAD_BY...
false
false
false
false
false
0
ID3GenreIntToString(int genre) { char* return_string = NULL; if (genre >= 0 && genre <= 79) { return_string = (char*)ID3v1GenreList[genre]; } return return_string; }
false
false
false
false
false
0
mx_notebook_remove (ClutterContainer *container, ClutterActor *actor) { MxNotebookPrivate *priv = MX_NOTEBOOK (container)->priv; GList *item = NULL; item = g_list_find (priv->children, actor); if (item == NULL) { g_warning ("Actor of type '%s' is not a child of container of ...
false
false
false
false
false
0
httpd_pages(const char* url,HttpdFunc httpd_func) { if( !httpd_files ) return; if(strdb_search(httpd_files,url+1)) { httpd_erase_pages(url); } strdb_insert(httpd_files,aStrdup(url+1),httpd_func); }
false
false
false
false
false
0
timerEvent(QTimerEvent* event) { if (event->timerId() == d->m_pendingItemsTimer.timerId()) { d->m_pendingItemsTimer.stop(); //process pending ItemChildAddedChanges QList<QGraphicsItem*>::const_iterator it1 = d->m_pendingItems.constBegin(), it2 = d->m_pendingItems.constEnd(); for (; it1 != it2; ++it1) { Q...
false
false
false
false
false
0
printInfo() const { gOut.dbgTitle(""); gOut.dbg("Name: " + mName + "\n"); gOut.dbg("Version: " + mVersion + "\n"); gOut.dbg("Author: " + mAuthor + "\n"); gOut.dbg("Summary: " + mSummary + "\n"); gOut.dbg("URL: " + mUrl + "\n"); gOut.dbg("License: " + mLicense + "\n"); gOut.dbg("C...
false
false
false
false
false
0
epoll_dispatch(struct event_base *base, struct timeval *tv) { struct epollop *epollop = base->evbase; struct epoll_event *events = epollop->events; int i, res, timeout = -1; if (tv != NULL) timeout = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000; if (timeout > MAX_EPOLL_TIMEOUT_MSEC) { /* Linux kernels can ...
false
false
false
false
false
0
InsertAfter(struct Item **filestart,struct Item *ptr,char *string) { struct Item *ip; if (*filestart == NULL || ptr == CF_UNDEFINED_ITEM) { AppendItem(filestart,string,NULL); return; } if (ptr == NULL) { AppendItem(filestart,string,NULL); return; } if ((ip = (struct Item *)malloc(sizeof(stru...
false
false
false
false
false
0
EnvDeftemplateSlotDefaultValue( void *theEnv, void *vTheDeftemplate, char *slotName, DATA_OBJECT_PTR theValue) { short position; struct deftemplate *theDeftemplate = (struct deftemplate *) vTheDeftemplate; struct templateSlot *theSlot; DATA_OBJECT tempDO; /*======================...
false
false
false
false
false
0
gen8mode_display_signedbyte(hi_ncurses_fpager *pager, int y, int start_x, int rowbyte, off_t offset, unsigned char value) { mvwprintw(pager->window,y,start_x+(rowbyte*pager->display_mode->width_multiple+(pager->byte_grouping > 0 ? (rowbyte/pager->byte_grouping) : 0)),pager->display_mode->format_option,(signed char) v...
false
false
false
false
false
0
_setup_passthrough (GstSubtitleOverlay * self) { GstPad *src, *sink; GstElement *identity; GST_DEBUG_OBJECT (self, "Doing video passthrough"); if (self->passthrough_identity) { GST_DEBUG_OBJECT (self, "Already in passthrough mode"); goto out; } /* Unlink & destroy everything */ gst_ghost_pad_se...
false
false
false
false
false
0
xhci_ring_free(struct xhci_hcd *xhci, struct xhci_ring *ring) { if (!ring) return; if (ring->first_seg) { if (ring->type == TYPE_STREAM) xhci_remove_stream_mapping(ring); xhci_free_segments_for_ring(xhci, ring->first_seg); } kfree(ring); }
false
false
false
false
false
0
execute ( Thread *t ) { if ( m_payload ) { m_payload->execute ( t ); m_collection->internalJobDone ( m_payload); } else { debug ( 1, "JobCollection: job in collection has been deleted." ); } Job::execute ( t ); }
false
false
false
false
false
0
merge_helpname_name(struct valname *src, struct valname *dest) { if (!dest->vn_hlist) /* Kludge for now */ dest->vn_hlist = src->vn_hlist; }
false
false
false
false
false
0
create_subtree_filter(Slapi_Filter* filter, int managedsait, Slapi_Filter** focref, Slapi_Filter** forr) { Slapi_Filter *ftop= filter; if ( !managedsait ) { ftop= create_referral_filter(filter, focref, forr); } return ftop; }
false
false
false
false
false
0
entry_guards_free_all(void) { if (entry_guards) { SMARTLIST_FOREACH(entry_guards, entry_guard_t *, e, entry_guard_free(e)); smartlist_free(entry_guards); entry_guards = NULL; } clear_bridge_list(); clear_transport_list(); smartlist_free(bridge_list); smartlist_free(transpor...
false
false
false
false
false
0
replace(const Arg *arg) { Key k = getkey(); if (!k.str[0]) return; size_t pos = window_cursor_get(vis->win->win); action_reset(&action_prev); action_prev.op = &ops[OP_REPEAT_REPLACE]; buffer_put(&buffer_repeat, k.str, strlen(k.str)); editor_delete_key(vis); editor_insert_key(vis, k.str, strlen(k.str)); text_...
false
false
false
false
false
0
globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv) { int i; Char *lm, *ls; const Char *pe, *pm, *pm1, *pl; Char patbuf[MAXPATHLEN]; /* copy part up to the brace */ for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++) ; *lm = BG_EOS; ls = lm; /* Find the balanced brace */...
false
false
false
false
false
0
multi_sync_pre_init() { int idx; Netgame.game_state = NETGAME_STATE_MISSION_SYNC; /* if we're in teamplay mode, always force skill level to be medium Karajorma - disabling cause it's just plain idiotic! if people want to play on insane let them if((Netgame.type_flags & NG_TYPE_TEAM) && (Net_player->flags & NET...
false
false
false
false
false
0
getFieldIndices( char* fields, char *flds_chosen[MAXCHOICES], int32* flds_indices ) { int32 lastItem = 0; /* whether the last field in the list 'fields' is reached */ int32 fld_name_idx; /* index for the list of field names */ int32 idx = 0; /* index for the array of field indices */ char *...
true
true
false
false
false
1
get_value(Item *item) { tmp.store_value(item); if (item->is_null()) return 0; return (uchar *)&tmp; }
false
false
false
false
false
0
set_checkpoint_timer(int first_time) { Var v; int interval, now = time(0); static Timer_ID last_checkpoint_timer; v = get_system_property("dump_interval"); if (v.type != TYPE_INT || v.v.num < 60 || now + v.v.num < now) { free_var(v); interval = 3600; /* Once per hour */ } else interval = v.v...
false
false
false
false
false
0
getiso(GtkWidget *button,gpointer data) { GtkWidget* Entry =(GtkWidget*)g_object_get_data(G_OBJECT (button), "Entry"); GtkWidget* EntryPercent =(GtkWidget*)g_object_get_data(G_OBJECT (button), "EntryPercent"); gchar* temp; gdouble isovalue = 0.1; gdouble percent = 100; gboolean square = TRUE; gdouble precision =...
false
false
false
false
false
0
ide_detach(struct pcmcia_device *link) { ide_info_t *info = link->priv; dev_dbg(&link->dev, "ide_detach(0x%p)\n", link); ide_release(link); kfree(info); }
false
false
false
false
false
0
intel_bufferobj_data(struct gl_context * ctx, GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage, struct gl_buffer_object *obj) { struct intel_context *intel = intel_context(ctx); struct intel_buffer_object *inte...
false
true
false
false
false
1
rssyl_curl_progress_function(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) { if (claws_is_exiting()) { debug_print("RSSyl: curl_progress_function bailing out, app is exiting\n"); return 1; } return 0; }
false
false
false
false
false
0
ajHetReadRawNew(AjPFile inf) { AjPHet het = NULL; AjPStr line = NULL; /* A line from the file */ AjPHetent entry = NULL; /* The current entry */ AjPHetent tmp = NULL; /* Temp. pointer */ AjPList list = NULL; /* List of entries */ ajint het_cnt = 0; /* Count of n...
false
false
false
true
false
1
clearData(bool bClipboard, bool bPrimary) { if (bClipboard) { gtk_clipboard_clear (gtkClipboardForTarget (TAG_ClipboardOnly)); m_fakeClipboard.clearClipboard(); } if (bPrimary) { gtk_clipboard_clear(gtkClipboardForTarget (TAG_PrimaryOnly)); m_fakePrimaryClipboard.clearClipboard(); } }
false
false
false
false
false
0
lWhatToElem(const lEnumeration *what) { lListElem *whatElem = NULL; sge_pack_buffer pb; DENTER(CULL_LAYER, "lWhatToElem"); if (init_packbuffer(&pb, 1024, 0) == PACK_SUCCESS) { if (cull_pack_enum(&pb, what) == PACK_SUCCESS) { whatElem = lCreateElem(PACK_Type); lSetUlong(whatElem, PA...
false
false
false
false
false
0
gtr_gda_get_lookup_statement (GtrGda *self, guint word_count, GError **error) { GdaStatement *stmt; gchar *query; stmt = GDA_STATEMENT (g_hash_table_lookup (self->priv->lookup_query_cache, GUINT_TO_POINTER (word_count))); if (stmt) return stmt; query = build...
false
false
false
false
false
0
mq_update_size_xattr (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, dict_t *dict, struct iatt *postparent) { int32_t ret = -1; dict_t *new_dict = NULL; int6...
false
false
false
false
false
0
ServerConfiguration_free(ServerConfiguration** sc) { int i; assert(sc != NULL); if (sc == NULL) { return; } assert((*sc) != NULL); if ((*sc) == NULL) { return; } if ((*sc)->certificateFile) { free((*sc)->certificateFile); (*sc)->certificateFile = NULL; } if ((*sc)->cacertificateFile)...
false
false
false
false
false
0
append_frag_to_list(opal_list_t *queue, mca_btl_base_module_t *btl, mca_pml_bfo_match_hdr_t *hdr, mca_btl_base_segment_t* segments, size_t num_segments, mca_pml_bfo_recv_frag_t* frag) { if(NULL == frag) { MCA_PML_BFO_RECV_FRAG_ALLOC(frag); MCA_PML_BFO_RECV_FRA...
false
false
false
false
true
1
MbrolaGenerate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) {//================================================================== FILE *f_mbrola = NULL; if(*n_ph == 0) return(0); if(option_mbrola_phonemes) { // send mbrola data to a file, not to the mbrola library f_mbrola = f_trans; } int again = ...
false
false
false
false
false
0
ask_keepgoing(char *str) { if (str == NULL) return 0; if (strlen(str) < 4) return 0; if (str[3] == '-') return 1; return 0; }
false
false
false
false
false
0
kb_response_cb (GtkDialog *dbox, int response, gpointer data) { switch (response) { case GTK_RESPONSE_ACCEPT: save_key_bindings (); break; default: close_edit_window (); close_list_window (); } }
false
false
false
false
false
0
r600_irq_init(struct radeon_device *rdev) { int ret = 0; int rb_bufsz; u32 interrupt_cntl, ih_cntl, ih_rb_cntl; /* allocate ring */ ret = r600_ih_ring_alloc(rdev); if (ret) return ret; /* disable irqs */ r600_disable_interrupts(rdev); /* init rlc */ if (rdev->family >= CHIP_CEDAR) ret = evergreen_rlc_r...
false
false
false
false
false
0
operator<<(mrpt::utils::CStream &s,const std::vector<std::string> &vec) { uint32_t N=static_cast<uint32_t>(vec.size()); s<<N; for (size_t i=0;i<N;i++) s<<vec[i]; return s; }
false
false
false
false
false
0
optimize0 (optimize0_param *op, Tour_PPIndex_f index, void *param) { gfloat index_work = 0.0; /* array_f proj_work, pdata, *proj;*/ array_f proj_work, *proj; int i,j, m, k; proj = &(op->proj_best); arrayf_init_null (&proj_work); arrayf_alloc_zero (&proj_work, proj->nrows, ...
false
false
false
false
false
0
dooption(int option) { int changeok = 0; /* * Process client input. */ DIAG(TD_OPTIONS, printoption("td: recv do", option)); if (will_wont_resp[option]) { will_wont_resp[option]--; if (will_wont_resp[option] && my_state_is_will(option)) will_wont_resp[option]--; } if ((will_w...
false
false
false
false
false
0
applicable0(const problem *p_) { const problem_dft *p = (const problem_dft *) p_; return (1 && p->sz->rnk == 1 && p->vecsz->rnk == 0 /* FIXME: allow other sizes */ && X(is_prime)(p->sz->dims[0].n) /* FIXME: infinite recursion of bluestein with itself */ && p->sz->dims[0].n...
false
false
false
false
false
0
__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) { int result; struct kernel_sigaction kact, koact; if (act) { kact.k_sa_handler = act->sa_handler; kact.sa_flags = act->sa_flags; memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); if (GLRO(dl_sys...
false
false
false
false
true
1
ScaleShape(vtkPoints* pd, double S) { for (int i = 0; i < pd->GetNumberOfPoints(); i++) { double p[3]; pd->GetPoint(i, p); pd->SetPoint(i, p[0]*S, p[1]*S, p[2]*S); } }
false
false
false
false
false
0
eb_write_text(EB_Book *book, const char *stream, size_t stream_length) { EB_Error_Code error_code; char *reallocated; LOG(("in: eb_write_text(book=%d, stream=%s)", (int)book->code, eb_quoted_stream(stream, stream_length))); /* * If the text buffer has enough space to write `stream', * save ...
false
true
false
false
false
1
sign_in_identity (GoaKerberosIdentityManager *self, Operation *operation) { GoaIdentity *identity; GError *error; krb5_error_code error_code; goa_debug ("GoaKerberosIdentityManager: signing in identity %s", operation->identifier); error = NULL; identity = g_h...
false
false
false
false
false
0
createFNeg(Value *V) { Value *Zero = cast<Value>(ConstantFP::getZeroValueForNegation(V->getType())); Value *NewV = createFSub(Zero, V); if (Instruction *I = dyn_cast<Instruction>(NewV)) createInstPostProc(I, true); // fneg's don't receive instruction numbers. return NewV; }
false
false
false
false
false
0
dmacheck (void) { dmac_acr++; if (old_dmac && (dmac_cntr & CNTR_TCEN)) { if (dmac_wtc == 0) dmac_istr |= ISTR_E_INT; else dmac_wtc--; } }
false
false
false
false
false
0
gedit_multi_notebook_get_page_num (GeditMultiNotebook *mnb, GeditTab *tab) { GList *l; gint real_page_num = 0; for (l = mnb->priv->notebooks; l != NULL; l = g_list_next (l)) { gint page_num; page_num = gtk_notebook_page_num (GTK_NOTEBOOK (l->data), GTK_WIDGET (tab)); if (page_num !...
false
false
false
false
false
0
dequeueNew(KResolver* obj) { // This function must be called with a locked mutex // Deadlock warning: // always lock the global mutex first if both mutexes must be locked KResolverPrivate *d = obj->d; // check if it's in the new request list for (QMutableListIterator<RequestData*> it(newRequests); ...
false
false
false
false
false
0
heapify(PTRLIST elems, size_t i, size_t N, int (* compar)(void *, const void *, const void *), void (* setreccookie)(void *, void *, size_t), void * cookie) { size_t min; /* Iterate down the tree. */ do { /* Look for the minimum element out of {i, 2i+1, 2i+2}. */ min = i; /* Is this bigger than eleme...
false
false
false
false
false
0
dewarpGetResult(L_DEWARP *dew) { PROCNAME("dewarpGetResult"); if (!dew) return (PIX *)ERROR_PTR("dew not defined", procName, NULL); if (dew->pixd) return pixClone(dew->pixd); else return (PIX *)ERROR_PTR("pixd not defined", procName, NULL); }
false
false
false
false
false
0
visit_enter(ir_assignment *ir) { ir_variable *const var = ir->lhs->variable_referenced(); if (strcmp(name, var->name) == 0) { found = true; return visit_stop; } return visit_continue_with_parent; }
false
false
false
false
false
0
fpm_launcher_show(fpm_launcher *launcher) { GtkWidget* widget; widget=lookup_widget(glb_win_misc, "entry_launcher_cmd"); gtk_entry_set_text(GTK_ENTRY(widget), launcher->cmdline); if (launcher->copy_user==2) widget=lookup_widget(glb_win_misc, "radiobutton_user_clip"); else { if (launcher->...
false
false
false
false
false
0
vxge_hw_vpath_reset(struct __vxge_hw_virtualpath *vpath) { enum vxge_hw_status status; u32 vp_id; vxge_trace(); vp_id = vpath->vp_id; if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { status = VXGE_HW_ERR_VPATH_NOT_OPEN; goto exit; } status = __vxge_hw_vpath_reset(vpath->hldev, vp_id); exit: return status; }
false
false
false
false
false
0
ex_global(eap) exarg_T *eap; { linenr_T lnum; /* line number according to old situation */ int ndone = 0; int type; /* first char of cmd: 'v' or 'g' */ char_u *cmd; /* command argument */ char_u delim; /* delimiter, normally '/' */ char_u *pat; regmmatch_T regmatch; int match...
false
false
false
false
false
0
product() const { QString product = m_device.sysfsProperty("product").toString(); if (product.isEmpty()) { if (queryDeviceInterface(Solid::DeviceInterface::Processor)) { // sysfs doesn't have anything useful here product = extractCpuInfoLine(deviceNumber(), "model name\\s+:\\s+(\...
false
false
false
false
false
0
cfc_literal_escapes(CplFileConf *cfc, int literal) { #ifndef WITHOUT_FILE_SYSTEM if(cfc) cfc->escaped = !literal; #endif }
false
false
false
false
false
0
PickSeeds(RTree_t * rtp) { register int i, j; unsigned int waste, worst; int seed0, seed1; unsigned int area[NODECARD + 1]; for (i = 0; i < NODECARD + 1; i++) area[i] = RectArea(&rtp->split.BranchBuf[i].rect); //worst = -rtp->split.CoverSplitArea - 1; worst=0; for (i = 0; i < NODECARD; i++) {...
false
false
false
false
false
0
get4hex( FILE *fp_in ) { int bytehi, bytelo, addr; bytehi = get2hex( fp_in ); if( bytehi != -1 ) { bytelo = get2hex( fp_in ); if( bytelo != -1 ) { addr = (bytehi * 256) + bytelo; return addr; } } return -1; }
false
false
false
false
false
0
e100_phy_check_without_mii(struct nic *nic) { u8 phy_type; int without_mii; phy_type = (nic->eeprom[eeprom_phy_iface] >> 8) & 0x0f; switch (phy_type) { case NoSuchPhy: /* Non-MII PHY; UNTESTED! */ case I82503: /* Non-MII PHY; UNTESTED! */ case S80C24: /* Non-MII PHY; tested and working */ /* paragraph from t...
false
false
false
false
false
0
GPS_Math_WGS84_To_UKOSMap_M(double lat, double lon, double* mE, double* mN, char* map) { double alat; double alon; double aht; double aE; double aN; GPS_Math_WGS84_To_Known_Datum_M(lat,lon,30,&alat,&alon,&aht,86); GPS_Math_Airy1830LatLonToNGEN(alat,alon,&aE,&aN); if...
false
false
false
false
false
0
setProfileName(const QString &name) { d->profileName = name; if (!PsiOptions::instance()->getOption("options.ui.account.single").toBool()) setText(0, d->profileName); else setText(0, ""); }
false
false
false
false
false
0
s_rcv_msg(IPC_Channel* chan, gpointer data) { struct iterinfo*i = data; i->errcount += checkinput(chan, "s_rcv_msg", &i->rcount, i->max); if (chan->ch_status == IPC_DISCONNECT || i->rcount >= i->max || i->errcount > MAXERRORS) { if (i->rcount < i->max) { ++i->errcount; cl_log(LOG_INFO, "Early exit from s...
false
false
false
false
false
0
windows_save() { window_t *w; if (config_windows_save) { string_t s = string_init(NULL); int maxid = 0, i; for (w = windows; w; w = w->next) { if (!w->floating && w->id > maxid) maxid = w->id; } for (i = 1; i <= maxid; i++) { const char *target = "-"; const char *session_name = NULL; ...
false
false
false
false
false
0
zxid_json_strlen(char* js) { int res = 0; for (; *js; ++js, ++res) { int c = *(unsigned char*)js; if (c < ' ') { if ((c == '\n') || (c == '\r') || (c == '\t') || (c == '\b') || (c == '\f')) { /* \X */ res++; } else { /* \uXXXX */ res += 5; } } else if ((c == '\'') || (c == '\"')...
false
false
false
false
false
0
mkplan(const solver *ego_, const problem *p_, planner *plnr) { const S *ego = (const S *) ego_; P *pln; const problem_dft *p; iodim *d; const kdft_desc *e = ego->desc; static const plan_adt padt = { X(dft_solve), X(null_awake), print, destroy }; UNUSED(plnr); if (ego->...
false
false
false
false
false
0
computeSectionKind(unsigned Flags) { if (Flags & COFF::IMAGE_SCN_MEM_EXECUTE) return SectionKind::getText(); if (Flags & COFF::IMAGE_SCN_MEM_READ && (Flags & COFF::IMAGE_SCN_MEM_WRITE) == 0) return SectionKind::getReadOnly(); return SectionKind::getDataRel(); }
false
false
false
false
false
0
compat_clock_nanosleep_restart(struct restart_block *restart) { long err; mm_segment_t oldfs; struct timespec tu; struct compat_timespec __user *rmtp = restart->nanosleep.compat_rmtp; restart->nanosleep.rmtp = (struct timespec __user *) &tu; oldfs = get_fs(); set_fs(KERNEL_DS); err = clock_nanosleep_restart(re...
false
false
false
false
false
0
php_var_dump(PHP_VALUE_NODE *node, int ident, int ref) { for(int i = 0; i < ident;i++) { printf("\t"); } if ( ref ) printf("&"); switch(node->type) { case PHP_VAL_BOOL: printf("bool(%s)\n", node->int_val ? "true" : "false"); break; case PHP_VAL_INT: printf("int(%"PRIu64")\n", node->int_val); break; case PHP...
false
false
false
false
false
0
compileExpr7(void){ TKVMExprCode_base *l=compileExpr8(); if (!l) return NULL; while(true){ lexer->skipWS(); Token token=lexer->next(ID_MODE); if (token.str=="*"){ TKVMExprCode_base *r=compileExpr8(); if (!r) { lexer->error(RC.S(ERR_COMPILER_PARSE_ERROR_AFTER)+"'*'"); return l; } l=new TKVMExprCodeMUL(...
false
false
false
false
false
0
update_partial_buffer(char ** buf, int * blen, long long bytes, int full) { int bsize = partial_buf_size(bytes); if( full ) bsize = bytes; /* want entire buffer */ if( !buf || !blen || bytes <= 0 ) { fprintf(stderr,"** UPB: bad params (%p,%p,%lld)\n", ...
false
false
false
false
false
0
int13_get_extended_parameters ( struct int13_drive *drive, struct i386_all_regs *ix86 ) { struct int13_disk_parameters params = { .bufsize = sizeof ( params ), .flags = INT13_FL_DMA_TRANSPARENT, .cylinders = drive->cylinders, .heads = drive->heads, .sectors_per_track = drive->sectors_per_track, .se...
false
false
false
false
false
0
dib9000_risc_apb_access_write(struct dib9000_state *state, u32 address, u16 attribute, const u8 * b, u32 len) { u16 mb[10]; u8 s, i; if (address >= 1024 || !state->platform.risc.fw_is_running) return -EINVAL; if (len > 18) return -EINVAL; /* dprintk( "APB access thru wr fw %d %x", address, attribute); */ ...
false
false
false
false
false
0
snd_pcm_plug_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params) { snd_pcm_plug_t *plug = pcm->private_data; snd_pcm_t *slave = plug->req_slave; snd_pcm_plug_params_t clt_params, slv_params; snd_pcm_hw_params_t sparams; int err; err = snd_pcm_plug_hw_refine_sprepare(pcm, &sparams); if (err < 0) return err;...
false
false
false
false
false
0
mkts1gmt(a) A a; { struct tm lt; A z; Q(a->t!=It,ERR_TYPE) Q(a->r!=1,ERR_RANK) Q(a->n!=7,ERR_LENGTH) z=gs(It); lt.tm_year=a->p[0]-1900; /* year */ lt.tm_mon=a->p[1]-1; /* month */ lt.tm_mday=a->p[2]; /* day */ lt.tm_hour=a->p[3]; /* hour ...
false
false
false
false
true
1
ibus_bus_destroy (IBusObject *object) { g_assert (_bus == (IBusBus *)object); IBusBus * bus = _bus; _bus = NULL; if (bus->priv->monitor) { g_object_unref (bus->priv->monitor); bus->priv->monitor = NULL; } if (bus->priv->config) { ibus_proxy_destroy ((IBusProxy *) bus->...
false
false
false
false
false
0
PyvtkVariant_vtkVariant_s3(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "vtkVariant"); bool temp0 = false; PyObject *result = NULL; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkVariant *op = new vtkVariant(temp0); result = PyVTKSpecialObject_New("vtkVariant", op); } re...
false
false
false
false
false
0
window_goto_percentage (WINDOW *window, int percent) { int desired_line; if (!percent) desired_line = 0; else desired_line = (int) ((float)window->line_count * ((float)percent / 100.0)); window->pagetop = desired_line; window->point = window->line_starts[window->pagetop] - window->node->co...
false
false
false
false
false
0
gt_sampling_new_regular(unsigned long rate, off_t first_offset) { GtSampling *sampling = gt_malloc(sizeof (*sampling)); sampling->method = GT_SAMPLING_REGULAR; gt_assert(rate != 0); sampling_init_sampling(sampling, rate); gt_assert(first_offset % sampling->pagesize == 0); sampling->page_sampling = NULL; ...
false
false
false
false
false
0
luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) { int res; lua_Number nl, nr; if (ttisinteger(l) && ttisinteger(r)) /* both operands are integers? */ return (ivalue(l) < ivalue(r)); else if (tofloat(l, &nl) && tofloat(r, &nr)) /* both are numbers? */ return luai_numlt(nl, nr); else if...
false
false
false
false
false
0
__dbj_rep_transport(DB_ENV *dbenv, const DBT *control, const DBT *rec, const DB_LSN *lsn, int envid, u_int32_t flags) { int detach; JNIEnv *jenv = __dbj_get_jnienv(&detach); jobject jdbenv = (jobject)DB_ENV_INTERNAL(dbenv); jobject jcontrol, jrec, jlsn; jbyteArray jcontrolarr, jrecarr; int ret; if (jdbe...
false
false
false
false
false
0
step(vector<double> &value, double s, RNG *rng) const { for (unsigned int i = 0; i < value.size(); ++i) { value[i] += rng->normal() * s; } }
false
false
false
false
false
0
parse_qmaster(lList **ppcmdline, u_long32 *help ) { stringT str; lList *alp = NULL; int usageshowed = 0; DENTER(TOP_LAYER, "parse_qmaster"); /* Loop over all options. Only valid options can be in the ppcmdline list. */ while(lGetNumberOfElem(*ppcmdline)) { /* -help */ if(par...
false
false
false
false
false
0
tIsInList( tString const & list_, tString const & item ) { tString list = list_; while( list != "" ) { // find the item int pos = list.StrPos( item ); // no traditional match? shoot. if ( pos < 0 ) { return false; } // check whether the ...
false
false
false
false
false
0
ena_set_rss_hash(struct ena_com_dev *ena_dev, struct ethtool_rxnfc *cmd) { enum ena_admin_flow_hash_proto proto; u16 hash_fields; switch (cmd->flow_type) { case TCP_V4_FLOW: proto = ENA_ADMIN_RSS_TCP4; break; case UDP_V4_FLOW: proto = ENA_ADMIN_RSS_UDP4; break; case TCP_V6_FLOW: proto = ENA_ADMI...
false
false
false
false
false
0
set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinType jointype, List *restrictlist) { Selectivity jselec; Selectivity pselec; double nrows; UniquePath *upath; /* * Compute joinclause selectivity. Note that we ar...
false
false
false
false
false
0
ario_server_preferences_crossfade_changed_cb (GtkWidget *widget, ArioServerPreferences *server_preferences) { ARIO_LOG_FUNCTION_START; gboolean is_active; if (!server_preferences->priv->sync_server) { is_active = gtk_toggle_button_get...
false
false
false
false
false
0
cr_declaration_dump (CRDeclaration * a_this, FILE * a_fp, glong a_indent, gboolean a_one_per_line) { CRDeclaration *cur = NULL; g_return_if_fail (a_this); for (cur = a_this; cur; cur = cur->next) { if (cur->prev) { if (a_one_per_line...
false
false
false
false
false
0
sim_dealloc() { PROFILE(SIM_DEALLOC); thread* tmp; /* Temporary thread pointer */ /* Deallocate each thread in the all_threads array */ while( all_head != NULL ) { tmp = all_head; all_head = all_head->all_next; free_safe( tmp, sizeof( thread ) ); } all_head = all_tail = all_next = NULL...
false
false
false
false
false
0
maybe_add_guid (xmlNodePtr ptr, const char *tag, GncTaxTable *table) { if (table) xmlAddChild (ptr, guid_to_dom_tree (tag, qof_instance_get_guid(QOF_INSTANCE(table)))); }
false
false
false
false
false
0
getInstruction(MCInst &MI, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, raw_ostream &OS, raw_ostream &CS) const { // Get the four bytes of the instruction. Size = 4; ...
false
false
false
false
false
0