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
method_56(const int *account, int *weight) { number2Array("4327654320", weight); int result = 11 - algo03(11, weight, false, account, 0, 9); // Ausnahme fuer 9 als erste Stelle; nach Hinweis von Michael // Plugge <m.plugge@fh-mannheim.de> if (result > 9) { if (account[0] == 9) { if (result == ...
false
false
false
false
false
0
qh_pointid (pointT *point) { unsigned id; if (!point) return -3; id= ((unsigned long) point - (unsigned long) qh first_point)/qh normal_size; if ((int)id >= qh num_points) { if (point == qh interior_point) id= (unsigned int) -2; else if ((int)(id= qh_setindex (qh other_points, point)) != -1) ...
false
false
false
false
false
0
source_load_from_key_file (GObject *object, GKeyFile *key_file, const gchar *group_name) { GObjectClass *class; GParamSpec **properties; guint n_properties, ii; class = G_OBJECT_GET_CLASS (object); properties = g_object_class_list_properties (class, &n_propert...
false
false
false
false
false
0
description() const { ostringstream ostr; ostr << _phimin << " <= phi <= " << _phimax; return ostr.str(); }
false
false
false
false
false
0
bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css) { if (unlikely(bio->bi_css)) return -EBUSY; css_get(blkcg_css); bio->bi_css = blkcg_css; return 0; }
false
false
false
false
false
0
readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) { redisClient *c = (redisClient*) privdata; char buf[REDIS_IOBUF_LEN]; int nread; REDIS_NOTUSED(el); REDIS_NOTUSED(mask); nread = read(fd, buf, REDIS_IOBUF_LEN); if (nread == -1) { if (errno == EAGAIN) { ...
false
false
false
false
false
0
hostlist_coalesce(hostlist_t hl) { int i, j; hostrange_t new; LOCK_HOSTLIST(hl); for (i = hl->nranges - 1; i > 0; i--) { new = hostrange_intersect(hl->hr[i - 1], hl->hr[i]); if (new) { hostrange_t hprev = hl->hr[i - 1]; hostrange_t hnext = hl->hr[i]; ...
false
false
false
false
false
0
comboentry_index_from_id(const ComboEntry centries[], guint32 id) { gint i; g_return_val_if_fail (centries, -1); /* handle field types not yet supported */ if (centries == splaction_notsupported_comboentries) return 0; for (i = 0; centries[i].str; ++i) { if (centries[i].id == id) ...
false
false
false
false
false
0
Print_CSeq(FILE *fp, allseq *alldata) { int i,j,k; int n_otu; n_otu = alldata->n_otu; fprintf(fp,"%d\t%d\n",n_otu,alldata->init_len); For(i,n_otu) { For(j,23) { if(j<(int)strlen(alldata->c_seq[i]->name)) fputc(alldata->c_seq[i]->name[j],fp); else fputc(' ',fp); } For(j,alldat...
false
false
false
false
false
0
remove_entry (ACE_Token::ACE_Token_Queue_Entry *entry) { ACE_TRACE ("ACE_Token::ACE_Token_Queue::remove_entry"); ACE_Token_Queue_Entry *curr = 0; ACE_Token_Queue_Entry *prev = 0; if (this->head_ == 0) return; for (curr = this->head_; curr != 0 && curr != entry; curr = curr->next_) prev...
false
false
false
false
false
0
is_valid(void) const { if (csetup_repp == 0 || csetup_repp->is_enabled() != true || csetup_repp->is_valid() != true || chains_repp == 0 || chains_repp->size() == 0 || inputs_repp == 0 || inputs_repp->size() == 0 || outputs_repp == 0 || outputs_repp->size() == 0) { ...
false
false
false
false
false
0
pt_buffer_setup_aux(int cpu, void **pages, int nr_pages, bool snapshot) { struct pt_buffer *buf; int node, ret; if (!nr_pages) return NULL; if (cpu == -1) cpu = raw_smp_processor_id(); node = cpu_to_node(cpu); buf = kzalloc_node(offsetof(struct pt_buffer, topa_index[nr_pages]), GFP_KERNEL, node); if...
false
false
false
false
false
0
event_system_start_free (CkLogSystemStartEvent *event) { g_assert (event != NULL); g_free (event->kernel_release); g_free (event->boot_arguments); }
false
false
false
false
false
0
expose_cb (GtkWidget * widget, GdkEventExpose * event) { gxineinfo_private_t *priv; gtk_paint_flat_box (widget->style, widget->window, GTK_WIDGET_STATE (widget), GTK_SHADOW_NONE, &event->area, widget, gtk_widget_get_name (widget), widget->allocation.x, widget->allocation.y, widget->a...
false
false
false
false
false
0
gst_rtp_asf_pay_parse_headers (GstRtpAsfPay * rtpasfpay) { gchar *maxps; g_return_val_if_fail (rtpasfpay->headers, GST_FLOW_ERROR); if (!gst_asf_parse_headers (rtpasfpay->headers, &rtpasfpay->asfinfo)) goto error; GST_DEBUG_OBJECT (rtpasfpay, "Packets number: %" G_GUINT64_FORMAT, rtpasfpay->asfinfo....
false
false
false
false
false
0
execd_merge_load_report(u_long32 seqno) { if (last_lr == NULL || seqno != lGetUlong(last_lr, REP_seqno)) { return; } else { lListElem *old_lr; for_each(old_lr, lGetList(last_lr, REP_list)) { const void *iterator = NULL; const char *hostname = lGetHost(old_lr, LR_host); ...
false
false
false
false
false
0
usbtouch_reset_resume(struct usb_interface *intf) { struct usbtouch_usb *usbtouch = usb_get_intfdata(intf); struct input_dev *input = usbtouch->input; int err = 0; /* reinit the device */ if (usbtouch->type->init) { err = usbtouch->type->init(usbtouch); if (err) { dev_dbg(&intf->dev, "%s - type->init()...
false
false
false
false
false
0
init_masks() { for(Square s = SQ_A1; s <= SQ_H8; s++) { SetMaskBB[s] = (1ULL << s); ClearMaskBB[s] = ~SetMaskBB[s]; } for(Color c = WHITE; c <= BLACK; c++) for(Square s = SQ_A1; s <= SQ_H8; s++) { PassedPawnMask[c][s] = in_front_bb(c, s) & this_and_neighboring_files_bb(s)...
false
false
false
false
false
0
alloc_image ( void ) { struct image *image; image = zalloc ( sizeof ( *image ) ); if ( image ) { ref_init ( &image->refcnt, free_image ); } return image; }
false
false
false
false
false
0
activated (reader_t *pipe_) { for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end (); ++it) { if (it->reader == pipe_) { zmq_assert (!it->active); it->active = true; return; } } zmq_assert (false); }
false
false
false
false
false
0
int_round(int argc, VALUE* argv, VALUE num) { VALUE n; int ndigits; if (argc == 0) return num; rb_scan_args(argc, argv, "1", &n); ndigits = NUM2INT(n); if (ndigits > 0) { return rb_Float(num); } if (ndigits == 0) { return num; } return int_round_0(num, ndigits); }
false
false
false
false
false
0
btrfs_iget_by_inr(struct fs_info *fs, u64 inr) { struct inode *inode; struct btrfs_inode_item inode_item; struct btrfs_disk_key search_key; struct btrfs_path path; int ret; /* FIXME: some BTRFS inode member are u64, while our logical inode is u32, we may need change them to u64 later */ search_key.ob...
false
false
false
false
false
0
ldns_resolver_restore_rtt(ldns_resolver *r, size_t *old_rtt) { size_t *cur_rtt = ldns_resolver_rtt(r); if (cur_rtt) { LDNS_FREE(cur_rtt); } ldns_resolver_set_rtt(r, old_rtt); }
false
false
false
false
false
0
ast_aoc_set_termination_request(struct ast_aoc_decoded *decoded) { if (decoded->msg_type != AST_AOC_REQUEST) { return -1; } decoded->termination_request = 1; return 0; }
false
false
false
false
false
0
goo_canvas_set_adjustments (GooCanvas *canvas, GtkAdjustment *hadj, GtkAdjustment *vadj) { gboolean need_reconfigure = FALSE; g_return_if_fail (GOO_IS_CANVAS (canvas)); if (hadj) g_return_if_fail (GTK_IS_ADJUSTMENT (hadj)); else if (canvas->hadjustment) hadj = GTK_ADJUSTMENT (gtk_adj...
false
false
false
false
false
0
calcTangentIntersectionPoints(const Vector2D startPoint, Vector2D &point1, Vector2D &point2){ if(isInside(startPoint)){ // Startpoint is inside circle -> there are no tangent interception points return(false); } //float d = posCenter.getLength()-startPoint.getLength(); float d = (posCenter-startPoint)....
false
false
false
false
false
0
find_battery(const struct dmi_header *dm, void *private) { struct acpi_battery *battery = (struct acpi_battery *)private; /* Note: the hardcoded offsets below have been extracted from the source code of dmidecode. */ if (dm->type == DMI_ENTRY_PORTABLE_BATTERY && dm->length >= 8) { const u8 *dmi_data = (const ...
false
false
false
false
false
0
doesfileexist(const char *f) { int fd; updatecontext(); if (!f) return 0; if ((fd = open(f,O_RDONLY | O_CREAT | O_EXCL | ADDED_OPEN_FLAGS, CREAT_PERMISSIONS)) < 0 && errno == EEXIST) return 1; else if (fd < 0) return 0; close(fd); unlink(f); return 0; }
false
false
false
false
true
1
set_thr_exit (ACE_TSS_TYPE (ACE_Thread_Exit) *ptr) { if (ACE_Thread_Manager::thr_exit_ == 0) ACE_Thread_Manager::thr_exit_ = ptr; else return -1; return 0; }
false
false
false
false
false
0
mx_application_get_actions (MxApplication *application) { MxApplicationPrivate *priv = application->priv; if (priv->is_proxy) { #ifdef HAVE_DBUS /* Refresh our list of actions if necessary */ if (!priv->actions_valid) { DBusGProxy *proxy = mx_application_get_dbus_proxy (applicatio...
false
false
false
false
false
0
des_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) { switch(type) { case EVP_CTRL_RAND_KEY: if (RAND_bytes(ptr, 8) <= 0) return 0; DES_set_odd_parity((DES_cblock *)ptr); return 1; default: return -1; } }
false
false
false
false
false
0
terminaltypeok (char *s) { #ifdef HAVE_TGETENT char buf[2048]; if (terminaltype == NULL) return 1; if (tgetent (buf, s) == 0) return 0; #endif /* HAVE_TGETENT */ return 1; }
false
false
false
false
false
0
do_get_nth_value(struct trie_node *node, int n) { struct record_val *v = get_nth_val_ent(node, n, 0); if (v && v->type == RT_VAL) { return v->u.val; } return 0; }
false
false
false
false
false
0
set_elements(const DynamicAny::AnySeq& as) { CHECK_NOT_DESTROYED; if( as.length() != pd_n_components ) throw DynamicAny::DynAny::InvalidValue(); for( unsigned i = 0; i < pd_n_components; i++ ) { if( !component_from_any(i, as[i]) ) throw DynamicAny::DynAny::TypeMismatch(); } }
false
false
false
false
false
0
host_peer_busy(struct host *host) { struct peer *unresponsive_peer = NULL; static const char diag[] = "host_peer_busy"; static const char back_channel_diag[] = "back_channel"; gfarm_mutex_lock(&host->back_channel_mutex, diag, back_channel_diag); if (!host->is_active || host->invalid) ; else if (host->busy_time...
false
false
false
false
false
0
disqualify_base_of_expr (tree t, const char *reason) { t = get_base_address (t); if (t && sra_mode == SRA_MODE_EARLY_IPA && TREE_CODE (t) == MEM_REF) t = get_ssa_base_param (TREE_OPERAND (t, 0)); if (t && DECL_P (t)) disqualify_candidate (t, reason); }
false
false
false
false
true
1
CreateMachineBasicBlock(const BasicBlock *bb) { return new (BasicBlockRecycler.Allocate<MachineBasicBlock>(Allocator)) MachineBasicBlock(*this, bb); }
false
false
false
false
false
0
bash_directory_completion_matches (text) const char *text; { char **m1; char *dfn; int qc; qc = rl_dispatching ? rl_completion_quote_character : 0; dfn = bash_dequote_filename ((char *)text, qc); m1 = rl_completion_matches (dfn, rl_filename_completion_function); free (dfn); if (m1 == 0 || m1[0]...
false
false
false
false
false
0
gt_bsGetUInt64(constBitString str, BitOffset offset, unsigned numBits) { unsigned long long accum = 0; unsigned bitsLeft = numBits, bitTop = offset%bitElemBits; size_t elemStart = offset/bitElemBits; const BitElem *p = str + elemStart; gt_assert(str); #ifndef NDEBUG if (numBits > sizeof (accum)*CHAR_BIT) ...
false
false
false
false
false
0
extractPoint(double index, double offsetDistance) const { LinearLocation loc = LengthLocationMap::getLocation(linearGeom, index); Coordinate ret; loc.getSegment(linearGeom)->pointAlongOffset(loc.getSegmentFraction(), offsetDistance, ret); return ret; }
false
false
false
false
false
0
HD44780_set_brightness(Driver *drvthis, int state, int promille) { PrivateData *p = drvthis->private_data; /* Check it */ if (promille < 0 || promille > 1000) return; /* store the software value since there is not get */ if (state == BACKLIGHT_ON) { p->brightness = promille; } else { p->offbrightness = p...
false
false
false
false
false
0
new_beta_list(GtkWidget *hboxall) { GtkWidget *frame; GtkWidget *scr; GtkWidget *vbox; GtkWidget *gtklist; gint i; gint N; gdouble* Energies; gdouble* Occ; gchar** sym; static gint type = 2; gint widall = 0; N = NBetaOrb; Energies = g_malloc(N*sizeof(gdouble)); Occ = g_malloc(N*sizeof(gdouble)); sym = g...
false
false
false
false
false
0
hwi_post_async_buffers(struct beiscsi_hba *phba, unsigned int is_header, uint8_t ulp_num) { struct hwi_controller *phwi_ctrlr; struct hwi_async_pdu_context *pasync_ctx; struct async_pdu_handle *pasync_handle; struct list_head *pfree_link, *pbusy_list; struct phys_addr *pasync_sge; unsigned int ring_id, nu...
false
false
false
true
false
1
avg_tpel_pixels_mc00_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){ switch(width){ case 2: avg_pixels2_c (dst, src, stride, height); break; case 4: avg_pixels4_c (dst, src, stride, height); break; case 8: avg_pixels8_c (dst, src, stride, height); break; case 16:avg_pixels16_...
false
false
false
false
false
0
conv_star(struct jmt *jmt, struct lens *lens, struct state **s, struct state **e, struct state **f) { *s = make_state(jmt); *e = make_state(jmt); *f = make_state(jmt); ERR_BAIL(jmt); struct state *si, *ei, *fi, *scall, *fcall; conv(jmt, lens->child, ...
false
false
false
false
false
0
ipath_user_sdma_pin_pages(const struct ipath_devdata *dd, struct ipath_user_sdma_pkt *pkt, unsigned long addr, int tlen, int npages) { struct page *pages[2]; int j; int ret; ret = get_user_pages_fast(addr, npages, 0, pages); if (ret != npages) { int i; for (i = 0; i < ret; i++) put_page(...
false
false
false
false
true
1
z_check_unicode (void) { zword c = zargs[0]; if (c >= 0x20 && c <= 0x7e) store (3); else if (c == 0xa0) store (1); else if (c >= 0xa1 && c <= 0xff) store (3); else store (0); }
false
false
false
false
false
0
contains(const std::string name, bool recurse) const { CYG_REPORT_FUNCNAMETYPE("CdlContainer::contains (name)", "result %d"); CYG_REPORT_FUNCARG2XV(this, recurse); CYG_PRECONDITION_THISC(); CYG_PRECONDITIONC("" != name); bool result = false; std::vector<CdlNode>::const_iterator node_i; for ...
false
false
false
false
false
0
refreshContactPoints(const btTransform& trA,const btTransform& trB) { int i; #ifdef DEBUG_PERSISTENCY printf("refreshContactPoints posA = (%f,%f,%f) posB = (%f,%f,%f)\n", trA.getOrigin().getX(), trA.getOrigin().getY(), trA.getOrigin().getZ(), trB.getOrigin().getX(), trB.getOrigin().getY(), trB.getOrigin()...
false
false
false
false
false
0
rc_input_new_inet(const char *path, int type) { char *s_addr, *s_port; uint32_t addr; int port; struct sockaddr_in sin; int fd; if (!(s_port = strchr(path, ':'))) { errno = EINVAL; return -1; } s_addr = xstrndup(path, s_port - path); addr = inet_addr(s_addr); port = atoi(s_port + 1); xfree(s_addr); ...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); MediaInfo *_t = static_cast<MediaInfo *>(_o); switch (_id) { case 0: _t->pruneVol(); break; case 1: _t->purgeVol(); brea...
false
false
false
false
false
0
esl_dmatrix_Destroy(ESL_DMATRIX *A) { if (A != NULL && A->mx != NULL && A->mx[0] != NULL) free(A->mx[0]); if (A != NULL && A->mx != NULL) free(A->mx); if (A != NULL) free(A); return eslOK; }
false
false
false
false
false
0
sumEvenTermsFib (const int max) { int sum = 0; int last = 0; int n = 2; int nextEven; while (n < ONE_MILLION) { sum += n; nextEven = n * 4 + last; last = n; n = nextEven; } return sum; }
false
false
false
false
false
0
update_clip(const struct adapter *adap) { int i; struct net_device *dev; int ret; rcu_read_lock(); for (i = 0; i < MAX_NPORTS; i++) { dev = adap->port[i]; ret = 0; if (dev) ret = cxgb4_update_root_dev_clip(dev); if (ret < 0) break; } rcu_read_unlock(); }
false
false
false
false
false
0
build_path_tlist(PlannerInfo *root, Path *path) { RelOptInfo *rel = path->parent; List *tlist = NIL; int resno = 1; ListCell *v; foreach(v, rel->reltargetlist) { /* Do we really need to copy here? Not sure */ Node *node = (Node *) copyObject(lfirst(v)); /* * If it's a parameterized path, ther...
false
false
false
false
false
0
perl_script_load_data(const char *data) { char *name; g_return_val_if_fail(data != NULL, NULL); name = script_data_get_name(); return script_load(name, NULL, data); }
false
false
false
false
false
0
addVar(const Variable *var, VariableType type, bool write_) { if (var->declarationId() > 0) { _varAddedInScope.back().insert(var->declarationId()); _varUsage.insert(std::make_pair(var->declarationId(), VariableUsage(var, type, false, write_, false))); ...
false
false
false
false
false
0
insertRows( int position, int rows, const QModelIndex &parent ) { Q_UNUSED( parent ); beginInsertRows( QModelIndex(), position, position+rows-1 ); for ( int row = 0; row < rows; ++row ) { m_labels.insert( position, "" ); } endInsertRows(); return true; }
false
false
false
false
false
0
set32x64Bits(uint32_t table[64], int32_t start, int32_t limit) { U_ASSERT(start<limit); U_ASSERT(limit<=0x800); int32_t lead=start>>6; // Named for UTF-8 2-byte lead byte with upper 5 bits. int32_t trail=start&0x3f; // Named for UTF-8 2-byte trail byte with lower 6 bits. // Set one bit indicatin...
false
false
false
false
true
1
ath9k_hw_ani_setup(struct ath_hw *ah) { int i; static const int totalSizeDesired[] = { -55, -55, -55, -55, -62 }; static const int coarseHigh[] = { -14, -14, -14, -14, -12 }; static const int coarseLow[] = { -64, -64, -64, -64, -70 }; static const int firpwr[] = { -78, -78, -78, -78, -80 }; for (i = 0; i < 5; i...
false
false
false
false
false
0
locale_from_utf8(const std::string& input) { GError* error_p = 0; gsize written = 0; GcharScopedHandle result_h(g_locale_from_utf8(input.data(), input.size(), 0, &written, &error_p)); if (error_p) { GerrorScopedHandle handle_h(error_p); throw ConversionError(error_p); } return std::string...
false
false
false
false
false
0
Stop() { if (!enabled()) { return; } // Move data from hash table to eviction buffer for (int b = 0; b < kBuckets; b++) { Bucket* bucket = &hash_[b]; for (int a = 0; a < kAssociativity; a++) { if (bucket->entry[a].count > 0) { Evict(bucket->entry[a]); } } } if (num_evic...
false
false
false
false
false
0
btrfs_init_delayed_node( struct btrfs_delayed_node *delayed_node, struct btrfs_root *root, u64 inode_id) { delayed_node->root = root; delayed_node->inode_id = inode_id; atomic_set(&delayed_node->refs, 0); delayed_node->count = 0; delayed_node->flags = 0; delayed_node->ins_root = RB_ROOT; delayed_node->de...
false
false
false
false
false
0
ast_lookup_path(char *path, struct gfs2_sbd *sbd) { int err = 0; char *c; struct gfs2_inode *ip, *iptmp; char *segment; uint64_t bn = 0; segment = strtok_r(path, "/", &c); ip = lgfs2_inode_read(sbd, sbd->sd_sb.sb_root_dir.no_addr); while (ip != NULL) { if (segment == NULL) { // No more segments bn = ip->...
false
false
false
false
false
0
setItems(const QList<MUCItem>& items) { MUCItemsTask* t = new MUCItemsTask(room_, client_->rootTask()); connect(t,SIGNAL(finished()),SLOT(setItems_finished())); t->set(items); t->go(true); }
false
false
false
false
false
0
rb_ipod_db_set_thumbnail_internal (RbIpodDb *ipod_db, Itdb_Track *track, GdkPixbuf *pixbuf) { g_return_if_fail (track != NULL); g_return_if_fail (pixbuf != NULL); itdb_track_set_thumbnails_from_pixbuf (track, pixbuf); rb_ipod_db_save_async (ipod_db); }
false
false
false
false
false
0
_cirrus_pci_read_cirrus(unsigned char addr) { uint16_t bus; uint8_t dev; uint32_t value; /* scan all pci devices for the cirrus */ for (bus = 0; bus < 256; bus++) { for (dev = 0; dev < 0x20; dev++) { /* read PCI0 device/vendor id */ value = _cirrus_pci_read(bus, dev, 0, 0); /* are...
false
false
false
false
false
0
flip(const int horz, const int vert) { switch (InterData->getRepresentation()) { case EPR_Uint8: { DiFlipTemplate<Uint8> dummy(InterData, Columns, Rows, NumberOfFrames, horz, vert); } break; case EPR_Uint16: {...
false
false
false
false
false
0
pixBlockconvGray(PIX *pixs, PIX *pixacc, l_int32 wc, l_int32 hc) { l_int32 w, h, d, wpl, wpla; l_uint32 *datad, *dataa; PIX *pixd, *pixt; PROCNAME("pixBlockconvGray"); if (!pixs) return (PIX *)ERROR_PTR("pixs not defined", procName...
false
false
false
false
false
0
stash_group_free(StashGroup *group) { StashPref *entry; guint i; foreach_ptr_array(entry, i, group->entries) { if (entry->widget_type == GTK_TYPE_RADIO_BUTTON) { g_free(entry->extra.radio_buttons); } g_slice_free(StashPref, entry); } g_ptr_array_free(group->entries, TRUE); g_free(group); }
false
false
false
false
false
0
iso_date(u8 *p, int flag) { int year, month, day, hour, minute, second, tz; int crtime; year = p[0]; month = p[1]; day = p[2]; hour = p[3]; minute = p[4]; second = p[5]; if (flag == 0) tz = p[6]; /* High sierra has no time zone */ else tz = 0; if (year < 0) { crtime = 0; } else { crtime = mktime64(ye...
false
false
false
false
false
0
sortByArtist() { setLevels( QList<CategoryId::CatMenuId>() << CategoryId::Artist ); }
false
false
false
false
false
0
random_laplace (gnm_float a) { gnm_float u; do { u = 2 * random_01 () - 1.0; } while (u == 0.0); if (u < 0) return a * gnm_log (-u); else return -a * gnm_log (u); }
false
false
false
false
false
0
ipmi_intf_session_set_username(struct ipmi_intf * intf, char * username) { if (intf->session == NULL) return; memset(intf->session->username, 0, 17); if (username == NULL) return; memcpy(intf->session->username, username, __min(strlen(username), 16)); }
false
true
false
false
false
1
qlocationutils_readVtg(const char *data, int size, QGeoPositionInfo *info, bool *hasFix) { if (hasFix) *hasFix = false; QByteArray sentence(data, size); QList<QByteArray> parts = sentence.split(','); bool parsed = false; double value = 0.0; if (parts.count() > 1 && parts[1].count() > 0...
false
false
false
false
false
0
printMinoltaExposureCompensation5D(std::ostream& os, const Value& value, const ExifData*) { std::ostringstream oss; oss.copyfmt(os); os << std::fixed << std::setprecision(2) << (float (value.toLong()-300)/100); os.copyfmt(oss); return os; }
false
false
false
false
false
0
posix_cpu_clock_set(const clockid_t which_clock, const struct timespec *tp) { /* * You can never reset a CPU clock, but we check for other errors * in the call before failing with EPERM. */ int error = check_clock(which_clock); if (error == 0) { error = -EPERM; } return error; }
false
false
false
false
false
0
List_do_with_(List *self, ListDoWithCallback *callback, void *arg) { LIST_FOREACH(self, i, v, if (v) (*callback)(v, arg)); }
false
false
false
false
false
0
ffe(node_t * u, elist uL, node_t * v, elist vL) { int i; edge_t *e; if ((uL.size > 0) && (vL.size > 0)) { if (uL.size < vL.size) { for (i = 0; (e = uL.list[i]); i++) if (aghead(e) == v) break; } else { for (i = 0; (e = vL.list[i]); i++) if (agtail(e) == u) break; } } else ...
false
false
false
false
false
0
subcat( int category ) { InnerNode* currNode; InnerNode* siblingNode; vector<int> ancestorCategories; vector<int> siblingCategories; getAncestors( ancestorCategories, category ); currNode = &_root; //erase all nodes except the node having the input category and its descendants for( int i=0; i < ancestorCa...
false
false
false
false
true
1
gee_hazard_pointer_get (GeeHazardPointer* self, gboolean other_thread) { gconstpointer result = NULL; GeeHazardPointerNode* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; void* _tmp2_ = NULL; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = self->_node; _tmp1_ = other_thread; _tmp2_ = gee_hazard_pointer_node_get (_...
false
false
false
false
false
0
ShallowCopy(vtkTextProperty *tprop) { if (!tprop) { return; } this->SetColor(tprop->GetColor()); this->SetOpacity(tprop->GetOpacity()); this->SetFontFamilyAsString(tprop->GetFontFamilyAsString()); this->SetFontSize(tprop->GetFontSize()); this->SetBold(tprop->GetBold()); this->SetItalic(tpro...
false
false
false
false
false
0
is_listall_mode(void) { return (!get_match(COL_SOURCE) && !get_match(COL_TARGET) && !get_match(COL_FSTYPE) && !get_match(COL_OPTIONS)); }
false
false
false
false
false
0
igb_put_hw_semaphore_generic(struct e1000_hw *hw) { u32 swsm; DEBUGFUNC("igb_put_hw_semaphore_generic"); swsm = E1000_READ_REG(hw, E1000_SWSM); swsm &= ~(E1000_SWSM_SMBI | E1000_SWSM_SWESMBI); E1000_WRITE_REG(hw, E1000_SWSM, swsm); }
false
false
false
false
false
0
DeleteChild (Widget w) { ArrayWidget aw; CompositeWidgetClass sclass; int ci; sclass = (CompositeWidgetClass) compositeWidgetClass; (*sclass->composite_class.delete_child) (w); aw = (ArrayWidget) XtParent (w); for (ci = 0; ci < aw->array.data.cj; ci++) if (aw->array.data.carray[ci]....
false
false
false
false
false
0
FastMeter (long hold, unsigned long dimen, Orientation o, int len, int clr0, int clr1, int clr2, int clr3) { orientation = o; hold_cnt = hold; hold_state = 0; current_peak = 0; current_level = 0; last_peak_rect.width = 0; last_peak_rect.height = 0; rgb0 = clr0; rgb1 = clr1; rgb2 = clr2; rgb3 = clr3; set_ev...
false
false
false
false
false
0
bfa_msix_all(struct bfa_s *bfa, int vec) { u32 intr, qintr; int queue; intr = readl(bfa->iocfc.bfa_regs.intr_status); if (!intr) return; /* * RME completion queue interrupt */ qintr = intr & __HFN_INT_RME_MASK; if (qintr && bfa->queue_process) { for (queue = 0; queue < BFI_IOC_MAX_CQS; queue++) bfa_...
false
false
false
false
false
0
vim_dialog_yesno(type, title, message, dflt) int type; char_u *title; char_u *message; int dflt; { if (do_dialog(type, title == NULL ? (char_u *)_("Question") : title, message, (char_u *)_("&Yes\n&No"), dflt, NULL) == 1) return VIM_YES; return VIM_NO; }
false
false
false
false
false
0
wilc_wlan_txq_add_mgmt_pkt(void *priv, u8 *buffer, u32 buffer_size, wilc_tx_complete_func_t func) { wilc_wlan_dev_t *p = &g_wlan; struct txq_entry_t *tqe; if (p->quit) return 0; tqe = kmalloc(sizeof(struct txq_entry_t), GFP_KERNEL); if (tqe == NULL) return 0; tqe->type = WILC_MGMT_PKT; tqe->buffer = buff...
false
false
false
false
false
0
setPluginEnabled( bool enabled ) { KPLUGININFO_ISVALID_ASSERTION; //kDebug( d->debugArea() ) ; d->pluginenabled = enabled; }
false
false
false
false
false
0
cst_track_resize(cst_track *t,int num_frames, int num_channels) { float *n_times; float **n_frames; int i; n_times = cst_alloc(float,num_frames); memmove(n_times,t->times, (sizeof(float)*((num_frames < t->num_frames) ? num_frames : t->num_frames))); n_frames = cst_alloc(float*,num_...
false
false
false
false
false
0
end_word(count, bigword, stop, empty) long count; int bigword; int stop; int empty; { int sclass; /* starting class */ #ifdef FEAT_VIRTUALEDIT curwin->w_cursor.coladd = 0; #endif cls_bigword = bigword; while (--count >= 0) { #ifdef FEAT_FOLDING /* When inside a range of fol...
false
false
false
false
false
0
irmo_connection_method_call(IrmoConnection *conn, IrmoMethodData *data) { if (conn->state != IRMO_CLIENT_CONNECTED && conn->state != IRMO_CLIENT_SYNCHRONIZED) { return; } // Add a new sendatom for this method call. irmo_client_...
false
false
false
false
false
0
asset_loaded_cb (GObject * source, GAsyncResult * res, GMainLoop * mainloop) { GESUriClipAsset *mfs = GES_URI_CLIP_ASSET (ges_asset_request_finish (res, NULL)); GstDiscovererInfo *discoverer_info = NULL; discoverer_info = ges_uri_clip_asset_get_info (mfs); GST_DEBUG ("Result is %d", gst_discoverer_info_g...
false
false
false
false
false
0
gftp_free_bookmark (gftp_bookmarks_var * entry, int free_node) { gftp_bookmarks_var * tempentry; if (entry->path) g_free (entry->path); if (entry->oldpath) g_free (entry->oldpath); if (entry->hostname) g_free (entry->hostname); if (entry->remote_dir) g_free (entry->remote_dir); if (entry->l...
false
false
false
false
false
0
setAlpha( gfloat alpha ) { g_return_if_fail( ( 0.0 <= alpha ) && ( alpha <= 1.0 ) ); setColorAlpha( _color, alpha ); }
false
false
false
false
false
0
asyncQueueUnregister(void) { bool advanceTail; Assert(listenChannels == NIL); /* else caller error */ LWLockAcquire(AsyncQueueLock, LW_SHARED); /* check if entry is valid and oldest ... */ advanceTail = (MyProcPid == QUEUE_BACKEND_PID(MyBackendId)) && QUEUE_POS_EQUAL(QUEUE_BACKEND_POS(MyBackendId), QUEUE_TAI...
false
false
false
false
false
0
Read(Lexer & lex, string const & token, string const & bufpath) { if (token == "filename") { lex.eatLine(); filename.set(lex.getString(), bufpath); } else if (token == "lyxscale") { lex.next(); lyxscale = lex.getInteger(); } else if (token == "display") { lex.next(); string const type = lex.getString(); ...
false
false
false
false
false
0
IsTriggeredSpellWithRedundentCastTime() const { return m_IsTriggeredSpell && (m_spellInfo->manaCost || m_spellInfo->ManaCostPercentage); }
false
false
false
false
false
0
setStyle(int index) { if (currentStyle == STYLE_BAR) degrade(bar); else degrade(water); switch (index) { case 0 : // BAR bar = (Bar*)this->setPlotStyle(Bar(this)); showNormals(false); updateNormals(); currentStyle = STYLE_BAR; break; case 1 : // SURFACE GRID...
false
false
false
false
false
0