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
refresh_clvmd(int all_nodes) { int num_responses; char args[1]; // No args really. lvm_response_t *response = NULL; int saved_errno; int status; int i; status = _cluster_request(CLVMD_CMD_REFRESH, all_nodes ? NODE_ALL : NODE_LOCAL, args, 0, &response, &num_responses, 0); /* If any nodes were down then display...
false
false
false
false
false
0
chooseDownloadProgram() { QString fileName = QFileDialog::getOpenFileName(this, tr("Choose Program"), externalDownloadPath->text()); if (fileName.contains(QLatin1Char(' '))) fileName = QString(QLatin1String("\"%1\"")).arg(fileName); externalDownloadPath->setText(fileName); }
false
false
false
false
false
0
getGOTEntrySize() { // We don't use the GOT in all of these cases, but it's essentially free // to put them all here. size_t Result = 0; switch (Arch) { case Triple::x86_64: case Triple::aarch64: case Triple::aarch64_be: case Triple::ppc64: case Triple::ppc64le: case Triple::systemz: Result = si...
false
false
false
false
false
0
mga_g200ev_set_plls(struct mga_device *mdev, long clock) { unsigned int vcomax, vcomin, pllreffreq; unsigned int delta, tmpdelta; unsigned int testp, testm, testn; unsigned int p, m, n; unsigned int computed; u8 tmp; m = n = p = 0; vcomax = 550000; vcomin = 150000; pllreffreq = 50000; delta = 0xffffffff; ...
false
false
false
false
false
0
handle_child( int commfd, struct program_result *res, struct error_buffer *errbuf) { // TODO: try using a SIGCHLD handler rather than blocking wait // * pause(3P) // * sigaction(3P) pid_t pid = wait4(res->pid, &res->status, 0, &res->rusage); if (pid < 0) { snprintf(...
false
false
false
false
false
0
make_am() /* Make the adjacency matrix of the graph */ { int i; EDGE *e,*ex; long ami; for (i = 0; i < nv; ++i) { ami = 0; e = ex = firstedge[i]; do { ami |= BIT(e->end); e = e->next; } while (e != ex); am[i] = ami; } }
false
false
false
false
false
0
j_process_lm_new(Recog *recog, JCONF_LM *lmconf) { PROCESS_LM *new, *ltmp; /* allocate memory */ new = (PROCESS_LM *)mymalloc(sizeof(PROCESS_LM)); memset(new, 0, sizeof(PROCESS_LM)); /* assign config */ new->config = lmconf; /* initialize some values */ new->lmtype = lmconf->lmtype; new->lmvar = lm...
false
false
false
false
false
0
create_new_hashtables(struct node_tables*t) { t->namemap = g_hash_table_new(g_str_hash, g_str_equal); if (t->namemap == NULL) { return FALSE; } t->uuidmap = g_hash_table_new(cl_uuid_g_hash, cl_uuid_g_equal); if (t->uuidmap == NULL) { g_hash_table_destroy(t->namemap); t->namemap = NULL; return FALSE; } re...
false
false
false
false
false
0
write(const std::string& str) { if (_proto_kind == binary) _write_str_bin(_socket, str); else _write_str(_socket, str); }
false
false
false
false
false
0
netsnmp_linux_interface_get_if_speed(int fd, const char *name, unsigned long long defaultspeed) { struct ifreq ifr; struct ethtool_cmd edata; memset(&ifr, 0, sizeof(ifr)); edata.cmd = ETHTOOL_GSET; edata.speed = 0; strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)-1); ifr.if...
false
false
false
false
false
0
utf2euc_4(ScmConvInfo *cinfo, unsigned char u0, const char *inptr, size_t inroom, char *outptr, size_t outroom, size_t *outchars) { unsigned char u1, u2, u3; unsigned short *tab = NULL; INCHK(4); if (u0 != 0xf0) { EUCJ_SUBST; ...
false
false
false
false
false
0
gstreamer_read_metadata_from_file (GFile *file, GFileInfo *info, GError **error) { char *uri; MetadataExtractor *extractor; if (! gstreamer_init ()) return FALSE; uri = g_file_get_uri (file); g_return_val_if_fail (uri != NULL, FALSE); extractor = g_slice_new0 (MetadataE...
false
false
false
false
false
0
pm_wakeup_pending(void) { unsigned long flags; bool ret = false; spin_lock_irqsave(&events_lock, flags); if (events_check_enabled) { unsigned int cnt, inpr; split_counters(&cnt, &inpr); ret = (cnt != saved_count || inpr > 0); events_check_enabled = !ret; } spin_unlock_irqrestore(&events_lock, flags); ...
false
false
false
false
false
0
refresh_identities (GoaKerberosIdentityManager *self, Operation *operation) { krb5_error_code error_code; krb5_ccache cache; krb5_cccol_cursor cursor; const char *error_message; GHashTable *refreshed_identities; /* If we have more refreshes queued up, don't bother doing...
false
false
false
false
false
0
holdPage(PageID pageID) { PageMap::iterator i = mPages.find(pageID); if (i != mPages.end()) i->second->touch(); }
false
false
false
false
false
0
IoObject_writeProtosToStore_stream_(IoObject *self, BStream *stream) { int i, protosCount = IoObject_rawProtosCount(self); BStream_writeTaggedInt32_(stream, protosCount); for (i = 0; i < protosCount; i ++) { IoObject *proto = IoObject_protoAt_(self, i); BStream_writeTaggedInt32_(stream, IoObject_pid(proto)); ...
false
false
false
false
false
0
Do( SpectralPeakArray& inputSinusoidalPeaks, Spectrum& inputResidualSpectrum, Audio& outputAudio, Audio& outputSinusoidalAudio, Audio& outputResidualAudio) { Spectrum tmpOutputSinSpec; Spectrum tmpOutputSpec; // init its size since we'll operate with these spectrums tmpOutputSinSpec.SetSize( inputResi...
false
false
false
false
false
0
process_jobs(struct list_head *jobs, struct dm_kcopyd_client *kc, int (*fn) (struct kcopyd_job *)) { struct kcopyd_job *job; int r, count = 0; while ((job = pop(jobs, kc))) { r = fn(job); if (r < 0) { /* error this rogue job */ if (job->rw & WRITE) job->write_err = (unsigned long) -1L; else ...
false
false
false
false
false
0
releaseCapability (Capability* cap USED_IF_THREADS) { ACQUIRE_LOCK(&cap->lock); releaseCapability_(cap, rtsFalse); RELEASE_LOCK(&cap->lock); }
false
false
false
false
false
0
gpiolib_seq_show(struct seq_file *s, void *v) { struct gpio_chip *chip = v; struct device *dev; seq_printf(s, "%sGPIOs %d-%d", (char *)s->private, chip->base, chip->base + chip->ngpio - 1); dev = chip->dev; if (dev) seq_printf(s, ", %s/%s", dev->bus ? dev->bus->name : "no-bus", dev_name(dev)); if (chip->...
false
false
false
false
false
0
get_map_row(int idx, int mod, int depth, int row, int col, void *buf, int res_type) { static CELL *ibuf; static DCELL *fbuf; map *m = &maps[idx]; switch (mod) { case 'M': read_map(m, buf, res_type, row, col); break; case '@': if (!ibuf) ibuf = G_malloc(columns * sizeof(CELL)); read_...
false
false
false
false
false
0
push_copy(struct script_stack *stack,int pos) { switch(stack->stack_data[pos].type){ case C_CONSTSTR: push_str(stack,C_CONSTSTR,stack->stack_data[pos].u.str); break; case C_STR: push_str(stack,C_STR,(unsigned char *)aStrdup(stack->stack_data[pos].u.str)); break; case C_PTR: push_ptr(stack,C_PTR,stack->sta...
false
false
false
false
false
0
folks_anti_linkable_has_anti_link_with_persona (FolksAntiLinkable* self, FolksPersona* other_persona) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; GeeSet* _tmp1_ = NULL; GeeSet* _tmp2_ = NULL; gboolean _tmp3_ = FALSE; gboolean _tmp10_ = FALSE; g_return_val_if_fail (other_persona != NULL, FALSE); _tmp1_ =...
false
false
false
false
false
0
get_webauth_krb5_ctxt(struct webauth_context *ctx, server_rec *server, const char *mwa_func) { struct webauth_krb5 *kc = NULL; int status; status = webauth_krb5_new(ctx, &kc); if (status != WA_ERR_NONE) { log_webauth_error(ctx, server, status, mwa_func, ...
false
false
false
false
false
0
receive (message_t *message_, bool block_) { int qid; if (block_) qid = blocking_receive (message_); else qid = non_blocking_receive (message_); // Once every api_thread_poll_rate messages check for signals and process // incoming commands. This happens only if we are not polling...
false
false
false
false
false
0
ep_queue(struct usb_ep *ep, struct usb_request *req, gfp_t __maybe_unused gfp_flags) { struct ci_hw_ep *hwep = container_of(ep, struct ci_hw_ep, ep); int retval = 0; unsigned long flags; if (ep == NULL || req == NULL || hwep->ep.desc == NULL) return -EINVAL; spin_lock_irqsave(hwep->lock, flags); retv...
false
false
false
false
false
0
GetBlockChild(const dReal* AABB){ if (Children){ for (int i = 0; i < SPLITS; i++){ if (Children[i].Inside(AABB)){ return Children[i].GetBlockChild(AABB); // Child will have good block } } } return this; // This is the best block }
false
false
false
false
false
0
sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, struct writeback_control *wbc) { pgoff_t index, end; struct pagevec pvec; int step = ino ? 2 : 0; int nwritten = 0, wrote = 0; pagevec_init(&pvec, 0); next_step: index = 0; end = LONG_MAX; while (index <= end) { int i, nr_pages; nr_pages = pagevec...
false
false
false
false
false
0
paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { QGraphicsRectItem::paint(painter, option, widget); if (m_flash) { m_flash = false; QTimer::singleShot(40, this, SLOT(restoreColor())); } bool save = m_showTerminalPoint || m_showMarquee; if (save) painter-...
false
false
false
false
false
0
searchManager() const { if (!d_ptr->factory || (d_ptr->searchError != QGeoServiceProvider::NoError)) return 0; if (!d_ptr->searchManager) { QGeoSearchManagerEngine *engine = d_ptr->factory->createSearchManagerEngine(d_ptr->parameterMap, &(d_ptr->searchE...
false
false
false
false
false
0
setSoundVolume(int volume) { m_soundVolume = MIX_MAX_VOLUME * volume / 100; if (m_soundVolume > MIX_MAX_VOLUME) { m_soundVolume = MIX_MAX_VOLUME; } else if (m_soundVolume < 0) { m_soundVolume = 0; } Mix_Volume(-1, m_soundVolume); }
false
false
false
false
false
0
gbemol_app_connect_mpd (GbemolApp* app) { if (!app->mpd) return; if (gbemol_cfg_get_bool("MPD", "use_auth")) gbemol_mpd_connect_and_authenticate (app->mpd); else gbemol_mpd_connect (app->mpd); gbemol_app_set_connected (app, gbemol_mpd_is_connected (app->mpd)); if (gbemol_mpd_is_connected (app->mpd)) { g...
false
false
false
false
false
0
seq_queue(unsigned char *note, char nonblock) { /* * Test if there is space in the queue */ if (qlen >= SEQ_MAX_QUEUE) if (!seq_playing) seq_startplay(); /* * Give chance to drain the queue */ if (!nonblock && qlen >= SEQ_MAX_QUEUE && !waitqueue_active(&seq_sleeper)) { /* * Sleep until...
false
false
false
false
false
0
Encrypt(const QByteArray &data) const { if(!_valid) { return QByteArray(); } QByteArray base(8, 0); Dissent::Utils::Serialization::WriteUInt(_key_id, base, 0); Dissent::Utils::Serialization::WriteUInt(_unique++, base, 4); return base.append(data); }
false
false
false
false
false
0
string2struct(void* value, size_t vallen, int depth, void** nv, size_t* nlen) { struct ha_msg *tmpmsg; if (!value || !nv || depth < 0){ cl_log(LOG_ERR, "string2struct:invalid input"); return HA_FAIL; } if (convert(value, vallen, depth,SYM_TO_NL) != HA_OK){ cl_log(LOG_ERR , "ha_msg_addraw_ll():...
false
false
false
false
false
0
update_ioasic_irq(void) { UINT16 fifo_state = ioasic_fifo_status_r(); UINT16 irqbits = 0x2000; UINT8 new_state; irqbits |= ioasic.sound_irq_state; if (fifo_state & 8) irqbits |= 0x0008; if (irqbits) irqbits |= 0x0001; ioasic.reg[IOASIC_INTSTAT] = irqbits; new_state = ((ioasic.reg[IOASIC_I...
false
false
false
false
false
0
MatchGroups(const char *g, int len, const char *pattern, bool exactmatch) { char *group, *groups, *q; int i, lastwhite; enum uwildmat matched; bool wanted = false; q = groups = xmalloc(len + 1); for (lastwhite = -1, i = 0 ; i < len ; i++) { /* trim white chars */ if (g[i] == '\r' || g[i] == ...
false
false
false
false
false
0
print_bm(block b, uint32 max) { uint32 i; printf("----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0\n"); for(i=1; i <= max; i++) { putchar(allocated(b, i) ? '*' : '.'); if(!(i % 100)) printf("\n"); } if((i-1) % 100) printf("\n"); }
false
false
false
false
false
0
Duplicate(bool forLine) { if (sel.Empty()) { forLine = true; } UndoGroup ug(pdoc, sel.Count() > 1); SelectionPosition last; const char *eol = ""; int eolLen = 0; if (forLine) { eol = StringFromEOLMode(pdoc->eolMode); eolLen = istrlen(eol); } for (size_t r=0; r<sel.Count(); r++) { SelectionPosition star...
false
false
false
false
false
0
ipmi_lcd_get_info_wh(struct ipmi_intf * intf) { IPMI_DELL_LCD_CAPS lcd_caps; char lcdstring[IPMI_DELL_LCD_STRING_LENGTH_MAX+1] = {0}; int rc; printf("LCD info\n"); if (ipmi_lcd_get_configure_command_wh(intf) != 0) { return -1; } if (lcd_mode.lcdmode== IPMI_DELL_LCD_CONFIG_DEFAULT) { char text[IPMI_DELL_LCD_S...
true
true
false
false
false
1
get_agi_cmd(struct ast_channel *chan) { struct ast_datastore *store; struct agi_cmd *cmd; AST_LIST_HEAD(, agi_cmd) *agi_commands; ast_channel_lock(chan); store = ast_channel_datastore_find(chan, &agi_commands_datastore_info, NULL); ast_channel_unlock(chan); if (!store) { ast_log(LOG_ERROR, "Huh? Async AGI dat...
false
false
false
false
false
0
journal_try_write(struct cache_set *c) __releases(c->journal.lock) { struct closure *cl = &c->journal.io; struct journal_write *w = c->journal.cur; w->need_write = true; if (!c->journal.io_in_flight) { c->journal.io_in_flight = 1; closure_call(cl, journal_write_unlocked, NULL, &c->cl); } else { spin_unloc...
false
false
false
false
false
0
ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev) { u8 active, recover; struct ata_timing t; /* Get the timing data in cycles. For now play safe at 50Mhz */ ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000); active = clamp_val(t.active, 2, 15); recover = clamp_val(t.recover, 2, 16) & 0x0...
false
false
false
false
false
0
E2alphabet_copy(n, str, type) Character *n; char *str; int type; { int i; for (i = 0; str[i] != '\0'; ++ i) { n[i].type = type; n[i].c1 = str[i]; } n[i].type = OTHER; n[i].c1 = 0; n[i].c2 = 0; }
false
false
false
false
false
0
kmo_wave_write_data_vector(const char *filename, const cpl_vector *vector, const char *extname) { cpl_propertylist *pl = cpl_propertylist_new(); cpl_propertylist_update_string(pl, "EXTNAME", extname); cpl_error_code error = cpl_vector_save(vector, filename,CPL_BPP_IEEE_DOUBLE,pl,CPL_IO_EXTEND);...
false
false
false
false
false
0
SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_); if (raw_buffer != NULL) { UninterpretedOption::SerializeWithCachedSizesToArray(raw_buffer); return; } // repeated...
false
false
false
false
false
0
skip_consec_insns (insn, count) rtx insn; int count; { for (; count > 0; count--) { rtx temp; /* If first insn of libcall sequence, skip to end. */ /* Do this at start of loop, since INSN is guaranteed to be an insn here. */ if (GET_CODE (insn) != NOTE && (temp = find_reg...
false
false
false
false
false
0
gd_tagged_entry_insert_tag (GdTaggedEntry *self, GdTaggedEntryTag *tag, gint position) { if (g_list_find (self->priv->tags, tag) != NULL) return FALSE; tag->priv->entry = self; self->priv->tags = g_list_insert (self->priv->tags, g_objec...
false
false
false
false
false
0
readSecretKeys() { if (m_gpgRunning) { QTimer::singleShot(5, this, SLOT(readSecretKeys())); return; } m_runMode = ListSecret; m_process = new KProcess(); *m_process << gpgExecutable() << "--no-secmem-warning" << "--no-tty" << "--with-colon" << "--list-secret-keys"; ...
false
false
false
false
false
0
addAlternativesFromParents(AltInfoArray altInfos, int verb, int level, Aint parameterNumber, Aint theClass, Aid theInstance, AltEntryFinder finder){ if (classes[theClass].parent != 0) addAlternativesFromParents(altInfos, verb, level, parameterNumber, ...
false
false
false
false
false
0
ReadIniStr(ini_t * ini, char *section, char *key, char *value, char *defvalue) { if (!_readinivalue(ini->pfile, section, key, value)) strcpy(value, defvalue); return value; }
false
false
false
false
false
0
t1_hinter__is_stem_hint_applicable(t1_hinter * self, t1_hint *hint, int pole_index, int *quality) { /* We don't check hint->side_mask because the unused coord should be outside the design bbox. */ int k; if (hint->type == hstem && ((k = 1, t1_hinter__is_stem_boundary_near(self, hint, self->pole[p...
false
false
false
false
false
0
getName(StringRef &Result) const { uintptr_t IntPtr = 0; if (std::error_code EC = OwningObject->getRvaPtr(Table[Index].Name, IntPtr)) return EC; Result = StringRef(reinterpret_cast<const char *>(IntPtr)); return std::error_code(); }
false
false
false
false
false
0
get_stream() { Glib::RefPtr < Gtk::TreeSelection > selection = this->get_selection(); Gtk::TreeModel::iterator iter = selection->get_selected(); if (!selection->count_selected_rows()) return std::string(); return (*iter)[columns.stream]; }
false
false
false
false
false
0
regcomp(regex_t*__restrict__ preg, const char*__restrict__ regex, int cflags) { const char* t; preg->cflags=cflags; t=parseregex(&preg->r,regex,preg); if (t==regex && *regex!=0) return -1; regex_putnext(&preg->r,0); return 0; }
false
false
false
false
false
0
setDOMDocument(const QDomDocument &document, bool merge) { QDomDocument doc = buildDomDocument(document); KXMLGUIClient::setDOMDocument(doc, merge); }
false
false
false
false
false
0
getRegPressureLimit(const TargetRegisterClass *RC, MachineFunction &MF) const { const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); switch (RC->getID()) { default: return 0; case ARM::tGPRRegClassID: return TFI->hasFP(MF) ? 4 : 5; case ARM::GPR...
false
false
false
false
false
0
operator=(const Wave& cpy) { if(m_data != 0) delete [] m_data; m_size = cpy.m_size; m_data = new sample_type[m_size]; for(size_type i=0; i < m_size; i++) m_data[i] = cpy.m_data[i]; return *this; }
false
false
false
false
false
0
dissect(const std::string& child, std::string& destination) const { const XMLNode* c = getChild(child); if (c != 0) { destination = c->getText(); return true; } else { return false; } }
false
false
false
false
false
0
__ecereProp___ecereNameSpace__ecere__com__Array_Set_size(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int value) { struct __ecereNameSpace__ecere__com__Array * __ecerePointer___ecereNameSpace__ecere__com__Array = (struct __ecereNameSpace__ecere__com__Array *)(this ? (((char *)this) + 12) : 0); if(__e...
false
false
false
true
false
1
CHECKVAL<uint64>(lua_State* L, int narg, uint64 def) { const char* c_str = CHECKVAL<const char*>(L, narg, NULL); if (!c_str) return def; uint64 l = 0; sscanf(c_str, UI64FMTD, &l); return l; }
false
false
false
false
false
0
init() { GtkAdjustment* adj = gtk_range_get_adjustment(GTK_RANGE(widget)); if (_min == _max) _max = _min + 1; if (_value < _min) _value = _min; else if (_value > _max) _value = _max; if (g_typ == Type_gSlider) { gtk_range_set_range(GTK_RANGE(widget), (gdouble)_min, (gdouble)_max); gtk_range_set_in...
false
false
false
false
false
0
on_sel_changed(GtkTreeSelection* tree_sel, FmDirTreeView* view) { GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); /* unload row of old selection if it's not expanded */ if(view->current_row) { GtkTreePath *tp = gtk_tree_row_reference_get_path(view->current_row); GtkT...
false
false
false
false
false
0
da9030_init_chip(struct da903x_chip *chip) { uint8_t chip_id; int err; err = __da903x_read(chip->client, DA9030_CHIP_ID, &chip_id); if (err) return err; err = __da903x_write(chip->client, DA9030_SYS_CTRL_A, 0xE8); if (err) return err; dev_info(chip->dev, "DA9030 (CHIP ID: 0x%02x) detected\n", chip_id); r...
false
false
false
false
false
0
msi2500_start_streaming(struct vb2_queue *vq, unsigned int count) { struct msi2500_dev *dev = vb2_get_drv_priv(vq); int ret; dev_dbg(dev->dev, "\n"); if (!dev->udev) return -ENODEV; if (mutex_lock_interruptible(&dev->v4l2_lock)) return -ERESTARTSYS; /* wake-up tuner */ v4l2_subdev_call(dev->v4l2_subdev, ...
false
false
false
false
false
0
nilfs_sufile_updatev(struct inode *sufile, __u64 *segnumv, size_t nsegs, int create, size_t *ndone, void (*dofunc)(struct inode *, __u64, struct buffer_head *, struct buffer_head *)) { struct buffer_head *header_bh, *bh; unsigned long blkoff, prev_blkoff; __u64 *seg; size_t nerr = 0, n = 0; int r...
false
false
false
false
false
0
istgt_queue_dequeue(ISTGT_QUEUE_Ptr head) { ISTGT_QUEUE_Ptr first; ISTGT_QUEUE_Ptr next; void *elem; if (head == NULL) return NULL; first = head->next; if (first == NULL || first == head) { return NULL; } else { elem = first->elem; next = first->next; xfree(first); if (next == NULL) { head->next ...
false
false
false
false
false
0
mime_dump_part(Mime_part *part) { static char *enc[] = { "7bit", "8bit", "binary", "quoted-printable", "base64", "*error*" }; if (part != NULL) { mime_dump_content_type(part->type); mime_dump_content_disposition(part->disposition); log_msg((LOG_TRACE_LEVEL, "Content-Transfer-Encoding: %s", enc[part->enc...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__PaneSplitter_OnLeftButtonUp(struct __ecereNameSpace__ecere__com__Instance * this, int x, int y, unsigned int mods) { struct __ecereNameSpace__ecere__PaneSplitter * __ecerePointer___ecereNameSpace__ecere__PaneSplitter = (struct __ecereNameSpace__ecere__PaneSplitter *)(this ? (((cha...
false
false
false
true
false
1
xfs_sb_quiet_read_verify( struct xfs_buf *bp) { struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp); if (dsb->sb_magicnum == cpu_to_be32(XFS_SB_MAGIC)) { /* XFS filesystem, verify noisily! */ xfs_sb_read_verify(bp); return; } /* quietly fail */ xfs_buf_ioerror(bp, -EWRONGFS); }
false
false
false
false
false
0
ralloc_vasprintf_append(char **str, const char *fmt, va_list args) { size_t existing_length, new_length; char *ptr; assert(str != NULL); if (unlikely(*str == NULL)) { // Assuming a NULL context is probably bad, but it's expected behavior. *str = ralloc_vasprintf(NULL, fmt, args); return ...
false
false
false
false
true
1
scopeSig(const char *scope) { if (scope && scope[0] != '\0') { postSig(scope); } else { scope = NULL; } pointerScopeStack[pointerScopeDepth++] = vtkstrdup(scope); }
false
false
false
false
false
0
OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC myDC(this); if (m_bNewNoticeAlert) { wxRect r = m_NoticesButton->GetRect(); if (m_bNoticesButtonIsRed) { CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple(); wxPen oldPen = myDC.GetPen(); wxBrush oldBrush...
false
false
false
false
false
0
init( const Spgr_descr& spgr_descr ) { // init spgr descr hash_ = spgr_descr.hash(); generators_ = spgr_descr.generator_ops(); // init cache entry cacheref = ClipperInstantiator::instance().spacegroup_cache().cache( spgr_descr ); symops = &(cacheref.data().symops[0]); isymops = &(cacheref.data().isymops[...
false
false
false
false
false
0
free_tsync_kv(void *value, void *unused_udata) { struct tsync *ts = value; (void) unused_udata; g_assert(ts); g_assert(ts->magic == TSYNC_MAGIC); tsync_free(ts); }
false
false
false
false
false
0
findCurrentArtist(GMList * list,GMSource * src) { GMDatabaseSource * dbs = dynamic_cast<GMDatabaseSource*>(src); if (dbs && dbs->getCurrentTrack()!=-1 ){ FXint artist,album; db->getTrackAssociation(dbs->getCurrentTrack(),artist,album); if (artist==-1) return false; for (FXint i=0;i<list->getNumItems...
false
false
false
false
false
0
wep_print(const u_char *p) { u_int32_t iv; if (!TTEST2(*p, IEEE802_11_IV_LEN + IEEE802_11_KID_LEN)) return 0; iv = EXTRACT_LE_32BITS(p); printf("Data IV:%3x Pad %x KeyID %x", IV_IV(iv), IV_PAD(iv), IV_KEYID(iv)); return 1; }
false
false
false
false
false
0
ParseUnaryExpression(bool* ok) { // UnaryExpression :: // PostfixExpression // 'delete' UnaryExpression // 'void' UnaryExpression // 'typeof' UnaryExpression // '++' UnaryExpression // '--' UnaryExpression // '+' UnaryExpression // '-' UnaryExpression // '~' UnaryExpression // ...
false
false
false
false
false
0
prepare_crypto (GkmSession *self, CK_MECHANISM_PTR mech, CK_ATTRIBUTE_TYPE method, CK_OBJECT_HANDLE handle) { GkmObject *object; CK_MECHANISM_TYPE_PTR mechanisms; CK_ULONG n_mechanisms, i; gsize n_data; gboolean have; gulong key_type; CK_RV rv; g_assert (GKM_IS_SESSION (self)); /* Cancel any ...
false
false
false
false
false
0
L1Distance(const R3Grid& voxels) const { // Compute distance between this and grid RNScalar distance = 0.0; for (int i = 0; i < grid_size; i++) distance += fabs(grid_values[i] - voxels.grid_values[i]); return distance; }
false
false
false
false
false
0
adxl34x_i2c_read_block(struct device *dev, unsigned char reg, int count, void *buf) { struct i2c_client *client = to_i2c_client(dev); int ret; ret = i2c_master_send(client, &reg, 1); if (ret < 0) return ret; ret = i2c_master_recv(client, buf, count); if (ret < 0) return ret; if (ret != count) ...
false
false
false
false
false
0
glusterfs_volume_top_write_perf (void *args) { int32_t fd = -1; int32_t input_fd = -1; char export_path[PATH_MAX]; char *buf = NULL; uint32_t blk_size = 0; uint32_t blk_cou...
false
false
false
true
false
1
get_field_y(const Glib::ustring& field_name) const { type_map_fields_y::const_iterator iterFind = m_map_fields_y.find(field_name); if(iterFind != m_map_fields_y.end()) return iterFind->second + 10.0; //Added an offset so that lines point approximately to the middle of the text. else return 0; }
false
false
false
false
false
0
Infoclr_Opcode(const char *str) { register int i; /* Scan through all legal operation names */ for (i = 0; opcode_pairs[i*2]; ++i) { /* Is this the right oprname? */ if (streq(opcode_pairs[i*2], str)) { /* Convert the second element in the pair into a Code */ return (atoi(opcode_pairs[i*2+1])); } } ...
false
false
false
false
false
0
evaluate_branch(uint8_t test_result) { uint8_t branchbyte0 = *(pc++); int16_t branch_offset; if ((branchbyte0 & 0x40) != 0) { branch_offset = (int16_t)(branchbyte0 & 0x3f); } else { branch_offset = (int16_t)(branchbyte0 & 0x1f); TRACE_LOG("Branch offset is: $%x.\n", branch_offset); /*@-sh...
false
false
false
false
false
0
evd_tls_credentials_add_certificate (EvdTlsCredentials *self, EvdTlsCertificate *cert, EvdTlsPrivkey *privkey, GError **error) { gpointer _cert; gpointer _privkey; EvdTlsCertificateType...
false
false
false
false
false
0
dodis() { register int i, n; register long j; register char_u *p; register struct yankbuf *yb; gotocmdline(TRUE, NUL); msg_outstr((char_u *)"--- Registers ---"); #ifdef NT for (i = -1; i < 37; ++i) #else for (i = -1; i < 36; ++i) #endif { if (i == -1) { if (y_previous != NULL) yb = y_previou...
false
false
false
false
false
0
finalizeObject(JNIEnv *jenv, PyObject *obj) { PythonGIL gil; set_vm_env(jenv); Py_DECREF(obj); }
false
false
false
false
false
0
OTF_RBuffer_close( OTF_RBuffer* rbuffer ) { int ret= 1; ret &= OTF_File_close( rbuffer->file ); rbuffer->file= NULL; if( rbuffer->list != NULL) { OTF_KeyValueList_close( rbuffer->list); } OTF_RBuffer_finish( rbuffer ); free( rbuffer ); rbuffer = NULL; return ret; }
false
false
false
false
false
0
cos_write_stream_alloc(cos_stream_t *pcs, gx_device_pdf *pdev, client_name_t cname) { gs_memory_t *mem = pdev->pdf_memory; stream *s = s_alloc(mem, cname); cos_write_stream_state_t *ss = (cos_write_stream_state_t *) s_alloc_state(mem, &st_cos_write_stream_state, cname); #defin...
false
false
false
false
false
0
acb_project_get_logfile (AcbProject *project, AcbProjectKind kind) { AcbProjectPrivate *priv = project->priv; gchar *filename = NULL; gchar *logfile = NULL; if (kind == ACB_PROJECT_KIND_BUILDING_LOCALLY) filename = g_strdup_printf ("%s-%s", priv->package_name, "make.log"); else if (kind == ACB_PROJECT_KIND_BUIL...
false
false
false
false
false
0
WriteImageStride(unsigned char *img, int stride, int cx, int cy) { if (WritePNG(szFile, img, stride, cx, cy) == -1) outputf("Error creating file %s\n", szFile); imagesWritten++; ProgressValueAdd(1); }
false
false
false
false
false
0
gsd_clipboard_manager_stop (GsdClipboardManager *manager) { g_debug ("Stopping clipboard manager"); if (manager->priv->window != None) { clipboard_manager_watch_cb (manager, manager->priv->window, FA...
false
false
false
false
false
0
_clutter_x11_event_source_new (ClutterBackendX11 *backend_x11) { ClutterEventSource *event_source; int connection_number; GSource *source; gchar *name; connection_number = ConnectionNumber (backend_x11->xdpy); CLUTTER_NOTE (EVENT, "Connection number: %d", connection_number); source = g_source_new (&even...
false
false
false
false
false
0
L15__IGNORE_ERRORS__clcs_handler() {register object *base=vs_base; register object *sup=base+VM15; VC15 vs_check;vs_top=sup; {object V108=base[0]->c.c_cdr; base[2]= V108;} base[3]= list(3,((object)VV[57]),make_cons(((object)VV[64]),base[2]),((object)VV[65])); vs_top=(vs_base=base+3)+1; return; }
false
false
false
false
false
0
text_delete(Text *txt, size_t pos, size_t len) { if (len == 0) return true; if (pos + len > txt->size) return false; if (pos < txt->lines.pos) lineno_cache_invalidate(&txt->lines); Location loc = piece_get_intern(txt, pos); Piece *p = loc.piece; if (!p) return false; size_t off = loc.off; if (cache_del...
false
false
false
false
false
0
frame_geom(client_t *c) { geom_t f = c->geom; /* everything else is the same as c->geom was */ f.h = frame_height(c) + (c->shaded ? -BW(c) : c->geom.h); /* X, in its perpetual helpfulness, always does native borders NorthWest * style. This, as usual, ruins everything. So we compensate. */ swi...
false
false
false
false
false
0
auth_krb5 ( /* PARAMETERS */ const char *user, /* I: plaintext authenticator */ const char *password, /* I: plaintext password */ const char *service, /* I: service authenticating to */ const char *realm /* I: user's realm */ /* END PARAMETERS */ ) { /* VARIABLES */ krb5_context context; ...
false
false
false
false
false
0
_cpl_frameset_cache_empty(const cpl_frameset *self, cpl_frameset_cacheid id) { cxbool state; switch (id) { case TAG: state = self->cache.tag == NULL; break; case POS: state = self->cache.pos == NULL; break; case ALL: state = (self->cache.tag == NULL && se...
false
false
false
false
false
0
removeRows( int row, int count, const QModelIndex &parent ) { DEBUG_BLOCK bool result; debug() << "in parent " << parent << "remove " << count << " starting at row " << row; if( !parent.isValid() ) { QModelIndex folderIdx = index( row, 0, QModelIndex() ); if( isGroup( folderIdx ) ) ...
false
false
false
false
false
0