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
_PyLong_AsMode_t(PyObject *op) { unsigned long value; mode_t mode; value = PyLong_AsUnsignedLong(op); if ((value == (unsigned long)-1) && PyErr_Occurred()) return (mode_t)-1; mode = (mode_t)value; if ((unsigned long)mode != value) { PyErr_SetString(PyExc_OverflowError, "mode ou...
false
false
false
false
false
0
cmdAcceptRejectRevision(bool bReject, UT_sint32 xPos, UT_sint32 yPos) { UT_DEBUGMSG(( "FV_View::cmdAcceptRejectRevision [bReject=%d]\n",bReject )); PT_DocPosition iStart, iEnd; fl_BlockLayout * pBlock = NULL; fp_Run *pRun = NULL; // Signal PieceTable Change _saveAndNotifyPieceTableChange(); if(isSelectionEmpt...
false
false
false
false
false
0
GMT_shore_desc_sort (const void *a, const void *b) { if (((struct GSHHS_SIDE *)a)->pos < ((struct GSHHS_SIDE *)b)->pos) return (1); if (((struct GSHHS_SIDE *)a)->pos > ((struct GSHHS_SIDE *)b)->pos) return (-1); return (0); }
false
false
false
false
false
0
channel_complete_callback(int chan) { Mix_Chunk *done_chunk = Mix_GetChunk(chan); Uint8 *chunkbuf=NULL; //We need to free these chunks as they were allocated by us and not SDL_Mixer //This happens when Mix_QuickLoadRAW is used. if(done_chunk->allocated == 0) chunkbuf = done_chunk->abuf; Mix_FreeChunk(done_c...
false
false
false
false
false
0
strio_extend(struct StringIO *ptr, long pos, long len) { long olen; check_modifiable(ptr); olen = RSTRING_LEN(ptr->string); if (pos + len > olen) { rb_str_resize(ptr->string, pos + len); if (pos > olen) MEMZERO(RSTRING_PTR(ptr->string) + olen, char, pos - olen); } else { rb_str_modify(p...
false
false
false
false
false
0
mouse_to_axis(int mouse_coord, axis_scale_t *axis) { double axis_coord; if (axis->term_scale == 0.0) return 0.; axis_coord = ((double)(mouse_coord - axis->term_lower)) / axis->term_scale + axis->min; if (axis->logbase > 0.0) axis_coord = exp(axis_coord * axis->logbase); return axis_coord; }
false
false
false
false
false
0
PCXWritePixels(PCXInfo *pcx_info, const unsigned char *pixels,Image *image) { register const unsigned char *q; register ssize_t i, x; ssize_t count; unsigned char packet, previous; q=pixels; for (i=0; i < (ssize_t) pcx_info->planes; i++) { if (pcx_info->encoding == 0) ...
false
false
false
false
false
0
init(const char *buf, const char *buf_end, bool use_new_format) { cached_new_format = use_new_format; if (use_new_format) { empty_flags=0; /* The code below assumes that buf will not disappear from under our feet during the lifetime of the event. This assumption ...
false
false
false
false
false
0
blkid_probe_use_wiper(blkid_probe pr, blkid_loff_t off, blkid_loff_t size) { struct blkid_chain *chn = NULL; if (blkid_probe_is_wiped(pr, &chn, off, size) && chn) { DBG(DEBUG_LOWPROBE, printf("wiped area detected -- ignore previous results\n")); blkid_probe_set_wiper(pr, 0, 0); blkid_probe_chain_reset_vals(pr,...
false
false
false
false
false
0
determine_set_costs (struct ivopts_data *data) { unsigned j, n; gimple phi; gimple_stmt_iterator psi; tree op; struct loop *loop = data->current_loop; bitmap_iterator bi; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "Global costs:\n"); fprintf (dump_file, " target_a...
false
false
false
false
false
0
unplug_port(struct port *port) { spin_lock_irq(&port->portdev->ports_lock); list_del(&port->list); spin_unlock_irq(&port->portdev->ports_lock); spin_lock_irq(&port->inbuf_lock); if (port->guest_connected) { /* Let the app know the port is going down. */ send_sigio_to_port(port); /* Do this after sigio is a...
false
false
false
false
false
0
init_suffix_index(struct outline_file *file) { if (!file->suf_index) { size_t i; file->suf_index = calloc(file->count, sizeof(file->suf_index[0])); if (!file->suf_index) return 1; for (i = 0; i < file->count; i++) { char *p = malloc(file->index[i].length + 1); if (!p) { while (i-- >= 0) ...
false
false
false
false
false
0
_comedi_perror(const char *s) { if(__comedi_loglevel>=3){ fprintf(stderr,"comedi_perror(): __comedi_errno=%d\n",__comedi_errno); } if(!s)s="comedilib"; fprintf(stderr,"%s: %s\n",s,comedi_strerror(__comedi_errno)); }
false
false
false
false
false
0
fs_queue_push_head_link(fs_queue *queue, fs_list *link) { if (queue == NULL || link == NULL) { return; } if (link->prev != NULL || link->next != NULL) { return; } link->next = queue->head; if (queue->head) queue->head->prev = link; else queue->tail = link; ...
false
false
false
false
false
0
free_priv_struct (gpointer ptr) { CertificateViewerPriv *priv = ptr; GSList *iter; if (!priv) return; if (priv->cert) CERT_DestroyCertificate (priv->cert); for (iter = priv->issuers; iter; iter = iter->next) { CERTCertificate *cert = iter->data; if (cert) CERT_DestroyCertificate (cert); } g_slist...
false
false
false
false
false
0
plugingui_load_cb (session *sess, char *file) { if (file) { char *buf = malloc (strlen (file) + 9); if (strchr (file, ' ')) sprintf (buf, "LOAD \"%s\"", file); else sprintf (buf, "LOAD %s", file); handle_command (sess, buf, FALSE); free (buf); } }
false
true
false
false
false
1
cpu_write_misc( nes_addr_t addr, int data ) { #if !NSF_EMU_APU_ONLY { if ( namco ) { switch ( addr ) { case Nes_Namco_Apu::data_reg_addr: namco->write_data( time(), data ); return; case Nes_Namco_Apu::addr_reg_addr: namco->write_addr( data ); return; } } if ( addr >= Nes_Fme7_...
false
false
false
false
false
0
AttackStart(Unit* pWho) override { if (m_creature->Attack(pWho, false)) { m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); // Only range attack - ToDo: research the distance m_creature->Get...
false
false
false
false
false
0
findlast (GCObject **p) { while (*p != NULL) p = &(*p)->next; return p; }
false
false
false
false
false
0
euclid (int n, double** data1, double** data2, int** mask1, int** mask2, const double weight[], int index1, int index2, int transpose) /* Purpose ======= The euclid routine calculates the weighted Euclidean distance between two rows or columns in a matrix. Arguments ========= n (input) int The number of ele...
false
false
false
false
false
0
id3v2_frame_init (GstId3v2Frame * frame, const gchar * frame_id, guint16 flags) { g_assert (strlen (frame_id) == 4); /* we only handle 2.3.0/2.4.0 */ memcpy (frame->id, frame_id, 4 + 1); frame->flags = flags; frame->len = 0; frame->writer = gst_byte_writer_new (64); id3v2_frame_write_bytes (frame, (const...
false
true
false
false
false
1
_font_sizes_list_load(Evas_Object *size_list) { Elm_Font_Size_Data *size_data; Eina_List *l; Evas *evas; evas = evas_object_evas_get(size_list); evas_event_freeze(evas); edje_freeze(); EINA_LIST_FOREACH(fndata.font_scale_list, l, size_data) elm_list_item_append(size_list, size_data->size_str...
false
false
false
false
false
0
create_insertchar_window(AW_root *root, AW_default def) { AWUSE(root); AWUSE(def); static AW_window_simple *aws = 0; if (aws) return aws; aws = new AW_window_simple; aws->init( root, "INSERT_COLOUM", "INSERT CHAR"); aws->load_xfig("inschar.fig"); aws->button_length(8); aws->callb...
false
false
false
false
false
0
tda9874a_getrxsubchans(struct CHIPSTATE *chip) { struct v4l2_subdev *sd = &chip->sd; int dsr,nsr,mode; int necr; /* just for debugging */ mode = V4L2_TUNER_SUB_MONO; if(-1 == (dsr = chip_read2(chip,TDA9874A_DSR))) return mode; if(-1 == (nsr = chip_read2(chip,TDA9874A_NSR))) return mode; if(-1 == (necr = ch...
false
false
false
false
false
0
IRasterIO( GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, void *pData, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nBandCount, int *panBandMap, ...
false
false
false
false
false
0
cfg_layout_duplicate_bb (bb, e) basic_block bb; edge e; { rtx insn; edge s, n; basic_block new_bb; gcov_type new_count = e ? e->count : 0; if (bb->count < new_count) new_count = bb->count; if (!bb->pred) abort (); #ifdef ENABLE_CHECKING if (!cfg_layout_can_duplicate_bb_p (bb)) abort...
false
false
false
false
false
0
callback_retr_headers(struct PCP_retr *r, const char *h, const char *v, void *vp) { struct retrinfo *ri=(struct retrinfo *)vp; int lastchar; if (!ri->text_flag) { ri->text_flag=1; printf("107 %s follows\n", r->event_id); } if (*h == '.') putchar('.'); printf("%s: ", h); while (*v && issp...
false
false
false
false
false
0
fizmo_free_blorb_map(z_blorb_map *blorb_map) { int i = 0; fizmo_blorb_map *map; fizmo_blorb *blorb; if (blorb_map == NULL) return -1; map = (fizmo_blorb_map*)blorb_map->blorb_map_implementation; blorb = map->blorbs[i++]; while (blorb != NULL) { free(blorb); blorb = map->blorbs[i++]; } ...
false
false
false
false
false
0
ch_util_get_calibration_map (ChUtilPrivate *priv, gchar **values, GError **error) { gboolean ret; guint16 calibration_map[6]; guint i; /* get from HW */ ch_device_queue_get_calibration_map (priv->device_queue, priv->device, calibration_map); ret = ch_device_queue_process (priv...
false
false
false
false
false
0
gf100_vm_map_sg(struct nvkm_vma *vma, struct nvkm_memory *pgt, struct nvkm_mem *mem, u32 pte, u32 cnt, dma_addr_t *list) { u32 target = (vma->access & NV_MEM_ACCESS_NOSNOOP) ? 7 : 5; /* compressed storage types are invalid for system memory */ u32 memtype = gf100_pte_storage_type_map[mem->memtype & 0xff]; nvkm_k...
false
false
false
false
false
0
ya_calc_need_lm_size_module(LoopDat *lpdat, Alg_set *alg_set, IntSet all, IntSet add_set, int *mktmpsize, const int level, const int mnum, Boolean consider_fd, List **local_node) { if(localize_with_pa) { ya_calc_need_lm_size_memory_access_region_tables(lpdat,alg_set, all,add_set, mktmpsize, le...
false
false
false
false
false
0
unstack(char c) { int pl=c?priority(c):255; while(stack>b_stack && stack[-1]!='(' && priocmp(pl)) { if(stack[-1]!=','&&stack[-1]!='v') outo(stack[-1]); stack--; } }
false
false
false
false
true
1
worker_attach_to_pool(struct worker *worker, struct worker_pool *pool) { mutex_lock(&pool->attach_mutex); /* * set_cpus_allowed_ptr() will fail if the cpumask doesn't have any * online CPUs. It'll be re-applied when any of the CPUs come up. */ set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask); ...
false
false
false
false
false
0
ProbeCache(Code::Flags flags) { Object* probe = GetProbeValue(flags); if (probe != Heap::undefined_value()) return probe; // Seed the cache with an undefined value to make sure that any // generated code object can always be inserted into the cache // without causing allocation failures. Object* result; ...
false
false
false
false
false
0
panel_instance_init (Panel * self) { IBusEngineDesc** _tmp0_ = NULL; GHashFunc _tmp1_ = NULL; GEqualFunc _tmp2_ = NULL; GHashTable* _tmp3_ = NULL; gchar* _tmp4_ = NULL; gchar** _tmp5_ = NULL; gchar** _tmp6_ = NULL; self->priv = PANEL_GET_PRIVATE (self); self->priv->m_settings_general = NULL; self->priv->m_set...
false
false
false
false
false
0
NCcreate(int fd, bool MustAuthorize, bool IsLocal) { CHANNEL *cp; int i; /* Create the channel. */ cp = CHANcreate(fd, CTnntp, CSgetcmd, NCreader, NCwritedone); cp->IsAuthenticated = !MustAuthorize; cp->HasSentUsername = false; NCclearwip(cp); cp->privileged = IsLocal; #if defined(...
false
false
false
false
false
0
ParseLocalName(State *state) { State copy = *state; if (ParseChar(state, 'Z') && ParseEncoding(state) && ParseChar(state, 'E') && MaybeAppend(state, "::") && ParseName(state) && Optional(ParseDiscriminator(state))) { return true; } *state = copy; if (ParseChar(state, 'Z') && ParseEncoding(sta...
false
false
false
false
false
0
inflate_buffer(void *in, size_t inlen, void *out, size_t outlen) { z_stream zs; int status = Z_OK; memset(&zs, 0x0, sizeof(zs)); zs.next_out = out; zs.avail_out = (uInt)outlen; zs.next_in = in; zs.avail_in = (uInt)inlen; if (inflateInit(&zs) < Z_OK) { giterr_set(GITERR_ZLIB, "Failed to inflate buffer"); ...
false
false
false
false
false
0
install_scheme_clicked (GtkButton *button, GeditPreferencesDialog *dlg) { GtkWidget *chooser; GtkFileFilter *filter; if (dlg->priv->install_scheme_file_schooser != NULL) { gtk_window_present (GTK_WINDOW (dlg->priv->install_scheme_file_schooser)); gtk_widget_grab_focus (dlg->priv->install_...
false
false
false
false
false
0
gnl_composition_dispose (GObject * object) { GnlComposition *comp = GNL_COMPOSITION (object); if (comp->priv->dispose_has_run) return; comp->priv->dispose_has_run = TRUE; comp->priv->can_update = TRUE; comp->priv->update_required = FALSE; if (comp->priv->ghostpad) { gnl_object_remove_ghost_pad (...
false
false
false
false
false
0
Resize(vtkIdType newSize) { vtkIdType size = Vector.size(); if( size <= newSize ) { Vector.resize(newSize); int index = static_cast<int>(log(static_cast<double>(newSize))/log(2.)); this->Modulo = PRIME_NUMBERS[index]; cout << "this->Modulo:" << index << ":" << this->Modulo << endl; } // ...
false
false
false
false
false
0
StopConnectionMonitor(Session* session) { VoiceChannel* voice_channel = GetVoiceChannel(session); if (voice_channel) { voice_channel->StopConnectionMonitor(); voice_channel->SignalConnectionMonitor.disconnect(this); } VideoChannel* video_channel = GetVideoChannel(session); if (video_channel) { vi...
false
false
false
false
false
0
open_accepting_local_sockets( int self_addresses_count, struct in_addr *self_addresses, int port, struct accepting_sockets *accepting) { int i; GFARM_MALLOC_ARRAY(accepting->local_socks, self_addresses_count); if (accepting->local_socks == NULL) accepting_fatal(GFARM_MSG_1000581, "not enough memory for UN...
false
false
false
false
false
0
tg3_phy_copper_begin(struct tg3 *tp) { if (tp->link_config.autoneg == AUTONEG_ENABLE || (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) { u32 adv, fc; if ((tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) && !(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN)) { adv = ADVERTISED_10baseT_Half | ADVERTISED_1...
false
false
false
false
false
0
constrain_by_groups(const struct cdok_puzzle *puz, const uint8_t *values, cdok_set_t *candidates) { int i; for (i = 0; i < CDOK_GROUPS; i++) { const struct cdok_group *g = &puz->groups[i]; if (g->size) { cdok_set_t c = group_candidates(g, values, puz->size); int j; for (j = 0; j < g->size; j++...
false
false
false
false
false
0
SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { UInt32 i; if (size < 4) return 0; size -= 4; for (i = 0; i <= size; i += 4) { if ((data[i] == 0x40 && (data[i + 1] & 0xC0) == 0x00) || (data[i] == 0x7F && (data[i + 1] & 0xC0) == 0xC0)) { UInt32 src = ((UInt32)d...
false
false
false
false
false
0
isl1208_rtc_toggle_alarm(struct i2c_client *client, int enable) { int icr = i2c_smbus_read_byte_data(client, ISL1208_REG_INT); if (icr < 0) { dev_err(&client->dev, "%s: reading INT failed\n", __func__); return icr; } if (enable) icr |= ISL1208_REG_INT_ALME | ISL1208_REG_INT_IM; else icr &= ~(ISL1208_REG_...
false
false
false
false
false
0
SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex) { wxString strDocumentText = wxEmptyString; wxString strDocumentText2 = wxEmptyString; float fDocumentFloat = 0.0; float fDocumentPercent = 0.0; CProject* project; bool dirty = false; if (GetProjectCa...
false
false
false
false
false
0
vlvSearch_findindexname(const struct vlvSearch* plist, const char *name) { const struct vlvSearch* t= plist; if (NULL == name) { return NULL; } for(; t!=NULL ; t= t->vlv_next) { struct vlvIndex *pi= t->vlv_index; for(;pi!=NULL;pi= pi->vlv_next) { if(strcas...
false
false
false
false
false
0
preferences_accept (struct s_options_data *data) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->rec_keepfiles))) config.keep = TRUE; else config.keep = FALSE; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->send_dotfiles))) config.dotfiles = TRUE; else config.dotfiles =...
false
false
false
false
false
0
startAsynchronousMode() { if(d->async) return; d->async = true; // initial entrylist d->need_update = false; d->async_entryList(); }
false
false
false
false
false
0
btreePageGetSizePribucket(const AjPBtpage page) { const unsigned char* buf = page->buf; ajuint nentries; ajulong overflow = 0UL; const unsigned char *idptr = NULL; const unsigned char *keyptr = NULL; ajuint klen; ajuint i; buf = page->buf; GBT_BUCKNENTRIES(buf,&nentries); GBT_B...
false
false
false
false
false
0
Cstrtoul(char *data,char **edata, const int base) { GStringRep::ChangeLocale locale(LC_NUMERIC,"C"); while (data && *data==' ') data++; return strtoul(data,edata,base); }
false
false
false
false
false
0
printFPConstant(const ConstantFP *Fp, raw_ostream &O) { APFloat APF = APFloat(Fp->getValueAPF()); // make a copy bool ignored; unsigned int numHex; const char *lead; if (Fp->getType()->getTypeID() == Type::FloatTyID) { numHex = 8; lead = "0f"; APF.convert(APFloat::IEEEsingle, APFloat::rmNearestTi...
false
false
false
false
false
0
snd_mpu401_uart_input_open(struct snd_rawmidi_substream *substream) { struct snd_mpu401 *mpu; int err; mpu = substream->rmidi->private_data; if (mpu->open_input && (err = mpu->open_input(mpu)) < 0) return err; if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) { if (snd_mpu401_do_reset(mpu) < 0) goto erro...
false
false
false
false
false
0
process_configure_dot_ac(const nstring &fn) { nstring path = resolve(fn); FILE *fp = fopen(path.c_str(), "r"); if (!fp) return; for (;;) { char line[2000]; if (!fgets(line, sizeof(line), fp)) break; if (0 == memcmp(line, "AC_CHECK_PROGS(GROFF,", 21)) have_groff = true; if (0 ==...
false
false
false
false
true
1
rst_del_item(void) { int i; struct rst_db_item *dbi; rst_list_items(); i = menu_choose_unr("item nr. to delete", 0, list_count(&l_rst_db) - 1, -1); if (i >= 0) { dbi = list_remove_at(&l_rst_db, i); free(dbi); } }
false
false
false
false
false
0
_internal_put_on_bb_append_coll_attr (const char *key, xmmsv_t *value, void *userdata) { xmmsv_t *bb = (xmmsv_t *)userdata; const char *s; int r; r = xmmsv_get_string (value, &s); x_return_if_fail (r); _internal_put_on_bb_string (bb, key); _internal_put_on_bb_string (bb, s); }
false
false
false
false
false
0
Save ( ostream& o ) const { const_iterator p, p_beg = begin(), p_end = end(); // get the max length of the identifier in the collection unsigned int maxLength = 0, curLength; for ( p = p_beg; p < p_end; p += 2 ) if ( maxLength < (curLength = strlen((*p)->getName())) ) maxLength = curLength; // save number o...
false
false
false
false
false
0
add_binary(TOperator op, TIntermTyped* a, TIntermTyped* b, TSourceLoc line, const char* name, bool boolResult) { TIntermTyped* res = ir_add_binary_math(op, a, b, line, *this); if (res == NULL) { binaryOpError(line, name, a->getCompleteString(), b->getCompleteString()); recover(); if (boolResult) { ...
false
false
false
false
false
0
getNumEntry(Guint offset) const { if (size > 0) { int res = 0; Guint resOffset = entries[0].offset; XRefEntry e; for (int i = 1; i < size; ++i) { e = entries[i]; if (e.offset < offset && e.offset >= resOffset) { res = i; resOffset = e.offset; } } r...
false
false
false
false
false
0
gedit_multi_notebook_close_tabs (GeditMultiNotebook *mnb, const GList *tabs) { GList *l; g_return_if_fail (GEDIT_IS_MULTI_NOTEBOOK (mnb)); for (l = (GList *)tabs; l != NULL; l = g_list_next (l)) { GList *nbs; for (nbs = mnb->priv->notebooks; nbs != NULL; nbs = g_list_next (nbs)) { gint n; ...
false
false
false
false
false
0
handle_end_element (HtmlContext * ctx, const char *name, gpointer user_data) { GstSamiContext *sctx = (GstSamiContext *) user_data; GST_LOG ("name:%s", name); if (!g_ascii_strcasecmp ("sync", name)) { sctx->in_sync = FALSE; } else if ((!g_ascii_strcasecmp ("body", name)) || (!g_ascii_strcasecmp ("sa...
false
false
false
false
false
0
pcx_rle_decode(const uint8_t *src, uint8_t *dst, unsigned int bytes_per_scanline) { unsigned int i = 0; unsigned char run, value; while (i<bytes_per_scanline) { run = 1; value = *src++; if (value >= 0xc0) { run = value & 0x3f; valu...
false
false
false
false
false
0
constructObject(KJSContext* ctx, void *internalValue) { CustomPrototype* p = PROTOTYPE(this); if (ctx && !p->prototype()) { ExecState* exec = EXECSTATE(ctx); KJS::Interpreter* i = exec->lexicalInterpreter(); JSObject* objectProto = i->builtinObjectPrototype(); p->setPrototype(ob...
false
false
false
false
false
0
GetBarInfo( register Perspective* s, IntCoord& bot, int& height ) { IntCoord maxheight = ymax + 1; if (s->height == 0) { scale = 1.0; bot = -1; height = maxheight + 2; } else { scale = double(maxheight) / double(s->height); if (Math::equal(scale, double(0.0), double(1e-6))) { ...
false
false
false
false
false
0
stoi(s) char *s; { int base = 10; int n = 0; if (*s == '0') { if (s[1] == 'x' || s[1] == 'X') { s += 2; base = 16; } else { base = 8; s += 1; } } while (*s) n = n * base + xdtoi(*s++); return n; }
false
false
false
false
false
0
xtensa_add_config_info (void) { asection *info_sec; char *data, *p; int sz; info_sec = subseg_new (".xtensa.info", 0); bfd_set_section_flags (stdoutput, info_sec, SEC_HAS_CONTENTS | SEC_READONLY); data = xmalloc (100); sprintf (data, "USE_ABSOLUTE_LITERALS=%d\nABI=%d\n", XSHAL_USE_ABSOLUTE_LITERALS,...
false
true
false
false
false
1
gedit_file_browser_store_iter_children (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent) { FileBrowserNode *node; GeditFileBrowserStore *model; GSList *item; g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model), FALSE); g_return_val_if_fail (parent == NULL || parent->user_da...
false
false
false
false
false
0
gretl_calculate_criteria (double ess, int n, int k, double *ll, double *aic, double *bic, double *hqc) { double lnl, c[3]; int err = 0; if (na(ess) || ess <= 0.0 || k < 1 || n <= k) { err = 1; } else { const double ln2pi1 = 2.837877066409345; /* log(2*pi) + 1 */ errno = 0; lnl =...
false
false
false
false
false
0
nw_rpc100s_destroy(StonithPlugin *s) { struct pluginDevice* ctx; VOIDERRIFWRONGDEV(s); ctx = (struct pluginDevice *)s; ctx->pluginid = NOTrpcid; /* close the fd if open and set ctx->fd to invalid */ RPCDisconnect(ctx); if (ctx->device != NULL) { FREE(ctx->device); ctx->device = NULL; } if (ctx->node...
false
false
false
false
false
0
precedence(ExprNodeOutputType output_type, const temporary_terms_t &temporary_terms) const { temporary_terms_t::const_iterator it = temporary_terms.find(const_cast<BinaryOpNode *>(this)); // A temporary term behaves as a variable if (it != temporary_terms.end()) return 100; switch (op_code) { case ...
false
false
false
false
false
0
ins_pageup() { pos_T tpos; undisplay_dollar(); #ifdef FEAT_WINDOWS if (mod_mask & MOD_MASK_CTRL) { /* <C-PageUp>: tab page back */ if (first_tabpage->tp_next != NULL) { start_arrow(&curwin->w_cursor); goto_tabpage(-1); } return; } #endif tpos = curwin->w_cursor; if (onepage...
false
false
false
false
false
0
printInfoComment(const Value &V) { if (isGCRelocate(&V)) printGCRelocateComment(V); if (AnnotationWriter) AnnotationWriter->printInfoComment(V, Out); }
false
false
false
false
false
0
position_changed_cb (GtkComboBox *box, struct SeriesLabelsState *state) { GtkTreeModel *model = gtk_combo_box_get_model (box); GtkTreeIter iter; GogSeriesLabelsPos pos; if (gtk_combo_box_get_active_iter (box, &iter)) { gtk_tree_model_get (model, &iter, 1, &pos, -1); if (GOG_IS_DATA_LABEL (state->labels)) { ...
false
false
false
false
false
0
loadTableFromStream(struct SFNTTable *tbl, struct Stream *s) { enum StreamResult sResult = seekAbsolute(s, tbl->offset); CHK_RD2(sResult); tbl->buf = (uint8_t *)malloc(tbl->bufSize); struct Stream sOut = constructStream2(tbl->buf, 0, tbl->bufSize); sResult = streamCopy(s, &sOut, tbl->bufSize); CHK_RD2(sResu...
false
false
false
false
false
0
parse_cfg_fld(struct imx_header *imxhdr, int32_t *cmd, char *token, char *name, int lineno, int fld, int *dcd_len) { int value; switch (fld) { case CFG_COMMAND: *cmd = get_table_entry_id(imximage_cmds, "imximage commands", token); if (*cmd < 0) { fprintf(stderr, "Error: %s[%d] - Invalid command" "(%s...
false
false
false
false
false
0
atom_op_mul(atom_exec_context *ctx, int *ptr, int arg) { uint8_t attr = U8((*ptr)++); uint32_t dst, src; SDEBUG(" src1: "); dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1); SDEBUG(" src2: "); src = atom_get_src(ctx, attr, ptr); ctx->ctx->divmul[0] = dst * src; }
false
false
false
false
false
0
iso_extend(struct iso_curve *ip, int num) { if (num == ip->p_max) return; if (num > 0) { if (ip->points == NULL) { ip->points = (struct coordinate GPHUGE *) gp_alloc(num * sizeof(struct coordinate), "iso curve points"); } else { ip->points = (struct coordinate GPHUGE *) gp_realloc(ip->points, ...
false
false
false
false
false
0
evaluatePolygon(bool &ok, const QString &parameterName, const QString &subParameterName) { if(!ok) return QPolygon(); const SubParameter &subParameter = retreiveSubParameter(parameterName, subParameterName); QString result; if(subParameter.isCode()) result = evaluateCode(ok, subParamete...
false
false
false
false
false
0
msg_unpack_real(Octstr *os, const char *file, long line, const char *func) { Msg *msg; int off; long i; msg = msg_create_real(0, file, line, func); if (msg == NULL) goto error; off = 0; if (parse_integer(&i, os, &off) == -1) goto error; msg->type = i; #define INTEGER(...
false
false
false
false
false
0
fn_not(fs_query *q, fs_value a) { #if 0 printf("! "); fs_value_print(a); printf("\n"); #endif if (fs_is_error(a)) { return a; } if (a.valid & fs_valid_bit(FS_V_RID) && a.rid == FS_RID_NULL) { return fs_value_error(FS_ERROR_INVALID_TYPE, NULL); } fs_value ebv = fn_ebv(a); if (fs_is_error(ebv)...
false
false
false
false
false
0
glusterd_op_ac_send_commit_failed (glusterd_op_sm_event_t *event, void *ctx) { int ret = 0; glusterd_req_ctx_t *req_ctx = NULL; dict_t *op_ctx = NULL; GF_ASSERT (ctx); req_ctx = ctx; op_ctx = glusterd_op...
false
false
true
true
false
1
set_h_prescale(struct v4l2_subdev *sd, int task, int prescale) { static const struct { int xpsc; int xacl; int xc2_1; int xdcg; int vpfy; } vals[] = { /* XPSC XACL XC2_1 XDCG VPFY */ { 1, 0, 0, 0, 0 }, { 2, 2, 1, 2, 2 }, { 3, 4, 1, 3, 2 }, { 4, 8, 1...
false
false
false
false
false
0
smgrGetPendingDeletes(bool forCommit, RelFileNode **ptr) { int nestLevel = GetCurrentTransactionNestLevel(); int nrels; RelFileNode *rptr; PendingRelDelete *pending; nrels = 0; for (pending = pendingDeletes; pending != NULL; pending = pending->next) { if (pending->nestLevel >= nestLevel && pending->atComm...
false
false
false
false
false
0
setItemIconPosition(FXint index,FXuint mode){ if(index<0 || items.no()<=index){ fxerror("%s::setItemIconPosition: index out of range.\n",getClassName()); } if(items[index]->getIconPosition()!=mode){ items[index]->setIconPosition(mode); recalc(); } }
false
false
false
false
false
0
e1000_print_hw_hang(struct work_struct *work) { struct e1000_adapter *adapter = container_of(work, struct e1000_adapter, print_hang_task); struct net_device *netdev = adapter->netdev; struct e1000_ring *tx_ring = adapter->tx_ring; unsigned int i = tx_ring->next_to_clean; unsigned int eop = tx...
false
false
false
false
false
0
tag_init(struct mvumi_tag *st, unsigned short size) { unsigned short i; BUG_ON(size != st->size); st->top = size; for (i = 0; i < size; i++) st->stack[i] = size - 1 - i; }
false
false
false
false
false
0
selectPreset (const string name) { for (int i=0; i<kNumPresets; i++) if (getPreset(i).getName() == name) return selectPreset (i); return -1; }
false
false
false
false
false
0
OnPlotsymbolCode( int code ) { if( setup_ || !curve_ )return; if( !connectCB_->IsChecked() )code *= -1; static_cast<GRA_intCharacteristic*>(curveChars_->Get(wxT("PLOTSYMBOL")))->Set( code ); curve_->SetPlotsymbolCode( code ); ReDraw(); }
false
false
false
false
false
0
clear_file_cache(void) { int i; if (DUMPFILE()) return; for (i = 0; i < DENTRY_CACHE; i++) { ft->cached_file[i] = 0; ft->cached_file_hits[i] = 0; } ft->file_cache_fills = 0; ft->file_cache_index = 0; }
false
false
false
false
false
0
error(const char *s1, const char *s2, const char *s3) { cerr << "Error: "; cerr << s1; if(s2 != NULL && strlen(s2) > 0) cerr << " " << s2; if(s3 != NULL && strlen(s3) > 0) cerr << " " << s3; cerr << endl; }
false
false
false
false
false
0
clearOldCache(const QString &sub, int maxAge) { if (sub.isEmpty()) { return; } QString d=cacheDir(sub, false); QDir dir(d); if (dir.exists()) { QFileInfoList files=dir.entryInfoList(QDir::Files|QDir::NoDotAndDotDot); if (files.count()) { QDateTime now=QDateTime:...
false
false
false
false
false
0
byte_buffer_read_bytes (ByteBuffer *buffer, uint8_t *bytes, size_t bytes_len, ElvinError *error) { on_error_return_false (check_remaining (buffer, bytes_len, error)); memcpy (bytes, buffer->data + buffer->position, bytes_len); buffer->position += bytes_len; return true; }
false
true
false
false
false
1
nchashremove(NChashmap* hm, nchashid hash) { int i,offset,len; NClist* seq; ncelem* list; offset = (hash % hm->alloc); seq = hm->table[offset]; if(seq == NULL) return TRUE; len = nclistlength(seq); list = nclistcontents(seq); for(i=0;i<len;i+=2,list+=2) { if(*list == hash) { ...
false
false
false
false
false
0
path_rec_start(struct net_device *dev, struct ipoib_path *path) { struct ipoib_dev_priv *priv = netdev_priv(dev); ipoib_dbg(priv, "Start path record lookup for %pI6\n", path->pathrec.dgid.raw); init_completion(&path->done); path->query_id = ib_sa_path_rec_get(&ipoib_sa_client, priv->ca, priv->port, ...
false
false
false
false
false
0
ajStrIsInt(const AjPStr str) { const char* cp; char* ptr = NULL; ajlong value; if(!str) return ajFalse; if(!str->Len) return ajFalse; cp = str->Ptr; errno = 0; value = strtol(cp, &ptr, 10); if(*ptr || errno == ERANGE) return ajFalse; if(value < INT_MIN) return ajFalse; ...
false
false
false
false
false
0
gnc_table_layout_add_cursor (TableLayout *layout, CellBlock *cursor) { GList *node; g_return_if_fail (layout != NULL); g_return_if_fail (cursor != NULL); if (g_list_find (layout->cursors, cursor)) return; for (node = layout->cursors; node; node = node->next) ...
false
false
false
false
false
0
fill_active_slots(void) { struct active_request_slot *slot = active_queue_head; while (active_requests < max_requests) { struct fill_chain *fill; for (fill = fill_cfg; fill; fill = fill->next) if (fill->fill(fill->data)) break; if (!fill) break; } while (slot != NULL) { if (!slot->in_use && slo...
false
false
false
false
false
0
remove_timeout(Fl_Timeout_Handler cb, void *argp) { // This version removes all matching timeouts, not just the first one. // This may change in the future. for (Timeout** p = &first_timeout; *p;) { Timeout* t = *p; if (t->cb == cb && (t->arg == argp || !argp)) { *p = t->next; t->next = free_t...
false
false
false
false
false
0