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
GroupMatchesExistingConfig(OpenSync::API &api) { member_list_type members; api.GetMembers(m_group_name, members); // what needs to match: // // - number of connected Config::Plugin objects in our // list must match number of members in config // - each member ID must match along with the plugin_name // of ea...
false
false
false
false
false
0
net2280_wakeup(struct usb_gadget *_gadget) { struct net2280 *dev; u32 tmp; unsigned long flags; if (!_gadget) return 0; dev = container_of(_gadget, struct net2280, gadget); spin_lock_irqsave(&dev->lock, flags); tmp = readl(&dev->usb->usbctl); if (tmp & BIT(DEVICE_REMOTE_WAKEUP_ENABLE)) writel(BIT(GENE...
false
false
false
false
false
0
_await(int pid4, char *str, int n, int opt) { int pid, status, cd; struct rusage ru; char buf[128], tmp[64]; ulong u, s; for(;;){ /* On Linux, pid==-1 means anyone; on SunOS, it's pid==0. */ if(pid4 == -1) pid = wait3(&status, opt, &ru); else pid = wait4(pid4, &status, opt, &ru); if(pid <= 0) ret...
true
true
false
false
false
1
grep_cache(struct grep_opt *opt, const struct pathspec *pathspec, int cached) { int hit = 0; int nr; read_cache(); for (nr = 0; nr < active_nr; nr++) { struct cache_entry *ce = active_cache[nr]; if (!S_ISREG(ce->ce_mode)) continue; if (!match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, NULL)) ...
false
false
false
false
false
0
countarray(const GCtab *t, uint32_t *bins) { uint32_t na, b, i; if (t->asize == 0) return 0; for (na = i = b = 0; b < LJ_MAX_ABITS; b++) { uint32_t n, top = 2u << b; TValue *array; if (top >= t->asize) { top = t->asize-1; if (i > top) break; } array = tvref(t->array); for (n =...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gfx__drivers__OpenGLDisplayDriver_CheckExtensions(struct __ecereNameSpace__ecere__gfx__drivers__OGLSystem * oglSystem) { char * extensions = glGetString(0x1F03); if(extensions) oglSystem->pow2textures = strstr(extensions, "GL_ARB_texture_non_power_of_two") ? 0x0 : 0x1; glGetInteg...
false
false
false
false
false
0
gdata_picasaweb_service_query_files (GDataPicasaWebService *self, GDataPicasaWebAlbum *album, GDataQuery *query, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error) { const gchar *uri; g_return_val_if_fail (GDATA_I...
false
false
false
false
false
0
get_storage_ref_info(struct mailengine * engine, struct mailstorage * storage) { chashdatum key; chashdatum data; int r; struct storage_ref_info * ref_info; key.data = &storage; key.len = sizeof(storage); #ifdef LIBETPAN_REENTRANT pthread_mutex_lock(&engine->storage_hash_lock); #endif r = chash...
false
false
false
false
false
0
RemovePlayer ( ePlayerNetID* player ) { tCONTROLLED_PTR( eTeam ) safety; safety = this; // avoid premature destruction of this team RemovePlayerDirty( player ); player->UpdateName(); // get colored player name tColoredString playerName; playerName << *player << tColoredString::Color...
false
false
false
false
false
0
scg_drag_send_text (SheetControlGUI *scg, GtkSelectionData *sd) { Sheet *sheet = scg_sheet (scg); Workbook *wb = sheet->workbook; GnmRange range = sheet_get_extent (sheet, TRUE, TRUE); GnmCellRegion *reg = clipboard_copy_range (sheet, &range); GString *s = cellregion_to_string (reg, TRUE, workbook_date_conv (wb));...
false
false
false
false
false
0
psys_new(int n, int m, int r){ int i; psys res; res=(psys)mem_malloc(sizeof(struct psys_t)); res->istore=(int *)mem_malloc(ISTORE_SIZE*sizeof(int)); res->dstore=(double *)mem_malloc(2*m*sizeof(double)); res->aux=(void **)mem_malloc(m*sizeof(void *)); Sys_N(res)=n; Sys_Neq(res)=n; Sy...
false
false
false
false
false
0
prepare_filter_index(Store *store) { int i; IndexWriter *iw; FieldInfos *fis = fis_new(STORE_YES, INDEX_YES, TERM_VECTOR_NO); struct FilterData data[FILTER_DOCS_SIZE] = { {"0", "20040601", "on"}, {"1", "20041001", "off"}, {"2", "20051101", "on"}, {"3", "20041201", "off"}...
false
false
false
false
false
0
extendSelection(FXint index,FXbool notify){ register FXbool changes=false; FXint i1,i2,i3,i; if(0<=index && 0<=anchor && 0<=extent){ // Find segments i1=index; if(anchor<i1){i2=i1;i1=anchor;} else{i2=anchor;} if(extent<i1){i3=i2;i2=i1;i1=extent;} else if(extent<i2){i3=i2;i2=extent;} e...
false
false
false
false
false
0
editor_prompt_show(Editor *ed, const char *title, const char *text) { if (ed->prompt_window) return; ed->prompt_window = ed->win; ed->win = ed->prompt; ed->prompt_type = title[0]; ed->ui->prompt(ed->ui, title, text); }
false
false
false
false
false
0
bld_identdfparams(int32 nrtdfps) { register int32 dfi, dfi2; register struct dfparam_t *dfpp1, *dfpp2; struct dfparam_t *mastdfp, *dfpend, **dfppndx; /* build and sort index - ordered so all same rooted paths contingous */ /* within same paths ordered by source order */ dfppndx = (struct dfparam_t **) __my_m...
false
false
false
false
false
0
dlci_dev_event(struct notifier_block *unused, unsigned long event, void *ptr) { struct net_device *dev = netdev_notifier_info_to_dev(ptr); if (dev_net(dev) != &init_net) return NOTIFY_DONE; if (event == NETDEV_UNREGISTER) { struct dlci_local *dlp; list_for_each_entry(dlp, &dlci_devs, list) { if (dlp...
false
false
false
false
false
0
partialWidth(Energy2 q2) const { TwoOffShellIntegrand integrand(this,sqr(_massptr->nominalMass()), _massptr->nominalWidth()*_massptr->nominalMass()); _scale=q2; // the limits Energy upp=min(sqrt(q2)-_mother,_massptr->upperLimit()); Energy low=max(_minmass,_massptr->lowerLimit()); if(low>upp) return Z...
false
false
false
false
false
0
get_one_option(int optid, const struct my_option *opt __attribute__ ((unused)), char *argument __attribute__ ((unused))) { DBUG_ENTER("get_one_option"); switch (optid) { case 'V': print_version(); exit(0); break; case '?': usage(); exit(0); break; case '#': DBUG_PUSH(argume...
false
false
false
false
false
0
ensAttributetypeNewCpy(const EnsPAttributetype at) { EnsPAttributetype pthis = NULL; AJNEW0(pthis); pthis->Use = 1U; pthis->Identifier = at->Identifier; pthis->Adaptor = at->Adaptor; if (at->Code) pthis->Code = ajStrNewRef(at->Code); if (at->Name) pthis->Name = ...
false
false
false
false
false
0
fr_event_now(fr_event_list_t *el, struct timeval *when) { if (!when) return 0; if (el && el->dispatch) { *when = el->now; } else { gettimeofday(when, NULL); } return 1; }
false
false
false
false
false
0
r128_cce_init(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_r128_init_t *init = data; DRM_DEBUG("\n"); LOCK_TEST_WITH_RETURN(dev, file_priv); switch (init->func) { case R128_INIT_CCE: return r128_do_init_cce(dev, init); case R128_CLEANUP_CCE: return r128_do_cleanup_cce(dev); } re...
false
false
false
false
false
0
read_image( pRnm const & a,const pstring & b) { ubyte type,quiet=1; PPMimage * image =loadPPM(b->c_str(),&type, quiet); if(!image) { std::cerr << " error loadPPM image "<< *b << endl; CompileError("error loadPPM image "); return a; } if(verbosity) cout << " size of image : " << image->sizeX...
false
false
false
false
false
0
set_ctbl_defaults(gx_color_lookup_table * plktblp, int num_comps) { int i; plktblp->n = num_comps; plktblp->m = 3; /* always output CIE ABC */ for (i = 0; i < countof(plktblp->dims); i++) plktblp->dims[i] = 0; plktblp->table = 0; }
false
false
false
false
false
0
pythongiFree(void) { DBG_fprintf(stderr, "Panel PythonGI: finalise.\n"); g_free(iconPath); g_object_unref(initScripts); if (!isPythonInitialised) return; Py_Finalize(); }
false
false
false
false
false
0
list_nut_devices(void * arg) { struct scan_nut_arg * nut_arg = (struct scan_nut_arg*)arg; char *target_hostname = nut_arg->hostname; struct timeval tv; int port; unsigned int numq, numa; const char *query[4]; char **answer; char *hostname = NULL; UPSCONN_t *ups = malloc(sizeof(*ups)); nutscan_device_t * dev =...
false
false
false
false
false
0
response_cb (GtkDialog *dialog, int response, CheeseAvatarChooser *chooser) { if (response == GTK_RESPONSE_ACCEPT) { GdkPixbuf *pixbuf; g_message ("got pixbuf captured"); g_object_get (G_OBJECT (chooser), "pixbuf", &pixbuf, NULL); } gtk_main_quit...
false
false
false
false
false
0
eet_jpeg_membuf_src(j_decompress_ptr cinfo, const void *buf, size_t len) { struct jpeg_membuf_src *src; src = calloc(1, sizeof(*src)); if (!src) return -1; src->self = src; cinfo->src = &src->pub; src->buf = buf; src->len = len; src-...
false
false
false
false
false
0
gdb_var_create (IAnjutaDebuggerVariableObject *variable, gpointer user_data, GError *err) { DmaVariablePacket *pack = (DmaVariablePacket *) user_data; GtkTreeIter iter; g_return_if_fail (pack != NULL); if (err != NULL) { /* Command failed */ dma_variable_packet_free (pack); return; } if ((pack->data ...
false
false
false
false
false
0
do_reload(gpointer data) { if(state==IDLE && !reloading) { unsigned char msg=APPLET_CMD_RELOAD; reloading=true; set_state(state, (PanelApplet *) data); write(to_slave, &msg, sizeof(msg)); } else pending_reload=true; return TRUE; }
false
false
false
false
false
0
normalize_playlist( playlist_t* pl, const ucs2_char_t* path_to_playlist, const ucs2_char_t* path_to_root, const ucs2_char_t* path_to_music, const ucs2_char_t* input, findfile_music_t* ffd_music, int flags, void *instance, easyh10_error_callback error_proc ) { int error_occurred = 0, num_success = 0; int i; ...
false
false
false
false
false
0
HSP_find_cobs(HSP *hsp){ register gint i, query_pos = hsp->query_start, target_pos = hsp->target_start; register Match_Score score = 0; /* Find the HSP centre offset by score */ for(i = 0; i < hsp->length; i++){ g_assert(HSP_check_positions(hsp->hsp_set, ...
false
false
false
false
false
0
AddGuiLogLine(const wxString& line) { if (amuledlg) { while ( !m_logLines.empty() ) { amuledlg->AddLogLine(m_logLines.front()); m_logLines.pop_front(); } amuledlg->AddLogLine(line); } else { m_logLines.push_back(line); } }
false
false
false
false
false
0
isFlat( const Expr& e ){ for( int a=0; a<e.arity(); a++ ){ if( e.getKind()==e[a].getKind() ){ if( e.arity()>=10 ) return false; else if( !isFlat( e[a] ) ) return false; } } return true; }
false
false
false
false
false
0
RP5H01_test_w( int which, int data ) { RP5H01 *chip; if ( which >= intf->num ) { logerror( "RP5H01_enable: trying to access an unmapped chip\n" ); return; } /* get the chip */ chip = &RP5H01_state[which]; /* if it's not enabled, ignore */ if ( !chip->enabled ) return; /* process the tes...
false
false
false
false
false
0
p_update_position_widgets(GapPlayerMainGlobalParams *gpp) { static gchar time_txt[12]; if((gint32)GTK_ADJUSTMENT(gpp->framenr_spinbutton_adj)->value != gpp->play_current_framenr) { gtk_adjustment_set_value( GTK_ADJUSTMENT(gpp->framenr_spinbutton_adj) , (gfloat)gpp->play_current_fr...
false
false
false
false
false
0
notifyModemReady() { (void) faxApp::sendModemStatus(getModemDeviceID(), readyState | getModemCapabilities() | ":%02x", modemPriority); }
false
false
false
false
false
0
open_combo_window ( ) { if (combowin && combowin->is_visible()) return; // Already open. if (!vgafile) { EStudio::Alert("'shapes.vga' file isn't present"); return; } Shapes_vga_file *svga = (Shapes_vga_file *) vgafile->get_ifile(); delete combowin; // Delete old (svga may have changed). combowin = ...
false
false
false
false
false
0
ENGINE_get_last(void) { ENGINE *ret; CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); ret = engine_list_tail; if(ret) { ret->struct_ref++; engine_ref_debug(ret, 0, 1) } CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); return ret; }
false
false
false
false
false
0
cursor_up() { u16 n, y; n = param[0]; if (n < 1) n = 1; if (cursor_y < n) y = 0; else y = cursor_y - n; move_cursor(cursor_x, y); }
false
false
false
false
false
0
on_comment_stream (GtkAction *action, gpointer user_data) { IAnjutaDocument *doc; doc = get_current_document (user_data); if (doc) ianjuta_editor_comment_stream (IANJUTA_EDITOR_COMMENT (doc), NULL); }
false
false
false
false
false
0
hso_free_net_device(struct hso_device *hso_dev) { int i; struct hso_net *hso_net = dev2net(hso_dev); if (!hso_net) return; remove_net_device(hso_net->parent); if (hso_net->net) unregister_netdev(hso_net->net); /* start freeing */ for (i = 0; i < MUX_BULK_RX_BUF_COUNT; i++) { usb_free_urb(hso_net->mux_b...
false
false
false
false
false
0
tracker_store_shutdown (void) { #line 324 "/home/martyn/Source/checkout/gnome/tracker/src/tracker-store/tracker-store.vala" _g_thread_pool_free0 (tracker_store_query_pool); #line 324 "/home/martyn/Source/checkout/gnome/tracker/src/tracker-store/tracker-store.vala" tracker_store_query_pool = NULL; #line 325 "/home/mar...
false
false
false
false
false
0
find_compact (name) char *name; { register int i; for (i = 0; compacts[i].actname; i++) if (STREQ (name, compacts[i].actname)) return i; return -1; }
false
false
false
false
false
0
mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag) { char *csrc; struct vsb *cmdsb; char sf[] = "./vcl.########.c"; char of[sizeof sf + 1]; char *retval; int sfd, i; struct vcc_priv vp; /* Create temporary C source file */ sfd = vtmpfile(sf); if (sfd < 0) { VSB_printf(sb, "Failed to create %s: %s", sf...
false
false
false
false
false
0
_x11_notify_handler_image(X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify) { Ecore_X_Selection_Data *data; Tmp_Info *tmp; cnp_debug("got a image file!\n"); data = notify->data; cnp_debug("Size if %d\n", data->length); if (sel->datacb) { Elm_Selection_Data ddata; ...
false
true
false
false
false
1
ajAlignSetHeaderApp(AjPAlign thys, const AjPStr header) { if(ajStrGetLen(thys->Header) && ajStrGetCharLast(thys->Header) != '\n') ajStrAppendC(&thys->Header, "\n"); ajStrAppendS(&thys->Header, header); ajDebug("ajAlignSetHeaderApp len %d '%S'\n", ajStrGetLen(thys->Header), header); return; }
false
false
false
false
false
0
system_timezone_is_valid (const gchar *tz, GHashTable *ical_zones) { const gchar *c; if (tz == NULL) return FALSE; for (c = tz; *c != '\0'; c++) { if (!(g_ascii_isalnum (*c) || *c == '/' || *c == '-' || *c == '_')) return FALSE; } if (ical_zones == NULL) return TRUE; r...
false
false
false
false
false
0
shell_options_parse(struct gnutella_shell *sh, const char *argv[], const option_t *ovec, int ovcnt) { int ret; shell_check(sh); ret = options_parse(argv, ovec, ovcnt); if (ret < 0) { shell_write_linef(sh, REPLY_ERROR, "Syntax error: %s", options_parse_last_error()); shell_set_msg(sh, _("Invalid command sy...
false
false
false
false
false
0
VisitStatements(ZoneList<Statement*>* stmts) { for (int i = 0, len = stmts->length(); i < len; i++) { stmts->at(i) = ProcessStatement(stmts->at(i)); } }
false
false
false
false
false
0
unsetcmd(int argc, char *argv[]) { struct setlist *ct; struct togglelist *c; char *name; if (argc < 2) { fprintf(stderr, "Need an argument to 'unset' command. 'unset ?' for help.\r\n"); return 0; } if (isprefix(argv[1], "?") || isprefix(argv[1], "help")) { for (ct = Setlist; ct->name; ...
false
false
false
false
false
0
decItem() { Config *config = Config::instance(); HiScore *hiScore = HiScore::getInstance(); float pos[3] = { 0.0, 0.0, 25.0 }; switch(curSel) { case NewGame: break; case SkillLevel: config->setGameSkillBase(config->gameSkillBase()-0.1); if( config->debug() ) hiScore->print(config->intSkill()); game...
false
false
false
false
false
0
wake_up_event_readers(struct service_processor *sp) { struct event_reader *reader; list_for_each_entry(reader, &sp->event_buffer->readers, node) wake_up_interruptible(&reader->wait); }
false
false
false
false
false
0
SplitLoop(vtkIdType fedges[2], vtkIdType& n1, vtkIdType *l1, vtkIdType& n2, vtkIdType *l2) { vtkIdType i; vtkIdType *loop; vtkIdType *count; n1 = n2 = 0; loop = l1; count = &n1; for (i=0; i <= this->V->MaxId; i++) { loop[(*count)++] = i; if ( i == fedges[0] ||...
false
false
false
false
false
0
SendToEngine( char msg[] ) { int outError=0; int msg_size = strlen( msg ); int msg_count=0; /* The trailing '\n' is necessary. Otherwise, Polyglot will not realise of the new message. TODO: This should be improved. */ msg[msg_size] = '\n'; msg[msg_size+1] = '\0'; msg_count = wri...
false
false
false
false
false
0
create_chunk(struct inode *inode, struct audit_tree *tree) { struct fsnotify_mark *entry; struct audit_chunk *chunk = alloc_chunk(1); if (!chunk) return -ENOMEM; entry = &chunk->mark; if (fsnotify_add_mark(entry, audit_tree_group, inode, NULL, 0)) { fsnotify_put_mark(entry); return -ENOSPC; } spin_lock(&...
false
false
false
false
false
0
release_object_request(struct object_request *obj_req) { struct object_request *entry = object_queue_head; if (obj_req->local != -1) error("fd leakage in release: %d", obj_req->local); if (obj_req == object_queue_head) { object_queue_head = obj_req->next; } else { while (entry->next != NULL && entry->next !=...
false
false
false
false
false
0
newblock(block *leftlink, block *rightlink, Py_ssize_t len) { block *b; /* To prevent len from overflowing PY_SSIZE_T_MAX on 32-bit machines, we * refuse to allocate new blocks if the current len is nearing overflow. */ if (len >= PY_SSIZE_T_MAX - 2*BLOCKLEN) { PyErr_SetString(PyExc_OverflowErr...
false
false
false
false
false
0
camel_mime_part_get_filename (CamelMimePart *mime_part) { if (mime_part->priv->disposition) { const gchar *name = camel_header_param ( mime_part->priv->disposition->params, "filename"); if (name) return name; } return camel_content_type_param ( ((CamelDataWrapper *) mime_part)->mime_type, "name"); }
false
false
false
false
false
0
igb_irq_disable(struct igb_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; E1000_WRITE_REG(hw, E1000_IAM, 0); E1000_WRITE_REG(hw, E1000_IMC, ~0); E1000_WRITE_FLUSH(hw); }
false
false
false
false
false
0
ekg_session_status_set(ekg_sessionObj * self, PyObject * pyargs) { char *status = NULL; char *descr = NULL; const char *command; if (!PyArg_ParseTuple(pyargs, "s|s", &status, &descr)) return NULL; command = ekg_status_string(ekg_status_int(status), 1); if (descr == NULL) descr = xstrdup("-"); command_exec...
false
false
false
false
false
0
GetEffects(int flags /* = ALL_EFFECTS */) { EffectArray *results = new EffectArray(); int len = mEffects.GetCount(); for(int i=0; i<len; i++) { int g = mEffects[i]->GetEffectFlags(); if ((flags & g) == g) results->Add(mEffects[i]); } return results; }
false
false
false
false
false
0
metadata_add_frame_from_keyval(metadata_t * meta, int tag, char * key, char * val) { meta_frame_t * frame = meta_frame_new(); char * str; char * parsefmt; frame->tag = tag; frame->type = meta_frame_type_from_embedded_name(tag, key); if (meta_get_fieldname(frame->type, &str)) { frame->field_name = strdup(str);...
false
true
false
false
true
1
remove_subsystem(struct trace_subsystem_dir *dir) { if (!dir) return; if (!--dir->nr_events) { tracefs_remove_recursive(dir->entry); list_del(&dir->list); __put_system_dir(dir); } }
false
false
false
false
false
0
file_enumerate_children (TrackerCrawler *crawler, DirectoryRootInfo *info, DirectoryProcessingData *dir_data) { EnumeratorData *ed; GFile *dir_file; gchar *attrs; ed = enumerator_data_new (crawler, info, dir_data); if (crawler->priv->file_attributes) { attrs = g_strconcat (FILE_ATTRIBUTE...
false
false
false
false
false
0
activate_uri_entry_cb(GtkWidget* entry, gpointer data) { const gchar* uri = gtk_entry_get_text(GTK_ENTRY (entry)); g_assert (uri); webkit_web_view_open(WEBKIT_WEB_VIEW(browser->webview), uri); }
false
false
false
false
false
0
c_ncagtc( int ncid, /* netCDF ID */ int varid, /* variable ID */ const char* attname, /* attribute name */ char* value, /* pointer to data values */ int attlen, /* length of string argument */ int* rcode /* returned error code */ ) { int status; nc_type datatype; if ((statu...
false
false
false
false
false
0
gp_itdb_pc_path_hash_find_tracks(iTunesDB *itdb, const gchar *filename) { ExtraiTunesDBData *eitdb; GList *tracks = NULL; g_return_val_if_fail (itdb, NULL); eitdb = itdb->userdata; g_return_val_if_fail (eitdb, NULL); g_return_val_if_fail (eitdb->pc_path_hash, NULL); if (filename && *filena...
false
false
false
false
false
0
paintOneBackground(QPainter* p, const QColor& c, const BackgroundLayer* bgLayer, QRect clipr, int _tx, int _ty, int w, int h) { CachedImage* bg = bgLayer->backgroundImage(); bool hasBackgroundImage = bg && bg->isComplete() && !bg->isTransparent(...
false
false
false
false
false
0
has_no_any_policy(linked_list_t *chain, int len) { enumerator_t *enumerator, *policies; x509_cert_policy_t *policy; certificate_t *cert; x509_t *x509; bool valid = TRUE; enumerator = chain->create_enumerator(chain); while (len-- > 0 && enumerator->enumerate(enumerator, &x509)) { policies = x509->create_cert_...
false
false
false
false
false
0
readspec(filename) char *filename; { FILE *file; struct string s; struct conf *spec=0; strinit(&s); file=fopen(filename, "r"); if(!file) goto error; readline(filename, file, &s); spec=confnew(filename, 1U, s.s_base, s.s_size); fclose(file); putprop("os", spec->c_field[OS].s_base); pu...
false
false
false
false
false
0
error( const char *msg, ... ) { va_list va; if (need_nl) { putchar( '\n' ); need_nl = 0; } va_start( va, msg ); vfprintf( stderr, msg, va ); va_end( va ); }
false
false
false
false
true
1
createMode(int icharge, unsigned int, DecayPhaseSpaceModePtr mode, unsigned int iloc,unsigned int ires, DecayPhaseSpaceChannelPtr phase,Energy upp) { if(icharge!=3&&icharge!=-3){return false;} // check that the mode is are kinematical allowed Energy min(getParticleData(ParticleID::pi...
false
false
false
false
false
0
estimate_bisect_steps(int all) { int n, x, e; if (all < 3) return 0; n = log2i(all); e = exp2i(n); x = all - e; return (e < 3 * x) ? n : n - 1; }
false
false
false
false
false
0
select_row( GtkButton *button GCC_UNUSED, gpointer user_data ) { GtkTreePath *path; GtkTreeView *view = user_data; GtkTreeViewColumn *focus_column; current_block = -1; /* Get selected row */ gtk_tree_view_get_cursor( GTK_TREE_VIEW( view ), &path, &focus_column ); if( path ) { int *indices = gtk_tree...
false
false
false
false
false
0
listline() { if (!listpre && lineptr != 0) { if (errcount || (list.current && (!macflag || mcount != 0)) || (macflag && maclist.current) || list_force ) list1(lstfil); if (errcount) { if (lstfil != STDOUT) list1(STDOUT); errcount = 0; erroverflow = FALSE; } } }
false
false
false
false
false
0
auth_is (unsigned char *data, int cnt) { TN_Authenticator *ap; if (cnt < 2) return; if (data[0] == AUTHTYPE_NULL) { auth_finished (0, AUTH_REJECT); return; } ap = findauthenticator (data[0], data[1]); if (ap) { if (ap->is) (*ap->is) (ap, data + 2, cnt - 2); } else i...
false
false
false
false
false
0
_hx509_Certificate_cmp(const Certificate *p, const Certificate *q) { int diff; diff = der_heim_bit_string_cmp(&p->signatureValue, &q->signatureValue); if (diff) return diff; diff = _hx509_AlgorithmIdentifier_cmp(&p->signatureAlgorithm, &q->signatureAlgorithm); if (diff) return diff; dif...
false
false
false
false
false
0
gdm_client_open_connection (GdmClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *operation_result; g_return_if_fail (GDM_IS_...
false
false
false
false
false
0
FlushRings() { if (!cl_valid) return -1; fd_set rset, wset; int max; time_t flushtime = time(0); // Nuke the fatal condition so we can track our own failures int old_fcon = globalreg->fatal_condition; globalreg->fatal_condition = 0; while ((time(0) - flushtime) < 2) {...
false
false
false
false
false
0
free_item(ITEM * item) { LIST *list, *next; if (item->name != NULL) G_free(item->name); for (list = item->list; list != NULL; list = next) { next = list->next; if (list->value) G_free(list->value); G_free(list); } G_free(item); return 0; }
false
false
false
false
false
0
dib9000_fw_set_channel_head(struct dib9000_state *state) { u8 b[9]; u32 freq = state->fe[0]->dtv_property_cache.frequency / 1000; if (state->fe_id % 2) freq += 101; b[0] = (u8) ((freq >> 0) & 0xff); b[1] = (u8) ((freq >> 8) & 0xff); b[2] = (u8) ((freq >> 16) & 0xff); b[3] = (u8) ((freq >> 24) & 0xff); b[4] =...
false
false
false
false
false
0
gegl_tile_storage_new_cached (gint tile_width, gint tile_height, const void *babl_fmt, gboolean use_ram) { GeglTileStorage *storage = NULL; GSList *iter; g_static_mutex_lock (&storage_cache_mutex); for (iter = storage_cache; iter; iter = iter->next) { TileStorageCacheItem...
false
false
false
false
false
0
handle_line(GScanner *scanner, const char *key, GTokenType token_type) { _current_profile = get_profile(); switch (token_type) { case G_TOKEN_IDENTIFIER_NULL: _current_profile->set_null_value(key); break; case G_TOKEN_INT: _current_profile->set_int_value(key, ...
false
false
false
false
false
0
ng_process_put_frame(struct ng_process_handle *h, struct ng_video_buf* buf) { switch (h->p->mode) { case NG_MODE_TRIVIAL: BUG_ON(NULL != h->in, "already have frame"); h->in = buf; break; case NG_MODE_COMPLEX: h->p->put_frame(h->phandle,buf); break; default: BUG_ON(1,"mode not implemented yet"); b...
false
false
false
false
false
0
lsplit(char** string_ref, char delim1, char delim2, char encloser) { lsplit_result result; if(char* string=*string_ref) { if(encloser && *string==encloser) { string++; char *read; char *write; write=read=string; char c; // we are enclosed, searching for second encloser while(c=*read++) { ...
false
false
false
false
false
0
w1_ds2760_io(struct device *dev, char *buf, int addr, size_t count, int io) { struct w1_slave *sl = container_of(dev, struct w1_slave, dev); if (!dev) return 0; mutex_lock(&sl->master->bus_mutex); if (addr > DS2760_DATA_SIZE || addr < 0) { count = 0; goto out; } if (addr + count > DS2760_DATA_SIZE) ...
false
false
false
false
false
0
copy_literals(Literals lits) { if (lits == NULL) return NULL; else { Literals new = get_literals(); new->sign = lits->sign; new->atom = copy_term(lits->atom); new->next = copy_literals(lits->next); return new; } }
false
false
false
false
false
0
number_faces(polyhedron) WEpolyhedron *polyhedron; { int count; WEface *face; /* at this point just assign consecutive indices to the */ /* faces, and let the routines for making display lists,*/ /* saving in other file formats, etc. set the actual */ /* fill tones */ count = 0; for (face=polyhed...
false
false
false
false
false
0
_get_offspring_data(List prec_list, jag_prec_t *ancestor, pid_t pid) { ListIterator itr; jag_prec_t *prec = NULL; itr = list_iterator_create(prec_list); while((prec = list_next(itr))) { if (prec->ppid == pid) { #if _DEBUG info("pid:%u ppid:%u rss:%d KB", prec->pid, prec->ppid, prec->rss); #endif _g...
false
false
false
false
false
0
Setup(const size_t requested) { ASSERT(code_range_ == NULL); code_range_ = new VirtualMemory(requested); CHECK(code_range_ != NULL); if (!code_range_->IsReserved()) { delete code_range_; code_range_ = NULL; return false; } // We are sure that we have mapped a block of requested addresses. AS...
false
false
false
false
false
0
gnibbles_properties_destroy (GnibblesProperties * props) { int i; for (i = 0; i < NUMWORMS; i++) g_slice_free (GnibblesWormProps, props->wormprops[i]); g_signal_handler_disconnect (settings, props->conf_notify_id); g_slice_free (GnibblesProperties, props); }
false
false
false
false
false
0
o_move_end_lowlevel_glist (GSCHEM_TOPLEVEL *w_current, GList *list, int diff_x, int diff_y) { OBJECT *object; GList *iter; iter = list; while (iter != NULL) { object = (OBJECT *)iter->data; o_move_end_lowlevel (w_current, obj...
false
false
false
false
false
0
php_cli_server_content_sender_pull(php_cli_server_content_sender *sender, int fd, size_t *nbytes_read) /* {{{ */ { ssize_t _nbytes_read; php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(131072); _nbytes_read = read(fd, chunk->data.heap.p, chunk->data.heap.len); if (_nbytes_read < 0) { c...
false
false
false
false
false
0
roccat_common2_receive_control_status(struct usb_device *usb_dev) { int retval; struct roccat_common2_control control; do { msleep(50); retval = roccat_common2_receive(usb_dev, ROCCAT_COMMON_COMMAND_CONTROL, &control, sizeof(struct roccat_common2_control)); if (retval) return retval; switch (co...
false
false
false
false
false
0
PaintCT(Surface *surfaceWindow) { if (!val) return; PRectangle rcClientPos = wCallTip.GetClientPosition(); PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, rcClientPos.bottom - rcClientPos.top); PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1);...
false
false
false
false
false
0
WebPINewYUVA(uint8_t* luma, size_t luma_size, int luma_stride, uint8_t* u, size_t u_size, int u_stride, uint8_t* v, size_t v_size, int v_stride, uint8_t* a, size_t a_size, int a_stride) { const int is_external_memory = (luma != NULL); ...
false
false
false
false
false
0
parse_uint32(const char *src, FLAC__uint32 *dest) { FLAC__ASSERT(0 != src); if(strlen(src) == 0 || strspn(src, "0123456789") != strlen(src)) return false; *dest = strtoul(src, 0, 10); return true; }
false
false
false
false
false
0
dw_mci_exynos_move_next_clksmpl(struct dw_mci *host) { struct dw_mci_exynos_priv_data *priv = host->priv; u32 clksel; u8 sample; if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 || priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU) clksel = mci_readl(host, CLKSEL64); else clksel = mci_readl(host, CLKSEL); sample = (cl...
false
false
false
false
false
0
FuncPOSITION_SUBSTRING( Obj self, Obj string, Obj substr, Obj off ) { Int ipos, i, j, lens, lenss, max; UInt1 *s, *ss, c; /* check whether <string> is a string */ if ( ! IsStringCon...
false
false
false
false
false
0
coerce_into_path (void *arg, object element) { struct seq_path *rec = (struct seq_path *)arg; if (stringp(element)) { coerce_into_path_string: with_string_0 (element, GLO(pathname_encoding), frob, { uintL j = frob_bytelen+1; char *path = (char*)clisp_malloc(j); while (j--) path[j] = frob...
false
false
false
false
false
0