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
movingAverage (unsigned int width_) { if (_len < width_) return (MSBuiltinVectorImpl *)create(); unsigned int newLen = _len - width_ +1; // because of the above test, newLen >= 1 MSBuiltinVectorImpl *mvAvg = (MSBuiltinVectorImpl *) create (newLen); double sum = 0.0; unsigned int i, j; for (i=0; i...
false
false
false
false
false
0
maintaining_absolute_top_line_number() { return mContinuousWrap && (mLineNumWidth != 0 || mNeedAbsTopLineNum); }
false
false
false
false
false
0
rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary) { VALUE arg1, arg2; long pos, len, orig_len; rb_ary_modify_check(ary); if (argc == 2) { pos = NUM2LONG(argv[0]); len = NUM2LONG(argv[1]); delete_pos_len: if (len < 0) return Qnil; orig_len = RARRAY_LEN(ary); if (pos < 0) { pos += orig_...
false
false
false
false
false
0
get_spaceship_descr(struct player_spaceship *pship) { struct player_spaceship ship; static struct astring str = ASTRING_INIT; astr_clear(&str); if (!pship) { pship = &ship; memset(&ship, 0, sizeof(ship)); } /* TRANS: spaceship text; should have constant width. */ astr_add_line(&str, _("Populati...
false
false
false
false
false
0
audio_add_plugin(struct audio_plugin *p) { fc_assert_ret(num_plugins_used < MAX_NUM_PLUGINS); memcpy(&plugins[num_plugins_used], p, sizeof(struct audio_plugin)); num_plugins_used++; }
false
true
false
false
false
1
skip_ahead(void) {eight_bits c; while(find_char()) {limit[1]='@'; while(*loc++ !='@'){} if(loc<=limit&&(c=code_of(*loc++))!=ignore)return c; } return new_section; }
false
false
false
false
false
0
move (Uint32 dt, int dec) { for (int i = 0; i < MAXSMOKEELEM; i ++) if (time [i] > 0) { time [i] -= dec; if (time [i] < 0) time [i] = 0; } }
false
false
false
false
false
0
Batch_signal_changed_callback(GdaBatch* self, GObject* p0,void* data) { using namespace Gnome::Gda; typedef sigc::slot< void,Glib::RefPtr<Statement> > SlotType; // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { #ifdef GLIBMM_EXCEPTION...
false
false
false
false
false
0
decode_de(yystype *params[], struct text_buffer *txtbuf) { const char *p = TOKEN_GET(params[0], cstring); const long a = TOKEN_GET(params[1], ival); /*const char *c = params[2];*/ char *k = TOKEN_GET(params[3], string); /*const char *r = params[5];*/ unsigned val=0; unsigned nsplit = 0; const char* o; const c...
false
false
false
false
false
0
nic_w5100_reset( nic_w5100_t *self ) { size_t i; nic_w5100_debug( "w5100: reset\n" ); memset( self->gw, 0, sizeof( self->gw ) ); memset( self->sub, 0, sizeof( self->sub ) ); memset( self->sha, 0, sizeof( self->sha ) ); memset( self->sip, 0, sizeof( self->sip ) ); for( i = 0; i < 4; i++ ) nic_w5100_...
false
false
false
false
false
0
crypto_scalarmult(unsigned char *q, const unsigned char *n, const unsigned char *p) { unsigned int work[96]; unsigned char e[32]; unsigned int i; for (i = 0;i < 32;++i) e[i] = n[i]; e[0] &= 248; e[31] &= 127; e[31] |= 64; for (i = 0;i < 32;++i) work[i] = p[i]; mainloop(work,e); recip(work + 32,w...
false
false
false
false
false
0
gm_world_view_update_status(GmWorldView *view, gchar const *status) { gtk_statusbar_pop(view->priv->statusbar, 0); if (status == NULL) { gtk_statusbar_push(view->priv->statusbar, 0, _("Welcome to GnoeMoe, explorer of new worlds!")); } else { gtk_statusbar_push(view->priv->statusbar, 0, status); } }
false
false
false
false
false
0
gst_qt_mux_send_mdat_header (GstQTMux * qtmux, guint64 * off, guint64 size, gboolean extended) { Atom *node_header; GstBuffer *buf; guint8 *data = NULL; guint64 offset = 0; GST_DEBUG_OBJECT (qtmux, "Sending mdat's atom header, " "size %" G_GUINT64_FORMAT, size); node_header = g_malloc0 (sizeof (...
false
false
false
false
false
0
IsAuth(struct DccUser *dccptr) { if (!dccptr) return (0); if ((dccptr->socket == NOSOCKET) || (dccptr->flags & SOCK_NEEDID) || IsDccPending(dccptr)) return (0); return (1); }
false
false
false
false
false
0
ocfs2_resmap_resv_bits(struct ocfs2_reservation_map *resmap, struct ocfs2_alloc_reservation *resv, int *cstart, int *clen) { if (resv == NULL || ocfs2_resmap_disabled(resmap)) return -ENOSPC; spin_lock(&resv_lock); if (ocfs2_resv_empty(resv)) { /* * We don't want to over-allocate for temporary ...
false
false
false
false
false
0
downloadCover( ServiceAlbumWithCoverPtr album ) { m_album = album; KUrl downloadUrl( album->coverUrl() ); m_coverDownloadPath = m_tempDir->name() + downloadUrl.fileName(); debug() << "Download Cover: " << downloadUrl.url() << " to: " << m_coverDownloadPath; m_albumDownloadJob = KIO::file_copy( d...
false
false
false
false
false
0
LowerNegateToMultiply(Instruction *Neg) { Type *Ty = Neg->getType(); Constant *NegOne = Ty->isIntOrIntVectorTy() ? ConstantInt::getAllOnesValue(Ty) : ConstantFP::get(Ty, -1.0); BinaryOperator *Res = CreateMul(Neg->getOperand(1), NegOne, "", Neg, Neg); Neg->setOperand(1, Constant::getNullValue(Ty)); // Drop...
false
false
false
false
false
0
parseAddrPD(const char * xmlFile, FILE * f, int t1,int t2,int iaid,int iface) { // IA paramteres char buf[256]; char * x = 0; SPtr<TAddrIA> ptrpd = 0; SPtr<TAddrAddr> addr; SPtr<TAddrPrefix> pr; SPtr<TDUID> duid = 0; while (!feof(f)) { if (!fgets(buf,255,f)) { Log(Err...
false
false
false
false
false
0
OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st, asn_app_consume_bytes_f *cb, void *app_key) { ssize_t wrote_len = 0; int startn; int add = 0; int i; for(i = 0, startn = 0; i < st->size; i++) { uint8_t b = st->buf[i]; if((b & 0x80)) /* Continuation expected */ continue; if(startn == 0) { ...
false
false
false
false
false
0
kletterWeiter(const Str & na, const Version & version) { /* Neuen Abschnittnamen bauen */ if (!mSquirrelPosString.isEmpty()) mSquirrelPosString += '/'; mSquirrelPosString += na; /* Knoten zum neuen Abschnitt suchen */ mSquirrelKnoten = (DefKnoten *) getEintragKnoten(na, version, true, type_DefK...
false
false
false
false
false
0
prefs_account_set_string_from_combobox(PrefParam *pparam) { GtkWidget *combobox; GtkListStore *menu; GtkTreeIter iter; gchar **str; cm_return_if_fail(*pparam->widget != NULL); combobox = *pparam->widget; cm_return_if_fail(gtk_combo_box_get_active_iter( GTK_COMBO_BOX(combobox), &iter)); str = (gchar **)pp...
false
false
false
false
false
0
compaction_alloc(struct page *migratepage, unsigned long data, int **result) { struct compact_control *cc = (struct compact_control *)data; struct page *freepage; /* * Isolate free pages if necessary, and if we are not aborting due to * contention. */ if (list_empty(&cc->freepages)) { if (!cc->co...
false
false
false
false
false
0
findExpr(const Assumptions& a, const Expr& e, vector<Theorem>& gamma) { bool found = false; const Assumptions::iterator aend = a.end(); Assumptions::iterator iter = a.begin(); for (; iter != aend; ++iter) { if (iter->isRefl()) continue; if (iter->isFlagged()) { if (iter...
false
false
false
false
false
0
T1_GetCharWidth( int FontID, char char1) { unsigned char uchar1; uchar1=(unsigned char) char1; /* Check whether font is loaded: */ if (T1_CheckForFontID(FontID)!=1){ T1_errno=T1ERR_INVALID_FONTID; return(0); } /* If no AFM info is present, we return an error */ if (pFontBase->pFontArray[Fon...
false
false
false
false
false
0
st_sensors_match_acpi_device(struct device *dev) { const struct acpi_device_id *acpi_id; kernel_ulong_t driver_data = 0; if (ACPI_HANDLE(dev)) { acpi_id = acpi_match_device(dev->driver->acpi_match_table, dev); if (!acpi_id) { dev_err(dev, "No driver data\n"); return -EINVAL; } driver_data = acpi_id->d...
false
false
false
false
false
0
list_length(struct Object *list) { if (list == NULL || (list->type != T_LIST && list->type != T_BLOCK) || list->value.l_value == NULL) return nil_object; struct Object *o = clone_object(number_object); if (o == NULL) fail("Unable to clone number_object in %s at line %d", __FILE__, __LINE__); o->value.i_value ...
false
false
false
true
false
1
write_viminfo_history(fp) FILE *fp; { int i; int type; int num_saved; char_u *p; int c; init_history(); if (hislen == 0) return; for (type = 0; type < HIST_COUNT; ++type) { num_saved = get_viminfo_parameter(hist_type2char(type, FALSE)); if (num_saved == 0)...
false
false
false
false
false
0
dsm_free(string blockId) throw (DsmException) { ostringstream outs; // Declare an output string stream. outs << "dsm_free " << this->nid << " " << blockId; this->send(outs.str()); string response = this->receive(); if (response.find("ERROR") == 0) { throw DsmException(string(response)); } }
false
false
false
false
false
0
snd_mtpav_mputreg(struct mtpav *chip, u16 reg, u8 val) { if (reg == DREG || reg == CREG) outb(val, chip->port + reg); }
false
false
false
false
false
0
deleteAttribute(int i) { if ((!d)||(i<0)||(i>=d->nAttribute)) return; d->nAttribute--; XMLAttribute *p=d->pAttribute+i; free((void*)p->lpszName); if (p->lpszValue) free((void*)p->lpszValue); if (d->nAttribute) memmove(p,p+1,(d->nAttribute-i)*sizeof(XMLAttribute)); else { free(p); d->pAttribute=N...
false
false
false
false
false
0
gnome_bg_slide_show_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { GnomeBGSlideShow *self; g_assert (GNOME_BG_IS_SLIDE_SHOW (object)); s...
false
false
false
false
false
0
toplevel_open_policies(toplevel_t * top, apol_policy_path_t * orig_path, apol_policy_path_t * mod_path) { struct policy_run_datum run; memset(&run, 0, sizeof(run)); run.top = top; run.paths[0] = orig_path; run.paths[1] = mod_path; sediffx_policy_e i; util_cursor_wait(GTK_WIDGET(top->w)); progress_show(top->pro...
false
false
false
false
false
0
knot_tsig_sign(uint8_t *msg, size_t *msg_len, size_t msg_max_len, const uint8_t *request_mac, size_t request_mac_len, uint8_t *digest, size_t *digest_len, const knot_tsig_key_t *key, uint16_t tsig_rcode, uint64_t request_time...
false
true
false
false
false
1
hwpoison_filter_task(struct page *p) { if (!hwpoison_filter_memcg) return 0; if (page_cgroup_ino(p) != hwpoison_filter_memcg) return -EINVAL; return 0; }
false
false
false
false
false
0
bcm_close(struct hci_uart *hu) { struct bcm_data *bcm = hu->priv; struct bcm_device *bdev = bcm->dev; bt_dev_dbg(hu->hdev, "hu %p", hu); /* Protect bcm->dev against removal of the device or driver */ mutex_lock(&bcm_device_lock); if (bcm_device_exists(bdev)) { bcm_gpio_set_power(bdev, false); #ifdef CONFIG_PM...
false
false
false
false
false
0
netio_tap_create(netio_tap_desc_t *ntd,char *tap_name) { if (strlen(tap_name) >= NETIO_DEV_MAXLEN) { fprintf(stderr,"netio_tap_create: bad TAP device string specified.\n"); return(-1); } memset(ntd,0,sizeof(*ntd)); strcpy(ntd->filename,tap_name); ntd->fd = netio_tap_open(ntd->filename); ...
false
false
false
false
false
0
CallBack_menu_CloseAllConnections(GtkWidget* widget) { (void)widget; guint32 i; for(i = 0 ; i < MAX_CONNECTION ; i++) { if(! connection_is_open[i]) continue; if(game && game->connectid == i) continue; client_disconnect(i); } }
false
false
false
false
false
0
bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int odd) { int off = odd ? 0x80 : 0x00; if (geo->comb) btor(BT848_VSCALE_COMB, BT848_E_VSCALE_HI+off); else btand(~BT848_VSCALE_COMB, BT848_E_VSCALE_HI+off); btwrite(geo->vtc, BT848_E_VTC+off); btwrite(geo->hscale >> 8, BT848_E_HSCAL...
false
false
false
false
false
0
encrypt_token(struct client *client, int32_t hContext, int32_t flags, krb5_data *in, krb5_data *out) { int32_t val; put32(client, eEncrypt); put32(client, hContext); put32(client, flags); put32(client, 0); putdata(client, *in); ret32(client, val); retdata(client, *out); return va...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__DropBox_NotifySelect__00000000(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * control, struct __ecereNameSpace__ecere__com__Instance * row, unsigned int mods) { struct __ecereNameSpace__ecere__sys__Size __simp...
false
false
false
false
false
0
crypt_keyslot_max(const char *type) { if (type && isLUKS(type)) return LUKS_NUMKEYS; return -EINVAL; }
false
false
false
false
false
0
SITEflushall(const bool Restart) { int i; SITE *sp; for (i = nSites, sp = Sites; --i >= 0; sp++) if (sp->Name) SITEflush(sp, Restart); }
false
false
false
false
false
0
explain_buffer_floppy_drive_params(explain_string_buffer_t *sb, const struct floppy_drive_params *data) { if (explain_is_efault_pointer(data, sizeof(*data))) { explain_buffer_pointer(sb, data); return; } explain_string_buffer_puts(sb, "{ cmos = "); explain_buffer_int(sb, data->c...
false
false
false
false
false
0
seek(double timepos) { Locker locker(m_Mutex); flush(); //AVM_WRITE("FF reader", 1, "seek(%f) %" PRId64 "\n", timepos, m_pContext->start_time); int64_t sp = ((m_pContext->start_time != (int64_t)AV_NOPTS_VALUE) ? m_pContext->start_time : 0) + int64_t(timepos * AV_TIME_BASE); #if 1 av_seek_frame...
false
false
false
false
false
0
runnerMatchingSuspended(bool suspended) { if (suspended || !prepped || teardownRequested) { return; } AbstractRunner *runner = qobject_cast<AbstractRunner *>(q->sender()); if (runner) { startJob(runner); } }
false
false
false
false
false
0
aead_poll(struct file *file, struct socket *sock, poll_table *wait) { struct sock *sk = sock->sk; struct alg_sock *ask = alg_sk(sk); struct aead_ctx *ctx = ask->private; unsigned int mask; sock_poll_wait(file, sk_sleep(sk), wait); mask = 0; if (!ctx->more) mask |= POLLIN | POLLRDNORM; if (aead_wri...
false
false
false
false
false
0
e_utf8_from_gtk_event_key (GtkWidget *widget, guint keyval, const gchar *string) { gint unival; gchar *utf; gint unilen; if (keyval == GDK_KEY_VoidSymbol) { utf = e_utf8_from_locale_string_sized (string, strlen (string)); } else { unival = gdk_keyval_to_un...
false
false
false
false
false
0
free_branches(struct inode *inode, sysv_zone_t *p, sysv_zone_t *q, int depth) { struct buffer_head * bh; struct super_block *sb = inode->i_sb; if (depth--) { for ( ; p < q ; p++) { int block; sysv_zone_t nr = *p; if (!nr) continue; *p = 0; block = block_to_cpu(SYSV_SB(sb), nr); bh = sb_bread...
false
false
false
false
false
0
libgncmod_gnome_search_gnc_module_init(int refcount) { /* load the engine (we depend on it) */ if (!gnc_module_load("gnucash/engine", 0)) { return FALSE; } if (!gnc_module_load("gnucash/gnome-utils", 0)) { return FALSE; } if (refcount == 0) { /* initialize k...
false
false
false
false
false
0
makeDecoder() const { if (decodeMap_.isNull()) { CharMapResource<Char> *map = new CharMapResource<Char>(replacementChar_); *(ConstPtr<CharMapResource<Char> > *)&decodeMap_ = map; for (const Desc *d = desc_; d->number != CharsetRegistry::UNREGISTERED; d++) { Owner<CharsetRegistry::Iter> iter(CharsetR...
false
false
false
false
false
0
fast_charge_timer_show(struct device *dev, struct device_attribute *attr, char *buf) { struct max77693_charger *chg = dev_get_drvdata(dev); unsigned int data, val; int ret; ret = regmap_read(chg->max77693->regmap, MAX77693_CHG_REG_CHG_CNFG_01, &data); if (ret < 0) return ret; data &= CHG_CNFG_01_FCHGTIME...
false
false
false
false
false
0
ario_lyrics_editor_save_cb (GtkButton *button, ArioLyricsEditor *lyrics_editor) { ARIO_LOG_FUNCTION_START; GtkTextIter start; GtkTextIter end; gchar *lyrics; if (!lyrics_editor->priv->data) return; /* Get lyrics from text view...
false
false
false
false
false
0
rep_hist_get_uptime(const char *id, time_t when) { or_history_t *hist = get_or_history(id); if (!hist) return 0; if (!hist->start_of_run || when < hist->start_of_run) return 0; return when - hist->start_of_run; }
false
false
false
false
false
0
TargetMaterializeFloatZero(const ConstantFP *CF) { MVT VT; if (!isTypeLegal(CF->getType(), VT)) return false; // Get opcode and regclass for the given zero. unsigned Opc = 0; const TargetRegisterClass *RC = NULL; switch (VT.SimpleTy) { default: return false; case MVT::f32: if (X86ScalarSS...
false
false
false
false
false
0
LinkGeometryMesh(FCDGeometryMesh* geometryMesh) { bool status = true; if (!geometryMesh->IsConvex() || geometryMesh->GetConvexHullOf().empty()) return status; FCDGeometry* concaveGeom = geometryMesh->GetDocument()->FindGeometry(geometryMesh->GetConvexHullOf()); if (concaveGeom) { FCDGeometryMesh* ori...
false
false
false
false
false
0
Mangle(uint32_t *S) { uint32_t *R = S; uint32_t *C = &S[1]; uint8_t r0 = Smoosh4(R[0] >> 24); uint8_t r1 = Smoosh4(R[0] >> 16); uint8_t r2 = Smoosh4(R[0] >> 8); uint8_t r3 = Smoosh4(R[0] & 0xff); int i; /* Diffuse */ uint32_t tmp = 0; for (i = 0; i < HEFTY1_SPONGE_WORDS - 1; i...
false
false
false
false
false
0
db_list_joblog_records(JCR *jcr, B_DB *mdb, uint32_t JobId, DB_LIST_HANDLER *sendit, void *ctx, e_list_type type) { char ed1[50]; if (JobId <= 0) { return; } db_lock(mdb); if (type == VERT_LIST) { Mmsg(mdb->cmd, "SELECT Time,LogText FROM Log " "WHERE ...
false
false
false
false
false
0
aw_help_select_newest_in_history(AW_root *aw_root) { char *history = aw_help_global.history; if (history) { const char *sep = strchr(history, '#'); char *lastHelp = sep ? GB_strpartdup(history, sep-1) : strdup(history); aw_root->awar("tmp/aw_window/helpfile")->write_string(la...
false
false
false
false
false
0
rtl92c_bt_ant_isolation(struct ieee80211_hw *hw, u8 tmp1byte) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_pci_priv *rtlpcipriv = rtl_pcipriv(hw); /* Only enable HW BT coexist when BT in "Busy" state. */ if (rtlpriv->mac80211.vendor == PEER_CISCO && rtlpcipriv->bt_coexist.bt_service == BT_OTHER_ACTI...
false
false
false
false
false
0
get_signature(const uint8_t *asn1_sig, int *len) { int offset = 0; const uint8_t *ptr = NULL; if (asn1_next_obj(asn1_sig, &offset, ASN1_SEQUENCE) < 0 || asn1_skip_obj(asn1_sig, &offset, ASN1_SEQUENCE)) goto end_get_sig; if (asn1_sig[offset++] != ASN1_OCTET_STRING) goto end...
false
false
false
false
false
0
geoniche_geostuff(const waypoint* wpt) { char* gs = NULL, *tmp1, *tmp2, *tmp3; char tbuf[10240]; if (!wpt->gc_data->terr) { return NULL; } snprintf(tbuf, sizeof(tbuf), "\n%s by %s\n\n", gs_get_cachetype(wpt->gc_data->type), wpt->gc_data->placer); gs = xstrappend(gs, tbuf); /* * 3 May 06: Removed...
true
true
false
false
false
1
cref_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table, const char *string) { struct cref_hash_entry *ret = (struct cref_hash_entry *) entry; /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == NULL) ret = ((struct cref_hash_entry...
false
false
false
false
false
0
dse_search_set_clean(dse_search_set *ss) { if (ss) { dl_cleanup(&ss->dl, NULL); slapi_ch_free((void **)&ss); } }
false
false
false
false
false
0
bits_replicate_horizontally(byte * data, uint width, uint height, uint raster, uint replicated_width, uint replicated_raster) { /* The current algorithm is extremely inefficient! */ const byte *orig_row = data + (height - 1) * raster; byte *tile_row = data + (height - 1) * replicated_raster...
false
false
false
false
false
0
vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs, struct vx_pipe *pipe) { int size, space, count; struct snd_pcm_runtime *runtime = subs->runtime; if (!pipe->running || (chip->chip_status & VX_STAT_IS_STALE)) return; size = runtime->buffer_size - snd_pcm_capture_avail(runtime); ...
false
false
false
false
false
0
read_int_handler(void *arg, int64_t k, uuid *v) { hlinda *h = (hlinda*)arg; if (k != h->int_id) return 0; return read_handler(arg, (void*)(size_t)k, v); }
false
false
false
false
false
0
val_str(String *str) { DBUG_ASSERT(fixed == 1); if ((value_cached || str_value_cached) && null_value) return NULL; if (!str_value_cached) { /* When it's possible the Item_cache_datetime uses INT datetime representation due to speed reasons. But still, it always has the STRING result ...
false
false
false
false
false
0
changeTheme() { if (global_debug > 0) kDebug() << "CHANGE THEME IN VIEW ... resetting slow counter"; mDrawTimes.clear(); mSlowDownFactor = 1.0; mSlowCnt = 0; mTimer->setInterval(int(mDefaultUpdateTime*mSlowDownFactor)); }
false
false
false
false
false
0
tdb_store(struct tdb_context *tdb, struct tdb_data key, struct tdb_data dbuf, int flag) { struct hash_info h; tdb_off_t off; tdb_len_t old_room = 0; struct tdb_used_record rec; enum TDB_ERROR ecode; if (tdb->flags & TDB_VERSION1) { if (tdb1_store(tdb, key, dbuf, flag) == -1) return tdb->last_error; re...
false
false
false
false
false
0
create_extra_pane (NemoWindow *window) { NemoWindowPane *pane; NemoWindowSlot *slot; GtkPaned *paned; /* New pane */ pane = nemo_window_pane_new (window); window->details->panes = g_list_append (window->details->panes, pane); paned = GTK_PANED (window->details->split_view_hpane); if (gtk_paned_get_child1 (pan...
false
false
false
false
false
0
mainEntry(const char *action, const void *handle, Property::Set *inArgs, Property::Set *outArgs) { if(_plugin){ PluginHandle* pHandle = _plugin->getPluginHandle(); if(pHandle){...
false
false
false
false
false
0
wsgi_log_stack_traces(void) { PyGILState_STATE state; PyObject *threads = NULL; /* * This should only be called on shutdown so don't try and log * any errors, just dump them straight out. */ state = PyGILState_Ensure(); threads = _PyThread_CurrentFrames(); if (threads && PyDi...
false
false
false
false
false
0
generate_dungeon_if_needed(level *l) { if (!l->random_dungeon || l->dungeon_generated) { return; } // Generate random dungeon now set_dungeon_output(l); generate_dungeon(l->xlen, l->ylen, l->random_dungeon, l->teleport_pair); l->dungeon_generated = 1; }
false
false
false
false
false
0
_bfd_coff_free_symbols (bfd *abfd) { if (obj_coff_external_syms (abfd) != NULL && ! obj_coff_keep_syms (abfd)) { free (obj_coff_external_syms (abfd)); obj_coff_external_syms (abfd) = NULL; } if (obj_coff_strings (abfd) != NULL && ! obj_coff_keep_strings (abfd)) { free (obj_...
false
false
false
false
false
0
uct_notify(struct engine *e, struct board *b, int id, char *cmd, char *args, char **reply) { struct uct *u = e->data; static bool board_resized = false; if (is_gamestart(cmd)) { board_resized = true; uct_pondering_stop(u); } /* Force resending the whole command history if we are out of sync * but do it onl...
true
true
false
false
false
1
main(int argc, char *argv[]) { /* while(FCGI_Accept() >= 0) { */ while(1) { char *query_str, *dir; /* send Content-type, so that the browser displays something */ fputs("Content-Type: ",stdout); fputs(content_type,stdout); fputs("\r\n\r\n",stdout); /* read the query string from the url to get the...
false
false
false
false
false
0
newFile() { if (drugModel()->drugsList().count()) { bool yes = Utils::yesNoMessageBox( tr("Save actual prescription?"), tr("The actual prescription is not empty. Do you want to save it before creating a new one?")); if (yes) { saveFile(); } } ...
false
false
false
false
false
0
grab_keyboard_and_mouse (saver_info *si, Window window, Cursor cursor, int screen_no) { Status mstatus = 0, kstatus = 0; int i; int retries = 4; Bool focus_fuckus = False; AGAIN: for (i = 0; i < retries; i++) { XSync (si->dpy, False); kstatus = grab_kbd (si, window,...
false
false
false
false
false
0
cavan_event_parse_virtual_keymap(struct cavan_event_device *dev) { size_t size; char pathname[1024]; const char *mem, *p, *file_end; struct cavan_virtual_key *key; int x, y, width, height, code; sprintf(pathname, "/sys/board_properties/virtualkeys.%s", dev->name); mem = file_read_all(pathname, 0, &size); if (m...
true
true
false
false
true
1
free_buf(Ds *ds) { if (ds->buf != NULL) { if (ds->clear_flag) memzap(ds->buf, ds->nalloc); ds->free(ds->buf); ds->buf = NULL; ds->nalloc = 0; /* Let the caller adjust ds->len if necessary */ } }
false
false
false
false
false
0
_Py_acosh(double x) { if (Py_IS_NAN(x)) { return x+x; } if (x < 1.) { /* x < 1; return a signaling NaN */ errno = EDOM; #ifdef Py_NAN return Py_NAN; #else return (x-x)/(x-x); #endif } else if (x >= two_pow_p28) { /* x > 2**28 */ i...
false
false
false
false
false
0
TS_find_name(STACK_OF(GENERAL_NAME) *gen_names, GENERAL_NAME *name) { int i, found; for (i = 0, found = 0; !found && i < sk_GENERAL_NAME_num(gen_names); ++i) { GENERAL_NAME *current = sk_GENERAL_NAME_value(gen_names, i); found = GENERAL_NAME_cmp(current, name) == 0; } return found ? i - 1 : -1; }
false
false
false
false
false
0
runOnModule(Module &M) { DEBUG(errs() << "Run on Module Mips16HardFloat\n"); bool Modified = false; for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) { if (F->hasFnAttribute("nomips16") && F->hasFnAttribute("use-soft-float")) { removeUseSoftFloat(*F); continue; } if (F...
false
false
false
false
false
0
ehci_remove(struct pci_dev *pdev, struct usb_hcd *hcd, struct pci_dev *companion, struct usb_hcd *companion_hcd) { if (is_ohci_or_uhci(companion)) companion_hcd->self.hs_companion = NULL; }
false
false
false
false
false
0
isccc_alist_definestring(isccc_sexpr_t *alist, const char *key, const char *str) { isccc_sexpr_t *v, *kv; v = isccc_sexpr_fromstring(str); if (v == NULL) return (NULL); kv = isccc_alist_define(alist, key, v); if (kv == NULL) isccc_sexpr_free(&v); return (kv); }
false
false
false
false
false
0
Cop_toK_Aop_18( GenefxState *gfxs ) { int w = gfxs->length; u8 *D = gfxs->Aop[0]; u32 Dkey = gfxs->Dkey; u32 Cop = gfxs->Cop; while (w) { if (Dkey == ((u32)(D[2]<<16 | D[1]<<8 | D[0]) & 0x3FFFF)) { D[0] = Cop; D[1] = Cop >> 8; D...
false
false
false
false
false
0
test_IsOnSameAtom1() { OBConversion conv; conv.SetInFormat("smi"); OBMol mol; // // C I C I 0 5 // \ / | | | | // C===C | C C | | 1 3 | // / \ | | | | // Cl F Cl-----F 2------4 // OB_ASSERT( conv.ReadStri...
false
false
false
false
false
0
rtp_source_process_bye (RTPSource * src, const gchar * reason) { g_return_if_fail (RTP_IS_SOURCE (src)); GST_DEBUG ("marking SSRC %08x as BYE, reason: %s", src->ssrc, GST_STR_NULL (reason)); /* copy the reason and mark as received_bye */ g_free (src->bye_reason); src->bye_reason = g_strdup (reason); ...
false
false
false
false
false
0
e1000_regdump(struct e1000_hw *hw, struct e1000_reg_info *reginfo) { int n = 0; char rname[16]; u32 regs[8]; switch (reginfo->ofs) { case E1000_RXDCTL(0): for (n = 0; n < 2; n++) regs[n] = __er32(hw, E1000_RXDCTL(n)); break; case E1000_TXDCTL(0): for (n = 0; n < 2; n++) regs[n] = __er32(hw, E1000_TXD...
false
false
false
false
false
0
skip_out(archive_num num) { list<data_tree *>::iterator it = rejetons.begin(); data_tree::skip_out(num); while(it != rejetons.end()) { (*it)->skip_out(num); ++it; } }
false
false
false
false
false
0
dogosub(void) { int a; if(preturn==MAXGOSUBS) serror("Reached maximum GOSUB depth",3); a=pc; gettoken(); returns[preturn++]=pc; pc=a; dogoto(); }
false
false
false
false
false
0
handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const { ChineseCalendar *nonConstThis = (ChineseCalendar*)this; // cast away const // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { doub...
false
false
false
false
false
0
hpi_aesebu_transmitter_get_format(u32 h_control, u16 *pw_output_format) { u16 err; u32 param; err = hpi_control_param1_get(h_control, HPI_AESEBUTX_FORMAT, &param); if (!err && pw_output_format) *pw_output_format = (u16)param; return err; }
false
false
false
false
false
0
output(void) { int m, i0, i1, j0, j1; m = len[0]; J[0] = 0; J[m+1] = len[1]+1; if (mode != 'e') { for (i0 = 1; i0 <= m; i0 = i1+1) { while (i0 <= m && J[i0] == J[i0-1]+1) i0++; j0 = J[i0-1]+1; i1 = i0-1; while (i1 < m && J[i1+1] == 0) i1++; j1 = J[i1+1]-1; J[i1] = j1; change(i0, i1,...
false
false
false
false
false
0
probe_lexmark_devices (void) { FILE *fp; SANE_Char line[PATH_MAX]; const char *lp; SANE_Int vendor, product; size_t len; Lexmark_Device *dev; /* mark already detected devices as missing, during device probe * detected devices will clear this flag */ dev = first_lexmark_device; while (dev != NULL) ...
false
false
false
false
false
0
PrettyPrintModifiers(const vector<const ModifierAndValue*>& modvals, const string& separator) { string out; for (vector<const ModifierAndValue*>::const_iterator it = modvals.begin(); it != modvals.end(); ++it) { if (it != modvals.begin()) out.append(separator); ...
false
false
false
false
false
0
udp_listener_event(GIOChannel *channel, GIOCondition condition, struct listener_data *ifdata, int family, guint *listener_watch) { unsigned char buf[768]; char query[512]; struct request_data *req; struct sockaddr_in6 client_addr6; socklen_t client_addr6_len = sizeof(client_addr6); struct sockaddr_in clie...
true
true
false
false
false
1
InternalDeepCopy(vtkAbstractTransform *gtrans) { vtkPerspectiveTransform *transform = static_cast<vtkPerspectiveTransform *>(gtrans); // copy the input this->SetInput(transform->Input); // copy the concatenation this->Concatenation->DeepCopy(transform->Concatenation); // copy the stack if (transfor...
false
false
false
false
false
0
get_uchar_array (GKeyFile *keyfile, const char *setting_name, const char *key, gboolean zero_terminate, gboolean unescape_semicolon) { GByteArray *array = NULL; char *tmp_string; gint *tmp_list; gsize length; int i; /* New format: just a string ...
false
false
false
false
false
0
panel_applet_position_menu (GtkMenu *menu, int *x, int *y, gboolean *push_in, GtkWidget *widget) { PanelApplet *applet; GtkAllocation allocation; GtkRequisition requisition; GdkDevice *device; GdkScreen *screen; int menu_x = 0; int ...
false
false
false
false
false
0