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
view_event (GtkWidget *widget, GdkEventAny *event, GitgCommitView *view) { GtkTextWindowType type; GtkTextBuffer *buffer; GtkTextIter iter; gboolean is_hunk = FALSE; type = gtk_text_view_get_window_type (GTK_TEXT_VIEW (widget), event->window); buffer = gtk_text_view_get_buffer (GT...
false
false
false
false
false
0
SplineToMultiLine (float* cpx, float* cpy, int cpcount) { register int cpi; if (cpcount < 3) { _x = cpx; _y = cpy; _count = cpcount; } else { mlcount = 0; CalcSection( cpx[0], cpy[0], cpx[0], cpy[0], cpx[0], cpy[0], cpx[1], cpy[1] ); CalcSection( ...
false
false
false
false
false
0
rpoplpushcommand(redisClient *c) { robj *sobj; sobj = lookupKeyWrite(c->db,c->argv[1]); if (sobj == NULL) { addReply(c,shared.nullbulk); } else { if (sobj->type != REDIS_LIST) { addReply(c,shared.wrongtypeerr); } else { list *srclist = sobj->ptr; ...
false
false
false
false
false
0
noekeon_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) #endif { ulong32 a,b,c,d,temp; int r; LTC_ARGCHK(skey != NULL); LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); LOAD32H(a,&pt[0]); LOAD32H(b,&pt[4]); LOAD32H(c,&pt[8]); LOAD32H(d,&pt[12]); #define ROUN...
false
false
false
false
false
0
apply_prediction(AACContext * ac, SingleChannelElement * sce) { int sfb, k; if (!sce->ics.predictor_initialized) { reset_all_predictors(sce->predictor_state); sce->ics.predictor_initialized = 1; } if (sce->ics.window_sequence[0] != EIGHT_SHORT_SEQUENCE) { for (sfb = 0; sfb < ff...
false
false
false
false
false
0
CompressionWiggleIterator(WiggleIterator * i) { if (i->overlaps) return i; else { UnaryWiggleIteratorData * data = (UnaryWiggleIteratorData *) calloc(1, sizeof(UnaryWiggleIteratorData)); data->iter = i; return newWiggleIterator(data, &CompressionWiggleIteratorPop, &UnaryWiggleIteratorSeek, i->default_value); ...
false
false
false
false
false
0
mbfl_identify_filter_init(mbfl_identify_filter *filter, enum mbfl_no_encoding encoding) { const struct mbfl_identify_vtbl *vtbl; /* encoding structure */ filter->encoding = mbfl_no2encoding(encoding); if (filter->encoding == NULL) { filter->encoding = &mbfl_encoding_pass; } filter->status = 0; filter->flag =...
false
false
false
false
false
0
expert_search (void) { // Get relevant information const gchar *search; search = gtk_entry_get_text (GTK_ENTRY (get ("expert_search_entry"))); gboolean value_search = biff_->value_bool ("expert_search_values"); GtkTreeIter iter; gboolean valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL(expert_liststore), &it...
false
false
false
false
false
0
unload_all_nic_libraries() { nic_lib_handle_t *current, *next; pthread_mutex_lock(&nic_lib_list_mutex); current = nic_lib_list; while (current != NULL) { next = current->next; free_nic_library_handle(current); current = next; } pthread_mutex_unlock(&nic_lib_list_mutex); nic_lib_list = NULL; return 0...
false
false
false
false
false
0
start_isoc_chain(struct usb_fifo *fifo, int num_packets_per_urb, usb_complete_t complete, int packet_size) { struct hfcsusb *hw = fifo->hw; int i, k, errcode; if (debug) printk(KERN_DEBUG "%s: %s: fifo %i\n", hw->name, __func__, fifo->fifonum); /* allocate Memory for Iso out Urbs */ for (i = 0; i <...
false
false
false
false
false
0
dst_gpio_outb(struct dst_state *state, u32 mask, u32 enbb, u32 outhigh, int delay) { union dst_gpio_packet enb; union dst_gpio_packet bits; int err; enb.enb.mask = mask; enb.enb.enable = enbb; dprintk(verbose, DST_INFO, 1, "mask=[%04x], enbb=[%04x], outhigh=[%04x]", mask, enbb, outhigh); if ((err = bt878_d...
false
false
false
false
false
0
Mother(unsigned long *pSeed) { unsigned long number, number1, number2; short n, *p; unsigned short sNumber; /* Initialize motheri with 9 random values the first time */ if (mStart) { sNumber= *pSeed&m16Mask; /* The low 16 bits */ number= *pSeed&m31Mask; /* Only want 31 bits */ p=mother...
false
false
false
false
false
0
build_runtime_defined_function_key(zval *result, const char *name, int name_length TSRMLS_DC) /* {{{ */ { char char_pos_buf[32]; uint char_pos_len; const char *filename; char_pos_len = zend_sprintf(char_pos_buf, "%p", LANG_SCNG(yy_text)); if (CG(active_op_array)->filename) { filename = CG(active_op_array)->file...
false
false
false
false
false
0
inode_remove(struct inode *inode) { int dfc_needs_free = 0; inode_remove_all_xattrs(inode); if (inode->u.c.state != NULL) gflog_fatal(GFARM_MSG_1000302, "inode_remove: still opened"); if (inode_is_file(inode)) { struct file_copy *copy, *cn; gfarm_error_t e; for (copy = inode->u.c.s.f.copies; copy != NULL...
false
false
false
false
false
0
handle_learn_logs(FILE *learnlog, FILE * stream) { struct glob_file *glob; parse_acls(); expand_acls(); /* since we don't call analyze_acls(), we'll defer the errors till they load the policy */ for (glob = glob_files_head; glob; glob = glob->next) add_globbed_object_acl(glob->subj, glob->filename, glob->mode,...
false
false
false
false
false
0
assign(QueuedGeometry* qgeom) { // Do we have enough space? // -2 first to avoid overflow (-1 to adjust count to index, -1 to ensure // no overflow at 32 bits and use >= instead of >) if ((mVertexData->vertexCount - 2 + qgeom->geometry->vertexData->vertexCount) >= mMaxVer...
false
false
false
false
false
0
rms_env_reset(rms_env *r) { unsigned int i; for (i=0; i<RMS_BUF_SIZE; i++) { r->buffer[i] = 0.0f; } r->pos = 0; r->sum = 0.0f; }
false
false
false
false
false
0
list_append_tv(l, tv) list_T *l; typval_T *tv; { listitem_T *li = listitem_alloc(); if (li == NULL) return FAIL; copy_tv(tv, &li->li_tv); list_append(l, li); return OK; }
false
false
false
false
false
0
lastaddr (void) { if (currprefs.z3fastmem2_size) return z3fastmem2_start + currprefs.z3fastmem2_size; if (currprefs.z3fastmem_size) return z3fastmem_start + currprefs.z3fastmem_size; if (currprefs.z3chipmem_size) return z3chipmem_start + currprefs.z3chipmem_size; if (currprefs.mbresmem_high_size) return a30...
false
false
false
false
false
0
trainpolicy( InputData* pTrainingData, const string baseLearnerName, const int numIterations, const int arrayInd ) { AdaBoostMHLearner* sHypothesis = new AdaBoostMHLearner(); sHypothesis->run(_args, pTrainingData, baseLearnerName, numIterations, _weakhyp ); delete sHypothesis; //_actionNum = pTrainingData->g...
false
false
false
false
false
0
gnome_desktop_thumbnail_factory_finalize (GObject *object) { GnomeDesktopThumbnailFactory *factory; GnomeDesktopThumbnailFactoryPrivate *priv; GConfClient *client; factory = GNOME_DESKTOP_THUMBNAIL_FACTORY (object); priv = factory->priv; if (priv->reread_scheduled != 0) { g_source_remove (priv->r...
false
false
false
false
false
0
resolve_generic_type(Oid declared_type, Oid context_actual_type, Oid context_declared_type) { if (declared_type == ANYARRAYOID) { if (context_declared_type == ANYARRAYOID) { /* * Use actual type, but it must be an array; or if it's a domain * over array, use the base array type. */ O...
false
false
false
false
false
0
real_slot_set_short_status (NautilusWindowSlot *slot, const gchar *primary_status, const gchar *detail_status) { gboolean disable_chrome; nautilus_floating_bar_cleanup_actions (NAUTILUS_FLOATING_BAR (slot->details->floating_bar)); nautilus_floating_bar_set_show_spinner (NAUTILUS_FLOATING_BAR (slot->de...
false
false
false
false
false
0
player_stop (void) { pthread_t thread = play_thread; play_thread = 0; if (thread) pthread_cancel (thread); gtk_video_in_spu_button (gtv, 0); xine_stop (stream); }
false
false
false
false
false
0
visitValue(const string& str, const string& val) throw (Exception) { printf("%.*s/%.*s = %.*s\n", PFSTR(root), PFSTR(str), PFSTR(val)); return true; } }
false
false
false
false
false
0
same_variable_part_p (rtx loc, tree expr, HOST_WIDE_INT offset) { tree expr2; HOST_WIDE_INT offset2; if (! DECL_P (expr)) return false; if (REG_P (loc)) { expr2 = REG_EXPR (loc); offset2 = REG_OFFSET (loc); } else if (MEM_P (loc)) { expr2 = MEM_EXPR (loc); offset2 = I...
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &fn) { mf = &fn; mri = &mf->getRegInfo(); tii = mf->getTarget().getInstrInfo(); tri = mf->getTarget().getRegisterInfo(); sis = &getAnalysis<SlotIndexes>(); lis = &getAnalysis<LiveIntervals>(); mli = &getAnalysis<MachineLoopInfo>(); mdt = &getAnalysis...
false
false
false
false
false
0
iblock_set_configfs_dev_params(struct se_device *dev, const char *page, ssize_t count) { struct iblock_dev *ib_dev = IBLOCK_DEV(dev); char *orig, *ptr, *arg_p, *opts; substring_t args[MAX_OPT_ARGS]; int ret = 0, token; unsigned long tmp_readonly; opts = kstrdup(page, GFP_KERNEL); if (!opts) return -ENOMEM; ...
false
false
false
false
false
0
H5G_loc_find_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char *name, const H5O_link_t UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/) { H5G_loc_fnd_t *udata = (H5G_loc_fnd_t *)_udata; /* User data passed in */ herr_t ret_value = SUCCEED; /* Return value */...
false
false
false
false
false
0
add_ligature(Code in1, Code in2, Code out) { if (Ligature *l = ligature_obj(in1, in2)) { Char &ch = _encoding[l->out]; if (ch.flags & Char::BUILT) { // move old ligatures to point to the true ligature for (Ligature *ll = ch.ligatures.begin(); ll != ch.ligatures.end(); ll++) add_ligature(out, ll->in2, ...
false
false
false
false
false
0
bios_10_4f05(struct regs *regs) { #if CIRRUS_DEBUG & CIRRUS_DEBUG_VESA_5 dprintf("Cirrus VESA Function 05 called.\n"); #endif /* FIXME? fail when in a lfb mode */ if (BL > 0x01) { /* There are only two memory windows */ AX = VBE_UNIMPLEMENTED; re...
false
false
false
false
false
0
lbs_mesh_ethtool_get_stats(struct net_device *dev, struct ethtool_stats *stats, uint64_t *data) { struct lbs_private *priv = dev->ml_priv; struct cmd_ds_mesh_access mesh_access; int ret; lbs_deb_enter(LBS_DEB_ETHTOOL); /* Get Mesh Statistics */ ret = lbs_mesh_access(priv, CMD_ACT_MESH_GET_STATS, &mesh_access);...
false
false
false
false
false
0
save_history_cb(GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) { FILE * fp; char * str; fp = (FILE *) data; gtk_tree_model_get(model, iter, 0, &str, -1); if (str) { fprintf(fp, "%s\n", str); g_free(str); } return FALSE; }
false
false
false
false
false
0
read_line(struct FTP *con)/*{{{*/ { char *result; int n; char *p; while (1) { n = read(con->fd, con->bufptr, con->readbuf + sizeof(con->readbuf) - con->bufptr); if (n < 0) { perror("read"); exit(1); } if (n == 0) { return NULL; } con->bufptr += n; p = con->readbu...
false
false
false
false
false
0
gl_field_button_set_key (glFieldButton *this, const gchar *key) { g_free (this->priv->key); this->priv->key = g_strdup (key); if ( this->priv->label_is_key ) { gtk_label_set_text (GTK_LABEL (this->priv->label), key); } }
false
false
false
false
false
0
selnl_notify(int msgtype, void *data) { int len; sk_buff_data_t tmp; struct sk_buff *skb; struct nlmsghdr *nlh; len = selnl_msglen(msgtype); skb = nlmsg_new(len, GFP_USER); if (!skb) goto oom; tmp = skb->tail; nlh = nlmsg_put(skb, 0, 0, msgtype, len, 0); if (!nlh) goto out_kfree_skb; selnl_add_payload...
false
false
false
false
false
0
card_open(struct sstate *ss, char *dev) { struct wif *wi = wi_open(dev); if (!wi) err(1, "wi_open()"); ss->ss_wi = wi; }
false
false
false
false
false
0
edgeAttrs(FILE * gxlFile, Agedge_t * e) { char *val; val = agget(e, GXL_ID); if (!EMPTY(val)) { fprintf(gxlFile, " id=\"%s\"", xml_string(val)); } val = agget(e, GXL_FROM); if (!EMPTY(val)) { fprintf(gxlFile, " fromorder=\"%s\"", xml_string(val)); } val = agget(e, GXL_TO); if (!EM...
false
false
false
false
false
0
OpKillApp() { cid_killapp_it out ; cid_killapp_ot in ; status=system("clear") ; printf("CID_OP_KILL_APP") ; printf("\n---------------\n") ; printf("Enter application id : ") ; status=scanf("%s", out.appid) ; /* obtain appid */ printf("\n\nTo CID :\n") ; printf("\nappid : %s", out.appid)...
false
true
false
false
true
1
depmod_load(struct depmod *depmod) { int err; err = depmod_load_modules(depmod); if (err < 0) return err; err = depmod_load_dependencies(depmod); if (err < 0) return err; err = depmod_calculate_dependencies(depmod); if (err < 0) return err; return 0; }
false
false
false
false
false
0
libifinet6_ifinet6_withprefixlength_to_ipv6addrstruct(char *addrstring, char *prefixlengthstring, char *resultstring, ipv6calc_ipv6addr *ipv6addrp) { int retval = 1, result, tempint; char tempstring[NI_MAXHOST]; uint8_t prefixlength = 0; if ( (ipv6calc_debug & DEBUG_libifinet6) != 0 ) { fprintf(stderr, "%s: Got ...
true
true
false
false
false
1
drawable3d_check_focus_highlight(GF_Node *node, GF_TraverseState *tr_state, GF_BBox *orig_bounds) { Drawable *hlight; GF_Node *prev_node; u32 prev_mode; GF_BBox *bounds; GF_Matrix cur; GF_Compositor *compositor = tr_state->visual->compositor; if (compositor->focus_node!=node) return; hlight = compositor->focu...
false
false
false
false
false
0
pch_udc_free_dma_chain(struct pch_udc_dev *dev, struct pch_udc_request *req) { struct pch_udc_data_dma_desc *td = req->td_data; unsigned i = req->chain_len; dma_addr_t addr2; dma_addr_t addr = (dma_addr_t)td->next; td->next = 0x00; for (; i > 1; --i) { /* do not free first desc., will be done by free fo...
false
false
false
false
false
0
ok() { double weight; QString tmp=weightLineEdit->text(); weight_sscanf(tmp, "%lf", &weight); if(weight<100.0 || weight>100.0){ QMessageBox::warning(this, tr("FET information"), tr("Invalid weight (percentage). It has to be 100")); return; } QString teacher_name=teachersComboBox->currentText(); int t=gt....
false
false
false
false
false
0
irtty_write_wakeup(struct tty_struct *tty) { struct sirtty_cb *priv = tty->disc_data; IRDA_ASSERT(priv != NULL, return;); IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;); clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); if (priv->dev) sirdev_write_complete(priv->dev); }
false
false
false
false
false
0
rc_avpair_get (VALUE_PAIR *vp, int attrid, int vendorpec) { for (; vp != NULL && !(ATTRID(vp->attribute) == ATTRID(attrid) && VENDOR(vp->attribute) == vendorpec); vp = vp->next) { continue; } return vp; }
false
false
false
false
false
0
ReadLineAddNewHeader() { append_more_headers= &ReadLineAddNewHeader; Buffer *bufptr; if (opta.Length()) bufptr= &opta; else if (optA.Length()) bufptr= &optA; else if (opti.Length()) bufptr= &opti; else if (optI.Length()) bufptr= &optI; else if (optUbuf.Length()) bufptr= &optUbuf; else { append_more_headers=...
false
false
false
false
false
0
Scheduler (int block) { /* One wants to be a bit careful about setting returnValue * to one, since a one implies we did some useful work, * and therefore probably won't be called to block next * time (TN3270 mode only). */ int returnValue; int netin, netout, netex, ttyin, ttyout; /* Decide which ri...
false
false
false
false
false
0
prunecmd(UAContext *ua, const char *cmd) { DIRRES *dir; CLIENT *client; POOL *pool; POOL_DBR pr; MEDIA_DBR mr; utime_t retention; int kw; static const char *keywords[] = { NT_("Files"), NT_("Jobs"), NT_("Volume"), NT_("Stats"), NULL}; if (!open_client_db(ua)) {...
false
false
false
false
false
0
refresh_authorization_thread (GSimpleAsyncResult *result, GDataAuthorizer *authorizer, GCancellable *cancellable) { GError *error = NULL; /* Refresh the authorisation and return */ gdata_authorizer_refresh_authorization (authorizer, cancellable, &error); if (error != NULL) { g_simple_async_result_set_from_error...
false
false
false
false
false
0
scsi_mode_select(struct scsi_device *sdev, int pf, int sp, int modepage, unsigned char *buffer, int len, int timeout, int retries, struct scsi_mode_data *data, struct scsi_sense_hdr *sshdr) { unsigned char cmd[10]; unsigned char *real_buffer; int ret; memset(cmd, 0, sizeof(cmd)); cmd[1] = (pf ? 0x10 : 0) | ...
false
false
false
false
false
0
bendian_short(const uint16_t s) { uint16_t r = 1; if (!*(uint8_t *)&r) return s; r = (s & 0x00FF) << 8 | (s & 0xFF00) >> 8; return r; }
false
false
false
false
false
0
winsync_plugin_call_pre_ad_add_user_cb(const Repl_Agmt *ra, Slapi_Entry *ad_entry, Slapi_Entry *ds_entry) { WINSYNC_PLUGIN_CALL_PLUGINS_COOKIE_BEGIN(WINSYNC_PLUGIN_PRE_AD_ADD_USER_CB,winsync_pre_ad_add_cb,thefunc) (*thefunc)(cookie, ad_entry, ds_entry); WINSYNC_PLU...
false
false
false
false
false
0
bin2hex(const unsigned char *p, size_t len) { unsigned int i; ssize_t slen; char *s; slen = len * 2 + 1; if (slen % 4) slen += 4 - (slen % 4); s = calloc(slen, 1); if (unlikely(!s)) quit(1, "Failed to calloc in bin2hex"); for (i = 0; i < len; i++) sprintf(s + (i * 2), "%02x", (unsigned int) p[i]); ret...
false
false
false
false
true
1
clutter_animation_has_property (ClutterAnimation *animation, const gchar *property_name) { ClutterAnimationPrivate *priv; g_return_val_if_fail (CLUTTER_IS_ANIMATION (animation), FALSE); g_return_val_if_fail (property_name != NULL, FALSE); priv = animation->priv; return ...
false
false
false
false
false
0
pushDown() { if ((!mpGame) || (mPauseFlag)) { return; } if (mNetMode) { mActionList.push_back(PlayerAction_Push_Down); } else { while(mpGame->setCurrentPiece(0, 1, 0)) ; mpGame->forceUpdateGame(); } }
false
false
false
false
false
0
Curl_add_custom_headers(struct connectdata *conn, Curl_send_buffer *req_buffer) { char *ptr; struct curl_slist *headers=conn->data->set.headers; while(headers) { ptr = strchr(headers->data, ':'); if(ptr) { /* we require a colon for this to be a true header */ ...
false
false
false
false
false
0
gkd_secret_session_set_item_secret (GkdSecretSession *self, GckObject *item, GkdSecretSecret *secret, DBusError *derr) { GckBuilder builder = GCK_BUILDER_INIT; GckMechanism mech; GckObject *object; GckSession *session; GError *error = NULL; GckAttributes *attrs; g_return_val_...
false
false
false
false
false
0
reset_permutation(unsigned int* perm) { const unsigned int N = get_nof_vertices(); for(unsigned int i = 0; i < N; i++, perm++) *perm = i; }
false
false
false
false
false
0
be_rx_cqs_create(struct be_adapter *adapter) { struct be_queue_info *eq, *cq; struct be_rx_obj *rxo; int rc, i; /* We can create as many RSS rings as there are EQs. */ adapter->num_rss_qs = adapter->num_evt_qs; /* We'll use RSS only if atleast 2 RSS rings are supported. */ if (adapter->num_rss_qs <= 1) adapt...
false
false
false
false
false
0
_wnck_get_string_property_latin1 (Screen *screen, Window xwindow, Atom atom) { Display *display; Atom type; int format; gulong nitems; gulong bytes_after; gchar *str; int err, result; char *retval; display = DisplayOfScreen (scre...
false
false
false
false
false
0
change_directory_list(void) { trace(("change_directory_list()\n{\n")); arglex(); change_identifier cid; cid.command_line_parse_rest(change_directory_usage); list_changes_in_state_mask ( cid, ( (1 << cstate_state_being_developed) | (1 << cstate_state_awaiting_review) | (1 << cs...
false
false
false
false
false
0
get_user_var_real(const char *name, double *value, int *null_value) { my_bool null_val; user_var_entry *entry= (user_var_entry*) my_hash_search(&current_thd->user_vars, (uchar*) name, strlen(name)); if (!entry) return 1; *value= entry->val_real(&n...
false
false
false
false
false
0
ReadLink(const Arguments& args) { HandleScope scope; if (args.Length() < 1 || !args[0]->IsString()) { return THROW_BAD_ARGS; } String::Utf8Value path(args[0]->ToString()); if (args[1]->IsFunction()) { ASYNC_CALL(readlink, args[1], *path) } else { ssize_t bz = readlink(*path, getbuf, ARRAY_SIZ...
false
false
false
false
false
0
GetNumParts() { OGRGeometry *poGeom; int numParts = 0; poGeom = GetGeometryRef(); if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbLineString) { /*------------------------------------------------------------- * Simple polyline *------------...
false
false
false
false
false
0
_elm_calendar_smart_add(Evas_Object *obj) { time_t weekday = 259200; /* Just the first sunday since epoch */ time_t current_time; int i, t; EVAS_SMART_DATA_ALLOC(obj, Elm_Calendar_Smart_Data); ELM_WIDGET_CLASS(_elm_calendar_parent_sc)->base.add(obj); priv->first_interval = 0.85; priv->year_min =...
true
true
false
false
false
1
simplify_control_stmt_condition (edge e, gimple stmt, gimple dummy_cond, tree (*simplify) (gimple, gimple), bool handle_dominating_asserts) { tree cond, cached_lhs; enum gimple_code code = gimple_code (stmt); /* For comparisons, we have to update both operands, then try to simplify the c...
false
false
false
true
false
1
find_logical(struct asr *asr) { int i, j; struct asr_raidtable *rt = asr->rt; /* This MUST be done backwards! */ for (i = rt->elmcnt - 1; i > -1; i--) { if (rt->ent[i].raidmagic == asr->rb.drivemagic) { for (j = i - 1; j > -1; j--) { if (rt->ent[j].raidlevel == FWL) return rt->ent + j; } } } ...
false
false
false
false
false
0
GB_Store(GB_TYPE type, GB_VALUE *src, void *dst) { if (src != NULL) VALUE_write((VALUE *)src, dst, type); else VALUE_free(dst, type); }
false
false
false
false
false
0
decompose(HepAxisAngle & rotation, Hep3Vector & boost)const { boost.set(0,0,0); rotation = axisAngle(); }
false
false
false
false
false
0
outc(wint_t c, int width) { int i; putwchar(c); if (must_use_uc && (curmode&UNDERL)) { for (i = 0; i < width; i++) print_out(CURS_LEFT); for (i = 0; i < width; i++) print_out(UNDER_CHAR); } }
false
false
false
false
false
0
tonemap_setDefaultInputTraits ( IP_XFORM_HANDLE hXform, /* in: handle for xform */ PIP_IMAGE_TRAITS pTraits) /* in: default image traits */ { PTMAP_INST g; HANDLE_TO_PTR (hXform, g); /* insure that traits we care about are known */ INSURE (pTraits->iPixelsPerRow>0 && pTraits->iBitsPerP...
false
false
false
false
false
0
scan_should_stop(void) { if (!kmemleak_enabled) return 1; /* * This function may be called from either process or kthread context, * hence the need to check for both stop conditions. */ if (current->mm) return signal_pending(current); else return kthread_should_stop(); return 0; }
false
false
false
false
false
0
find_embedded_crc32(const char* filepath, unsigned* crc32_be) { const char* e = filepath + strlen(filepath) - 10; /* search for the sum enclosed in brackets */ for(; e >= filepath && !IS_PATH_SEPARATOR(*e); e--) { if((*e == '[' && e[9] == ']') || (*e == '(' && e[9] == ')')) { const char *p = e + 8; for(; p ...
false
false
false
false
false
0
selectedRows() const { QModelIndexList selectedIndexes = ui->scriptView->selectionModel()->selectedIndexes(); if(selectedIndexes.count() == 0) return QList<int>(); QList<int> selectedRows; foreach(const QModelIndex &index, selectedIndexes) { if(index.column() == ScriptModel::ColumnLabel) selectedRows << ...
false
false
false
false
false
0
check_acm(netsnmp_agent_session *asp, u_char type) { int view; int i, j, k; netsnmp_request_info *request; int ret = 0; netsnmp_variable_list *vb, *vb2, *vbc; int earliest = 0; for (i = 0; i <= asp->treecache_num; i++) { for (request =...
false
false
false
false
false
0
test_parse_with_bad_binary_encoding (void) { GError *error = NULL; GckUriData *uri_data; uri_data = gck_uri_parse ("pkcs11:id=%%", GCK_URI_FOR_ANY, &error); g_assert (!uri_data); g_assert_error (error, GCK_URI_ERROR, GCK_URI_BAD_ENCODING); g_error_free (error); }
false
false
false
false
false
0
load_ugly_table(FILE *fp) { char buf[4096]; struct nstat_ent *db = NULL; struct nstat_ent *n; while (fgets(buf, sizeof(buf), fp) != NULL) { char idbuf[sizeof(buf)]; int off; char *p; p = strchr(buf, ':'); if (!p) abort(); *p = 0; idbuf[0] = 0; strncat(idbuf, buf, sizeof(idbuf) - 1); off = p ...
true
true
false
false
false
1
showlocs(void) #else static void showlocs() #endif { char str[80]; int loc; output("LOCATIONS:"); for (loc = LOCMIN; loc <= LOCMAX; loc++) { sprintf(str, "$i%3ld: ", (long) loc); output(str); say(loc); } }
false
false
false
false
false
0
QueryDB(const char *file, int line, JCR *jcr, B_DB *mdb, char *cmd) { sql_free_result(mdb); if (!sql_query(mdb, cmd, QF_STORE_RESULT)) { m_msg(file, line, &mdb->errmsg, _("query %s failed:\n%s\n"), cmd, sql_strerror(mdb)); j_msg(file, line, jcr, M_FATAL, 0, "%s", mdb->errmsg); if (verbose) { ...
false
false
false
false
false
0
igb_tx_ctxtdesc(struct igb_ring *tx_ring, u32 vlan_macip_lens, u32 type_tucmd, u32 mss_l4len_idx) { struct e1000_adv_tx_context_desc *context_desc; u16 i = tx_ring->next_to_use; context_desc = IGB_TX_CTXTDESC(tx_ring, i); i++; tx_ring->next_to_use = (i < tx_ring->count) ? i : 0; /* set bits to identify ...
false
false
false
false
false
0
makeSchematicSvg(const QString & expectedFileName) { QStringList pieces = expectedFileName.split("_"); int pins = pieces.at(2).toInt(); double increment = GraphicsUtils::StandardSchematicSeparationMils / 1000; double incrementPoints = increment * 72; // 72 dpi QString header("<?xml version='1.0' encoding=...
false
false
false
false
false
0
trivial_hashR(unsigned char *buf, size_t len) { u_int32_t h = 0; buf += len-1; while(len--) { h = h + *buf--; h = ROT32R(h, 3); } return h; }
false
false
false
false
false
0
add_char(char c) { if (stk.last->cur - stk.last->buf == stk.last->size) resize_buffer(1); *(stk.last->cur++) = c; }
false
false
false
false
false
0
help_exec ( int argc __unused, char **argv __unused ) { struct command *command; unsigned int hpos = 0; printf ( "\nAvailable commands:\n\n" ); for_each_table_entry ( command, COMMANDS ) { hpos += printf ( " %s", command->name ); if ( hpos > ( 16 * 4 ) ) { printf ( "\n" ); hpos = 0; } else { while ...
false
false
false
false
false
0
threads_dispatch_free(gpointer data) { threads_dispatch_t * dispatch = data; if (dispatch->destroy && dispatch->data) { dispatch->destroy(dispatch->data); } g_slice_free(threads_dispatch_t, data); }
false
false
false
false
false
0
grid_random_alphanum(gint length) { gint i, decide; GRand *r; GString *text; r = g_rand_new(); text = g_string_new(NULL); /* NB: some systems require an alphabetical character first */ g_string_sprintfa(text, "%c", g_rand_int_range(r, 'a', 'z')); i=1; while (i<length) { decide = g_rand_int_range(r, 0, 99); if (...
false
false
false
false
false
0
ProbeList(ALCchar **list, size_t *listsize, enum DevProbe type) { DO_INITCONFIG(); LockLists(); free(*list); *list = NULL; *listsize = 0; if(type == ALL_DEVICE_PROBE && PlaybackBackend.Probe) PlaybackBackend.Probe(type); else if(type == CAPTURE_DEVICE_PROBE && CaptureBackend.Probe)...
false
false
false
false
false
0
jack_session_commands_free (jack_session_command_t *cmds) { int i=0; while(1) { if (cmds[i].client_name) free ((char *)cmds[i].client_name); if (cmds[i].command) free ((char *)cmds[i].command); if (cmds[i].uuid) free ((char *)cmds[i].uuid); else break; i += 1; } free(cmds); }
true
true
false
false
false
1
setCompassCTRL6() { unsigned char ctrl6; // convert FSR to uT switch (m_settings->m_GD20HM303DCompassFsr) { case LSM303D_COMPASS_FSR_2: ctrl6 = 0; m_compassScale = (RTFLOAT)0.008; break; case LSM303D_COMPASS_FSR_4: ctrl6 = 0x20; m_compassScale = (RTFLOAT)0...
false
false
false
false
false
0
bs_ssc_close(struct scsi_lu *lu) { struct ssc_info *ssc; ssc = dtype_priv(lu); dprintf("##### Close #####\n"); close(lu->fd); }
false
false
false
false
false
0
Process2FirewallUDP(const uint8_t *packetData, uint32_t lenPacket, uint32_t ip) { // Verify packet is expected size CHECK_PACKET_MIN_SIZE(3); uint8_t errorCode = PeekUInt8(packetData); uint16_t incomingPort = PeekUInt16(packetData + 1); if ((incomingPort != CKademlia::GetPrefs()->GetExternalKadPort() && incomingP...
false
false
false
false
false
0
mds_idle_func (PluginInstance *inst) { ggvisd *ggv = ggvisFromInst (inst); ggobid *gg = inst->gg; gboolean doit = ggv->running_p; if (doit) { mds_once (true, ggv, gg); update_ggobi (ggv, gg); } return (doit); }
false
false
false
false
false
0
cec_get_device_power_status(cec_logical_address iLogicalAddress) { if (cec_parser) return cec_parser->GetDevicePowerStatus(iLogicalAddress); return CEC_POWER_STATUS_UNKNOWN; }
false
false
false
false
false
0
L6() {register object *base=vs_base; register object *sup=base+VM6; VC6 vs_check; {object V13; object V14; object V15; V13=(base[0]); V14=(base[1]); V15=(base[2]); vs_top=sup; goto TTL; TTL:; base[3]= list(4,((object)VV[30]),((object)VV[31]),list(4,((object)VV[30]),((object)VV[32]),list(2,((object)VV[33]),li...
false
false
false
false
false
0
cpio_append_fts_entry (FTSENT *entry) { if (entry->fts_info & FTS_NS || entry->fts_info & FTS_NSOK) cpio_append (entry->fts_path); else cpio_append_stat (entry->fts_path, entry->fts_statp); }
false
false
false
false
false
0
mousePressEvent(QMouseEvent *event) { int index = segmentAt(event->pos()); if (segmentEnabled(index)) { d->wasPressed = d->focusIndex = d->pressedIndex = segmentAt(event->pos()); d->postUpdate(d->pressedIndex); } }
false
false
false
false
false
0
appendGraphicsPath (char *newPath) { int i; void *ptr; char *add; for (i = 0; i < nGraphicsPathElems; i++) { if (streq (graphicsPath[i], newPath)) { diagnostics(WARNING,"Repeated graphics path element {%s}",newPath); return; } } ptr = (void *) gra...
false
false
false
false
false
0
freeup() /* Free all allocations in the 'found' list, the 'zfiles' list and the 'patterns' list. */ { struct flist far *f; /* steps through found list */ struct zlist far *z; /* pointer to next entry in zfiles list */ for (f = found; f != NULL; f = fexpel(f)) ; while (zfiles != NULL) { z = zfile...
false
false
false
false
false
0
affs_insert_hash(struct inode *dir, struct buffer_head *bh) { struct super_block *sb = dir->i_sb; struct buffer_head *dir_bh; u32 ino, hash_ino; int offset; ino = bh->b_blocknr; offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); pr_debug("%s(dir=%lu, ino=%d)\n", __func__, dir...
false
false
false
false
false
0