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
ov9640_prog_dflt(struct i2c_client *client) { int i, ret; for (i = 0; i < ARRAY_SIZE(ov9640_regs_dflt); i++) { ret = ov9640_reg_write(client, ov9640_regs_dflt[i].reg, ov9640_regs_dflt[i].val); if (ret) return ret; } /* wait for the changes to actually happen, 140ms are not enough yet */ mdelay(150);...
false
false
false
false
false
0
SVC_GetChallenge (void) { int i; int oldest; int oldestTime; oldest = 0; oldestTime = 0x7fffffff; // see if we already have a challenge for this ip for (i = 0 ; i < MAX_CHALLENGES ; i++) { if (NET_CompareBaseAdr (&net_from, &svs.challenges[i].adr)) break; if (svs.challenges[i].time < oldestTime) {...
false
false
false
false
false
0
init_ipxsaparray(void) { register int i; register struct hnamemem *table; for (i = 0; ipxsap_db[i].s != NULL; i++) { int j = htons(ipxsap_db[i].v) & (HASHNAMESIZE-1); table = &ipxsaptable[j]; while (table->name) table = table->nxt; table->name = ipxsap_db[i].s; table->addr = htons(ipxsap_db[i].v); ta...
false
false
false
false
false
0
fakeCString(const wchar_t *u) { char *s, *t; unsigned int len; if(u == NULL) return NULL; len = uStrLen(u) + 1; t = s = (char*)malloc(len+1); while (*u) { if (*u == (wchar_t)0x2028) *t = '\n'; else if (*u == (wchar_t)0x2029) *t = '\r'; else *t = (char)*u; u++; t++; } ...
false
false
false
false
false
0
libmail_kwgDestroy(struct libmail_kwGeneric *g) { struct libmail_kwGenericEntry *p; size_t n; for (n=0; n<sizeof(g->messageHashTable)/sizeof(g->messageHashTable[0]); n++) while ((p=g->messageHashTable[n]) != NULL) { g->messageHashTable[n]=p->next; if (p->filename) free(p->filename); if (p->ke...
false
false
false
false
false
0
modeisar(struct BCState *bcs, int mode, int bc) { struct IsdnCardState *cs = bcs->cs; /* Here we are selecting the best datapath for requested mode */ if (bcs->mode == L1_MODE_NULL) { /* New Setup */ bcs->channel = bc; switch (mode) { case L1_MODE_NULL: /* init */ if (!bcs->hw.isar.dpath) /* no init fo...
false
false
false
false
false
0
PyFFi_newLayer(PyObject *noself, PyObject *args) { PyFF_Layer *self = (PyFF_Layer *) PyFFLayer_new(&PyFF_LayerType,NULL,NULL); int i, len; if ( self==NULL ) return( NULL ); len = PyTuple_Size(args); if ( len<1 ) { PyErr_Format(PyExc_TypeError, "Too few arguments"); return( NULL ); } self->...
false
false
false
false
false
0
XGI_DisableBridge(struct xgifb_video_info *xgifb_info, struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo) { unsigned short tempah = 0; if (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV | VB_SIS302LV | VB_XGI301C)) { tempah = 0x3F; if (!(pVBInfo->VBInfo & (Disabl...
false
false
false
false
false
0
convert_mono_to_stereo( struct xmms_convert_buffers* buf, void **data, int length, int b16 ) { int i; void *outbuf = convert_get_buffer( &buf->stereo_buffer, length * 2 ); if ( b16 ) { uint16_t *output = outbuf, *input = *data; for ( i = 0; i < length / 2; i++ ) { *o...
false
false
false
false
false
0
SlowReverseLookup(Object* value) { if (HasFastProperties()) { DescriptorArray* descs = map()->instance_descriptors(); for (int i = 0; i < descs->number_of_descriptors(); i++) { if (descs->GetType(i) == FIELD) { if (FastPropertyAt(descs->GetFieldIndex(i)) == value) { return descs->GetKe...
false
false
false
false
false
0
getPrintPages(int *from, int *to) const { GtkPageRange *range; int nrange; range = gtk_print_settings_get_page_ranges(_settings, &nrange); if (nrange <= 0) *from = *to = -1; else { *from = range->start; *to = range->end; g_free(range); } }
false
false
false
false
false
0
PI_InterpChanged(GGadget *g, GEvent *e) { if ( e->type==et_controlevent && e->u.control.subtype == et_radiochanged ) { GIData *ci = GDrawGetUserData(GGadgetGetWindow(g)); SplinePoint *cursp = ci->cursp; if ( GGadgetGetCid(g)==CID_Interpolated ) { if ( cursp->nonextcp && cursp->noprevcp ) /* Do Nothing */...
false
false
false
false
false
0
get_xcoords(GtkHex *gh, gint pos, gint *x, gint *y) { gint cx, cy, spaces; if(gh->cpl == 0) return FALSE; cy = pos / gh->cpl; cy -= gh->top_line; if(cy < 0) return FALSE; cx = 2*(pos % gh->cpl); spaces = (pos % gh->cpl) / gh->group_type; cx *= gh->char_width; cy *= gh->char_height; spaces *= gh->c...
false
false
false
false
false
0
CropString(const kwsys_stl::string& s, size_t max_len) { if (!s.size() || max_len == 0 || max_len >= s.size()) { return s; } kwsys_stl::string n; n.reserve(max_len); size_t middle = max_len / 2; n += s.substr(0, middle); n += s.substr(s.size() - (max_...
false
false
false
false
false
0
xts_done(symmetric_xts *xts) { LTC_ARGCHKVD(xts != NULL); cipher_descriptor[xts->cipher].done(&xts->key1); cipher_descriptor[xts->cipher].done(&xts->key2); }
false
false
false
true
false
1
pfx_add (const char * word, int len, struct affent* ep, int num) { struct affent * aent; int cond; int tlen; unsigned char * cp; int i; char * pp; char tword[MAX_WD_LEN]; for (aent = ep, i = num; i > 0; aent++, i--) { /* now make sure all con...
false
false
false
false
false
0
getPropertySheet(string /*ignored inSessionID*/, string inAlgorithmID)const{ mMutexSessionManager.lock(); CAlgorithm& lAlgorithm(getAlgorithmByType(inAlgorithmID)); CXMLElement* lReturnValue(0); if(lAlgorithm.stringReadAttribute(mrml_const::cui_property_sheet_id).first){ lReturnValue=mPropertySh...
false
false
false
false
false
0
flavor_assign_random(byte tval) { int i, j; int flavor_count = 0; int choice; /* Count the random flavors for the given tval */ for (i = 0; i < z_info->flavor_max; i++) { if ((flavor_info[i].tval == tval) && (flavor_info[i].sval == SV_UNKNOWN)) { flavor_count++; } } for (i = 0; i < z_info->k_ma...
false
false
false
false
false
0
authentication_agent_cancel_all_sessions (AuthenticationAgent *agent) { /* cancel all active authentication sessions; use a copy of the list since * callbacks will modify the list */ if (agent->active_sessions != NULL) { GList *l; GList *active_sessions; active_sessions = g_list_copy (a...
false
false
false
false
false
0
plugin_unregister(struct plugin_handle* plugin) { struct chat_history_data* data = (struct chat_history_data*) plugin->ptr; if (data) { list_clear(data->chat_history, &hub_free); list_destroy(data->chat_history); plugin->hub.command_del(plugin, data->command_history_handle); hub_free(data->command_history_...
false
false
false
false
false
0
G_ExitLevel (int dest) { if(dest == 0) dest = gamemap + 1; destmap = dest; riftdest = 0; gameaction = ga_completed; }
false
false
false
false
false
0
internalGetReading(void) { ArTime readingRequested; std::string reading; char buf[1024]; reading = ""; readingRequested.setToNow(); if (!writeLine(myRequestString)) { ArLog::log(ArLog::Terse, "Could not send request distance reading to urg"); return false; } if (!readLine(buf, sizeof(buf),...
false
false
false
false
false
0
_ibar_focused_next_find(void) { IBar *b, *bn = NULL; Eina_List *l; Eina_List *tmpl = NULL; EINA_LIST_FOREACH(ibars, l, b) { if (!b->icons) continue; tmpl = eina_list_sorted_insert (tmpl, EINA_COMPARE_CB(_ibar_cb_sort), b); } if (!tmpl) tmpl = ibars; EINA_LIST_FOR...
false
false
false
false
false
0
create(void const * const buffer, const size_t size) { Memory *mbs=new Memory(); GP<ByteStream> retval=mbs; mbs->init(buffer,size); return retval; }
false
false
false
false
false
0
iks_first_tag (iks *x) { if (x) { x = IKS_TAG_CHILDREN (x); while (x) { if (IKS_TAG == x->type) return x; x = x->next; } } return NULL; }
false
false
false
false
false
0
BuildRepresentation() { // The net effect is to resize the handle if ( this->GetMTime() > this->BuildTime || (this->Renderer && this->Renderer->GetVTKWindow() && this->Renderer->GetVTKWindow()->GetMTime() > this->BuildTime) ) { if ( ! this->Placed ) { this->ValidPick = 1; t...
false
false
false
false
false
0
nfs4_xdr_dec_destroy_clientid(struct rpc_rqst *rqstp, struct xdr_stream *xdr, void *res) { struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (!status) status = decode_destroy_clientid(xdr, res); return status; }
false
false
false
false
false
0
faulthandler_disable(void) { unsigned int i; fault_handler_t *handler; if (fatal_error.enabled) { fatal_error.enabled = 0; for (i=0; i < faulthandler_nsignals; i++) { handler = &faulthandler_handlers[i]; if (!handler->enabled) continue; #ifdef HAVE_SI...
false
false
false
false
false
0
cell_foreach_range_dep (GnmCell const *cell, GnmDepFunc func, gpointer user) { search_rangedeps_closure_t closure; GHashTable *bucket = cell->base.sheet->deps->range_hash[BUCKET_OF_ROW (cell->pos.row)]; if (bucket != NULL) { closure.col = cell->pos.col; closure.row = cell->pos.row; closure.func = func; cl...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__net__DCOMServerThread_Main(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__net__DCOMServerThread * __ecerePointer___ecereNameSpace__ecere__net__DCOMServerThread = (struct __ecereNameSpace__ecere__net__DCOMServerThread *)(this ? (((char *)thi...
false
false
false
true
false
1
boot(void) { enum { BOOT_NONE, BOOT_A, BOOT_CDROM, BOOT_C, BOOT_D, BOOT_E, BOOT_F, BOOT_LS_ZIP, BOOT_SCSI, }; static const uint8_t seq[][3] = { { BOOT_A, BOOT_C, BOOT_SCSI }, { BOOT_C, BOOT_A, BOOT_SCSI }, { BOOT_C, BOOT_CDROM, BOOT_A }, { BOOT_CDROM, BOOT_C, BOOT_A }, { BOOT_D, BOOT_A, B...
false
false
false
false
false
0
cvt_s16_to_native(struct mulaw_priv *data, unsigned char *dst, u16 sample) { sample ^= data->flip; if (data->cvt_endian) sample = swab16(sample); if (data->native_bytes > data->copy_bytes) memset(dst, 0, data->native_bytes); memcpy(dst + data->native_ofs, (char *)&sample + data->copy_ofs, data-...
false
false
false
false
false
0
CMod_LoadSubmodels (lump_t *l) { dmodel_t *in; cmodel_t *out; int i, j, count; in = (void *)(cmod_base + l->fileofs); if (l->filelen % sizeof(*in)) Com_Error (ERR_DROP, "CMod_LoadSubmodels: funny lump size"); count = l->filelen / sizeof(*in); if (count < 1) Com_Error (ERR_DROP, "Map with no m...
false
false
false
false
false
0
PS_generate_grav1d(ParaSparse *M, int *N, MPI_Comm comm) { int i,j,n; *M = PS_DEFAULT; M->N = *N; M->comm = comm; MPI_Comm_size(M->comm, &(M->size)); MPI_Comm_rank(M->comm, &(M->rank)); M->na = (M->rank) * (*N/(M->size)); if(M->rank == M->size-1) M->nd = *N - M->na; else M->nd = ((M->rank)+1)*(*N/(M-...
false
false
false
false
false
0
gst_file_src_map_small_region (GstFileSrc * src, off_t offset, gsize size) { GstBuffer *ret; off_t mod; guint pagesize; GST_LOG_OBJECT (src, "attempting to map a small buffer at %" G_GUINT64_FORMAT "+%d", (guint64) offset, (gint) size); pagesize = src->pagesize; mod = offset % pagesize; /*...
false
false
false
false
false
0
gst_asf_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstASFDemux *demux; gboolean ret = TRUE; demux = GST_ASF_DEMUX (parent); GST_LOG_OBJECT (demux, "handling %s event", GST_EVENT_TYPE_NAME (event)); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEGMENT:{ const GstSeg...
false
false
false
false
false
0
expr_s(Interp &interp, const RefPtr<Expr> &arg, const RefPtr<Obj> &/*data*/) { Val tmp_self=interp.top_scope()->self(); Val tmp_arg=arg->eval_in(interp); if(tmp_self.obj()->is_method("m") && tmp_arg.obj()->is_method("m")) { string var_name=interp.top_scope()->var("v").expr()->str(); ...
false
false
false
false
false
0
klp_init_patch(struct klp_patch *patch) { struct klp_object *obj; int ret; if (!patch->objs) return -EINVAL; mutex_lock(&klp_mutex); patch->state = KLP_DISABLED; ret = kobject_init_and_add(&patch->kobj, &klp_ktype_patch, klp_root_kobj, "%s", patch->mod->name); if (ret) goto unlock; klp_for_each_...
false
false
false
false
false
0
IsHardClass(char *sp) /* true if string matches a hardwired class e.g. hpux */ { int i; static char *names[] = { "any","agent","Morning","Afternoon","Evening","Night","Q1","Q2","Q3","Q4", "SuSE","suse","fedora","Ubuntu","lsb_compliant","localhost", NULL }; static char *prefixes[] = ...
false
false
false
false
false
0
detect_target_charset(const char *locname) { char *s = NULL; #ifdef HAVE_NL_LANGINFO if (!locname) return NULL; if ((s = setlocale(LC_CTYPE, locname)) == NULL) return NULL; s = enca_strdup(nl_langinfo(CODESET)); if (setlocale(LC_CTYPE, "C") == NULL) { fprintf(stderr, "%s: Cannot set LC_CTYPE t...
false
false
false
false
false
0
getLastMousePositionRay(TLine3D &ray) const { int x,y; if (getLastMousePosition(x,y)) { m_csAccess3DScene.enter(); m_3Dscene->getViewport("main")->get3DRayForPixelCoord(x,y,ray); m_csAccess3DScene.leave(); return true; } else return false; }
false
false
false
false
false
0
_equalCreateOpClassItem(CreateOpClassItem *a, CreateOpClassItem *b) { COMPARE_SCALAR_FIELD(itemtype); COMPARE_NODE_FIELD(name); COMPARE_NODE_FIELD(args); COMPARE_SCALAR_FIELD(number); COMPARE_NODE_FIELD(order_family); COMPARE_NODE_FIELD(class_args); COMPARE_NODE_FIELD(storedtype); return true; }
false
false
false
false
false
0
cancel(GtkWidget */*widget*/, gpointer data) { DialogWindow *self = (DialogWindow *)data; self->_dialog_result = GTK_RESPONSE_CANCEL; if (self->_args != NULL) self->_args->call_callbacks("ui-dialog-cancel-CB"); self->hide(); }
false
false
false
false
false
0
isa(class_desc* base_class) { for (class_desc* cls = this; cls->n_bases != 0; cls = *cls->bases) { if (cls == base_class) return true; } return false; }
false
false
false
false
false
0
iuu_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios) { const u32 supported_mask = CMSPAR|PARENB|PARODD; struct iuu_private *priv = usb_get_serial_port_data(port); unsigned int cflag = tty->termios.c_cflag; int status; u32 actual; u32 parity; int csize = CS7; int ...
false
false
false
false
false
0
track_change_done (RBPlayerGst *mp, GError *error) { mp->priv->stream_change_pending = FALSE; if (error != NULL) { rb_debug ("track change failed: %s", error->message); return; } rb_debug ("track change finished"); mp->priv->current_track_finishing = FALSE; mp->priv->buffering = FALSE; mp->priv->playing = ...
false
false
false
false
false
0
spl_filesystem_object_free_storage(void *object TSRMLS_DC) /* {{{ */ { spl_filesystem_object *intern = (spl_filesystem_object*)object; if (intern->oth_handler && intern->oth_handler->dtor) { intern->oth_handler->dtor(intern TSRMLS_CC); } zend_object_std_dtor(&intern->std TSRMLS_CC); if (intern->_path) { e...
false
false
false
false
false
0
modify_access_pattern_one_dim(List *outer_loop_list, int dim, int entry) { Block *bpt; List *li; int lower = 0, upper = 0; int temp = 0; for (li = outer_loop_list; li != NULL; li = li->next) { bpt = (Block *)li->data; temp = modify_access_pattern_one_dim_lower(bpt, dim, entry); ...
false
false
false
false
false
0
xml_strncpy_encode_entity(char *dest, const char *src, int n) { int i=0; if(n < 1) { return(0); } *dest = 0; for(; *src; src++) { if((n - i) < 7) { break; } if(*src == '<') { strcpy(dest + i, "&lt;"); i += 4; continue; } if(*src == '>') { ...
false
false
false
false
false
0
have_data_locks(const struct tdb_context *tdb) { unsigned int i; for (i = 0; i < tdb->num_lockrecs; i++) { if (tdb->lockrecs[i].off >= lock_offset(-1)) return true; } return false; }
false
false
false
false
false
0
load_layers(SFHeader *hdr, SList at) { int i; SFGenLayer *p; if ((hdr->nlayers = SIndex(at)) <= 0) { hdr->nlayers = 0; return; } hdr->layer = (SFGenLayer*)safe_malloc(sizeof(SFGenLayer) * hdr->nlayers); p = hdr->layer; at = SCar(at); for (i = 0; i < hdr->nlayers; i++) { load_lists(p, at); p++; at = S...
false
false
false
false
false
0
on_web_view_navigation_policy_decision_requested (WebKitWebView *webView, WebKitWebFrame *frame, WebKitNetworkRequest *request, WebKitWebNavig...
false
false
false
false
false
0
mono_ArgIterator_IntGetNextArgT (MonoArgIterator *iter, MonoType *type) { guint32 i, arg_size; gint32 align; MonoTypedRef res; MONO_ARCH_SAVE_REGS; i = iter->sig->sentinelpos + iter->next_arg; g_assert (i < iter->sig->param_count); while (i < iter->sig->param_count) { if (!mono_metadata_type_equal (type, it...
false
false
false
false
false
0
AcpiTbStoreTable ( ACPI_PHYSICAL_ADDRESS Address, ACPI_TABLE_HEADER *Table, UINT32 Length, UINT8 Flags, UINT32 *TableIndex) { ACPI_STATUS Status; ACPI_TABLE_DESC *NewTable; /* Ensure that there is room for ...
false
false
false
false
false
0
makeFrameArray(JNIEnv *env, cpl_frameset *fset) { jobject jFrame = (jobject)0; jobjectArray jFrames = (jobjectArray)0; cpl_frame *frame; jsize ifrm; jsize nfrm; int ok = 1; /* Determine the size of the frameset. */ nfrm = cpl_frameset_get_size(fset); /* Construct an empty array to hold the ...
false
false
false
false
false
0
error(GLEErrorMessage* msg) { const char* file = msg->getFile(); const char* abbrev = msg->getLineAbbrev(); ostringstream output; output << endl; output << ">> " << file << " (" << msg->getLine() << ")"; if (abbrev[0] != 0) { output << " |" << abbrev << "|"; } if (msg->getColumn() != -1) { char number[50]; ...
false
false
false
false
false
0
pixLocateBarcodes(PIX *pixs, l_int32 thresh, PIX **ppixb, PIX **ppixm) { BOXA *boxa; PIX *pix8, *pixe, *pixb, *pixm; PROCNAME("pixLocateBarcodes"); if (!pixs) return (BOXA *)ERROR_PTR("pixs not defined", procName, NULL); ...
false
false
false
false
false
0
ExpandBilevelRow ( PBYTE pDest, PBYTE pSrc, int nPixels) { BYTE mask, inbyte=0; mask = 0; while (nPixels > 0) { if (mask == 0) { mask = 0x80u; inbyte = *pSrc++; } *pDest++ = inbyte & mask ? 0 : 255; mask >>= 1; nPixels -= 1; ...
false
true
false
false
false
1
gameSetup_destroy(GameSetup *ls) { assert(MAGIC(ls)); if (ls->callback) { ls->callback(ls->packet, NULL); ls->callback = NULL; } if (ls->win) butWin_destroy(ls->win); MAGIC_UNSET(ls); wms_free(ls); }
false
false
false
false
false
0
db_select_int(dbDriver * driver, const char *tab, const char *col, const char *where, int **pval) { int type, more, alloc, count; int *val; char *buf = NULL; const char *sval; dbString stmt; dbCursor cursor; dbColumn *column; dbValue *value; dbTable *table; G_debug(3, "db_se...
false
false
false
false
true
1
writeWidgetLookSeriesToStream(const String& prefix, OutStream& out_stream) const { // start of file // output xml header XMLSerializer xml(out_stream); // output root element xml.openTag("Falagard"); for (WidgetLookList::const_iterator curr = d_widgetLooks.begin(); cu...
false
false
false
false
false
0
serial_open(struct tty_struct *tty, struct file *filp) { struct usb_serial_port *port = tty->driver_data; dev_dbg(tty->dev, "%s\n", __func__); return tty_port_open(&port->port, tty, filp); }
false
false
false
false
false
0
s_doTabDlg(FV_View * pView) { UT_return_val_if_fail(pView, false); XAP_Frame * pFrame = static_cast<XAP_Frame *>(pView->getParentData()); UT_return_val_if_fail(pFrame, false); pFrame->raise(); XAP_DialogFactory * pDialogFactory = static_cast<XAP_DialogFactory *>(pFrame->getDialogFactory()); AP_Dialog_Tab * ...
false
false
false
false
false
0
DumpFileToXML(std::ostream& fxml, std::string const& fname) { std::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary); std::string line; const char* sep = ""; while(cmSystemTools::GetLineFromStream(fin, line)) { fxml << sep << cmXMLSafe(line).Quotes(false); ...
false
false
false
false
false
0
discard_until (character) int character; { int c; while ((c = shell_getc (0)) != EOF && c != character) ; if (c != EOF) shell_ungetc (c); }
false
false
false
false
false
0
goo_canvas_scroll_to_item (GooCanvas *canvas, GooCanvasItem *item) { GooCanvasBounds bounds; gdouble hvalue, vvalue; /* We can't scroll to static items. */ if (goo_canvas_item_get_is_static (item)) return; goo_canvas_item_get_bounds (item, &bounds); goo_canvas_convert_to_pixels (canvas, &bo...
false
false
false
false
false
0
babysit_signal_handler (int signo) { char b = '\0'; again: if (write (babysit_sigchld_pipe, &b, 1) <= 0) if (errno == EINTR) goto again; }
false
false
false
false
false
0
ParseFile( CString name ) { FreeDoc(); if ( (pDoc = xmlRecoverFile(name.Data())) == 0 ) { return false; } return true; }
false
false
false
false
false
0
operator++() { if (_impl && !_impl->advance()) { if (0 == _impl->deref()) delete _impl; _impl = 0; } return *this; }
false
false
false
false
false
0
twoBodyMEcode(const DecayMode & dm,int & mecode, double & coupling) const { coupling=1.; unsigned int inspin(dm.parent()->iSpin()),outspin,outmes; ParticleMSet::const_iterator pit(dm.products().begin()); bool order; if((**pit).iSpin()%2==0) { order=true; outspin=(**pit).iSpin(); ++pit;ou...
false
false
false
false
false
0
P_FindLowestCeilingSurrounding(sector_t* sec) { int i; line_t* check; sector_t* other; fixed_t height = INT_MAX; for (i=0 ;i < sec->linecount ; i++) { check = sec->lines[i]; other = getNextSector(check,sec); if (!other) continue; if (other->ceilingheight < height) height =...
false
false
false
false
false
0
bind_credentials_clear( Connection *conn, PRBool lock_conn, PRBool clear_externalcreds ) { if ( lock_conn ) { PR_Lock( conn->c_mutex ); } if ( conn->c_dn != NULL ) { /* a non-anonymous bind has occurred */ reslimit_update_from_entry( conn, NULL ); /* clear resource limits */ if ( conn...
false
false
false
false
false
0
normalize (float *x, float *y, float size) { float length = sqrt ((*x) * (*x) + (*y) * (*y)); if (length == 0) length = 1; *x *= size / length; *y *= size / length; }
false
false
false
false
false
0
read_reg(SLMP_INFO * info, unsigned char Addr) { CALC_REGADDR(); return *RegAddr; }
false
false
false
true
false
1
canvas_makefilename(t_canvas *x, char *file, char *result, int resultsize) { char *dir = canvas_getenv(x)->ce_dir->s_name; if (file[0] == '/' || (file[0] && file[1] == ':') || !*dir) { strncpy(result, file, resultsize); result[resultsize-1] = 0; } else { int nleft; ...
false
true
false
false
false
1
enumerate_cache_updated_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GVfsBackendAfpBrowse *afp_backend = G_VFS_BACKEND_AFP_BROWSE (source_object); GVfsJobEnumerate *job = G_VFS_JOB_ENUMERATE (user_data); GError *err = NULL;...
false
false
false
false
false
0
hud_target_last_transmit_level_init() { int i; for ( i = 0; i < MAX_TRANSMIT_TARGETS; i++ ) { Transmit_target_list[i].objnum = -1; Transmit_target_list[i].objsig = -1; } Transmit_target_next_slot = 0; Transmit_target_current_slot = 0; Transmit_target_reset_timer = timestamp(0); }
false
false
false
false
false
0
posix_sched_setaffinity(PyObject *self, PyObject *args) { pid_t pid; int ncpus; size_t setsize; cpu_set_t *mask = NULL; PyObject *iterable, *iterator = NULL, *item; if (!PyArg_ParseTuple(args, _Py_PARSE_PID "O:sched_setaffinity", &pid, &iterable)) return NULL; ...
false
false
false
false
false
0
refresh(void) { if (++refreshCounter < bx_options.video.refresh) { return; } refreshCounter = 0; if (force_refresh) { clear_screen = true; forceRefreshLogo(); forceRefreshVidel(); forceRefreshNfvdi(); if (screen) { setDirtyRect(0,0, screen->w, screen->h); } force_refresh = false; } initScree...
false
false
false
false
false
0
fimc_is_hw_close_sensor(struct fimc_is *is, unsigned int index) { if (is->sensor_index != index) return; fimc_is_hw_wait_intmsr0_intmsd0(is); mcuctl_write(HIC_CLOSE_SENSOR, is, MCUCTL_REG_ISSR(0)); mcuctl_write(is->sensor_index, is, MCUCTL_REG_ISSR(1)); mcuctl_write(is->sensor_index, is, MCUCTL_REG_ISSR(2)); f...
false
false
false
false
false
0
AddRange(TreeMap *tree,size_t n, void *Data,void *ExtraArgs) { struct Node *p; CompareInfo cInfo; cInfo.ExtraArgs = ExtraArgs; cInfo.ContainerLeft = tree; while (n > 0) { p = iHeap.NewObject(tree->Heap); if (p) { memcpy(p->data ,Data,tree->ElementSize); } else { iError.RaiseError("TreeM...
false
true
false
false
false
1
memmove(void *dest, const void *src, ulong n) { long i; char *d = (char *)dest, *s = (char *)src; /* If src == dest do nothing */ if (dest < src) { for(i = 0; i < n; i++) { d[i] = s[i]; } } else if (dest > src) { for(i = n -1; i >= 0; i--) { d[i] = s[i]; } } return dest; }
false
false
false
false
false
0
find_shortcut(int* ip, const bool require_alt) const { const Fl_Menu_Item* m = this; if (m) for (int ii = 0; m->text; m = next_visible_or_not(m), ii++) { if (m->active()) { if (Fl::test_shortcut(m->shortcut_) || Fl_Widget::test_shortcut(m->text, require_alt)) { if (ip) *ip=ii; return m; } } ...
false
false
false
false
false
0
mmu_op(uae_u32 opcode, uae_u16 /*extra*/) { if ((opcode & 0xFE0) == 0x0500) { /* PFLUSH instruction */ flush_internals(); } else if ((opcode & 0x0FD8) == 0x548) { /* PTEST instruction */ } else op_illg(opcode); }
false
false
false
false
false
0
processMessage(const std::string& messageText) { Poco::Message message; _pParser->parse(messageText, message); log(message); }
false
false
false
false
false
0
sgen_pin_stats_reset (void) { int i; pin_stats_tree_free (pin_stat_addresses); pin_stat_addresses = NULL; for (i = 0; i < PIN_TYPE_MAX; ++i) pinned_byte_counts [i] = 0; sgen_pointer_queue_clear (&pinned_objects); sgen_hash_table_clean (&pinned_class_hash_table); sgen_hash_table_clean (&global_remset_class_hash...
false
false
false
false
false
0
plugin_init_raspi(void) { /* Check if raspi plugin section exists in config file */ if (cfg_number(Section, "enabled", 0, 0, 1, &plugin_enabled) < 1) { plugin_enabled = 0; } /* Disable plugin unless it is explicitly enabled */ if (plugin_enabled != 1) { info("[raspi] WARNING: Plugin is not enable...
true
true
false
false
true
1
gnome_desktop_thumbnail_factory_load_from_tempfile (GnomeDesktopThumbnailFactory *factory, char **tmpname) { GdkPixbuf *pixbuf; GdkPixbuf *tmp_pixbuf; pixbuf = gdk_pixbuf_new_from_file (*tmpname, NULL); g_unlink (*tmpname); g_free (*tmpname); *tmpname = NULL; if (pixbuf == NU...
false
false
false
false
false
0
doremring() { register struct obj *otmp = 0; int Accessories = 0; #define MOREACC(x) if (x) { Accessories++; otmp = x; } MOREACC(uleft); MOREACC(uright); MOREACC(uamul); MOREACC(ublindf); if(!Accessories) { pline("Not wearing any accessories.%s", (iflags.cmdassist && (uarm || uarmc || #ifdef TOURIST ...
false
false
false
false
false
0
emitter(const DipoleIndex&) const { assert(flavour()); assert(abs(flavour()->id()) < 6 && flavour()->mass() == ZERO); return flavour(); }
false
false
false
false
false
0
mathmlize(MathStream & os) const { // FIXME These are not quite right, because they do not nest // correctly. A proper fix would presumably involve tracking // the fonts already in effect. std::string variant; docstring const & tag = key_->name; if (tag == "mathnormal" || tag == "mathrm" || tag == "text" || ...
false
false
false
false
false
0
maki_in_dcc_resume_accept (makiServer* serv, makiUser* user, gchar* remaining, gboolean is_incoming) { gchar* file_name; gsize file_name_len; if (!remaining) { return; } if ((file_name = maki_dcc_send_get_file_name(remaining, &file_name_len)) != NULL) { gchar** args; guint args_len; args = g_strsplit(...
false
false
false
false
false
0
_k_placeClicked(const QModelIndex &index) { KFilePlacesModel *placesModel = qobject_cast<KFilePlacesModel*>(q->model()); if (placesModel==0) return; lastClickedIndex = QPersistentModelIndex(); if (placesModel->setupNeeded(index)) { QObject::connect(placesModel, SIGNAL(setupDone(QModelIndex,bo...
false
false
false
false
false
0
last32() { pos = end; if(pos > begin) { UChar32 c; UTF_PREV_CHAR(text, begin, pos, c); return c; } else { return DONE; } }
false
false
false
false
false
0
on_navigation_cursor_changed (GtkTreeView *tv, gpointer user_data) { GSQL_TRACE_FUNC; GtkListStore *details = NULL; GtkTreePath *path; GtkTreeViewColumn *column; GtkTreeModel *model; GtkTreeIter iter; GSQLWorkspace *workspace; GSQLNavigation *navigation = user_data; workspace = gsql_session_get_wo...
false
false
false
false
false
0
dumpdatalist(Datalist* list, char* tag) { Bytebuffer* buf = bbNew(); bufdump(list,buf); fprintf(stderr,"%s: %s\n",tag,bbContents(buf)); bbFree(buf); }
false
false
false
false
false
0
omp_check_private (struct gimplify_omp_ctx *ctx, tree decl, bool copyprivate) { splay_tree_node n; do { ctx = ctx->outer_context; if (ctx == NULL) return !(is_global_var (decl) /* References might be private, but might be shared too, when checking for copyprivate, assume they might be ...
false
false
false
false
false
0
_php_stream_rmdir(char *path, int options, php_stream_context *context TSRMLS_DC) { php_stream_wrapper *wrapper = NULL; wrapper = php_stream_locate_url_wrapper(path, NULL, ENFORCE_SAFE_MODE TSRMLS_CC); if (!wrapper || !wrapper->wops || !wrapper->wops->stream_rmdir) { return 0; } return wrapper->wops->stream_rm...
false
false
false
false
false
0
rb_gzreader_readlines(int argc, VALUE *argv, VALUE obj) { VALUE str, dst; dst = rb_ary_new(); while (!NIL_P(str = gzreader_gets(argc, argv, obj))) { rb_ary_push(dst, str); } return dst; }
false
false
false
false
false
0
fdilate_2_52(l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls) { l_int32 i; register l_int32 j, pwpls; register l_uint32 *sptr, *dptr; pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src *...
false
false
false
false
false
0