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
timedur_get_spec (const GstTestInfo * info, gboolean compare_value) { if (compare_value) { return g_param_spec_int64 ("allowed-timestamp-deviation", "allowed timestamp deviation", "allowed average difference in usec between timestamp of next buffer " "and expected timestamp from analyzing ...
false
false
false
false
false
0
KickBan(const int ban, const char *source, struct Channel *channel, const char *nicks, const char *reason) { char *mask = NULL, *tempnix = NULL, **av; char temp[MAXLINE + 1]; int ac, ii; struct Luser *lptr = NULL; if ((source == NULL) || (channel == NULL) || (nicks == NULL)) return; tempnix = MyStrdup(nicks...
true
true
false
false
false
1
server_port_read(struct evdns_server_port *s) { u8 packet[1500]; struct sockaddr_storage addr; socklen_t addrlen; int r; for (;;) { addrlen = sizeof(struct sockaddr_storage); r = recvfrom(s->socket, packet, sizeof(packet), 0, (struct sockaddr*) &addr, &addrlen); if (r < 0) { int err = last_error(s-...
false
false
false
false
false
0
start_write_pass (double when) { Glib::Threads::Mutex::Lock lm (_lock); DEBUG_TRACE (DEBUG::ControlList, string_compose ("%1: setup write pass @ %2\n", this, when)); new_write_pass = true; did_write_during_pass = false; insert_position = when; /* leave the insert iterator invalid, so that we will do the looku...
false
false
false
false
false
0
dissect_ldap_T_and(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 570 "../../asn1/ldap/ldap.cnf" proto_tree *tr=NULL; proto_item *it=NULL; const char *old_and_filter_string=and_filter_string; and_filter_string=NULL; tr=proto_tre...
false
false
false
false
false
0
ibmasm_wait_for_response(struct command *cmd, int timeout) { wait_event_interruptible_timeout(cmd->wait, cmd->status == IBMASM_CMD_COMPLETE || cmd->status == IBMASM_CMD_FAILED, timeout * HZ); }
false
false
false
false
false
0
initvar (VAR_ *v) { if ( (v->type & (e_str | e_list)) && ! v->vu.i ) { v->vu.i = xrealloc (NULL, sizeof (INTER_)); v->vu.i->count = 1; v->vu.i->ls.list.size = 0; v->vu.i->ls.list.element = NULL; v->vu.i->ls.str = NULL; } }
false
false
false
false
false
0
fill_cmd_set_command_enables (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint8_t *enable_disable_bitmask, unsigned int enable_disable_bitmask_len, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (...
false
false
false
false
false
0
gwy_plain_tool_selection_reconnect(GwyPlainTool *plain_tool) { const gchar *key; gchar *sigdetail; gwy_debug("%s", plain_tool->selection_bname); if (!plain_tool->selection_bname) return; key = gwy_plain_tool_set_selection_key(plain_tool, plain_to...
false
false
false
false
false
0
check_branch_target_aligned (bfd_byte *contents, bfd_size_type content_length, bfd_vma offset, bfd_vma address) { bfd_size_type insn_len = insn_decode_len (contents, content_length, offset); if (insn_len == 0) return FALSE; return check_branch_target_aligned_address (address, insn_len)...
false
false
false
false
false
0
SetPage( GraphicsPage *p ) { int np = notebook_->GetPageCount(); for( int i=0; i<np; ++i ) { if( notebook_->GetPage(i) == p ) { SetPage(i+1); return; } } }
false
false
false
false
false
0
prefs_display_header_set_list(void) { gint row = 0; DisplayHeaderProp *dp; GtkTreeModel *model; GtkTreeIter iter; g_slist_free(prefs_common.disphdr_list); prefs_common.disphdr_list = NULL; model = gtk_tree_view_get_model(GTK_TREE_VIEW(dispheader.headers_list_view)); while (gtk_tree_model_iter_nth_child(model,...
false
false
false
false
false
0
parallel_client_scan(char *file, int scantype, int *infected, int *err, int maxlevel, int flags) { struct cli_ftw_cbdata data; struct client_parallel_data cdata; int ftw; if((cdata.sockd = dconnect()) < 0) return 1; if(sendln(cdata.sockd, "zIDSESSION", 11)) { closesocket(cdata.sockd); return 1;...
false
false
false
false
false
0
isVisible() { if(visible) return true; for(std::list<RDirNode*>::const_iterator it = children.begin(); it != children.end(); it++) { if((*it)->isVisible()) { visible = true; return true; } } return false; }
false
false
false
false
false
0
instantiation( const SubstitutionMap& subst, const problem_t& problem) const { Conjunction* conj = new Conjunction; for( FormulaList::const_iterator fi = conjuncts_.begin(); fi != conjuncts_.end(); ++fi ) { const StateFormula& c = (*fi)->instantiation( subst, problem ); if( c.contradiction() ...
false
false
false
false
false
0
nemo_window_split_view_on (NemoWindow *window) { NemoWindowSlot *slot, *old_active_slot; GFile *location; old_active_slot = nemo_window_get_active_slot (window); slot = create_extra_pane (window); location = NULL; if (old_active_slot != NULL) { location = nemo_window_slot_get_location (old_active_slot); if ...
false
false
false
false
true
1
Do(const Spectrum& inSpec,Spectrum& outSpec) { if (!mConfig.GetPreserveOuts()) { outSpec = inSpec; //TODO big cludge for streaming } int spectrumSize = inSpec.GetSize(); TData spectralResolution = spectrumSize/inSpec.GetSpectralRange(); int centerPoint = Round (mCenterFreqCtl.GetLastValue()*spectralRes...
false
false
false
false
false
0
register_driver(gn_driver *driver, const char *model, char *setupmodel, struct gn_statemachine *sm) { gn_data *data = NULL; gn_data *p_data; gn_error error = GN_ERR_UNKNOWNMODEL; if (setupmodel) { data = calloc(1, sizeof(gn_data)); if (!data) return GN_ERR_INTERNALERROR; data->model = setupmodel; p_data...
false
false
false
false
false
0
dav_notify_created(request_rec *r, dav_lockdb *lockdb, const dav_resource *resource, int resource_state, int depth) { dav_error *err; i...
false
false
false
false
false
0
SetExp(int skill, int exp) { forlist(this) { Skill *s = (Skill *) elem; if (s->type == skill) { s->exp = exp; return; } } if (exp == 0) return; Skill *s = new Skill; s->type = skill; s->days = 0; s->exp = exp; Add(s); }
false
false
false
false
false
0
stw481x_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct stw481x *stw481x; int ret; int i; stw481x = devm_kzalloc(&client->dev, sizeof(*stw481x), GFP_KERNEL); if (!stw481x) return -ENOMEM; i2c_set_clientdata(client, stw481x); stw481x->client = client; stw481x->map = devm_regma...
false
false
false
false
false
0
BuildingTypeBaseWidget( PG_Widget* parent, const PG_Point& pos, int width, const BuildingType* buildingType, const Player& player ) : SelectionWidget( parent, PG_Rect( pos.x, pos.y, width, getBuildingHeight(buildingType)+10 )), vt( buildingType ), actplayer(player) { new PG_Label( this, PG_Rect( buildingWidth, 20, ...
false
false
false
false
false
0
mp_alloc_internal(struct mempool *pool, unsigned size) { struct mempool_chunk *chunk; if (size <= pool->threshold) { pool->idx = 0; if (pool->unused) { chunk = pool->unused; pool->unused = chunk->next; } else chunk = mp_new_chunk(pool->chunk_size); chunk->next = pool->sta...
false
false
false
false
false
0
addLetter(EditBoard *eb, int loc) { SgfElem *search; int i; char letter[2]; for (search = eb->sgf->active; search && (search->type != sgfType_node); search = search->parent) { if ((search->type == sgfType_label) && (goBoard_sgf2Loc(eb->game->board, search->lVal) == loc)) { if (eb->sgf-...
true
true
false
false
false
1
virtualMemEffect(uint8_t buffer[][3], bool reset) { int i; if (reset) { for (i=0; i<NBR_LEDS; i++) { COPY_COLOR(buffer[i], part_black); } } for (i = 0; i < NBR_LEDS; i++) { uint8_t R5, G6, B5; uint8_t (*led)[2] = (uint8_t (*)[2])ledringmem; // Convert from RGB565 to RGB888 R5...
false
false
false
false
false
0
bgav_mxf_index_table_segment_dump(int indent, mxf_index_table_segment_t * idx) { int i; bgav_diprintf(indent, "Index table segment:\n"); bgav_diprintf(indent+2, "UID: "); dump_ul(idx->uid), bgav_diprintf(indent+2, "edit_rate: %d/%d", idx->edit_rate_num, idx->edit_rate_den)...
false
false
false
false
false
0
cciss_procinit(ctlr_info_t *h) { struct proc_dir_entry *pde; if (proc_cciss == NULL) proc_cciss = proc_mkdir("driver/cciss", NULL); if (!proc_cciss) return; pde = proc_create_data(h->devname, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH, proc_cciss, &cciss_proc_fops, h); }
false
false
false
false
false
0
cleanUnreachable() { #if (GNASH_GC_DEBUG > 1) log_debug("GC: sweep scan started"); #endif size_t deleted = 0; for (ResList::iterator i = _resList.begin(), e = _resList.end(); i != e;) { const GcResource* res = *i; if (!res->isReachable()) { #if GNASH_GC_DEBUG > 1 log_debug("G...
false
false
false
false
false
0
toLvalue(Scope *sc, Expression *ex) { Expression *e; if (e1->op == TOKvar) { /* Convert (e1 op= e2) to * e1 op= e2; * e1 */ e = e1->copy(); e = new CommaExp(loc, this, e); e = e->semantic(sc); } else { /* Convert (e1 op= e2)...
false
false
false
false
false
0
dobjects(float *smooth, int nx, int ny, float limit, float dpsf, int *objects) { u8* mask; int rtn; /* smooth by the point spread function */ //dsmooth2(image, nx, ny, dpsf, smooth); /* check how much noise is left after running a median filter and a point...
false
false
false
false
false
0
addPart(const string& baseUrl, const MD5& md, const vector<string>& value) { string url; if (findLabelColon(value.front()) != 0) url = value.front(); else uriJoin(&url, baseUrl, value.front()); //debug("addPart %1 -> %2", md.toString(), url); PartUrlMapping* p = new PartUr...
false
false
false
false
false
0
click_find_cb (GtkWidget * widget, gpointer data) { GSearchWindow * gsearch = data; gchar * command; if (gsearch->command_details->is_command_timeout_enabled == TRUE) { return; } if ((gsearch->command_details->command_status == STOPPED) || (gsearch->command_details->command_status == ABORTE...
false
false
false
false
false
0
unescape_html( const char *pnHtml ) { if ( pnHtml != NULL ) { const char *pnC = pnHtml; GString *psRet = g_string_new( "" ); while ( *pnC ) { if ( !strncmp( pnC, "<br>", 4 ) ) { psRet = g_string_append_c( psRet, '\n' ); pnC += 4; } else { psRet = g_string_append_c( psRet, *pnC ); pnC++; ...
false
false
false
false
false
0
SHPTreeNodeCreate( double * padfBoundsMin, double * padfBoundsMax ) { SHPTreeNode *psTreeNode; psTreeNode = (SHPTreeNode *) malloc(sizeof(SHPTreeNode)); if( NULL == psTreeNode ) return NULL; psTreeNode->nShapeCount = 0; psTreeNode->panShapeIds = NULL...
false
false
false
false
false
0
yylex (YYSTYPE* ace_yylval, ACE_Svc_Conf_Param* param) { #if defined (ACE_USES_WCHAR) bool look_for_bom = false; ACE_Encoding_Converter_Factory::Encoding_Hint hint = ACE_Encoding_Converter_Factory::ACE_NONE; #endif /* ACE_USES_WCHAR */ if (param->buffer == 0) { #if d...
false
false
false
false
false
0
long_float(PyObject *v) { double result; result = PyLong_AsDouble(v); if (result == -1.0 && PyErr_Occurred()) return NULL; return PyFloat_FromDouble(result); }
false
false
false
false
false
0
notebook_num_pages_changed (NautilusWindow *window) { NautilusView *view; NautilusWindowSlot *active_slot; active_slot = nautilus_window_get_active_slot (window); if (active_slot == NULL) { return; } view = nautilus_window_slot_get_current_view (active_slot); if (view == NULL) { return; } /* Only add a s...
false
false
false
false
false
0
lha_file_header_free(LHAFileHeader *header) { // Sanity check: if (header->_refcount == 0) { return; } // Count down references and only free when all have been removed. --header->_refcount; if (header->_refcount > 0) { return; } free(header->filename); free(header->path); free(header->symlink_target...
false
false
false
false
false
0
ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, unsigned int flags) { struct ext4_extent_header *neh; struct buffer_head *bh; ext4_fsblk_t newblock, goal = 0; struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es; int err = 0; /* Try to prepend new index to old one */ if (ext_depth(inode)) ...
false
false
false
false
false
0
pvr_altera_load(struct bttv *btv, const u8 *micro, u32 microlen) { u32 n; u8 bits; int i; gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG); gpio_write(0); udelay(PVR_GPIO_DELAY); gpio_write(BTTV_ALT_NCONFIG); udelay(PVR_GPIO_DELAY); for (n = 0; n < microlen; n++) { bits = micro[n]; for ...
false
false
false
false
false
0
loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer) { bool ret = false; io::IReadFile* read = FileSystem->createAndOpenFile(filename); if (!read) { os::Printer::log("Unable to open scene file", filename, ELL_ERROR); } else { ret = loadScene(read, userDataSerializer); ...
false
false
false
false
false
0
glade_gtk_image_menu_item_parse_finished (GladeProject *project, GladeWidget *widget) { GladeWidget *gimage; GtkWidget *image = NULL; glade_widget_property_get (widget, "image", &image); if (image && (gimage = glade_widget_get_from_gobject (image))) glade_widget_lock (widget, gimage); }
false
false
false
false
false
0
AdjustSlotRefs(std::vector<bool> & vfOmit, std::vector<int> & vnNewIndices, GdlRule * prule) { if (m_pexpConstraint) return m_pexpConstraint->AdjustSlotRefs(vfOmit, vnNewIndices, prule); else return true; }
false
false
false
false
false
0
hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid) { struct hdmi_spec *spec = codec->spec; struct hdmi_spec_per_cvt *per_cvt; unsigned int chans; int err; chans = get_wcaps(codec, cvt_nid); chans = get_wcaps_channels(chans); per_cvt = snd_array_new(&spec->cvts); if (!per_cvt) return -ENOMEM; per_cvt...
false
false
false
false
false
0
Synthesize (el_sample_t **bufs, el_nframes_t len) { if (bufs == 0) return 0; // Zero buffer! if (combirateshift != 1.0) { // Timestretch + Rateshift (TS+RT) // DEBUGPRINT("tempbuf_pos: %.5lf\n",tempbuf_pos); // Check if intermediate buffers are big enough // Endpos is the end position // ...
false
false
false
false
false
0
sge_is_start_user_superuser(void) { bool is_root = false; uid_t start_uid; DENTER(UIDGID_LAYER, "sge_is_start_user_superuser"); start_uid = getuid(); is_root = (start_uid == SGE_SUPERUSER_UID)?true:false; DEXIT; return is_root; }
false
false
false
false
false
0
getDiscontiguous(const UCollator *coll, collIterate *source, const UChar *constart) { /* source->pos currently points to the second combining character after the start character */ UChar *temppos = source->pos; UChar buffer[4*UCOL_MAX_BUFFER]; ...
false
false
false
false
false
0
InndHisOpen(void) { char *histpath; int flags; size_t synccount; histpath = concatpath(innconf->pathdb, INN_PATH_HISTORY); if (innconf->hismethod == NULL) { sysdie("hismethod is not defined"); /*NOTREACHED*/ } flags = HIS_RDWR | (INND_DBZINCORE ? HIS_MMAP : HIS_ONDISK); History = HIS...
false
false
false
false
false
0
copy_restrictions_list (GList *list) { GList *dup = NULL; GList *iter; for (iter = list; iter != NULL; iter = iter->next) { GUPnPDLNARestriction *restriction = GUPNP_DLNA_RESTRICTION (iter->data); GUPnPDLNARestriction *copy...
false
false
false
false
false
0
gcf(gdouble *gammcf, gdouble a, gdouble x, gdouble *gln) { gint n; gdouble gold=0.0,g,fac=1.0,b1=1.0; gdouble b0=0.0,anf,ana,an,a1,a0=1.0; *gln=gammln(a); a1=x; for (n=1 ; n<=ITMAX ; n++) { an = (gdouble) n; ana = an-a; a0 = (a1+a0*ana)*fac; b0 = (b1+b0*ana)*fac; anf = an*fac; a1 = x*a0+anf*a1; b1 = x*...
false
false
false
false
false
0
sinfo_new_cube_getvig( cpl_imagelist * cube_in, int loleft_x, int loleft_y, int upright_x, int upright_y) { cpl_imagelist * cube_out ; int i ; int outlx, ...
false
false
false
false
false
0
x264_otoi( char *str, int def ) { int ret = def; if( str ) { char *end; ret = strtol( str, &end, 0 ); if( end == str || *end != '\0' ) ret = def; } return ret; }
false
false
false
false
false
0
ah_find_elm(HASH *ahd, void *celem) { void *pfirst; /* ptr first element found */ void *p; /* favourite pointer */ int i; /* favourite index */ pfirst = ah_find(ahd, *((int4 *) celem)); if ((pfirst == 0) || (ahd->ah_cmp == 0) || ((*(ahd->ah_cmp))(pfirst, celem) == 0)) { return(pfirst); } /* * The ele...
false
false
false
false
false
0
initenv(void) { #if !defined(_WIN32) struct passwd *ent; /* our password entry */ #endif char *c; /* determine the $CALCPATH value */ c = (no_env ? NULL : getenv(CALCPATH)); calcpath = (c ? strdup(c) : NULL); if (calcpath == NULL) calcpath = DEFAULTCALCPATH; /* determine the $CALCRC value */ c = (no_env ? ...
false
false
false
false
false
0
expander_activated_cb (GtkExpander *w, NautilusFileConflictDialog *dialog) { NautilusFileConflictDialogDetails *details; int start_pos, end_pos; details = dialog->details; if (!gtk_expander_get_expanded (w)) { if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (details->entry)), details->conflict_n...
false
false
false
false
false
0
_dxf_BUFFER_RESTORE_CONFIG (void *ctx, int OrigDisplayMode, int OrigBufferMode, tdmInteractorRedrawMode redrawMode) { /* * Restore frame buffer configuration. */ ENTRY(("_dxf_BUFFER_RESTORE_CONFIG (0x%x, %d, %d, %d)", ctx, OrigDisplayMode, OrigBufferMode, redrawMode)); if (redrawMode == ...
false
false
false
false
false
0
get_stencil_miptree(struct intel_renderbuffer *irb) { if (!irb) return NULL; if (irb->mt->stencil_mt) return irb->mt->stencil_mt; return irb->mt; }
false
false
false
false
false
0
message_append_one(DBusMessageIter *iter, value v) { CAMLparam1(v); int c_type; c_type = __type_table[Tag_val(v)]; DEBUG_APPEND("one: %c (%d)\n", c_type, c_type); v = Field(v, 0); /* after this point v represent the contents of the ocaml variant type */ if (IS_BASIC(c_type)) { message_append_basic(iter, c_type...
false
false
false
false
false
0
decrease_timeouts(void) { int adjust = (adj_con_fix[p_ptr->state.stat_ind[A_CON]] + 1); int i; /* Decrement all effects that can be done simply */ for (i = 0; i < TMD_MAX; i++) { int decr = 1; if (!p_ptr->timed[i]) continue; switch (i) { case TMD_CUT: { /* Hack -- check for truly "mortal" wo...
false
false
false
false
false
0
checkIntSuffix(const UnicodeString& text, int32_t start, int32_t patLoc, UBool isNegative) const { // local variables UnicodeString suf; int32_t patternMatch; int32_t textPreMatch; int32_t textPostMatch; // check that we are still in range if ( (start > text...
false
false
false
false
false
0
ensure_user_config_dir (void) { const gchar *config_dir; gboolean ret = TRUE; gint res; config_dir = gedit_dirs_get_user_config_dir (); if (config_dir == NULL) { g_warning ("Could not get config directory\n"); return FALSE; } res = g_mkdir_with_parents (config_dir, 0755); if (res < 0) { g_warning ("Co...
false
false
false
false
false
0
is_blank_string(const char *s) { while (*s) if (!isspace((unsigned char)*s)) return 0; return 1; }
false
false
false
false
false
0
cm3232_reg_init(struct cm3232_chip *chip) { struct i2c_client *client = chip->client; s32 ret; chip->als_info = &cm3232_als_info_default; /* Identify device */ ret = i2c_smbus_read_word_data(client, CM3232_REG_ADDR_ID); if (ret < 0) { dev_err(&chip->client->dev, "Error reading addr_id\n"); return ret; } ...
false
false
false
false
false
0
GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { case GOSSIP_ACTION_INFO_DEF+1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); ...
false
false
false
false
false
0
native_disable_io_apic(void) { /* * If the i8259 is routed through an IOAPIC * Put that IOAPIC in virtual wire mode * so legacy interrupts can be delivered. */ if (ioapic_i8259.pin != -1) { struct IO_APIC_route_entry entry; memset(&entry, 0, sizeof(entry)); entry.mask = IOAPIC_UNMASKED; entry.trigge...
false
false
false
false
false
0
impl_secret_agent_get_secrets (NMSecretAgent *self, GHashTable *connection_hash, const char *connection_path, const char *setting_name, const char **hints, guint32 f...
false
false
false
false
false
0
xsh_correl_spectra(double* flux_s, double* flux_m, const int size, const int hsearch, const double wlogstp,const int norm_xcorr, const double range, const int ext,XSH_GAUSSIAN_FIT* gfit) { double* xcorr = NULL; double* pwcorr = NULL; double corr = 0; double delta=0; char fname[256]; ...
true
true
false
false
false
1
ms_tburst(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { struct Channel *chptr = NULL; int accept_remote = 0; time_t remote_channel_ts = atol(parv[1]); time_t remote_topic_ts = atol(parv[3]); const char *topic = ""; const char *setby = ""; /* * Do NOT test parv[5...
false
false
false
false
false
0
clariion_set_params(struct scsi_device *sdev, const char *params) { struct clariion_dh_data *csdev = sdev->handler_data; unsigned int hr = 0, st = 0, argc; const char *p = params; int result = SCSI_DH_OK; if ((sscanf(params, "%u", &argc) != 1) || (argc != 2)) return -EINVAL; while (*p++) ; if ((sscanf(p, "...
false
false
false
false
false
0
smsc2_add_smsc(Octstr *id) { CfgGroup *grp; SMSCConn *conn; Octstr *smscid = NULL; long i; int success = 0; if (!smsc_running) return -1; gw_rwlock_wrlock(&smsc_list_lock); if (bb_reload_smsc_groups() != 0) { gw_rwlock_unlock(&smsc_list_lock); return -1; } ...
false
false
false
false
false
0
gerbv_image_delete_net (gerbv_net_t *currentNet) { gerbv_net_t *tempNet; g_assert (currentNet); /* we have a match, so just zero out all the important data fields */ currentNet->aperture = 0; currentNet->aperture_state = GERBV_APERTURE_STATE_OFF; /* if this is a polygon start, we need to erase all the rest of...
false
false
false
false
false
0
Clipped_Print (Clipped clipped, struct prt_info *p) { Object render, clipping; if(!p->recurse || p->level >= p->maxlevel) return; DXGetClippedInfo((Clipped) clipped, &render, &clipping); INDENT(p->level); DXMessage("Object being clipped: "); p->level++; Object_Print(render, p); p->l...
false
false
false
false
false
0
uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) { char buf[1024]; ngx_queue_t* q; uv_async_t* h; ssize_t r; while (1) { r = read(loop->async_pipefd[0], buf, sizeof(buf)); if (r == sizeof(buf)) continue; if (r != -1) break; if (errno == EAGAIN || errno == EWOULDB...
false
false
false
false
false
0
qlcnic_sriov_handle_msg_event(struct qlcnic_sriov *sriov, struct qlcnic_vf_info *vf) { struct qlcnic_bc_hdr hdr; u32 *ptr = (u32 *)&hdr; u8 msg_type, i; for (i = 2; i < 6; i++) ptr[i - 2] = readl(QLCNIC_MBX_FW(vf->adapter->ahw, i)); msg_type = hdr.msg_type; switch (msg_type) { case QLC_BC_COMMAND: q...
false
false
false
false
false
0
ReadFromFile(FILE *fpSrc, int nOffset, int nSize /*= 512*/) { GByte *pabyBuf; if (fpSrc == NULL || nSize == 0) { CPLError(CE_Failure, CPLE_AssertionFailed, "TABRawBinBlock::ReadFromFile(): Assertion Failed!"); return -1; } m_f...
false
false
false
false
false
0
mailstream_low_write(mailstream_low * s, const void * buf, size_t count) { ssize_t r; if (s == NULL) return -1; #ifdef STREAM_DEBUG STREAM_LOG(s, 1, ">>>>>>> send >>>>>>\n"); if (s->privacy) { STREAM_LOG_BUF(s, 1, buf, count); } else { STREAM_LOG_BUF(s, 2, buf, count); } STREAM_LOG(s...
false
false
false
false
false
0
currentMode() { LASSERT(!empty(), /**/); for (int i = depth() - 1; i >= 0; --i) { int res = operator[](i).inset().currentMode(); bool locked_mode = operator[](i).inset().lockedMode(); // Also return UNDECIDED_MODE when the mode is locked, // as in this case it is treated the same as TEXT_MODE if (res != Ins...
false
false
false
false
false
0
dump_all_value_ranges (FILE *file) { size_t i; for (i = 0; i < num_vr_values; i++) { if (vr_value[i]) { print_generic_expr (file, ssa_name (i), 0); fprintf (file, ": "); dump_value_range (file, vr_value[i]); fprintf (file, "\n"); } } fprintf (file, "\n"); }
false
false
false
false
false
0
P_ChangeSwitchTexture(line_t * line, int useAgain) { int texTop; int texMid; int texBot; int i; texTop = sides[line->sidenum[0]].toptexture; texMid = sides[line->sidenum[0]].midtexture; texBot = sides[line->sidenum[0]].bottomtexture; for (i = 0; i < numswitches * 2; i++) { ...
false
false
false
false
false
0
dw_mci_dto_timer(unsigned long arg) { struct dw_mci *host = (struct dw_mci *)arg; switch (host->state) { case STATE_SENDING_DATA: case STATE_DATA_BUSY: /* * If DTO interrupt does NOT come in sending data state, * we should notify the driver to terminate current transfer * and report a data timeout to th...
false
false
false
false
false
0
vhci_release(struct inode *inode, struct file *file) { struct vhci_data *data = file->private_data; struct hci_dev *hdev; cancel_delayed_work_sync(&data->open_timeout); hdev = data->hdev; if (hdev) { hci_unregister_dev(hdev); hci_free_dev(hdev); } skb_queue_purge(&data->readq); file->private_data = NULL...
false
false
false
false
false
0
btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info) { struct inode_defrag *defrag; struct rb_node *node; spin_lock(&fs_info->defrag_inodes_lock); node = rb_first(&fs_info->defrag_inodes); while (node) { rb_erase(node, &fs_info->defrag_inodes); defrag = rb_entry(node, struct inode_defrag, rb_node); km...
false
false
false
false
false
0
usr_cache_hash_fn (const void *key) { UserCacheObj *usrObj = (UserCacheObj *)key; if (usrObj->derCert) return usr_cache_hash_cert(usrObj->derCert); else return PR_HashCaseString(usrObj->uid); }
false
false
false
false
false
0
styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *data) const { switch (hint) { case SH_Menu_SpaceActivatesItem: case SH_TitleBar_NoBorder: return 1; case SH_ScrollBa...
false
false
false
false
false
0
preset_parse_version (const gchar * str_version) { guint major, minor, micro, nano; gint num; major = minor = micro = nano = 0; /* parse version (e.g. 0.10.15.1) to guint64 */ num = sscanf (str_version, "%u.%u.%u.%u", &major, &minor, &micro, &nano); /* make sure we have atleast "major.minor" */ if (num ...
false
false
false
false
false
0
SEC_PKCS12DecoderVerify(SEC_PKCS12DecoderContext *p12dcx) { SECStatus rv = SECSuccess; /* make sure that no errors have occurred... */ if(!p12dcx) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; } if(p12dcx->error) { /* error code is already set! PORT_SetError(p12dcx->errorValue); */...
false
false
false
false
false
0
totem_sidebar_is_focused (Totem *totem, gboolean *handles_kbd) { GtkWidget *focused, *sidebar_button; if (handles_kbd != NULL) *handles_kbd = has_popup (); focused = gtk_window_get_focus (GTK_WINDOW (totem->win)); if (focused == NULL) return FALSE; if (gtk_widget_is_ancestor (focused, GTK_WIDGET (totem->side...
false
false
false
false
false
0
initParameters_(void) { m_parameterNames.clear(); m_parameter.clear(); unsigned int count=getNumParameters_(); unsigned int i; m_parameterNames.push_back(""); // dummy parameter for(i=0; i<count; i++) { std::string name=getParameterName_(i); FFUInt32 type = getParameterType_ (i)...
false
false
false
false
false
0
verifyMemory () { git_uint32 checksum = 0; git_uint32 n; for (n = 0 ; n < gExtStart ; n += 4) checksum += read32 (gRom + n); checksum -= read32 (gRom + 32); return (checksum == read32 (gRom + 32)) ? 0 : 1; }
false
false
false
false
false
0
x86_64_virt_phys_base(void) { char buf[BUFSIZE]; struct syment *sp; ulong phys, linux_banner_phys; if (!(sp = symbol_search("linux_banner")) || !((sp->type == 'R') || (sp->type == 'r'))) return FALSE; linux_banner_phys = sp->value - __START_KERNEL_map; if (readmem(linux_banner_phys + machdep->machspec->...
true
true
false
false
false
1
TRANS_tree(bool check_statement, TRANS_TREE **result, int *count) { #ifdef DEBUG int i; #endif tree_length = 0; current = JOB->current; TRY { analyze_expr(0, RS_NONE); JOB->current = current; } CATCH { JOB->current = current; PROPAGATE(); } END_TRY #ifdef DEBUG printf("\n"); for (i = 0; i <...
false
true
false
false
false
1
defer_kevent(struct eth_dev *dev, int flag) { if (test_and_set_bit(flag, &dev->todo)) return; if (!schedule_work(&dev->work)) ERROR(dev, "kevent %d may have been dropped\n", flag); else DBG(dev, "kevent %d scheduled\n", flag); }
false
false
false
false
false
0
__load_block_bitmap(struct super_block *sb, struct udf_bitmap *bitmap, unsigned int block_group) { int retval = 0; int nr_groups = bitmap->s_nr_groups; if (block_group >= nr_groups) { udf_debug("block_group (%d) > nr_groups (%d)\n", block_group, nr_groups); } if (bitmap->s_block_bitmap...
false
false
false
false
false
0
var_list_onin_object (sc_gameref_t game, sc_int associate) { const sc_var_setref_t vars = gs_get_vars (game); sc_int object, count, trail; sc_bool supporting; /* List out the objects standing on this object. */ count = 0; trail = -1; supporting = FALSE; for (object = 0; object < gs_object_count (game);...
false
false
false
false
false
0
PrintHelp( KEY *key, TBOOLEAN *subtopics) /* (in) - subtopics only? */ /* (out) - are there subtopics? */ { LINEBUF *t; StartOutput(); if (subtopics == NULL || !*subtopics) { for (t = key->text; t != NULL; t = t->next) OutLine(t->line); /* print text line */ } ShowSubtopics(key, ...
false
false
false
false
false
0
ftrace_match(char *str, struct ftrace_glob *g) { int matched = 0; int slen; switch (g->type) { case MATCH_FULL: if (strcmp(str, g->search) == 0) matched = 1; break; case MATCH_FRONT_ONLY: if (strncmp(str, g->search, g->len) == 0) matched = 1; break; case MATCH_MIDDLE_ONLY: if (strstr(str, g->sear...
false
false
false
false
false
0
SST_GetFrequencyRange(SST_Stats inst, double *lo, double *hi) { double freq, skew; freq = inst->estimated_frequency; skew = inst->skew; *lo = freq - skew; *hi = freq + skew; /* This function is currently used only to determine the values of delta and epsilon in the ntp_core modul...
false
false
false
false
false
0
bgav_mxf_partition_dump(int indent, mxf_partition_t * ret) { int i; bgav_diprintf(indent, "Partition\n"); bgav_diprintf(indent+2, "major_version: %d\n", ret->major_version); bgav_diprintf(indent+2, "minor_version: %d\n", ret->minor_version); bgav_diprintf(indent+2, "kag_size: %d\n", r...
false
false
false
false
false
0
Vect_open_update_head(struct Map_info *Map, const char *name, const char *mapset) { int ret; ret = Vect__open_old(Map, name, mapset, 1, 1); if (ret > 0) { /* Probably not important */ Map->plus.do_uplist = 1; Map->plus.uplines = NULL; Map->plus.n_uplines = 0; Map->plus.alloc_uplines = 0; Ma...
false
false
false
false
false
0
cisco_pix_parse_date(char *input, unsigned char mode) { int retval, day, hour, minute, second; char smonth[4]; #ifdef IRIX char tmp[SHOSTLEN]; #endif #ifdef LOGDOTS char *remove_dot; #endif if (mode == CP_OPT_HOST) { retval = sscanf(input, "%3s %2d %2d:%2d:%2d %32s", smonth, &day, &hour, &minute, &second...
true
true
false
false
true
1