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
is_attribute_or_alias(const char *name, const xmlChar **attrs, int nb_attributes) { if (strcmp(name, "Attribute") == 0) { process_attribute_element(attrs, nb_attributes); // next state: inside_attribtue or inside_attribute_container return true; } else if (strcmp(name, "Alias...
false
false
false
false
false
0
wcreate(SCREEN *t, WATOM *watom, W *where, W *target, W *original, int height, unsigned char *huh, int *notify) { W *new; if (height < 1) return NULL; /* Create the window */ new = (W *) joe_malloc(sizeof(W)); new->notify = notify; new->t = t; new->w = t->w - 1; seth(new, height); new->h = new->reqh; new-...
false
false
false
false
false
0
expr_with_var_bounded_array_refs_p (tree expr) { while (handled_component_p (expr)) { if (TREE_CODE (expr) == ARRAY_REF && !host_integerp (array_ref_low_bound (expr), 0)) return true; expr = TREE_OPERAND (expr, 0); } return false; }
false
false
false
false
false
0
scm_s_letrec_internal(enum ScmObjType permitted, ScmObj bindings, ScmObj body, ScmEvalState *eval_state) { ScmObj binding, formals, actuals, var, val, exp, env; DECLARE_INTERNAL_FUNCTION("letrec" /* , syntax_variadic_tailrec_1 */); /*===================================================...
false
false
false
false
false
0
print_table(symbol_t table){ int i; symbol_t* p_table; int size=0; node* aux; p_table=&table; for (i=0; i<=210; i++) { // Percorre o array verificando se ha entradas if (p_table->list[i] != NULL) { // Se houver imprime seu conteudo na tela aux = p_table->list[i]; /...
false
false
false
false
false
0
process_move() { int actualStep = total_step; if(target_type == BULLET_TARGET_UNIT) { Unit *unitPtr; if( unit_array.is_deleted(target_recno) || !(unitPtr = unit_array[target_recno]) || !unitPtr->is_visible() ) { // target lost/die, proceed to Bullet::process_move target_type = BULLET_TARGET_NONE...
false
false
false
false
false
0
print_table_f2_ivy(FILE *fp, struct symbol *s) { int i, j; int n0 = s->args[0].n; int n1 = s->args[1].n; fprintf(fp, " ((%s . 2) . (\n", s->name); for (i = 0; i < n0; i++) { for (j = 0; j < n1; j++) { fprintf(fp, " ((%d %d) . %d)\n", i, j, function_value_2(s, i, j)); } } fpr...
false
false
false
false
false
0
ipmi_sol_keepalive_using_sol(struct ipmi_intf * intf) { struct ipmi_v2_payload v2_payload; struct ipmi_rs * rsp = NULL; struct timeval end; int ret = 0; if (_disable_keepalive) return 0; gettimeofday(&end, 0); if (end.tv_sec - _start_keepalive.tv_sec > SOL_KEEPALIVE_TIMEOUT) { memset(&v2_payload, 0, ...
false
false
false
false
false
0
moveHandle(const QPointF& handleScenePos) { const QPointF handlePos = mapFromScene(handleScenePos); //factor 2: item bounding rect is always centered around (0,0) QSizeF newSize(2 * qAbs(handlePos.x()), 2 * qAbs(handlePos.y())); dynamic_cast<Kolf::LandscapeItem*>(qitem())->setSize(newSize); }
false
false
false
false
false
0
wecleman_unpack_sprites(void) { const int region = REGION_GFX1; // sprites const unsigned int len = memory_region_length(region); unsigned char *src = memory_region(region) + len / 2 - 1; unsigned char *dst = memory_region(region) + len - 1; while(dst > src) { unsigned char data = *src...
false
false
false
false
false
0
stlBoundaries() { const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase(); const std::size_t functions = symbolDatabase->functionScopes.size(); for (std::size_t i = 0; i < functions; ++i) { const Scope * scope = symbolDatabase->functionScopes[i]; for (const Token* tok = ...
false
false
false
false
false
0
done() { /* Goal has now been achieved */ if (quiet #if EXPLAIN_INSTANCE_RESOLUTION || showInstRes #endif ) return; if (useDots) { while (maxPos>currPos++) Putchar('.'); Putchar('\n'); } else for (; charCount>0; charCount--) { Putchar('\b'); #if ...
false
false
false
false
false
0
setDormant() { if (!mStopButton->text().contains("Stop", Qt::CaseSensitive)) { stopClickedSlot(); } mMips->setActive(false); }
false
false
false
false
false
0
impl_DataCalView_start (EGdbusCalView *object, GDBusMethodInvocation *invocation, EDataCalView *view) { if (!view->priv->started) { GThread *thread; view->priv->started = TRUE; e_debug_log ( FALSE, E_DEBUG_LOG_DOMAIN_CAL_QUERIES, "---;%p;VIEW-START;%s;%s", v...
false
false
false
false
false
0
scrollbar(Adjustable* a, DimensionName d) const { const OL_Specs* s = specs_; const OLKit* k = kit_; OL_Cable* c = new OL_Cable(s, a, d, new OL_Indicator(k, s, d)); OL_Elevator* e = new OL_Elevator(s, a, d, new OL_ElevatorGlyph(k, s, d)); return new OL_Scrollbar(s, a, style_, d, c, e); }
false
false
false
false
false
0
secfile_section_by_name(const struct section_file *secfile, const char *name) { SECFILE_RETURN_VAL_IF_FAIL(secfile, NULL, NULL != secfile, NULL); section_list_iterate(secfile->sections, psection) { if (0 == strcmp(section_name(psection), name)) { return psection; ...
false
false
false
false
false
0
set_property(DBusConnection *conn, DBusMessage *msg, void *data) { struct thermometer *t = data; const char *property; DBusMessageIter iter; DBusMessageIter sub; uint16_t value; if (!dbus_message_iter_init(msg, &iter)) return btd_error_invalid_args(msg); if (dbus_message_iter_get_arg_type(&iter) != D...
false
false
false
false
false
0
gconf_database_sync_timeout(GConfDatabase* db) { db->sync_timeout = 0; /* Install the sync idle */ if (db->sync_idle == 0) db->sync_idle = g_idle_add((GSourceFunc)gconf_database_sync_idle, db); gconf_log(GCL_DEBUG, "Sync queued one minute after changes occurred"); /* Remove the timeout function by ...
false
false
false
false
false
0
stradd(const char* a) { if (a) while (*a && curn--) { *cur++ = *a++; } *cur = 0; return cur; }
false
false
false
false
false
0
H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/) { H5P_genplist_t *plist; /* Property list pointer */ H5T_t *type; /* Datatype */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "iix", plist_id, ty...
false
false
false
false
false
0
xmlnode_get_attrib( xmlnode *psNode, const char *pnAttr ) { xmlnode *psX; g_return_val_if_fail( psNode != NULL, NULL ); g_return_val_if_fail( pnAttr != NULL, NULL ); for ( psX = psNode -> psChild; psX != NULL; psX = psX -> psNext ) { if ( psX -> nType == XMLNODE_TYPE_ATTRIB && strcmp( pnAttr, psX -> pnName ) ==...
false
false
false
false
false
0
Process(fcmpx *Input) { int err; err=Output.EnsureSpace(Dist); if(err) return err; Process(Input,Output.Data); Output.Len=Dist; return 0; }
false
false
false
false
false
0
updateProgrammers() { QString currentProgrammer; int index = m_programmerComboBox->currentIndex(); if (index >= 0) { currentProgrammer = m_programmerComboBox->itemData(index).toString(); } while (m_programmerComboBox->count() > 0) { m_programmerComboBox->removeItem(0); } QHash<QString, QString> programmer...
false
false
false
false
false
0
ajDiroutExists(AjPDirout thys) { #ifdef WIN32 if(ajStrMatchC(thys->Name, ".")) { ajStrAssignC(&thys->Name, ""); ajStrAssignC(&thys->Printname, ""); return ajTrue; } #endif /* WIN32 */ if(ajStrGetCharLast(thys->Name) != SLASH_CHAR) { ajStrAppendC(&thys->Name, SLASH_ST...
false
false
false
false
false
0
getFileInfo(f,tm,sz) /* find time stamp and size of file*/ String f; Time *tm; Long *sz; { #if HAVE_SYS_STAT_H || HAVE_STAT_H || HAVE_UNIX_H struct stat scbuf; if (!stat(f,&scbuf)) { *tm = scbuf.st_mtime; *sz = (Long)(scbuf.st_size); } else { *tm = 0; *sz = 0; } #else ...
false
false
false
false
false
0
fstate_src_list_copy(fstate_src_list_ty *from) { size_t j; fstate_src_list_ty *result; if (!from) return 0; trace(("fstate_src_list_copy(from = %08lX)\n{\n", (long)from)); result = (fstate_src_list_ty *)fstate_src_list_alloc(); assert(from->length <= from->maximum); assert(!from->list == !...
false
false
false
false
false
0
i915_gem_evict_for_vma(struct i915_vma *target) { struct drm_mm_node *node, *next; list_for_each_entry_safe(node, next, &target->vm->mm.head_node.node_list, node_list) { struct i915_vma *vma; int ret; if (node->start + node->size <= target->node.start) continue; if (node->start >= target->node.star...
false
false
false
false
false
0
gck_session_enumerate_objects (GckSession *session, GckAttributes *match) { GckUriData *uri_data; g_return_val_if_fail (match != NULL, NULL); uri_data = gck_uri_data_new (); uri_data->attributes = gck_attributes_ref_sink (match); return _gck_enumerator_new_for_session (session, ur...
false
false
false
false
false
0
ReadSeqID(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Cargo, cmsUInt32Number n, cmsUInt32Number SizeOfTag) { cmsSEQ*...
false
false
false
false
false
0
print(const int * sequenceLookup) const { int sequence = -1; if (sequence_ >= 0) sequence = sequenceLookup ? sequenceLookup[sequence_] : sequence_; printf("%6d %6d %5d %6d %7.3f %s %s %13.7g (%5d) -> ", id_, parentId_, depth_, sequence, value_, abs(way_) == 1 ? " left" : "right", ...
false
false
false
false
false
0
egg_list_box_accessible_ref_selection (AtkSelection *selection, gint idx) { GtkWidget *box; GtkWidget *widget; AtkObject *accessible; if (idx != 0) return NULL; box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (box == NULL) return NUL...
false
false
false
false
false
0
PerlIOScalar_get_ptr(pTHX_ PerlIO * f) { if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) { PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); return PerlIOScalar_get_base(aTHX_ f) + s->posn; } return (STDCHAR *) NULL; }
false
false
false
false
false
0
createPlane( const String& name, const String& groupName, const Plane& plane, Real width, Real height, int xsegments, int ysegments, bool normals, unsigned short numTexCoordSets, Real xTile, Real yTile, const Vector3& upVector, HardwareBuffer::Usage vertexBufferUsage, HardwareBuffer::Usage index...
false
false
false
false
false
0
R_InitCubemapTextures (void) { float vector[3]; int i, x, y; byte pixels[CUBEMAP_MAXSIZE * CUBEMAP_MAXSIZE * 4]; qglDisable (GL_TEXTURE_2D); qglEnable (GL_TEXTURE_CUBE_MAP_ARB); qglBindTexture(GL_TEXTURE_CUBE_MAP_ARB, normalisationCubeMap); // set up the texture parameters - did a clamp on R as wel...
false
false
false
false
false
0
nextUpperAlpha(const char* p, char x) { char c; for(c = toupper(*p); *p != 0; c = toupper(*++p)) { if ('A' <= c && c <= 'Z') { if (c != x) { return p; } } } return p; }
false
false
false
false
false
0
status_cb (void * unused) { if (! headless && ! status_window) { status_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_type_hint ((GtkWindow *) status_window, GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_title ((GtkWindow *) status_window, _("Searching ...")); ...
true
true
false
false
true
1
av_check_malloc() { int ctr; AV_LOCK(mallock); ctr = malloctr; AV_UNLOCK(mallock); if(ctr != 0) av_log(AVLOG_WARNING, "Unfreed memory remaining (%i)", ctr); else av_log(AVLOG_DEBUG, "No unfreed memory remaining"); }
false
false
false
false
false
0
typeParameters(PyTypeObject *types[], size_t size) { size_t count = size / sizeof(PyTypeObject *); PyObject *tuple = PyTuple_New(count); for (size_t i = 0; i < count; i++) { PyObject *type = (PyObject *) types[i]; if (type == NULL) type = Py_None; PyTuple_SET_I...
false
false
false
false
true
1
lam_ssi_rpi_usysv_push_env(struct lam_ssi_rpi_proc *ps, MPI_Request req) { volatile int *lock; double starttime = 0.0; lock = &ps->cp_outbox->pb_header.bh_lock; if (lam_ssi_rpi_tcp_flblock) { LAM_TRACE(starttime = ttime()); spinlock(lock, 1, lam_ssi_rpi_usysv_lock_poll_write); LAM_TRACE(_kio.ki_blk...
false
false
false
false
false
0
Remove(unsigned start, unsigned end) { bool restart = 0; std::set<PlaylistInterface *>::const_iterator i; std::set<playlist_interface *>::const_iterator j; if(start > end) { unsigned tmp = end; end = start; start = tmp; } Lock(); if(start < 1) start = 1; if(start > queue.size()) start = queue...
false
false
false
false
false
0
nv_join(cap) cmdarg_T *cap; { #ifdef FEAT_VISUAL if (VIsual_active) /* join the visual lines */ nv_operator(cap); else #endif if (!checkclearop(cap->oap)) { if (cap->count0 <= 1) cap->count0 = 2; /* default for join is two lines! */ if (curwin->w_cursor.lnum + cap->count0 - 1 > cur...
false
false
false
false
false
0
gnumeric_imsum (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv) { GnmValue *v; eng_imoper_t p; p.type = Imsum; p.imunit = 'j'; complex_real (&p.res, 0); v = function_iterate_argument_values (ei->pos, callback_function_imoper, &p, argc, argv, TRUE, CELL_ITER_IGNORE_BLANK); if (v ...
false
false
false
false
false
0
ipa_analyze_virtual_call_uses (struct cgraph_node *node, struct ipa_node_params *info, gimple call, tree target) { struct ipa_jump_func jfunc; tree obj = OBJ_TYPE_REF_OBJECT (target); tree var; int index; if (!flag_devirtualize) return; if (TREE_CODE (obj) == ADDR_EXPR) { ...
false
false
false
false
false
0
wilc_handle_isr(void *wilc) { u32 int_status; acquire_bus(ACQUIRE_AND_WAKEUP); g_wlan.hif_func.hif_read_int(&int_status); if (int_status & PLL_INT_EXT) wilc_pllupdate_isr_ext(int_status); if (int_status & DATA_INT_EXT) { wilc_wlan_handle_isr_ext(wilc, int_status); #ifndef WILC_OPTIMIZE_SLEEP_INT /* Chip ...
false
false
false
false
false
0
accumulate_check_null_result (gpointer result, gpointer user_data) { GPkcs11Array *attrs = result; g_assert (attrs == NULL); return TRUE; /* call again */ }
false
false
false
false
false
0
bf_prop_info(Var arglist, Byte next, void *vdata, Objid progr) { /* (object, prop-name) */ Objid oid = arglist.v.list[1].v.obj; const char *pname = arglist.v.list[2].v.str; db_prop_handle h; Var r; unsigned flags; char *s; if (!valid(oid)) { free_var(arglist); return make_error_pack(E_...
false
false
false
false
false
0
ll_idx_n2a(unsigned idx, char *buf) { struct idxmap *im; if (idx == 0) return "*"; for (im = idxmap[idx&0xF]; im; im = im->next) if (im->index == idx) return im->name; snprintf(buf, 16, "if%d", idx); return buf; }
false
false
false
false
false
0
write_template_template_param (const tree parm) { tree templ = NULL_TREE; /* PARM, a TEMPLATE_TEMPLATE_PARM, is an instantiation of the template template parameter. The substitution candidate here is only the template. */ if (TREE_CODE (parm) == BOUND_TEMPLATE_TEMPLATE_PARM) { templ = TI_T...
false
false
false
false
false
0
strat_map_update_unit_layer() { int i, j; Unit *unit; DotPos *dotpos = 0; list_clear( dots ); free_surf( &unit_layer ); free_surf( &flag_layer ); unit_layer = create_surf( width, height, SDL_SWSURFACE ); SDL_FillRect( unit_layer, 0, 0x0 ); flag_layer = create_surf( width, height, SDL...
false
false
false
false
false
0
check_function_arguments (attrs, params) tree attrs; tree params; { /* Check for null being passed in a pointer argument that must be non-null. We also need to do this if format checking is enabled. */ if (warn_nonnull) check_function_nonnull (attrs, params); /* Check for errors in format s...
false
false
false
false
false
0
set_by_name(const char *string) { int n = find_by_name(string); if (n<0) return 0; set(n + min); return 1; }
false
false
false
false
false
0
min_bytes_allocd(void) { word result; # ifdef STACK_NOT_SCANNED word stack_size = 0; # elif defined(STACK_GROWS_UP) word stack_size = GC_approx_sp() - GC_stackbottom; /* GC_stackbottom is used only for a single-threaded case. */ # else word stack_size = GC_stackbottom - GC_appro...
false
false
false
false
false
0
ftfile_entry_new(int len) { struct ftfile_entry *e; if (!(e = (struct ftfile_entry*)malloc(sizeof (struct ftfile_entry)))) return (struct ftfile_entry*)0L; bzero(e, sizeof *e); if (!(e->name = (char*)malloc(len+1))) { free (e); return (struct ftfile_entry*)0L; } return e; }
false
false
false
false
false
0
le_conn_complete(int index, void *ptr) { struct dev_info *dev = &devs[index]; evt_le_connection_complete *evt = ptr; char filename[PATH_MAX]; char local_addr[18], peer_addr[18], *str; struct bt_conn *conn; uint8_t bdaddr_type; if (evt->status) { btd_event_conn_failed(&dev->bdaddr, &evt->peer_bdaddr, e...
false
false
false
false
false
0
_expand_format(char *dt_fmt) { char *ptr, *expanded_fmt, ch; unsigned int idx = 0, len = 0; char buf[ELM_DATETIME_MAX_FORMAT_LEN] = {0, }; Eina_Bool fmt_char = EINA_FALSE; ptr = dt_fmt; while ((ch = *ptr)) { if ((fmt_char) && (strchr(multifield_formats, ch))) { /* ...
true
true
false
false
true
1
resize(int xx, // I - New left position int yy, // I - New top position int ww, // I - New width int hh) // I - New height { Fl_Boxtype b = box() ? box() : FL_DOWN_BOX; // Box to draw... Fl_Widget::resize(xx, yy, ww, hh); int ss = Fl::scrollbar_size(); scrollbar_.resi...
false
false
false
false
false
0
starts_with(const char *s, int len) const { // See note on equals() re: "out-of-memory" strings. if (len < 0) len = strlen(s); if (_r.length < len) return false; else if (_r.data == s) return true; else if (len == 0) return (s != &oom_data && _r.data != &oom_data); else return memcmp(_r.dat...
false
false
false
false
false
0
wl3501_esbq_confirm_done(struct wl3501_card *this) { u8 tmp = 0; wl3501_set_to_wla(this, this->esbq_confirm + 3, &tmp, sizeof(tmp)); this->esbq_confirm += 4; if (this->esbq_confirm >= this->esbq_confirm_end) this->esbq_confirm = this->esbq_confirm_start; }
false
false
false
false
false
0
Stop() { jack_log("JackServer::Stop"); int res = -1; if (fFreewheel) { if (fThreadedFreewheelDriver) { res = fThreadedFreewheelDriver->Stop(); } } else { if (fAudioDriver) { res = fAudioDriver->Stop(); } } fEngine->NotifyQuit(); ...
false
false
false
false
false
0
get_elem (size, av_table, av_count) int size; avail_elem av_table[]; int *av_count; { int index; /* For searching through the avail block. */ avail_elem val; /* The default return value. */ /* Initialize default return value. */ val.av_adr = 0; val.av_size = 0; /* Search for element. Li...
false
false
false
false
true
1
ebook_set_subbook(BOOK_INFO *binfo) { EB_Error_Code error_code; error_code = eb_set_subbook(binfo->book, binfo->subbook_no); if (error_code != EB_SUCCESS){ LOG(LOG_CRITICAL, "Failed to set subbook %s, %d : %s", binfo->book_path, binfo->subbook_no, ebook_error_message(error_code)); return(error_code); }...
false
false
false
false
false
0
ho_recognize_font_1_nun_sofit (const double *array_in) { double return_value = 0.0; if (WIDTH < 0.3) return_value += 0.2; if (WIDTH_BY_HEIGHT < 0.45) return_value += 0.2; if (RIGHT_VBAR || MID_VBAR) return_value += 0.2; if (BOTTOM < 0.45) return_value += 0.3; if (HEIGHT > 0.53) return_v...
false
false
false
false
false
0
recogTrainUnlabelled(L_RECOG *recog, L_RECOG *recogboot, PIX *pixs, BOX *box, l_int32 singlechar, l_float32 minscore, l_int32 debug) { char *text; l_float32 score; N...
false
false
false
false
false
0
ExpandChainLibCall(RTLIB::Libcall LC, SDNode *Node, bool isSigned) { SDValue InChain = Node->getOperand(0); TargetLowering::ArgListTy Args; TargetLowering::ArgListEntry Entry; for (unsigned i = 1, e = Node->getNumOperands(); i !=...
false
false
false
false
false
0
really_remove_tee (GstPad *pad, GstPadProbeInfo *info, RBGstPipelineOp *op) { GstElement *bin; GstElement *parent; if (op->linking) return GST_PAD_PROBE_OK; op->linking = TRUE; rb_debug ("really removing tee %p", op->element); _rb_player_gst_tee_emit_tee_pre_remove (RB_PLAYER_GST_TEE (op->player), op->elemen...
false
false
false
false
false
0
Q_PushTail(queue *q, void *d) { node *p = NULL; datanode *n; /* first entry - added by M. Zacho 990613 */ if (q->tail == NULL) { q->tail = malloc(sizeof(datanode)); if (q->tail == NULL) return False_; } else { ...
false
false
false
false
false
0
toscr_1 (int nbits, int fm) { switch (fm) { case 0: toscr_2_0 (nbits); break; #ifdef AGA case 1: toscr_2_1 (nbits); break; case 2: toscr_2_2 (nbits); break; #endif } out_nbits += nbits; if (out_nbits == 32) { int i; uae_u8 *dataptr = line_data[next_lineno] + out_offs * 4; for (i = 0; i < thisli...
false
false
false
false
false
0
pcxhr_monitor_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pcxhr *chip = snd_kcontrol_chip(kcontrol); int changed = 0; int i; mutex_lock(&chip->mgr->mixer_mutex); for (i = 0; i < 2; i++) { if (chip->monitoring_volume[i] != ucontrol->value.integer.value[i]) ...
false
false
false
false
false
0
check_for_change() { Glib::ustring new_text = get_text(); if(new_text == m_old_text) return; //Validate the input: bool success = false; sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item()); const Gnome::Gda::Value value = Conversions::pars...
false
false
false
false
false
0
ex_copen(eap) exarg_T *eap; { qf_info_T *qi = &ql_info; int height; win_T *win; tabpage_T *prevtab = curtab; buf_T *qf_buf; win_T *oldwin = curwin; if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) { qi = GET_LOC_LIST(curwin); if (qi == NULL) { EMSG(_(e_loclist));...
false
false
false
false
false
0
pixGlobalNormNoSatRGB(PIX *pixd, PIX *pixs, l_int32 rval, l_int32 gval, l_int32 bval, l_int32 factor, l_float32 rank) { l_int32 mapval; l_float32 rankrval, ran...
false
false
false
false
false
0
f_2329(C_word t1,C_word t2){ C_word tmp; C_word t3; C_word t4; C_word t5; C_word t6; C_word t7; C_word t8; C_word t9; C_stack_overflow_check; loop: if(C_truep(C_i_pairp(t2))){ t3=C_i_cdr(t1); t4=t2; t5=C_u_i_cdr(t4); t8=t3; t9=t5; t1=t8; t2=t9; goto loop;} else{ t3=t1; return(t3);}}
false
false
false
false
false
0
add_nas_attr(REQUEST *request) { VALUE_PAIR *nas; switch (request->packet->src_ipaddr.af) { case AF_INET: nas = pairfind(request->packet->vps, PW_NAS_IP_ADDRESS, 0); if (!nas) { nas = radius_paircreate(request, &request->packet->vps, PW_NAS_IP_ADDRESS, 0, PW_TYPE_IPADDR); nas->vp_ipaddr = requ...
false
true
false
false
false
1
ensQcalignmentCalculateQueryCoverageProteinGenome( EnsPQcalignment qca, float identity, ajuint edge) { ajuint qlength = 0U; ajint qstart = 0; ajint qend = 0; ajint qstrand = 0; if (!qca) return ajFalse; /* An Alignment object without a target automatically has coverage...
false
false
false
false
false
0
CreateHeaderWindow() { m_headerWin = new wxListHeaderWindow ( this, wxID_ANY, m_mainWin, wxPoint(0,0), wxSize(GetClientSize().x, m_headerHeight), wxTAB_TRAVERSAL ); Calcula...
false
false
false
false
false
0
__kthread_bind_mask(struct task_struct *p, const struct cpumask *mask, long state) { unsigned long flags; if (!wait_task_inactive(p, state)) { WARN_ON(1); return; } /* It's safe because the task is inactive. */ raw_spin_lock_irqsave(&p->pi_lock, flags); do_set_cpus_allowed(p, mask); p->flags |= PF_NO_SETAF...
false
false
false
false
false
0
alloc_scratch_page(struct drm_device *dev) { struct i915_page_scratch *sp; int ret; sp = kzalloc(sizeof(*sp), GFP_KERNEL); if (sp == NULL) return ERR_PTR(-ENOMEM); ret = __setup_page_dma(dev, px_base(sp), GFP_DMA32 | __GFP_ZERO); if (ret) { kfree(sp); return ERR_PTR(ret); } set_pages_uc(px_page(sp), 1)...
false
false
false
false
false
0
verify_button_links(const mapstruct *map) { oblinkpt *obp; objectlink *ol; if (!map) return; for (obp = map->buttons; obp; obp = obp->next) { for (ol = obp->link; ol; ol = ol->next) { if (ol->id != ol->ob->count) LOG(llevError, "verify_button_links: object %...
false
false
false
false
false
0
__kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t nr, void **p) { size_t i; for (i = 0; i < nr; i++) { void *x = p[i] = kmem_cache_alloc(s, flags); if (!x) { __kmem_cache_free_bulk(s, i, p); return 0; } } return i; }
false
false
false
false
false
0
nfsd4_return_file_layout(struct nfs4_layout *lp, struct nfsd4_layout_seg *seg, struct list_head *reaplist) { struct nfsd4_layout_seg *lo = &lp->lo_seg; u64 end = layout_end(lo); if (seg->offset <= lo->offset) { if (layout_end(seg) >= end) { list_move_tail(&lp->lo_perstate, reaplist); return; } lo->off...
false
false
false
false
false
0
addSubmenu(const ustring &name, int hotCharPos, YMenu *submenu) { return add(new YMenuItem(name, hotCharPos, null, 0, submenu)); }
false
false
false
true
false
1
gxqdrgb (gaint clr, gaint *r, gaint *g, gaint *b) { if (clr>=0 && clr<16) { *r = reds[clr]; *g = greens[clr]; *b = blues[clr]; } return; }
false
false
false
false
false
0
locate(__this__, itk_component* child) { if (child->visible) { size2_t c = CONTAINER(this)->size; return new_rectangle(0, 0, c.width, c.height); } else { rectangle_t rc; rc.defined = false; return rc; } }
false
false
false
false
false
0
do_stop(void) { int cnt; pgpid_t pid; struct stat statbuf; pid = get_pgpid(); if (pid == 0) /* no pid file */ { write_stderr(_("%s: PID file \"%s\" does not exist\n"), progname, pid_file); write_stderr(_("Is server running?\n")); exit(1); } else if (pid < 0) /* standalone backend, not postmaster...
false
false
false
false
false
0
clearAllDisplaySegments(ocw) OnTheSpotConversionWidget ocw; { DisplaySegment *dsp = ocw->onthespot.dispsegments; int i; for (i = 0; i < ocw->onthespot.numsegments; i++) { freeDisplaySegment(dsp++); } ocw->onthespot.numsegments = 0; }
false
false
false
false
false
0
getPlugins (xmlDocPtr doc, GGobiInitInfo * info, gboolean single) { xmlNode *node, *el = NULL; int count = 0; if (single) { /* Call recursively with single = false to get the "plugins" element. If there are any, then return assuming that we have <plugins> <plugin> ...</plugins>. We will ignore...
false
false
false
false
false
0
HandleMoverRelocation(MovementInfo& movementInfo) { movementInfo.UpdateTime(WorldTimer::getMSTime()); Unit* mover = _player->GetMover(); if (Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL) { if (movementInfo.HasMovementFlag(MOVEFLAG_ONTRANSPORT)) { ...
false
false
false
false
false
0
send_turret_fired_packet( int ship_objnum, int subsys_index, int weapon_objnum ) { int packet_size; ushort pnet_signature; ubyte data[MAX_PACKET_SIZE], cindex; object *objp; ubyte has_sig = 0; ship_subsys *ssp; short val; // sanity if((weapon_objnum < 0) || (Objects[weapon_objnum].type != OBJ_WEAPON) || (Obje...
false
false
false
false
false
0
primary_icon_name_toggled (GtkWidget * widget, GladeEntryEditor * entry_editor) { GladeEntryEditorPrivate *priv = entry_editor->priv; GladeWidget *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (entry_editor)); if (glade_editable_loading (GLADE_EDITABLE (entry_editor)) || !gwidget) return; if (!...
false
false
false
false
false
0
alx_intr_handle(struct alx_priv *alx, u32 intr) { struct alx_hw *hw = &alx->hw; bool write_int_mask = false; spin_lock(&alx->irq_lock); /* ACK interrupt */ alx_write_mem32(hw, ALX_ISR, intr | ALX_ISR_DIS); intr &= alx->int_mask; if (intr & ALX_ISR_FATAL) { netif_warn(alx, hw, alx->dev, "fatal interrup...
false
false
false
false
false
0
fs_msn_conference_init (FsMsnConference *conf, FsMsnConferenceClass *bclass) { GST_DEBUG_OBJECT (conf, "fs_msn_conference_init"); conf->priv = FS_MSN_CONFERENCE_GET_PRIVATE (conf); }
false
false
false
false
false
0
aeProcessEvents(aeEventLoop *eventLoop, int flags) { int processed = 0, numevents; /* Nothing to do? return ASAP */ if (!(flags & AE_TIME_EVENTS) && !(flags & AE_FILE_EVENTS)) return 0; /* Note that we want call select() even if there are no * file events to process as long as we want to process ...
false
false
false
false
false
0
cc_generic_monitor_suspend(struct ast_cc_monitor *monitor) { struct generic_monitor_instance_list *generic_list; struct generic_monitor_instance *generic_instance; enum ast_device_state state = ast_device_state(monitor->interface->device_name); if (!(generic_list = find_generic_monitor_instance_list(monitor->inter...
false
false
false
false
false
0
print_result(char *message, int inr) { int i; DPRINT("%s ", message); if (inr >= 0) for (i = 0; i < inr; i++) pr_cont("repl[%d]=%x ", i, reply_buffer[i]); pr_cont("\n"); }
false
false
false
false
false
0
skipCharLiteral(char *pStart) #else char * skipCharLiteral(pStart) char *pStart; #endif { char *p = pStart; if (*p == 0) return p; require (*p == '\'', "skipCharLiteral") p++; for (p = p; *p != 0; p++) { if (*p == '\\') { p++; if (*p == 0) break; p++; } if (*p == '\'') { p...
false
false
false
false
false
0
create_Layout () { long mDepth, depth, depthNext, offset; mDepth = ilog2 (LV_N); LV_prevTreeOut = -1; LV_oneShift = 0; GENLIB_DEF_PHFIG (LV_modelName); offset = 0; depthNext = get_depth (LV_N, NULL); do { depth = depthNext; depthNext = get_depth (LV_N, depth + 1); offs...
false
false
false
false
false
0
init_target_counters_5_5(void) { oid target_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1 }; DEBUGMSGTL(("target_counters", "initializing\n")); NETSNMP_REGISTER_STATISTIC_HANDLER( netsnmp_create_handler_registration( "target_counters", NULL, target_oid, OID_LENGTH(target_oid), HANDLER_...
false
false
false
false
false
0
g_daemon_file_enumerator_new (GFile *file, GVfsDBusMount *mount_proxy, const char *attributes, gboolean sync) { GDaemonFileEnumerator *daemon; char *treename; char *path; daemon = g_object_new (G_TYPE_DAEMON_FILE_ENUMERATOR, "container", ...
false
false
false
false
false
0
Set_program_directory(ARG_UNUSED const char * argv0,char * program_dir) { #undef ARG_UNUSED // MacOSX #if defined(__macosx__) CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); CFURLGetFileSystemRepresentation(url,true,(UInt8*)program_dir,MAXPATHLEN); CFRelease(url); // Append trailin...
false
false
false
false
false
0
glob(const Path& pathPattern, std::set<std::string>& files, int options) { Path pattern(pathPattern); pattern.makeDirectory(); // to simplify pattern handling later on Path base(pattern); Path absBase(base); absBase.makeAbsolute(); while (base.depth() > 0 && base[base.depth() - 1] != "..") { base.popDirectory...
false
false
false
false
false
0