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
tazer(game *g, monster *z) { int j; if (rl_dist(z->posx, z->posy, g->u.posx, g->u.posy) > 2 || !g->sees_u(z->posx, z->posy, j)) return; // Out of range z->sp_timeout = z->type->sp_freq; // Reset timer z->moves = -200; // It takes a while g->add_msg("The %s shocks you!", z->name().c_str()); int shock = rn...
false
false
false
false
false
0
_dxfFaceNormals(Pointer ptr) { Field field = (Field)ptr; Array fa, la, ea, pa, na; int *f, *l, *e; float *p; int nf, nl, ne, ndim, rank; na = (Array)DXGetComponentValue(field, "normals"); if (na) { char *str; if (! DXGetStringAttribute((Object)na, "dep", &str)) { DXSetError(ERR...
false
false
false
false
false
0
catbuf (buffer, buf, len) string_type *buffer; char *buf; unsigned int len; { if (buffer->write_idx + len >= buffer->size) { while (buffer->write_idx + len >= buffer->size) buffer->size *= 2; buffer->ptr = (char *) realloc (buffer->ptr, buffer->size); } memcpy (buffer->ptr + buff...
false
false
false
false
true
1
write_handler(void *this_ptr, Bit32u address, Bit32u value, unsigned io_len) { #if !BX_USE_DEV_SMF bx_devices_c *class_ptr = (bx_devices_c *) this_ptr; class_ptr->port92_write(address, value, io_len); } void bx_devices_c::port92_write(Bit32u address, Bit32u value, unsigned io_len) { #else UNUSED(this_ptr); #endi...
false
false
false
false
false
0
ListSend() { LogMessage(Debug_Verbose, _T("CSftpControlSocket::ListSend()")); if (!m_pCurOpData) { LogMessage(__TFILE__, __LINE__, this, Debug_Info, _T("Empty m_pCurOpData")); ResetOperation(FZ_REPLY_INTERNALERROR); return FZ_REPLY_ERROR; } CSftpListOpData *pData = static_cast<CSftpListOpData *>(m_pCurOpDa...
false
false
false
false
false
0
FindParticle( const Particle& particle, const Event& event, bool checkStatus ) { int index = -1; for ( int i = int(event.size()) - 1; i > 0; --i ) if ( event[i].id() == particle.id() && event[i].colType() == particle.colType() && event[i].chargeType() == particle.chargeType() ...
false
false
false
false
false
0
qselect(qstat_env_t* qstat_env, qselect_handler_t* handler, lList **alpp) { lListElem *cqueue = NULL; lListElem *qep = NULL; DENTER(TOP_LAYER,"qselect"); /* we need the queue list in any case */ qstat_env->need_queues = true; if (qstat_env_prepare(qstat_env, false, alpp) != 0) { DRETU...
false
false
false
false
false
0
nfs3_proc_remove(struct inode *dir, struct qstr *name) { struct nfs_removeargs arg = { .fh = NFS_FH(dir), .name = *name, }; struct nfs_removeres res; struct rpc_message msg = { .rpc_proc = &nfs3_procedures[NFS3PROC_REMOVE], .rpc_argp = &arg, .rpc_resp = &res, }; int status = -ENOMEM; dprintk("NFS call...
false
false
false
false
false
0
tracing_saved_cmdlines_size_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) { char buf[64]; int r; arch_spin_lock(&trace_cmdline_lock); r = scnprintf(buf, sizeof(buf), "%u\n", savedcmd->cmdline_num); arch_spin_unlock(&trace_cmdline_lock); return simple_read_from_buffer(ubuf, cnt, ppos,...
true
true
false
false
false
1
snd_rme32_free(void *private_data) { struct rme32 *rme32 = (struct rme32 *) private_data; if (rme32 == NULL) { return; } if (rme32->irq >= 0) { snd_rme32_pcm_stop(rme32, 0); free_irq(rme32->irq, (void *) rme32); rme32->irq = -1; } if (rme32->iobase) { iounmap(rme32->iobase); rme32->iobase = NULL; } ...
false
false
false
false
false
0
gst_check_setup_sink_pad_by_name (GstElement * element, GstStaticPadTemplate * tmpl, const gchar * name) { GstPad *srcpad, *sinkpad; /* receiving pad */ sinkpad = gst_pad_new_from_static_template (tmpl, "sink"); GST_DEBUG_OBJECT (element, "setting up receiving pad %p", sinkpad); fail_if (sinkpad == NULL,...
false
false
false
true
false
1
setPlanes(unsigned int numPlanes, const hsPlane3* planes) { delete[] fPlanes; fNumPlanes = numPlanes; if (fNumPlanes > 0) { fPlanes = new hsPlane3[fNumPlanes]; for (size_t i=0; i<fNumPlanes; i++) fPlanes[i] = planes[i]; } else { fPlanes = NULL; } }
false
false
false
false
false
0
STREAM_in_archive(const char *path) { ARCHIVE *arch; if (FILE_is_relative(path)) { ARCHIVE_get_current(&arch); if (arch->name || EXEC_arch) // || !FILE_exist_real(path)) - Why that test ? return TRUE; } return FALSE; }
false
false
false
false
false
0
docwinEventHandler(clientData, pEvent) ClientData clientData; XEvent *pEvent; { HtmlTree *pTree = (HtmlTree *)clientData; switch (pEvent->type) { case Expose: { XExposeEvent *p = (XExposeEvent *)pEvent; HtmlLog(pTree, "EVENT", "Docwin Expose: x=%d y...
false
false
false
false
false
0
eio_signal_wakeup(eio_handle_t *eio) { char c = 0; if (write(eio->fds[1], &c, sizeof(char)) != 1) return error("eio_handle_signal_wake: write; %m"); return 0; }
false
false
false
false
false
0
setTitle(QString x) { _title = x; emit titleChanged(_title); }
false
false
false
false
false
0
cmp_love(const struct player *player1, const struct player *player2) { int love1, love2; if (NULL == client.conn.playing) { return player_number(player1) - player_number(player2); } if (player1 == client.conn.playing || !player1->ai_controlled) { love1 = MAX_AI_LOVE + 999; } else...
true
true
false
false
false
1
ienvironment_get_real_directory (IAnjutaEnvironment* environment, gchar *dir, GError** err) { ScratchboxPlugin *plugin = ANJUTA_PLUGIN_SCRATCHBOX (environment); if (plugin->user_dir) { gchar *real_dir; real_dir = g_strconcat(plugin->user_dir, dir, NULL); g_free (dir); return real_dir; } else { ret...
false
false
false
false
false
0
Status() { if(sock==-1) return _("Not connected"); if(!connected) return _("Connecting..."); if(!peer_id) return _("Handshaking..."); xstring &buf=xstring::format("dn:%llu %sup:%llu %s", peer_recv,peer_recv_rate.GetStrS(),peer_sent,peer_send_rate.GetStrS()); if(peer_interested) ...
false
false
false
false
false
0
color_table_menu_init (AmitkColorTableMenu * ct_menu) { GtkCellRenderer *renderer; GdkPixbuf *pixbuf; GtkTreeIter iter; GtkListStore *store; AmitkColorTable i_color_table; /* create the store of data */ store = gtk_list_store_new(2, /* NUM_COLUMNS */ GDK_TYPE_PIXBUF, G_TYPE_STRING); ...
false
false
false
false
false
0
getSunRiseSet(UBool rise) { UDate t0 = fTime; // Make a rough guess: 6am or 6pm local time on the current day double noon = ClockMath::floorDivide(fTime + fGmtOffset, (double)DAY_MS)*DAY_MS - fGmtOffset + (12*HOUR_MS); U_DEBUG_ASTRO_MSG(("Noon=%.2lf, %sL, gmtoff %.2lf\n", noon, debug_astro_date(noon+f...
false
false
false
false
false
0
render_new(greymap_t *gm) { render_t *rm; rm = (render_t *) malloc(sizeof(render_t)); if (!rm) { return NULL; } memset(rm, 0, sizeof(render_t)); rm->gm = gm; rm->incrow_buf = (int *) malloc(gm->h * sizeof(int)); if (!rm->incrow_buf) { free(rm); return NULL; } memset(rm->incrow_buf, 0, g...
false
true
false
false
false
1
eb_fix_word(EB_Book *book, const EB_Search *search, char *word, char *canonicalized_word) { LOG(("in: eb_fix_word(book=%d, word=%s, canonicalized_word=%s)", (int)book->code, eb_quoted_string(word), eb_quoted_string(canonicalized_word))); if (search->index_id == 0xa1 && search->candidates_page != 0) retu...
false
false
false
false
false
0
protocolBotch(fxStr& emsg, const char* fmt ...) { va_list ap; va_start(ap, fmt); emsg = NLS::TEXT("Protocol botch") | fxStr::vformat(fmt, ap); va_end(ap); }
false
false
false
false
false
0
trace(Collector &c) const { for (size_t i = 0; i < inheritedCInfo_.size(); i++) { for (const InheritedCInfo *p = inheritedCInfo_[i].pointer(); p; p = p->prev.pointer()) { c.trace(p->style); c.trace(p->cachedValue); } } }
false
false
false
false
false
0
SetTransparentBackground(button_info *ub, int w, int h) { if (FShapesSupported) { button_info *b; int i = -1; XGCValues gcv; if (shapeMask != None) XFreePixmap(Dpy, shapeMask); shapeMask = XCreatePixmap(Dpy, MyWindow, w, h, 1); if (transGC == NULL) { transGC = fvwmlib_XCreateGC(Dpy, shapeMask, 0,...
false
false
false
false
false
0
addOldMsgToAskAgain(string old_msg) { if(M_MsgUnknowToAsk.find(old_msg) == M_MsgUnknowToAsk.end()) // not found { M_MsgUnknowToAsk[old_msg] = false; return 1; } else return 0; }
false
false
false
false
false
0
Cns_srv_shutdown(magic, req_data, clienthost, thip) int magic; char *req_data; const char *clienthost; struct Cns_srv_thread_info *thip; { int force = 0; char func[17]; gid_t gid; gid_t *gids; char groups[256]; int nbgids; char *p; char *rbp; uid_t uid; char *user; strcpy (func, "Cns_srv_shutdown"); rbp = ...
false
false
false
false
false
0
IsFieldUnique(int nFieldId) { int i, numFields; if (m_poMainTable==NULL || m_poRelTable==NULL || m_panMainTableFieldMap==NULL || m_panRelTableFieldMap==NULL) return FALSE; /*----------------------------------------------------------------- * Look for nFieldId in the poRelTable field m...
false
false
false
false
false
0
CreateMemMove(Value *Dst, Value *Src, Value *Size, unsigned Align, bool isVolatile, MDNode *TBAATag) { Dst = getCastedInt8PtrValue(Dst); Src = getCastedInt8PtrValue(Src); Value *Ops[] = { Dst, Src, Size, getInt32(Align), getInt1(isVolatile) }; Type *Tys[] = { Dst->getType(), Src->getType(), Siz...
false
false
false
false
false
0
startCycle(const MSUnsignedLongVector& colors_) { if (cycleTimer()==0) _cycleTimer=new CycleTimer(this,cycleInterval()); else cycleTimer()->reset(); if (_cycle==0) { _cycle=new MSColorCycle(this,0,0,colors_,cycleColorMode()); } else { cycle()->reset(); } cycleValue(); }
false
false
false
false
false
0
scsi_prep_state_check(struct scsi_device *sdev, struct request *req) { int ret = BLKPREP_OK; /* * If the device is not in running state we will reject some * or all commands. */ if (unlikely(sdev->sdev_state != SDEV_RUNNING)) { switch (sdev->sdev_state) { case SDEV_OFFLINE: case SDEV_TRANSPORT_OFFLINE: ...
false
false
false
false
false
0
Monitor(giopConnection::notifyReadable_t func, void* cookie) { pd_callback_func = func; pd_callback_cookie = cookie; while (!isEmpty()) { if (!Select()) break; } }
false
false
false
false
false
0
gnm_lpsolve_start_solution (GnmLPSolve *lp) { g_return_val_if_fail (lp->result == NULL, NULL); lp->result = g_object_new (GNM_SOLVER_RESULT_TYPE, NULL); lp->result->solution = value_new_array_empty (range_width (&lp->srinput.range), range_height (&lp->srinput.range)); return lp->result; }
false
false
false
false
false
0
wdtpci_get_status(int *status) { unsigned char new_status; unsigned long flags; spin_lock_irqsave(&wdtpci_lock, flags); new_status = inb(WDT_SR); spin_unlock_irqrestore(&wdtpci_lock, flags); *status = 0; if (new_status & WDC_SR_ISOI0) *status |= WDIOF_EXTERN1; if (new_status & WDC_SR_ISII1) *status |= WDI...
false
false
false
false
false
0
prefs_actions_substitute_cb(GtkWidget *w, gpointer data) { gint row; row = gtkut_list_view_get_selected_row(actions.actions_list_view); if (row <= 0) return; prefs_actions_clist_set_row(row); modified = FALSE; modified_list = TRUE; }
false
false
false
false
false
0
arm_evpc_neon_vext (struct expand_vec_perm_d *d) { unsigned int i, nelt = d->nelt; rtx (*gen) (rtx, rtx, rtx, rtx); rtx offset; unsigned int location; unsigned int next = d->perm[0] + 1; /* TODO: Handle GCC's numbering of elements for big-endian. */ if (BYTES_BIG_ENDIAN) return false; /* Check...
false
false
false
false
false
0
count_handlers (int signum) { int i; int count = 0; for (i = 0; i < NUM_SIGNALS; ++i) { if (mph_int_get (&signals [i].signum) == signum) ++count; } return count; }
false
false
false
false
false
0
_cogl_color_unpremultiply (CoglColor *color) { gfloat alpha; alpha = cogl_color_get_alpha (color); if (alpha != 0) { gfloat red, green, blue; red = cogl_color_get_red (color); green = cogl_color_get_green (color); blue = cogl_color_get_blue (color); red = red / alpha; g...
false
false
false
false
false
0
load_module(char *name, int len) { mstack.buffer[mstack.index++] = YY_CURRENT_BUFFER; if (mstack.index == MAX_DEPTH) fatal_error(_("Too many levels of inclusion")); yyin = fopen(name, "r"); if (yyin == NULL) fatal_error(_("Unable to open module")); yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_S...
false
false
false
false
true
1
knot_response_realloc_wc_nodes(const knot_node_t ***nodes, const knot_dname_t ***snames, short *max_count, mm_ctx_t *mm) { short new_max_count = *max_count + RRSET_ALLOC_STEP; const knot_nod...
false
true
false
false
false
1
processRGBAImage(imageStruct &image) { unsigned char *base = image.data; int count = image.ysize * image.xsize; while (count--) { float red = base[chRed]; float green = base[chGreen]; float blue = base[chBlue]; float alpha = base[chAlpha]; float r = m_matrix[0] * r...
false
false
false
false
false
0
gst_queue2_src_activate_mode (GstPad * pad, GstObject * parent, GstPadMode mode, gboolean active) { gboolean res; switch (mode) { case GST_PAD_MODE_PULL: res = gst_queue2_src_activate_pull (pad, parent, active); break; case GST_PAD_MODE_PUSH: res = gst_queue2_src_activate_push (pad, p...
false
false
false
false
false
0
core_alua_check_transition(int state, int valid, int *primary) { /* * OPTIMIZED, NON-OPTIMIZED, STANDBY and UNAVAILABLE are * defined as primary target port asymmetric access states. */ switch (state) { case ALUA_ACCESS_STATE_ACTIVE_OPTIMIZED: if (!(valid & ALUA_AO_SUP)) goto not_supported; *primary = 1...
false
false
false
false
false
0
c_plxormod(PLINT mode, PLINT *status) /* xor mode */ { static int ostate = 0; if (!plsc->dev_xor) { *status = 0; return; } if (plsc->level > 0) { plP_esc(PLESC_XORMOD, &mode); if (mode) { ostate = plsc->plbuf_write; plsc->plbuf_write = 0; } else plsc->plbuf_write = ostate...
false
false
false
false
false
0
operator=(const char *c) { if (data) delete [] data; length = strlen(c); data = new char[length+1]; memcpy(data, c, length + 1); return *this; }
false
false
false
false
false
0
interpolate_none_get (GstTimedValueControlSource * self, GstClockTime timestamp, gdouble * value) { gboolean ret = FALSE; GSequenceIter *iter; g_mutex_lock (&self->lock); iter = gst_timed_value_control_source_find_control_point_iter (self, timestamp); if (iter) { *value = _interpolate_none (se...
false
false
false
false
false
0
orte_finalize(void) { int rc; --orte_initialized; if (0 != orte_initialized) { /* check for mismatched calls */ if (0 > orte_initialized) { opal_output(0, "%s MISMATCHED CALLS TO ORTE FINALIZE", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); } retur...
false
false
false
false
false
0
blogic_write_outbox(struct blogic_adapter *adapter, enum blogic_action action, struct blogic_ccb *ccb) { struct blogic_outbox *next_outbox; next_outbox = adapter->next_outbox; if (next_outbox->action == BLOGIC_OUTBOX_FREE) { ccb->status = BLOGIC_CCB_ACTIVE; /* The CCB field must be written before the Act...
false
false
false
false
false
0
htnenames_init(Bounds *b, File *file, ht_format_group *group) { ht_ne_shared_data *ne_shared=(ht_ne_shared_data *)group->get_shared_data(); uint32 h=ne_shared->hdr_ofs; ht_uformat_viewer *v=new ht_uformat_viewer(); v->init(b, DESC_NE_NAMES, VC_EDIT | VC_SEARCH, file, group); ht_mask_sub *m=new ht_mask_sub(); m->...
false
false
false
false
false
0
ctl2_init_segdir( msft_typelib_t *typelib) /* [I] The typelib to initialize. */ { int i; MSFT_pSeg *segdir; segdir = &typelib->typelib_segdir[MSFT_SEG_TYPEINFO]; for (i = 0; i < 15; i++) { segdir[i].offset = -1; segdir[i].length = 0; segdir[i].res08 = -1; segdir[i].res0c = 0x0f; } }
false
false
false
false
false
0
OGR_ST_SetUnit( OGRStyleToolH hST, OGRSTUnitId eUnit, double dfGroundPaperScale ) { VALIDATE_POINTER0( hST, "OGR_ST_SetUnit" ); ((OGRStyleTool *) hST)->SetUnit(eUnit, dfGroundPaperScale); }
false
false
false
false
false
0
handle_focusin (Window win) { task *tk; tk = tb.task_list; while (tk) { if (tk->focused) { if (tk->win != win) { tk->focused = 0; gui_draw_task (tk); } } else { if (tk->win == win) { tk->focused = 1; gui_draw_task (tk); } } tk = tk->next; } }
false
false
false
false
false
0
sheet_widget_checkbox_draw_cairo (SheetObject const *so, cairo_t *cr, double width, double height) { SheetWidgetCheckbox const *swc = GNM_SOW_CHECKBOX (so); double halfheight = height/2; double dx = 8., dxh, pm; int pw, ph; pm = MIN (height - 2, width - 12); if (dx > pm) dx = MAX (pm, 3); dxh = dx/2; ...
false
false
false
false
false
0
_g_file_get_destination (GFile *source, GFile *source_base, GFile *destination_folder) { char *source_uri; const char *source_suffix; char *destination_folder_uri; char *destination_uri; GFile *destination; source_uri = g_file_get_uri (source); if (source_base != NUL...
false
false
false
false
false
0
L149() {register object *base=vs_base; register object *sup=base+VM149; VC149 vs_check; {object V960; V960=(base[0]); vs_top=sup; goto TTL; TTL:; base[1]=MMcons(Cnil,Cnil); base[2]=MMcons(Cnil,base[1]); base[3]= (V960); base[4]= make_cclosure_new(LC222,Cnil,base[2],Cdata); vs_top=(vs_base=base+3)+2; (void...
false
false
false
false
false
0
ExecuteInformation() { vtkImageData *input = this->GetInput(); vtkImageData *output = this->GetOutput(); if (!input) { vtkErrorMacro(<< "Input not set."); return; } // Copy the defaults output->CopyTypeSpecificInformation( input ); // Take this opportunity to override the defaults. in...
false
false
false
false
false
0
helpMenu( QWidget *parent ) //STATIC { if ( s_helpMenu == 0 ) s_helpMenu = new KHelpMenu( parent, KGlobal::mainComponent().aboutData(), Amarok::actionCollection() ); KMenu* menu = s_helpMenu->menu(); // "What's This" isn't currently defined for anything in Amarok, so let's remove it s_helpMenu...
false
false
false
false
false
0
get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name,...
false
false
false
false
false
0
handle_colormap_change(XColormapEvent *e) { Client *c = find_client(e->window); if (c && e->new) { c->cmap = e->colormap; XInstallColormap(dpy, c->cmap); } }
false
false
false
false
false
0
tree_string_cmp (const void *p1, const void *p2) { if (p1 == p2) return 0; tree s1 = *(const tree*)p1; tree s2 = *(const tree*)p2; return strcmp (TREE_STRING_POINTER (s1), TREE_STRING_POINTER (s2)); }
false
false
false
false
false
0
r852_irq(int irq, void *data) { struct r852_device *dev = (struct r852_device *)data; uint8_t card_status, dma_status; unsigned long flags; irqreturn_t ret = IRQ_NONE; spin_lock_irqsave(&dev->irqlock, flags); /* handle card detection interrupts first */ card_status = r852_read_reg(dev, R852_CARD_IRQ_STA); r8...
false
false
false
false
false
0
brw_set_math_message( struct brw_compile *p, struct brw_instruction *insn, unsigned function, unsigned integer_type, bool low_precision, unsigned dataType ) { struct brw_context *brw = p->brw; unsigned msg_length; unsigned response_length; /* Infer message length from the func...
false
false
false
false
false
0
create_primitive (Data *data) { CoglAttribute *attributes[2]; int i; data->attribute_buffer = cogl_attribute_buffer_new_with_size (data->context, sizeof (data->sparks)); cogl_buffer_set_update_hint (COGL_BUFFER (data->attribute_buffer), ...
false
false
false
false
false
0
visitMachineFunctionBefore() { regsReserved = TRI->getReservedRegs(*MF); // A sub-register of a reserved register is also reserved for (int Reg = regsReserved.find_first(); Reg>=0; Reg = regsReserved.find_next(Reg)) { for (const unsigned *Sub = TRI->getSubRegisters(Reg); *Sub; ++Sub) { // FIXME:...
false
false
false
false
false
0
hook_op_check_entersubforcv_remove (hook_op_check_id id) { void *ret; userdata_t *ud = hook_op_check_remove (OP_ENTERSUB, id); if (!ud) { return NULL; } ret = ud->ud; Safefree (ud); return ret; }
false
false
false
false
false
0
printlaunch(argc, argv) int argc; char *CONST argv[]; { char *ext; int i, n; u_char flags; if (argc >= 3) { builtinerror(argv, NULL, ER_FEWMANYARG); return(-1); } hitkey(2); if (argc <= 1) for (i = 0; i < maxlaunch; i++) { printlaunchcomm(launchlist, i, 1, 1, Xstdout); hitkey(0); } else { ext = gete...
false
false
false
false
false
0
gx_gradient_copy(const GxGradient *grad) { GxGradient *new_grad; g_return_val_if_fail(grad != NULL, NULL); new_grad = g_slice_new(GxGradient); new_grad->colors = g_slist_copy(grad->colors); for (GSList *p = new_grad->colors; p; p = g_slist_next(p)) { p->data = element_copy(p->data); } return new_grad; }
false
false
false
false
false
0
scanSeqlenFromID(const string& idContent) { StringParser parser(idContent); string lastWord = parser.extractWord(); // eat id bool bpseen = false; long bp = -1; while (!bpseen) { parser.eatSpaces(); string word = parser.extractWord(); if (word =...
false
false
false
false
false
0
ValidateNetmaskBits(int bits, unsigned long *netmask) { /* Maximum netmask is 32 */ if (bits < 1 || bits > 32) { fprintf(stderr , "Invalid netmask specification [%d]" , bits); usage(OCF_ERR_CONFIGURED); /*not reached */ } bits = 32 - bits; *netmask = (1L<<(bits))-1L; *netmask = ((~(*netmask))&0xffffff...
false
false
false
false
false
0
pkix_pl_LdapResponse_Hashcode( PKIX_PL_Object *object, PKIX_UInt32 *pHashcode, void *plContext) { PKIX_UInt32 dataLen = 0; PKIX_UInt32 dindex = 0; PKIX_UInt32 sizeOfLength = 0; PKIX_UInt32 idLen = 0; const unsigned char *msgBuf = NULL; PKIX_PL_Ldap...
false
false
false
false
false
0
resolveReferences( ExecState* exec, const ScriptableExtension::FunctionRef& f, bool* ok) { QVariant v = doGet(exec, f.base, f.field, ok); if (*ok) { ...
false
false
false
false
false
0
_ecore_fps_debug_init(void) { char buf[PATH_MAX]; const char *tmp; int pid; _ecore_fps_debug_init_count++; if (_ecore_fps_debug_init_count > 1) return; #ifndef HAVE_EVIL tmp = "/tmp"; #else tmp = evil_tmpdir_get (); #endif /* HAVE_EVIL */ pid = (int)getpid(); snprintf(buf, sizeof(buf), "%s/...
false
false
false
false
false
0
screensaverActivated(bool activated) { // We care only if it has been disactivated if (!activated) { m_screenSaverIface->SimulateUserActivity(); emit resumingFromIdle(); } }
false
false
false
false
false
0
or51211_load_firmware (struct dvb_frontend* fe, const struct firmware *fw) { struct or51211_state* state = fe->demodulator_priv; u8 tudata[585]; int i; dprintk("Firmware is %zu bytes\n", fw->size); /* Get eprom data */ tudata[0] = 17; if (i2c_writebytes(state,0x50,tudata,1)) { pr_warn("error eprom addr...
false
false
false
false
false
0
doc_reload_bbt(struct docg3 *docg3) { int block = DOC_LAYOUT_BLOCK_BBT; int ret = 0, nbpages, page; u_char *buf = docg3->bbt; nbpages = DIV_ROUND_UP(docg3->max_block + 1, 8 * DOC_LAYOUT_PAGE_SIZE); for (page = 0; !ret && (page < nbpages); page++) { ret = doc_read_page_prepare(docg3, block, block + 1, p...
false
false
false
false
false
0
draw_rounded_rect(GdkGC *gc, struct coord a, struct coord b, int fill) { struct coord min = translate(a); struct coord max = translate(b); unit_type h, w, r; sort_coord(&min, &max); h = max.y-min.y; w = max.x-min.x; if (h > w) { r = w/2; draw_arc(DA, gc, fill, min.x+r, max.y-r, r, 180, 0); if (fill) ...
false
false
false
false
false
0
plus_scan(K x, K y) { //Optimized scan forces you to pre-determine output type for (x,y), in contrast to optimized over P(x && xt != 1 && xt != 2, 0) P(yn<2 || !yt || ABS(yt) > 2 , 0) I t = -ABS(yt); if(x) t = -MAX(ABS(xt),ABS(t)); I n = y->n + (x?1:0); K z; if(!x && y->c==1 && (yt==t || sizeof(I)=...
false
false
false
false
true
1
swf_parse_sprite(SWFReader *read) { /*parse*/ while (1) { GF_Err e = swf_parse_tag(read); if (e<0) { swf_report(read, e, "Error parsing tag %s", swf_get_tag_name(read->tag)); return e; } /*done with sprite*/ if (read->tag==SWF_END) break; } return GF_OK; }
false
true
false
false
true
1
modify(const OsiSolverInterface * /*solver*/, OsiRowCut & cut) { int n = cut.row().getNumElements(); if (!n) return 0; const int * column = cut.row().getIndices(); //const double * element = cut.row().getElements(); int returnCode = 0; for (int i = 0; i < n; ...
false
false
false
false
false
0
node_tsync_udp(cqueue_t *unused_cq, void *obj) { gnutella_node_t *n = obj; gnutella_node_t *udp = NULL, *tn; (void) unused_cq; g_assert(!NODE_USES_UDP(n)); g_assert(n->attrs & NODE_A_TIME_SYNC); n->tsync_ev = NULL; /* has been freed before calling this function */ /* * If we did not get replies within the r...
false
false
false
false
false
0
lm_map_del(lm_map* map, ur_map_key_type key,ur_map_del_func delfunc) { int ret = 0; if(map && key) { size_t index = (size_t)(key & (LM_MAP_HASH_SIZE - 1)); lm_map_array *a = &(map->table[index]); size_t i; for(i=0;i<LM_MAP_ARRAY_SIZE;++i) { ur_map_key_type key0 = a->main_keys[i]; if((key0 == key) &...
false
false
false
false
false
0
Delete() { int i = index; *this = se_lines(se_lines.Len()-1); index = i; if (se_lines.Len() > 0) se_lines.SetLen(se_lines.Len()-1); }
false
false
false
false
false
0
GenerateNormals(ASE::Mesh& mesh) { if (!mesh.mNormals.empty() && !configRecomputeNormals) { // Check whether there are only uninitialized normals. If there are // some, skip all normals from the file and compute them on our own for (std::vector<aiVector3D>::const_iterator qq = mesh.mNormals.begin();qq != mesh...
false
false
false
false
false
0
lkbde_get_hw_dev(int d) { if (!VALID_DEVICE(d)) { return NULL; } return (void *)_devices[d].pci_device; }
false
false
false
false
false
0
slotRosterRequestFinished ( bool success ) { kDebug() << success; if ( success ) { stackedWidget->setCurrentIndex(1); } }
false
false
false
false
false
0
module_get_fixed_var( struct module_t * m_, OBJECT * name ) { struct fixed_variable * v; struct module_t * m = m_; if ( m->class_module ) m = m->class_module; if ( !m->variable_indices ) return -1; v = (struct fixed_variable *)hash_find( m->variable_indices, name ); ...
false
false
false
false
false
0
matrix_argmin_l2_float (const float* sample,const float* dict,size_t n,size_t m) { size_t c,cMin = 0; float dMin = vector_l2p2_float(sample, dict, n); for (c = 1; c < m; c++) { float d = vector_l2p2_float(sample, dict+c*n, n); if (d < dMin) { dMin = d; cMin = c; ...
false
false
false
false
false
0
cleanTextBuffer(char *b2, char *b) { // skip the first line while(!(*b == '\n' || *b == 0)) b++; // remove tags included for GtkTextBuffer while(*b != 0){ if(*b > 0 && *b < 8) b++; *b2 = *b; b++; b2++; } *b2 = 0; }
false
false
false
false
false
0
find_connected_components (IplImage * mask, int poly1_hull0, float perimScale, CvMemStorage * mem_storage, CvSeq * contours) { CvContourScanner scanner; CvSeq *c; int numCont = 0; /* Just some convenience variables */ const CvScalar CVX_WHITE = CV_RGB (0xff, 0xff, 0xff); const CvScalar CVX_BLACK = CV_RG...
false
false
false
false
false
0
cm_alidisplay_Destroy(CM_ALIDISPLAY *ad) { if (ad == NULL) return; if (ad->mem) { /* serialized form */ free(ad->mem); } else { /* deserialized form */ if (ad->rfline) free(ad->rfline); if (ad->ncline) free(ad->ncline); if (ad->csline) free(ad->csline); if (ad->m...
false
false
false
false
false
0
xmlFAParseCharGroup(xmlRegParserCtxtPtr ctxt) { int n = ctxt->neg; while ((CUR != ']') && (ctxt->error == 0)) { if (CUR == '^') { int neg = ctxt->neg; NEXT; ctxt->neg = !ctxt->neg; xmlFAParsePosCharGroup(ctxt); ctxt->neg = neg; } else ...
false
false
false
false
false
0
L64() {register object *base=vs_base; register object *sup=base+VM64; VC64 vs_check; {object V327; object V328; object V329; V327=(base[0]); V328=(base[1]); V329=(base[2]); vs_top=sup; goto TTL; TTL:; {object V330; base[3]= (V328); vs_top=(vs_base=base+3)+1; (void) (*Lnk184)(); vs_top=sup; V330= vs_base...
false
false
false
false
false
0
GetPrimitives() { if( iCurrentClass >= 0 && CSLCount(papszCurrentFields) > 7 ) { CSLDestroy( papszTempResult ); papszTempResult = CSLTokenizeStringComplex( papszCurrentFields[7], ";", TRUE, FALSE ); return papszTempResult; }...
false
false
false
false
false
0
gdb_fread_strlist(void) { char* res = NULL; int count; count = FREAD_i32; while (count > 0) { char* str = FREAD_CSTR; if (str != NULL) { if (*str && (res == NULL)) { res = str; } else { xfree(str); } } count--; } return res; }
false
false
false
false
false
0
create_port_classes (void) { long i; scm_port_class = (SCM *) scm_malloc (3 * 256 * sizeof (SCM)); for (i = 0; i < 3 * 256; ++i) scm_port_class[i] = 0; for (i = 0; i < scm_numptob; ++i) scm_make_port_classes (i, SCM_PTOBNAME (i)); }
false
false
false
false
false
0
_redisRetVal_parseInteger(char *rdata, char **tail) { RedisRetVal *rv; char *rest; rv = _redis_initReturnValue(); if (rv == NULL) return NULL; rv->type = REDIS_RETURN_INTEGER; /* bstr_t can be used as char* */ rv->integer = strtol(rdata, &rest, 0); if (tail != NULL) *tail = rest + 2; return r...
false
false
false
false
false
0
gst_message_parse_clock_lost (GstMessage * message, GstClock ** clock) { const GValue *clock_gvalue; GstStructure *structure; g_return_if_fail (GST_IS_MESSAGE (message)); g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_CLOCK_LOST); structure = GST_MESSAGE_STRUCTURE (message); clock_gvalue = gs...
false
false
false
false
false
0
ParseTileFormat( std::string full_text, int &block_size, std::string &compression ) { compression = "NONE"; block_size = 127; UCaseStr( full_text ); /* -------------------------------------------------------------------- */ /* Only operate on tiled stuff. ...
false
false
false
false
false
0
qla1280_get_nvram_word(struct scsi_qla_host *ha, uint32_t address) { uint32_t nv_cmd; uint16_t data; nv_cmd = address << 16; nv_cmd |= NV_READ_OP; data = le16_to_cpu(qla1280_nvram_request(ha, nv_cmd)); dprintk(8, "qla1280_get_nvram_word: exiting normally NVRAM data = " "0x%x", data); return data; }
false
false
false
false
false
0