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
ustr_cpy(struct UString *dst, const struct UString *src, UErrorCode *status) { if(U_FAILURE(*status) || dst == src) return; if(dst->fCapacity < src->fLength) { ustr_resize(dst, ALLOCATION(src->fLength), status); if(U_FAILURE(*status)) return; } if(src->fCha...
false
false
false
false
false
0
dbus_connection_flush (DBusConnection *connection) { /* We have to specify DBUS_ITERATION_DO_READING here because * otherwise we could have two apps deadlock if they are both doing * a flush(), and the kernel buffers fill up. This could change the * dispatch status. */ DBusDispatchStatus status; _dbu...
false
false
false
false
false
0
ap_document_root(request_rec *r) /* Don't use this! */ { core_server_config *sconf; core_request_config *rconf = ap_get_core_module_config(r->request_config); if (rconf->document_root) return rconf->document_root; sconf = ap_get_core_module_config(r->server->module_config); return sconf->ap_...
false
false
false
false
false
0
ata_sff_data_xfer_noirq(struct ata_device *dev, unsigned char *buf, unsigned int buflen, int rw) { unsigned long flags; unsigned int consumed; local_irq_save(flags); consumed = ata_sff_data_xfer32(dev, buf, buflen, rw); local_irq_restore(flags); return consumed; }
false
false
false
false
false
0
ga_service_browser_dispose(GObject * object) { GaServiceBrowser *self = GA_SERVICE_BROWSER(object); GaServiceBrowserPrivate *priv = GA_SERVICE_BROWSER_GET_PRIVATE(self); if (priv->dispose_has_run) return; priv->dispose_has_run = TRUE; if (priv->browser) avahi_service_browser_free(...
false
false
false
false
false
0
vt1724_midi_read(struct snd_ice1712 *ice) { struct snd_rawmidi_substream *s; int count, i; u8 buffer[32]; s = get_rawmidi_substream(ice, SNDRV_RAWMIDI_STREAM_INPUT); count = inb(ICEREG1724(ice, MPU_RXFIFO)); if (count > 0) { count = min(count, 32); for (i = 0; i < count; ++i) buffer[i] = inb(ICEREG1724(ic...
false
false
false
false
false
0
ms_lib_setacquired_errorblock(struct us_data *us, u16 phyblk) { u16 log; struct ene_ub6250_info *info = (struct ene_ub6250_info *) us->extra; if (phyblk >= info->MS_Lib.NumberOfPhyBlock) return (u32)-1; log = info->MS_Lib.Phy2LogMap[phyblk]; if (log < info->MS_Lib.NumberOfLogBlock) info->MS_Lib.Log2PhyMap[l...
false
false
false
false
false
0
pack_into_push_datagram(WAPEvent *event) { WAPEvent *datagram; WSP_PDU *pdu; Octstr *ospdu; unsigned char push_id; gw_assert(event->type == S_Unit_Push_Req); debug("wap.wsp.unit", 0, "WSP_UNIT: Connectionless push accepted"); http_header_add(event->u.S_Unit_Push_Req.pu...
false
false
false
false
false
0
rdaddc(rdstringc *rs, char c) { if (rs->pos >= rs->size-1) { rs->size = rs->pos + 128; rs->text = sresize(rs->text, rs->size, char); } rs->text[rs->pos++] = c; rs->text[rs->pos] = 0; }
false
false
false
false
false
0
unity_webapps_action_info_new (UnityWebappsActionManager *manager, const gchar *path, DbusmenuMenuitem *item, UnityWebappsActionInfo *parent) { UnityWebappsActionInfo *info; info = g_malloc0 (sizeof (UnityWebappsActionInfo)); info->manager = manager; info->path = g_strdup (pa...
false
false
false
false
false
0
mysasl_config(void *context __attribute__((unused)), const char *plugin_name, const char *option, const char **result, unsigned *len) { char opt[1024]; if (!strcmp(option, "srvtab")) { /* we don't transform srvtab! */ *result = config_getstring(IMAPOPT_SRVTAB); } else { *result = NULL;...
true
true
true
false
false
1
_e2_pane_go_forward (gpointer from, E2_ActionRuntime *art) { // printd (DEBUG, "_e2_pane_go_forward action"); E2_PaneRuntime *rt = (E2_PaneRuntime *)art->action->data; //action data is pointer to pane data struct, or NULL to use current pane if (rt == NULL) rt = curr_pane; //history entries are prepended to list,...
false
false
false
false
false
0
ajCodClearData(AjPCod thys) { ajint i; ajStrAssignClear(&thys->Name); ajStrAssignClear(&thys->Species); ajStrAssignClear(&thys->Division); ajStrAssignClear(&thys->Release); ajStrAssignClear(&thys->Desc); thys->CdsCount = 0; thys->CodonCount = 0; thys->GeneticCode = 0; for(i=0;...
false
false
false
false
false
0
t1_hinter__closepath(t1_hinter * self) { if (self->pass_through) { vd_lineto(self->bx, self->by); self->path_opened = false; return gx_path_close_subpath(self->output_path); } else { int contour_beg = self->contour[self->contour_count], code; if (contour_beg == self->pole_...
false
false
false
false
false
0
itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) { if (change == ItemChildRemovedChange) { QGraphicsItem* item = value.value<QGraphicsItem*>(); d->m_pendingItems.removeAll(item); QGraphicsObject* object = item->toGraphicsObject(); Tagaro::SpriteObjectItem* objectItem = qobject_cast<...
false
false
false
false
false
0
edit_knapp_callback(Widget w, XtPointer client_data, XtPointer call_data) { PostContext *context = (PostContext *)client_data; if (context->busy) { XBell(display, 0); return; } post_set_message(context, "Started editor...", False); post_set_busy(context); fork_editor(context); }
false
false
false
false
false
0
gnome_scan_job_new (GnomeScanSettings *settings, GnomeScanSink *sink) { if (settings == NULL) { settings = gnome_scan_settings_new(); } else g_object_ref(settings); GObject *object = g_object_new (GNOME_TYPE_SCAN_JOB, "settings", settings, "sink", sink, NULL); g_object_unref(s...
false
false
false
false
false
0
updateWonItem() { const qreal aspectRatio = Renderer::self()->aspectRatioOfElement("message_frame"); int boxWidth; int boxHeight; if ( width() < aspectRatio * height() ) { boxWidth = width() * wonBoxToSceneSizeRatio; boxHeight = boxWidth / aspectRatio; } else { bo...
false
false
false
false
false
0
bg_cdaudio_sha_print(unsigned char digest[20]) { int i, j; for (j = 0; j < 5; ++j) { for (i = 0; i < 4; ++i) { printf("%02x", *digest++); } printf("%c", (j < 4) ? ' ' : '\n'); } }
false
false
false
false
false
0
color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf) { if (!*color) return fwrite(buf, count, 1, fp) != 1; while (count) { char *p = memchr(buf, '\n', count); if (p != buf && (fputs(color, fp) < 0 || fwrite(buf, p ? p - buf : count, 1, fp) != 1 || fputs(GIT_COLOR_RESET, fp) <...
false
false
false
false
false
0
free_all_array_dim(Array_lmad_dim *dim_head) { Array_lmad_dim *dim, *tmp_dim; dim = dim_head; while(dim != NULL) { if(dim->stride != NULL) { semtree_destruct(dim->stride); dim->stride = NULL; } if(dim->span != NULL) { semtree_destruct(dim->span); dim->span = NULL; } tmp_dim = dim;...
false
false
false
false
false
0
pci_ea_flags(struct pci_dev *dev, u8 prop) { unsigned long flags = IORESOURCE_PCI_FIXED; switch (prop) { case PCI_EA_P_MEM: case PCI_EA_P_VF_MEM: flags |= IORESOURCE_MEM; break; case PCI_EA_P_MEM_PREFETCH: case PCI_EA_P_VF_MEM_PREFETCH: flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH; break; case PCI_EA_P...
false
false
false
false
false
0
query_val_str(THD *thd, String* str) const { switch (state) { case INT_VALUE: str->set_int(value.integer, unsigned_flag, &my_charset_bin); break; case REAL_VALUE: str->set_real(value.real, NOT_FIXED_DEC, &my_charset_bin); break; case DECIMAL_VALUE: if (my_decimal2string(E_DEC_FATAL_ERROR, &d...
false
false
false
true
false
1
GetAngle(const WorldObject* obj) const { if (!obj) { return 0.0f; } // Rework the assert, when more cases where such a call can happen have been fixed // MANGOS_ASSERT(obj != this || PrintEntryError("GetAngle (for self)")); if (obj == this) { sLog.outError("INVALID CALL for GetAngle...
false
false
false
false
false
0
r600_engine_clock_entry_set_reference_divider(struct radeon_device *rdev, u32 index, u32 divider) { WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART1 + (index * 4 * 2), STEP_0_SPLL_REF_DIV(divider), ~STEP_0_SPLL_REF_DIV_MASK); }
false
false
false
false
false
0
getStructSize() const { if (!getStruct()) { assert(false && "Not a struct"); return 0; } if (structureSize == 0) for (TTypeList::iterator tl = getStruct()->begin(); tl != getStruct()->end(); tl++) structureSize += ((*tl).type)->getObjectSize(); return structureSize; }
false
false
false
false
false
0
userfaultfd_wake_function(wait_queue_t *wq, unsigned mode, int wake_flags, void *key) { struct userfaultfd_wake_range *range = key; int ret; struct userfaultfd_wait_queue *uwq; unsigned long start, len; uwq = container_of(wq, struct userfaultfd_wait_queue, wq); ret = 0; /* len == 0 means wake all */ s...
false
false
false
false
false
0
LLA_SkiplistSearch(AllocList *head, AllocList *e, AllocList **prev) { AllocList *p = head; for (int level = head->levels - 1; level >= 0; level--) { for (AllocList *n; (n = p->next[level]) != 0 && n < e; p = n) { } prev[level] = p; } return (head->levels == 0) ? ...
false
false
false
false
true
1
aa_cmd_ch_srv(cmd_parms *cmd, void *mconfig, const char *parm1) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "server config change hat %s", parm1 ? parm1 : "DEFAULT"); apparmor_srv_cfg *scfg = (apparmor_srv_cfg *) ap_get_module_config(cmd->server->module_con...
false
false
false
false
false
0
xmlSecNssKeysStoreFinalize( xmlSecKeyStorePtr store ) { xmlSecNssKeysStoreCtxPtr context = NULL ; xmlSecAssert( xmlSecKeyStoreCheckId( store , xmlSecNssKeysStoreId ) ) ; xmlSecAssert( xmlSecKeyStoreCheckSize( store , xmlSecNssKeysStoreSize ) ) ; context = xmlSecNssKeysStoreGetCtx( s...
false
false
false
false
false
0
dico_quote_char(int c) { char *p; for (p = quote_transtab; *p; p += 2) { if (p[1] == c) return p[0]; } return 0; }
false
false
false
false
false
0
free_db( value v ) { database *db = val_db(v); if( db->last != NULL ) finalize_result(val_result(db->last),0); if( sqlite3_close(db->db) != SQLITE_OK ) { // No exception : we shouldn't alloc memory in a finalizer anyway } }
false
false
false
false
false
0
wl1273_fm_vidioc_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *tuner) { struct wl1273_device *radio = video_get_drvdata(video_devdata(file)); struct wl1273_core *core = radio->core; int r = 0; dev_dbg(radio->dev, "%s\n", __func__); dev_dbg(radio->dev, "tuner->index: %d\n", tuner->index);...
false
false
false
false
false
0
CreateManipulator ( Viewer* v, Event& e, Transformer* rel, Tool* tool ) { Manipulator* manip = nil; if (tool->IsA(GRAPHIC_COMP_TOOL)) { manip = CreateGraphicCompManip(v, e, rel, tool); } else if (tool->IsA(MOVE_TOOL)) { manip = GraphicView::CreateManipulator(v, e, rel, tool); } el...
false
false
false
false
false
0
eg_surface_sanity(struct radeon_surface_manager *surf_man, struct radeon_surface *surf, unsigned mode) { unsigned tileb; /* check surface dimension */ if (surf->npix_x > 16384 || surf->npix_y > 16384 || surf->npix_z > 16384) { return -EINVAL...
false
false
false
false
false
0
doPending() { if(d->notifyRead) { if(d->notifyClose) QTimer::singleShot(0, this, SLOT(doPending())); sc_readyRead(); } else if(d->notifyClose) sc_connectionClosed(); }
false
false
false
false
false
0
S_StartSound(void *origin_p, int sfx_id) { sfxinfo_t *sfx; mobj_t *origin; int rc; int sep; int cnum; int volume; origin = (mobj_t *) origin_p; volume = snd_SfxVolume; // check for bogus sound # if (sfx_id < 1 || sfx_id > NUMSFX) { I_Error("Bad sfx #: %d", sfx_id); ...
false
false
false
false
false
0
set_table_for_PT_N_mis() { int i; psg.w_N_mismatches[0] = 0; psg.w_N_mismatches[1] = 0; psg.w_N_mismatches[2] = 1; psg.w_N_mismatches[3] = 2; psg.w_N_mismatches[4] = 4; psg.w_N_mismatches[5] = 5; for (i=6; i<=PT_POS_TREE_HEIGHT; i++) psg.w_N_mismatches[i] = i; }
false
false
false
false
false
0
rsxx_eeh_save_issued_creg(struct rsxx_cardinfo *card) { struct creg_cmd *cmd = NULL; cmd = card->creg_ctrl.active_cmd; card->creg_ctrl.active_cmd = NULL; if (cmd) { del_timer_sync(&card->creg_ctrl.cmd_timer); spin_lock_bh(&card->creg_ctrl.lock); list_add(&cmd->list, &card->creg_ctrl.queue); card->creg_ct...
false
false
false
false
false
0
vsp1_pipeline_stopped(struct vsp1_pipeline *pipe) { unsigned long flags; bool stopped; spin_lock_irqsave(&pipe->irqlock, flags); stopped = pipe->state == VSP1_PIPELINE_STOPPED, spin_unlock_irqrestore(&pipe->irqlock, flags); return stopped; }
false
false
false
false
false
0
brcms_c_chipmatch(struct bcma_device *core) { switch (core->bus->hosttype) { case BCMA_HOSTTYPE_PCI: return brcms_c_chipmatch_pci(core); case BCMA_HOSTTYPE_SOC: return brcms_c_chipmatch_soc(core); default: pr_err("unknown host type: %i\n", core->bus->hosttype); return false; } }
false
false
false
false
false
0
dump_database_section(dns_message_t *msg, int section) { dns_name_t *msg_name=NULL; dns_rdataset_t *rdataset; do { dns_message_currentname(msg, section, &msg_name); for (rdataset = ISC_LIST_HEAD(msg_name->list); rdataset != NULL; rdataset = ISC_LIST_NEXT(rdataset, link)) { dns_name_print(msg_name, s...
false
false
false
false
false
0
caravan_parameter_is_legal(const struct caravan_parameter *parameter) { /* a discount > 1.0 means money later is worth more than money now, which is ridiculous. */ if (parameter->discount > 1.0) { return FALSE; } /* a negative discount doesn't converge */ if (parameter->discount < 0.0) { return ...
false
false
false
false
false
0
token_decode(const char *token) { int i; unsigned int val = 0; int marker = 0; if (strlen(token) < 4) return DECODE_ERROR; for (i = 0; i < 4; i++) { val *= 64; if (token[i] == '=') marker++; else if (marker > 0) return DECODE_ERROR; else val += pos(token[i]); } if (marker...
false
false
false
false
false
0
skip(struct s5p_jpeg_buffer *buf, long len) { if (len <= 0) return; while (len--) get_byte(buf); }
false
false
false
false
false
0
misc_mpddata_remove_duplicate_songs(MpdData * data) { MpdData_real *node; if (!data) return NULL; /* sort on file filename, this is our key */ node = (MpdData_real *) misc_sort_mpddata(data, (GCompareDataFunc) __sort_filename, NULL); /* loop through it */ while (node->next) { if (node->type == MPD_DATA_TYPE_...
false
false
false
false
false
0
setFunction(TraceFunction* f) { if (_function == f) return false; _function = f; _multiView->activate(f); _functionSelection->activate(f); _partSelection->activate(f); _stackSelection->setFunction(_function); StackBrowser* b = _stackSelection->browser(); if (b) { // do not disable up: a press forc...
false
false
false
false
false
0
_fetch_file_info_for_shortcut(const char *target, GAppLaunchContext* ctx, FmFileLauncher* launcher, gpointer user_data) { FmFileInfoJob *job; QueryErrorData data; ...
false
false
false
false
false
0
reset() { for (size_t i = 0; i <= m_windowSize/2; ++i) { m_prevMag[i] = 0; } }
false
false
false
false
false
0
vmx_start_preemption_timer(struct kvm_vcpu *vcpu) { u64 preemption_timeout = get_vmcs12(vcpu)->vmx_preemption_timer_value; struct vcpu_vmx *vmx = to_vmx(vcpu); if (vcpu->arch.virtual_tsc_khz == 0) return; /* Make sure short timeouts reliably trigger an immediate vmexit. * hrtimer_start does not guarantee this...
false
false
false
false
false
0
mark_int_list(int *ilp, int max_ints, int lookup_type) { ignore_white_space(); if (*Mp != '(') { error_display(1, "Marking integer list. Found [%c]. Expecting '('.\n", *Mp); longjmp(parse_abort, 6); } Mp++; ignore_white_space(); while (*Mp != ')') { if (*Mp == '"') { int num = 0; char str[128]; ...
false
false
false
false
false
0
SITEopen(SITE *sp) { int e; if ((sp->F = xfopena(sp->Filename)) == NULL && ((e = errno) != EACCES || chmod(sp->Filename, 0644) < 0 || (sp->F = xfopena(sp->Filename)) == NULL)) { syswarn("%s cannot fopen %s", sp->Name, sp->Filename); if ((sp->F = fopen("/dev/null", "w")) == NULL) /* T...
false
false
false
false
false
0
seng_exec_conditional(M_Conditional *c, GF_SceneGraph *scene) { GF_List *clist = c->buffer.commandList; c->buffer.commandList = NULL; gf_sg_command_apply_list(gf_node_get_graph((GF_Node*)c), clist, 0.0); if (c->buffer.commandList != NULL) { while (gf_list_count(clist)) { GF_Command *sub_com = (GF_Command *)g...
false
false
false
false
false
0
lib_cmd_notify (sc_gameref_t game) { /* Report the current state of notification. */ if_print_string ("Game score change notification is "); if_print_tag (SC_TAG_ITALICS, ""); if_print_string (game->notify_score_change ? "on" : "off"); if_print_tag (SC_TAG_ENDITALICS, ""); if (game->notify_score_change) ...
false
false
false
false
false
0
hasCompBoundaryAfter(UChar32 c, UBool onlyContiguous, UBool testInert) const { for(;;) { uint16_t norm16=getNorm16(c); if(isInert(norm16)) { return TRUE; } else if(norm16<=minYesNo) { // Hangul LVT (==minYesNo) has a boundary after it. // Hangul LV and non...
false
false
false
false
false
0
load(const QString& filename) { //initialise data stream QFile file(filename); if(!file.open(QIODevice::ReadOnly)) { return false; } QDataStream stream(&file); quint32 magicNumber; stream >> magicNumber; if(magicNumber != 0xCD5CBD01U) { if((magicNumber & 0xFFFFFF...
false
false
false
false
false
0
ether_multicast(const struct in6_addr *ipv6addr){ unsigned int i; struct ether_addr ether; ether.a[0]=0x33; ether.a[1]=0x33; for(i=2;i<6;i++) ether.a[i]= ipv6addr->s6_addr[i+10]; return ether; }
false
false
false
false
false
0
removeVariableUpdates() { QMutableListIterator<GDBCommand*> it = m_commandList; while (it.hasNext()) { CommandType type = it.next()->type(); if ((type >= VarEvaluateExpression && type <= VarListChildren) || type == VarUpdate) it.remove(); } }
false
false
false
false
false
0
BuildFullscreenModesList(void) { SDL_PixelFormat format; SDL_Rect **modes; screen_mode_t *m1; screen_mode_t *m2; screen_mode_t m; int num_modes; int i; // Free the existing modes list, if one exists if (screen_modes_fullscreen != NULL) { free(screen_modes_fullscreen); ...
false
false
false
false
false
0
locact(Aword act, Aword whr) #else static void locact(act, whr) Aword act, whr; #endif { Aword prevact = cur.act; Aword prevloc = cur.loc; cur.loc = whr; acts[act-ACTMIN].loc = whr; if (act == HERO) { if (locs[acts[act-ACTMIN].loc-LOCMIN].describe % (cur.visits+1) == 0) look(); else { ...
false
false
false
false
false
0
plane_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles, int x, int y, int w, int h, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y) { gx_device_plane_extract * const edev = (gx_device_plane_extract *)dev; gx_device * const plane_dev = edev->plane_dev; gx_...
false
false
false
false
false
0
operator<<(std::ostream& os, const pos_range& pr) { os << "["; if (pr.is_begin_pos) { os << pr.begin_pos+1; } else { os << "-inf"; } os << " .. "; if (pr.is_end_pos) { os << pr.end_pos; } else { os << "inf"; } os << "]"; return os; }
false
false
false
false
false
0
GetLayerInfo(LayerFile,UseLayerTable,UseStreamNames) char *LayerFile; int UseLayerTable,UseStreamNames; { FILE *ltable; int i,j,k,l,n; char buffer[80]; char *emesg = "Incorrect layer table format in %s.\n"; if (UseLayerTable) { if ((ltable = fopen(LayerFile,"r")) == NULL) { fpr...
false
false
false
false
true
1
construct(ExecState *exec, const List &args) { int numArgs = args.size(); double value; if (numArgs == 0) { // new Date() ECMA 15.9.3.3 value = getCurrentUTCTime(); } else if (numArgs == 1) { JSValue* arg0 = args[0]; if (arg0->isObject(&DateInstance::info)) value = static_cast<DateInstance*>(...
false
false
false
false
false
0
device_values_destructor(device_values_t *s) { if (NULL != s->section_name) { free(s->section_name); } if (NULL != s->values.receive_queues) { free(s->values.receive_queues); } }
false
false
false
false
false
0
xc_tune_channel(struct xc4000_priv *priv, u32 freq_hz) { int found = 1; int result; dprintk(1, "%s(%u)\n", __func__, freq_hz); /* Don't complain when the request fails because of i2c stretching */ priv->ignore_i2c_write_errors = 1; result = xc_set_rf_frequency(priv, freq_hz); priv->ignore_i2c_write_errors = 0;...
false
false
false
false
false
0
dib3000mc_identify(struct dib3000mc_state *state) { u16 value; if ((value = dib3000mc_read_word(state, 1025)) != 0x01b3) { dprintk("-E- DiB3000MC/P: wrong Vendor ID (read=0x%x)\n",value); return -EREMOTEIO; } value = dib3000mc_read_word(state, 1026); if (value != 0x3001 && value != 0x3002) { dprintk("-E- ...
false
false
false
false
false
0
_mbuffer_remove_bytes (mbuffer_head_st * buf, size_t bytes) { size_t left = bytes; mbuffer_st *bufel, *next; if (bytes > buf->byte_length) { gnutls_assert (); return GNUTLS_E_INVALID_REQUEST; } for (bufel = buf->head; bufel != NULL && left > 0; bufel = next) { next = bufel->next;...
false
false
false
false
false
0
ReadNBytes(std::vector<char>& dst, int byteCount) { for (int i = 0; i < byteCount; ++i) { dst.push_back((char)ReadByte()); } }
false
false
false
false
false
0
FillUndo(int N) //Fills UBuf[N] (N=0,1) with the current text { GtkTextIter Start,End; gchar *BufTxt; gtk_text_buffer_get_start_iter(Buf,&Start); gtk_text_buffer_get_end_iter(Buf,&End); BufTxt=gtk_text_buffer_get_text(Buf,&Start,&End,FALSE); if (strlen(BufTxt)<MAX_...
false
false
false
false
false
0
moveRule(int src_rule_n, int dst_rule_n) { FWObject* src =getRuleByNum( src_rule_n ); FWObject* dst =getRuleByNum( dst_rule_n ); if (src!=NULL && dst!=NULL && src!=dst ) { FWObject *o; list<FWObject*>::iterator m, m1, m2; for (m=begin(); m!=end(); ++m) { if ( (o=(*m))!=NULL ) { ...
false
false
false
false
false
0
type_abstractmethods(PyTypeObject *type, void *context) { PyObject *mod = NULL; /* type itself has an __abstractmethods__ descriptor (this). Don't return that. */ if (type != &PyType_Type) mod = _PyDict_GetItemId(type->tp_dict, &PyId___abstractmethods__); if (!mod) { PyObject *mes...
false
false
false
false
false
0
parseStaticCtor() { Loc loc = token.loc; nextToken(); check(TOKlparen); check(TOKrparen); StaticCtorDeclaration *f = new StaticCtorDeclaration(loc, Loc()); parseContracts(f); return f; }
false
false
false
false
false
0
dm_pool_issue_prefetches(struct dm_pool_metadata *pmd) { down_read(&pmd->root_lock); if (!pmd->fail_io) dm_tm_issue_prefetches(pmd->tm); up_read(&pmd->root_lock); }
false
false
false
false
false
0
is_startline(const pcre_uchar *code, unsigned int bracket_map, unsigned int backref_map) { do { const pcre_uchar *scode = first_significant_code( code + PRIV(OP_lengths)[*code], FALSE); register int op = *scode; /* If we are at the start of a conditional assertion group, *both* the conditional asser...
false
false
false
false
false
0
t6963_close(Driver *drvthis) { PrivateData *p = drvthis->private_data; debug(RPT_INFO, "Shutting down!"); if (p != NULL) { port_deny_multiple(p->port, 3); if (p->display_buffer1 != NULL) free(p->display_buffer1); free(p); } drvthis->store_private_ptr(drvthis, NULL); }
false
false
false
false
false
0
component(const size_t& i) const { ASSERT (i<3); return (*(*__vector3Variable).expression()).component(i); }
false
false
false
false
false
0
_e2_command_line_find_name (gchar *option, gchar *def) { if ((option == NULL) || (*option == '\0')) option = def; gchar *name = NULL; GList *tmp = g_list_find_custom (line_names, option, (GCompareFunc)_e2_command_line_match_list_str); if (tmp == NULL) name = g_strdup (option); else { gint turn = 2; wh...
false
false
false
false
false
0
idByName(const char *name) { uint64 out=0, i; uint32 size = 0; if(name == 0) // null pointer-name throw SpatialFailure("SpatialIndex:idByName:no name given"); if(name[0] != 'N' && name[0] != 'S') // invalid name throw SpatialFailure("SpatialIndex:idByName:invalid name",name); size = s...
false
false
false
false
false
0
pidff_find_effects(struct pidff_device *pidff, struct input_dev *dev) { int i; for (i = 0; i < sizeof(pidff_effect_types); i++) { int pidff_type = pidff->type_id[i]; if (pidff->set_effect_type->usage[pidff_type].hid != pidff->create_new_effect_type->usage[pidff_type].hid) { hid_err(pidff->hid, ...
false
false
false
false
false
0
iret32_stack_return_from_v86(bxInstruction_c *i) { if (BX_CPU_THIS_PTR get_IOPL() < 3) { // trap to virtual 8086 monitor BX_DEBUG(("IRET in vm86 with IOPL != 3, VME = 0")); exception(BX_GP_EXCEPTION, 0, 0); } Bit32u eip, cs_raw, flags32; // Build a mask of the following bits: // ID,VIP,VIF,AC,VM,...
false
false
false
false
false
0
find_user_func(gconstpointer user, gconstpointer jid) { g_return_val_if_fail(user != NULL, -1); g_return_val_if_fail(jid != NULL, -1); return strcmp(((XMPP_ROSTER_USER_REC *)user)->jid, jid); }
false
false
false
false
false
0
ompi_coll_libnbc_iallreduce_inter(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, struct ompi_communicator_t *comm, ompi_request_t ** request, struct mca_coll_base_module_2_0_0_t *module) { int rank, res, size, rsiz...
false
false
false
false
false
0
fileSaveAs() { QString filename = QFileDialog::getSaveFileName(this, tr("Save Atlas File"), _filename, QString::null); if(filename.isEmpty()) return; _filename = filename; _currentDir = QFileInfo(_filename).absoluteDir().absolutePath(); fileSave(); }
false
false
false
false
false
0
fli_handle_goodie_font( FL_OBJECT * ob1, FL_OBJECT * ob2 ) { if ( goodie_style < 0 ) return; if ( ob1 ) { fl_set_object_lstyle( ob1, goodie_style ); fl_set_object_lsize( ob1, goodie_size ); fl_fit_object_label( ob1, 1, 1 ); } if ( ob2 ) {...
false
false
false
false
false
0
camel_header_address_fold (const gchar *in, gsize headerlen) { gsize len, outlen; const gchar *inptr = in, *space, *p, *n; GString *out; gchar *ret; gint i, needunfold = FALSE; if (in == NULL) return NULL; /* first, check to see if we even need to fold */ len = headerlen + 2; p =...
false
false
false
false
false
0
caml_format_int(value fmt, value arg) { char format_string[FORMAT_BUFFER_SIZE]; char default_format_buffer[FORMAT_BUFFER_SIZE]; char * buffer; char conv; value res; buffer = parse_format(fmt, ARCH_INTNAT_PRINTF_FORMAT, format_string, default_format_buffer, &conv); switch (conv) { ...
false
false
false
false
false
0
fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { if (fl_visual->depth > 16) { fl_color(r,g,b); fl_rectf(x,y,w,h); } else { uchar c[3]; c[0] = r; c[1] = g; c[2] = b; innards(c,x,y,w,h,0,0,0,0,0); } }
false
false
false
false
false
0
selectMeshBoundaryElementsByNeighbor() { if (modelInfo->selectedBodyElementId == NO_INDEX) return; if (meshInfo->selectedBndrElementId == NO_INDEX) return; BodyElement* be = model->getBoundaryById(modelInfo->selectedBodyElementId); if (be == NULL) return; MeshElementTable* table = meshData->...
false
false
false
false
false
0
query_transactions(struct dundi_request *dr) { struct dundi_transaction *trans; AST_LIST_LOCK(&peers); AST_LIST_TRAVERSE(&dr->trans, trans, parentlist) { dundi_query(trans); } AST_LIST_UNLOCK(&peers); return 0; }
false
false
false
false
false
0
touch_display (Touchable *display) { UIRequest *req = get_request (TouchDisplay); if (req == 0) { return; } req->display = display; send_request (req); }
false
false
false
false
false
0
dump_maplevels (struct garmin_tre_map_level *levels, int num) { int i; for (i = 0; i < num; i ++) { printf("level=%d bit456=0x%x %s bits=%2d nsubdiv=%d\n", levels[i].level, levels[i].bit456, levels[i].inherited ? "inher" : "noinh", levels[i].bits, levels[i].nsubdiv); } }
false
false
false
false
false
0
xfs_mkfs(cdico *d, char *partition, char *fsoptions) { char command[2048]; char buffer[2048]; char options[2048]; int exitst; u64 temp64; if (exec_command(command, sizeof(command), NULL, NULL, 0, NULL, 0, "mkfs.xfs -V")!=0) { errprintf("mkfs.xfs not found. please install xfsprogs on y...
false
false
false
false
false
0
ARMMoveToIntReg(EVT VT, unsigned SrcReg) { if (VT == MVT::i64) return 0; unsigned MoveReg = createResultReg(TLI.getRegClassFor(VT)); AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(ARM::VMOVSR), MoveReg) .addReg(SrcReg)); return MoveReg; }
false
false
false
false
false
0
setS5BServerPort ( int port ) { d->s5bServerPort = port; if ( fileTransfersEnabled () ) { return s5bServer()->start ( port ); } return true; }
false
false
false
false
false
0
Stage3end_query_alignment_length (T this) { int length; length = Substring_match_length(this->substring1); length += Substring_match_length(this->substring2); length += Substring_match_length(this->substring0); if (this->hittype == INSERTION) { length += this->nindels; } return length; }
false
false
false
false
false
0
WriteISAR(struct IsdnCardState *cs, int mode, u_char offset, u_char value) { if (mode == 0) writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx, offset, value); else { if (mode == 1) byteout(cs->hw.sedl.adr, offset); byteout(cs->hw.sedl.hscx, value); } }
false
false
false
false
false
0
_backup_audio_orc_unpack_s16_swap (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; orc_union32 * ORC_RESTRICT ptr0; const orc_union16 * ORC_RESTRICT ptr4; orc_union16 var34; orc_union32 var35; orc_union16 var36; orc_union32 var37; ptr0 = (orc_union32 *)ex->arrays[0]; ptr4 = (orc_union16 *)ex...
false
false
false
false
false
0
do_load(int fd, unsigned char *buffer, size_t len) { int height; int width = 8; int charsize; int fontsize = 256; int has_table = 0; unsigned char *font = buffer; unsigned char *table; if (len >= sizeof(struct psf1_header) && PSF1_MAGIC_OK(psf1h(buffer))) { if (psf1h(buffer)->mode > PSF1_MAXMODE) bb_error...
false
false
false
false
false
0
ipmi_lcd_get_single_line_text(struct ipmi_intf * intf, char* lcdstring, uint8_t max_length) { IPMI_DELL_LCD_STRING lcdstringblock; int lcdstring_len = 0; int bytes_copied = 0; int ii, rc; for (ii = 0; ii < 4; ii++) { int bytes_to_copy; rc = ipmi_mc_getsysinfo(intf, IPMI_DELL_LCD_STRING_SELECTOR, ii, 0, s...
false
true
false
false
false
1