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
sq_newclass(HSQUIRRELVM v,SQBool hasbase) { SQClass *baseclass = NULL; if(hasbase) { SQObjectPtr &base = stack_get(v,-1); if(type(base) != OT_CLASS) return sq_throwerror(v,_SC("invalid base type")); baseclass = _class(base); } SQClass *newclass = SQClass::Create(_ss(v), baseclass); if(baseclass) v->Pop();...
false
false
false
false
false
0
ov5642_s_power(struct v4l2_subdev *sd, int on) { struct i2c_client *client = v4l2_get_subdevdata(sd); struct soc_camera_subdev_desc *ssdd = soc_camera_i2c_to_desc(client); struct ov5642 *priv = to_ov5642(client); int ret; if (!on) return soc_camera_power_off(&client->dev, ssdd, priv->clk); ret = soc_camera_po...
false
false
false
false
false
0
tp_call_stream_set_sending_async (TpCallStream *self, gboolean send, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *result; g_return_if_fail (TP_IS_CALL_STREAM (self)); result = g_simple_async_result_new (G_OBJECT (self), callback, user_data, tp_call_stream_set_sending...
false
false
false
false
false
0
StripSlash(char *topdest,unsigned char *source) { char *dest; int englen; unsigned char *parse = source; if(*parse != '/'){ topdest = '\0'; return 1; } parse=strrchr(source, '/'); if(parse<&source[2]){ fprintf(stderr,"Error: english part too short\n"); fprintf(stderr,"%s\n", source); return 1; } eng...
false
true
false
false
false
1
tracker_writeback_module_get (const gchar *name) { static GHashTable *modules = NULL; TrackerWritebackModule *module; g_return_val_if_fail (name != NULL, NULL); if (G_UNLIKELY (!modules)) { modules = g_hash_table_new (g_str_hash, g_str_equal); } module = g_hash_table_lookup (modules, name); if (G_UNLIKELY ...
false
false
false
false
false
0
paint_inset_box_shadow_to_cairo_context (StThemeNode *node, StShadow *shadow_spec, cairo_t *cr, cairo_path_t *shadow_outline) { cairo_surface_t *shadow_surface; cairo_patt...
false
false
false
false
false
0
Curl_pgrsDone(struct connectdata *conn) { int rc; struct SessionHandle *data = conn->data; data->progress.lastshow=0; rc = Curl_pgrsUpdate(conn); /* the final (forced) update */ if(rc) return rc; if(!(data->progress.flags & PGRS_HIDE) && !data->progress.callback) /* only output if we don't use...
false
false
false
false
false
0
usb6fire_midi_out_drain(struct snd_rawmidi_substream *alsa_sub) { struct midi_runtime *rt = alsa_sub->rmidi->private_data; int retry = 0; while (rt->out && retry++ < 100) msleep(10); }
false
false
false
false
false
0
cb_uri_type_changed_cb( GtkComboBoxText* cb ) { GtkWidget* dialog; FileAccessWindow* faw; const gchar* type; g_return_if_fail( cb != NULL ); dialog = gtk_widget_get_toplevel( GTK_WIDGET(cb) ); g_return_if_fail( dialog != NULL ); faw = g_object_get_data( G_OBJECT(dialog), "FileAccessWindow"...
false
false
false
false
false
0
glarea_button_press (GtkWidget* widget, GdkEventButton* event) { int x = event->x; int y = event->y; if (event->button == 1) { /* Mouse button 1 was engaged */ g_print ("Button 1 press (%d, %d)\n", x, y); return TRUE; } if (event->button == 2) { /* Mouse button 2 was engaged */ g_p...
false
false
false
false
false
0
fs_rtp_bitrate_adapter_get_suggested_caps (FsRtpBitrateAdapter *self) { GstCaps *allowed_caps; GstCaps *wanted_caps; GstCaps *caps = NULL; GST_OBJECT_LOCK (self); if (self->caps) caps = gst_caps_ref (self->caps); GST_OBJECT_UNLOCK (self); if (!caps) return NULL; allowed_caps = gst_pad_get_all...
false
false
false
false
false
0
gss_context_query_attributes(OM_uint32 *minor_status, gss_const_ctx_id_t context_handle, const gss_OID attribute, void *data, size_t len) { if (minor_status) *minor_status = 0; if (gss_oid_equal(GSS_C_ATTR_STREAM_SIZES, attribute)) { memset(data, 0, len); return GSS_S_COMPLET...
false
false
false
false
false
0
bnx2x_pbf_update(struct link_params *params, u32 flow_ctrl, u32 line_speed) { struct bnx2x *bp = params->bp; u8 port = params->port; u32 init_crd, crd; u32 count = 1000; /* Disable port */ REG_WR(bp, PBF_REG_DISABLE_NEW_TASK_PROC_P0 + port*4, 0x1); /* Wait for init credit */ init_crd = REG_RD(bp, PBF_R...
false
false
false
false
false
0
turn_off_all_playing_notes() { int i, chan, pitch; for (i = 0; i < 2048; i++) if (notechan[i] >= 0) { chan = i / 128; pitch = i % 128; copy_noteoff(chan, pitch, 0); } }
false
false
false
false
false
0
FreeExternalsList(Externals *externals, int n) { int i; for (i = 0; i < n; i++) if (externals[i]) FreeExternals(externals[i]); DXFree((Pointer)externals); return OK; }
false
false
false
false
false
0
ndc_2_dc_and_project ( s4DVertex *dest,s4DVertex *source, u32 vIn ) const { u32 g; for ( g = 0; g != vIn; g += 2 ) { if ( (dest[g].flag & VERTEX4D_PROJECTED ) == VERTEX4D_PROJECTED ) continue; dest[g].flag = source[g].flag | VERTEX4D_PROJECTED; const f32 w = source[g].Pos.w; const f32 iw = ...
false
false
false
false
false
0
cmd_pls_ignore(struct userrec *u, int idx, char *par) { char *who, s[UHOSTLEN]; unsigned long int expire_time = 0; if (!par[0]) { dprintf(idx, "Usage: +ignore <hostmask> [%%<XdXhXm>] [comment]\n"); return; } who = newsplit(&par); if (par[0] == '%') { char *p, *p_expire; unsigned long int e...
true
true
false
false
false
1
skip_node_characters (char *string, int flag) { register int c, i = 0; int paren_seen = 0; int paren = 0; if (!string) return 0; if (flag == PARSE_NODE_VERBATIM) return strlen (string); /* Handle special case. This is when another function has parsed out the filename component of the node...
false
false
false
false
false
0
jdns_server_copy(const jdns_server_t *s) { jdns_server_t *c = jdns_server_new(); if(s->name) c->name = _ustrdup(s->name); c->port = s->port; c->priority = s->priority; c->weight = s->weight; return c; }
false
false
false
false
false
0
buildTree(int loc, unsigned versionNum) { // Allocate the current node and set its symbol RepairTreeNode* root = new RepairTreeNode(associations[loc].getSymbol()); // Keep track of which versions we've processed in order to choose a root (see getNextRootLoc) associations[loc].removeFromVersions(versionNum); uns...
false
false
false
false
false
0
createPidFile() { bool fRet(false); if (pidFile.open(QIODevice::ReadWrite)) { const QByteArray abPid(pidFile.readAll()); pidFile.close(); const int iPid(abPid.count() == 0 ? 0 : abPid.toInt()); if (!iPid || iPid == ::getpid() || ::kill(iPid, 0) != 0) { if (::setsid() >...
false
false
false
false
false
0
mpg123_plain_strerror(int errcode) { if(errcode >= 0 && errcode < sizeof(mpg123_error)/sizeof(char*)) return mpg123_error[errcode]; else switch(errcode) { case MPG123_ERR: return "A generic mpg123 error."; case MPG123_DONE: return "Message: I am done with this track."; case MPG123_NEED_MORE: return "...
false
false
false
false
false
0
flushtrel() { unsigned nbytes; nbytes = trelbufptr - trelbuf; if (write(trelfd, trelbuf, nbytes) != nbytes) outputerror("cannot write"); trelbufptr = trelbuf; }
false
false
false
false
false
0
ast_sockaddr_is_any(const struct ast_sockaddr *addr) { union { struct sockaddr_storage ss; struct sockaddr_in sin; struct sockaddr_in6 sin6; } tmp_addr = { .ss = addr->ss, }; return (ast_sockaddr_is_ipv4(addr) && (tmp_addr.sin.sin_addr.s_addr == INADDR_ANY)) || (ast_sockaddr_is_ipv6(addr) && IN6_IS_AD...
false
false
false
false
false
0
friends_gtk_account_target_bar_account_created (FriendsGtkAccountTargetBar* self, GeeHashMap* accounts_buttons_map, FriendsAccount* account) { GeeHashMap* _tmp0_; FriendsAccount* _tmp1_; guint _tmp2_; guint _tmp3_; gboolean _tmp4_ = FALSE; FriendsAccount* _tmp7_; FriendsGtkAccountToggleButton* _tmp8_ = NULL; Fr...
false
false
false
false
false
0
ath5k_common_padpos(struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; __le16 frame_control = hdr->frame_control; int padpos = 24; if (ieee80211_has_a4(frame_control)) padpos += ETH_ALEN; if (ieee80211_is_data_qos(frame_control)) padpos += IEEE80211_QOS_CTL_LEN; return pa...
false
false
false
false
false
0
mostViolated(ConstraintList &l) { double minSlack = DBL_MAX; Constraint* v=NULL; #ifdef RECTANGLE_OVERLAP_LOGGING ofstream f(LOGFILE,ios::app); f<<"Looking for most violated..."<<endl; #endif ConstraintList::iterator end = l.end(); ConstraintList::iterator deletePoint = end; for(ConstraintList::iterator i=l.begi...
false
false
false
true
false
1
ForceSet(v8::Handle<Value> key, v8::Handle<Value> value, v8::PropertyAttribute attribs) { ON_BAILOUT("v8::Object::ForceSet()", return false); ENTER_V8; HandleScope scope; i::Handle<i::JSObject> self = Utils::OpenHandle(this); i::Handle<i::Object> key_obj = U...
false
false
false
false
false
0
z(home,file,len,uid,gid,mode) char *home; char *file; int len; int uid; int gid; int mode; { if (chdir(home) == -1) strerr_die4sys(111,FATAL,"unable to switch to ",home,": "); perm("",home,"/",file,S_IFREG,uid,gid,mode); }
false
false
false
false
false
0
compareTo(NamedObject* o){ if ( o->getObjectName() != Float::getClassName() ) return -1; Float* other = (Float*)o; if (value == other->value) return 0; // Returns just -1 or 1 on inequality; doing math might overflow. return value > other->value ? 1 : -1; }
false
false
false
false
false
0
main(int argc, char **argv) { int i, j = 0; FILE *f; if(argc > 1) { if(!(f = fopen(argv[1], "r"))) { perror(argv[1]); return 1; } } else { fprintf(stderr, "usage: bin2c file\n"); return 2; } printf("unsigned char %s_data[] = {\n", argv[1]); while((i = fgetc(f)) != EOF) { ...
false
false
false
false
true
1
Insert(TickSample* sample) { if (paused_) return; if (Succ(head_) == tail_) { overflow_ = true; } else { buffer_[head_] = *sample; head_ = Succ(head_); buffer_semaphore_->Signal(); // Tell we have an element. } }
false
false
false
false
false
0
wrapped_length_dervied (krb5_context context, krb5_crypto crypto, size_t data_len) { struct _krb5_encryption_type *et = crypto->et; size_t padsize = et->padsize; size_t res; res = et->confoundersize + data_len; res = (res + padsize - 1) / padsize * padsize; if (et->keyed_checksum...
false
false
false
false
false
0
get_buffer_lines(buf, start, end, retlist, rettv) buf_T *buf; linenr_T start; linenr_T end; int retlist; typval_T *rettv; { char_u *p; if (retlist && rettv_list_alloc(rettv) == FAIL) return; if (buf == NULL || buf->b_ml.ml_mfp == NULL || start < 0) return; if (!retlist) { ...
false
false
false
false
false
0
expand_group(STRLIST input) { STRLIST sl,output=NULL,rover; for(rover=input;rover;rover=rover->next) if(expand_id(rover->d,&output,rover->flags)==0) { /* Didn't find any groups, so use the existing string */ sl=add_to_strlist(&output,rover->d); sl->flags=rover->flags; } return output; }
false
false
false
false
false
0
cpl_table_multiply_columns(cpl_table *table, const char *to_name, const char *from_name) { cpl_column *to_column = cpl_table_find_column_(table, to_name); /* FIXME: Should be const */ cpl_column *from_column = cpl_table_fin...
false
false
false
false
false
0
ac_get_property(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val) { struct pcf50633_mbc *mbc = power_supply_get_drvdata(psy); int ret = 0; u8 usblim = pcf50633_reg_read(mbc->pcf, PCF50633_REG_MBCC7) & PCF50633_MBCC7_USB_MASK; switch (psp) { case POWER_SUPPLY_PR...
false
false
false
false
false
0
check_loaded_state (GVariant *state) { gboolean loaded, scanned; g_variant_get (state, "(bb)", &loaded, &scanned); if (loaded && scanned) { /* give it a tiny bit longer to populate sources etc. */ g_timeout_add (1500, (GSourceFunc) g_main_loop_quit, mainloop); } }
false
false
false
false
false
0
amitk_objects_count(GList * objects) { gint count; if (objects == NULL) return 0; if (AMITK_IS_OBJECT(objects->data)) count = 1; else count = 0; /* count data sets that are children */ count += amitk_objects_count(AMITK_OBJECT_CHILDREN(objects->data)); /* add this count too the counts fr...
false
false
false
false
false
0
find_bigpair(BUFHEAD *bufp, int ndx, char *key, int size) { uint16_t *bp; char *p; int ksize; uint16_t bytes; char *kkey; bp = (uint16_t *)bufp->page; p = bufp->page; ksize = size; kkey = key; for (bytes = this->BSIZE - bp[ndx]; bytes <= size && bp[ndx + 1] == PARTIAL_KEY; bytes = th...
false
false
false
false
false
0
char_val (gunichar c, gint number_base) { gint result = 0; gunichar _tmp0_ = 0U; gboolean _tmp1_ = FALSE; gint value = 0; gunichar _tmp2_ = 0U; gint _tmp3_ = 0; gint _tmp4_ = 0; gint _tmp5_ = 0; _tmp0_ = c; _tmp1_ = g_unichar_isxdigit (_tmp0_); if (!_tmp1_) { result = -1; return result; } _tmp2_ = c; ...
false
false
false
false
false
0
wield(Entity * entity) { if(entity->getLocation() != m_entity) { error() << "Can't wield an Entity which is not located in the avatar."; return; } Anonymous arguments; arguments->setId(entity->getId()); Wield wield; wield->setFrom(m_entityId); wield->setArgs1(arguments...
false
false
false
false
false
0
THX_upgrade_sv(pTHX_ SV *input) { U8 *p, *end; STRLEN len; if(SvUTF8(input)) return input; p = (U8*)SvPV(input, len); for(end = p + len; p != end; p++) { if(*p & 0x80) { SV *output = sv_mortalcopy(input); sv_utf8_upgrade(output); return output; } } return input; }
false
false
false
false
false
0
pump_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, off_t off, dict_t *dict) { afr_private_t *priv = NULL; priv = this->private; if (!priv->use_afr_in_pump) { STACK_WIND (frame, default_readdirp_cbk, ...
false
false
false
false
false
0
cciss_getluninfo(ctlr_info_t *h, struct gendisk *disk, void __user *argp) { LogvolInfo_struct luninfo; drive_info_struct *drv = get_drv(disk); if (!argp) return -EINVAL; memcpy(&luninfo.LunID, drv->LunID, sizeof(luninfo.LunID)); luninfo.num_opens = drv->usage_count; luninfo.num_parts = 0; if (copy_to_user(ar...
false
true
false
false
false
1
activateMenuOption (void) { System::getInstance ().removeActiveState (false); System::getInstance ().setActiveState ( new TournamentSetupState (*m_SelectedOption)); }
false
false
false
false
false
0
compress( void *inData, size_t inDataSize, std::vector<unsigned char> &outData) { int ret=0; MRPT_START unsigned long resSize; outData.resize(inDataSize+inDataSize/1000+50); resSize = (unsigned long)outData.size(); ret = ::compress( &outData[0], &resSize, (unsigned char*)inData, (unsigned l...
false
false
false
false
false
0
ibus_input_pad_config_get_str (IBusInputPadConfig *config, const gchar *section, const gchar *name, gchar **value_strp) { IBusConfig *ibus_config; GVariant *value = NULL; ...
false
false
false
false
false
0
readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg) { int inval; int rdcount = 0; /* counts bytes read */ unsigned char *temp = msg->buf; int count = msg->len; const unsigned flags = msg->flags; while (count > 0) { inval = i2c_inb(i2c_adap); if (inval >= 0) { *temp = inval; rdcount++; } else...
false
false
false
false
false
0
force_better_solution(struct isl_tab *tab, __isl_keep isl_vec *sol, int n_op) { int i; isl_ctx *ctx; isl_vec *v = NULL; if (!sol) return -1; for (i = 0; i < n_op; ++i) if (!isl_int_is_zero(sol->el[1 + i])) break; if (i == n_op) { if (isl_tab_mark_empty(tab) < 0) return -1; return 0; } ctx = i...
false
false
false
false
false
0
CollectStaticSystemInfo(void) { const char * cp; int fd; int cc; char buf[256]; /* * Get the number of ticks per second. */ ticksPerSecond = sysconf(_SC_CLK_TCK); if (ticksPerSecond <= 0) ticksPerSecond = 100; /* * Get the page size. */ pageSize = sysconf(_SC_PAGESIZE); if (pageSize <= 0) page...
false
false
false
false
false
0
Map_Task(Pointer taskPtr) { MapTask *task; Object map; task = (MapTask *)taskPtr; if (DXGetObjectClass(task->map) == CLASS_INTERPOLATOR) { if (! (map = DXCopy(task->map, COPY_STRUCTURE))) return ERROR; } else map = task->map; DXReference(map); if (ERROR == DXMap(...
false
false
false
false
false
0
coerce_to_uvec (int type, SCM obj) { if (is_uvec (type, obj)) return obj; else if (scm_is_pair (obj)) return list_to_uvec (type, obj); else if (scm_is_generalized_vector (obj)) { scm_t_array_handle handle; size_t len = scm_c_generalized_vector_length (obj), i; SCM uvec = alloc_uvec (...
false
false
false
false
false
0
SetMaskEditAtts(PG_MaskEdit *Widget, const char **atts, ParseUserData_t *XMLParser) { char *c; Widget->SetMask(PG_Layout::GetParamStr(atts, "mask")); c = PG_Layout::GetParamStr(atts, "spacer"); if (c[0] != 0) Widget->SetSpacer(c[0]); return(SetLineEditAtts(Widget, atts, XMLParser)); }
false
false
false
false
false
0
tps80031_power_req_config(struct device *parent, struct tps80031_regulator *ri, struct tps80031_regulator_platform_data *tps80031_pdata) { int ret = 0; if (ri->rinfo->preq_bit < 0) goto skip_pwr_req_config; ret = tps80031_ext_power_req_config(parent, ri->ext_ctrl_flag, ri->rinfo->preq_bit, ri->rinfo->stat...
false
false
false
false
false
0
invalid_cmdline(const fr_args & args, int err, const char * fmt, ...) { va_list vargs; va_start(vargs, fmt); err = ff_vlog(FC_ERROR, err, fmt, vargs); va_end(vargs); ff_log(FC_NOTICE, 0, "Try `%s --help' for more information", args.program_name); /* mark error as reported */ return err ? e...
false
false
false
false
false
0
parse_merge_opt(struct merge_options *o, const char *s) { if (!s || !*s) return -1; if (!strcmp(s, "ours")) o->recursive_variant = MERGE_RECURSIVE_OURS; else if (!strcmp(s, "theirs")) o->recursive_variant = MERGE_RECURSIVE_THEIRS; else if (!strcmp(s, "subtree")) o->subtree_shift = ""; else if (!prefixcmp(s...
false
false
false
false
false
0
GetMsg( short id ) const { if ( (id >= 0) && ((short)cat.size() > id) ) return cat[id].c_str(); return 0; }
false
false
false
false
false
0
handleNewgen (action, arg) char *action, *arg; { int i=0; while (i < actionCount) { if (actionList[i++] == VADM_NEWGEN) { sprintf (stMessage, "You already requested the new generation -- '%s' ignored.", action); stLog (stMessage, ST_LOG_WARNING); return (0); } } return (addToActio...
false
false
false
false
false
0
goa_editable_label_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GoaEditableLabel *e = GOA_EDITABLE_LABEL (object); switch (prop_id) { case PR...
false
false
false
false
false
0
il_poll_bit(struct il_priv *il, u32 addr, u32 mask, int timeout) { const int interval = 10; /* microseconds */ int t = 0; do { if ((il_rd(il, addr) & mask) == mask) return t; udelay(interval); t += interval; } while (t < timeout); return -ETIMEDOUT; }
false
false
false
false
false
0
sample_discrete() { const long int BLOCK_SIZE = 16384; long int samples[BLOCK_SIZE]; double* probs; size_t num_probs; plfit_walker_alias_sampler_t sampler; long int i, n; double u; if (opts.num_samples <= 0) return 0; if (opts.kappa > 0) { /* Power law with exponent...
false
false
false
false
false
0
compat_radeon_mem_alloc(struct file *file, unsigned int cmd, unsigned long arg) { drm_radeon_mem_alloc32_t req32; drm_radeon_mem_alloc_t __user *request; if (copy_from_user(&req32, (void __user *)arg, sizeof(req32))) return -EFAULT; request = compat_alloc_user_space(sizeof(*request)); if (!access_ok(VER...
false
false
false
false
false
0
innconf_parse(struct config_group *group) { unsigned int i, j; bool *bool_ptr; long *signed_number_ptr; unsigned long *unsigned_number_ptr; const char *char_ptr; char **string; const struct vector *vector_ptr; struct vector **list; struct innconf *config; config = xmalloc(sizeof...
false
false
false
false
false
0
getUserAny(const String& key) const { // Allocate attributes on demand. if (mAttributes == NULL) mAttributes = OGRE_NEW UserObjectBindings::Attributes; // Case map doesn't exists. if (mAttributes->mUserObjectsMap == NULL) return msEmptyAny; UserObjec...
false
false
false
false
false
0
parse_next_regex(char *ptr) { assert(ptr != NULL); /* Continue until the end of the line, or a " followed by a space, a * blank character, or \0. */ while ((*ptr != '"' || (!isblank(*(ptr + 1)) && *(ptr + 1) != '\0')) && *ptr != '\0') ptr++; assert(*ptr == '"' || *ptr == '\0'); if (*ptr ==...
false
false
false
false
false
0
to_fn(XtPointer closure, XtIntervalId *id) { torec_t *torec; torec_t *prev = NULL; voidfn *fn = NULL; for (torec = torecs; torec != NULL; torec = torec->next) { if (torec->id == *id) { break; } prev = torec; } if (torec != NULL) { /* Remember the record. */ fn = torec->fn; /* Free the recor...
false
false
false
false
false
0
gst_rtp_mux_change_state (GstElement * element, GstStateChange transition) { GstRTPMux *rtp_mux; rtp_mux = GST_RTP_MUX (element); switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: break; case GST_STATE_CHANGE_READY_TO_PAUSED: gst_rtp_mux_ready_to_paused (rtp_mux); break; c...
false
false
false
false
false
0
VSsetexternalfile(int32 vkey, const char *filename, int32 offset) { CONSTR(FUNC, "VSsetexternalfile"); int32 ret_value = SUCCEED; vsinstance_t *w; VDATA *vs; intn status; if(!filename || offset < 0) HGOTO_ERROR(DFE_ARGS, FAIL); if (HAatom_group(vkey)!=VSIDGROUP) HGO...
false
false
false
false
false
0
icx_add_audience(Icx_ctx *ctx, char *audience) { if (ctx->audience == NULL) ctx->audience = dsvec_init(NULL, sizeof(char *)); /* XXX should check syntax here instead of in icx_is_in_audience() */ dsvec_add_ptr(ctx->audience, strdup(audience)); return(0); }
false
false
false
false
false
0
GetFileNames(const std::string & seriesUID, bool recursive) { if ( m_Directory == "" ) { itkExceptionMacro (<< "No directory defined!"); } // Make sure the SeriesUIDs are up to date. This may require the // directory to be scanned. this->GetSeriesUIDs(recursive); // Get the filenames, sorted by ...
false
false
false
false
false
0
Skip_transparent ( unsigned char *& pixels, // 8-bit pixel scan line. int x, // X-coord. of pixel to start with. int w // Remaining width of pixels. ) { while (x < w && *pixels == 255) { x++; pixels++; } return (x); }
false
false
false
false
false
0
AacEncEncode(AAC_ENCODER *aacEnc, /*!< an encoder handle */ Word16 *timeSignal, /*!< BLOCKSIZE*nChannels audio samples, interleaved */ const UWord8 *ancBytes, /*!< pointer to ancillary data bytes */ Word16 *numAncBytes, /*!< number of ancillary D...
false
false
false
false
false
0
channel_request_xon(PLCI *plci, byte ch) { DIVA_CAPI_ADAPTER *a = plci->adapter; if (a->ch_flow_control[ch] & N_CH_XOFF) { a->ch_flow_control[ch] |= N_XON_REQ; a->ch_flow_control[ch] &= ~N_CH_XOFF; a->ch_flow_control[ch] &= ~N_XON_CONNECT_IND; } }
false
false
false
false
false
0
clock (void) { struct timespec ts; /* clock_gettime shouldn't fail here since CLOCK_PROCESS_CPUTIME_ID is supported since 2.6.12. Check the return value anyway in case the kernel barfs on us for some reason. */ if (__glibc_unlikely (__clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &ts) != 0)) return (c...
false
false
false
false
false
0
panasonic_prop(struct exifprop *prop, struct exiftags *t) { switch (prop->tag) { /* White balance. */ case 0x0003: prop->override = EXIF_T_WHITEBAL; break; /* White balance adjust (unknown). */ case 0x0023: exifstralloc(&prop->str, 10); snprintf(prop->str, 9, "%d", (int16_t)prop->value); break; /*...
false
false
false
false
false
0
run(const gchar *name , gint n_params , const GimpParam *param , gint *nreturn_vals , GimpParam **return_vals) { static GimpParam values[1]; GimpRunMode run_mode; GimpPDBStatusType status = GIMP_PDB_SUCCESS; gint32 image_id; gint32 drawable_id; char *filtermacro_file; gint32 ...
false
false
false
false
false
0
get(MSAttrValueList& avList_) { //This is replacement to the get method in MSTypeEntryField as //code there is too generic and resulting code is incorrect MSString buf; MSFloat value; value=(double)_incrementValue; value.format(buf,MSFloat::Decimal4); avList_<<MSAttrValue("incrementValue",buf); if ...
false
false
false
false
false
0
check_function_arguments (const_tree fntype, int nargs, tree *argarray) { /* Check for null being passed in a pointer argument that must be non-null. We also need to do this if format checking is enabled. */ if (warn_nonnull) check_function_nonnull (TYPE_ATTRIBUTES (fntype), nargs, argarray); /* Chec...
false
false
false
false
false
0
StoreRsaKey(DecodedCert* cert) { int length; word32 read = cert->srcIdx; if (GetSequence(cert->source, &cert->srcIdx, &length) < 0) return ASN_PARSE_E; read = cert->srcIdx - read; length += read; while (read--) cert->srcIdx--; cert->pubKeySize = length; cert->pub...
false
true
false
false
true
1
apol_mls_range_create_from_mls_range(const apol_mls_range_t * range) { apol_mls_range_t *r; if ((r = apol_mls_range_create()) == NULL) { return NULL; } if (range != NULL && ((r->low = apol_mls_level_create_from_mls_level(range->low)) == NULL || (r->high = apol_mls_level_create_from_mls_level(range->hig...
false
false
false
false
false
0
EmitInstruction(const MachineInstr *MI) { MipsTargetStreamer &TS = getTargetStreamer(); TS.forbidModuleDirective(); if (MI->isDebugValue()) { SmallString<128> Str; raw_svector_ostream OS(Str); PrintDebugValueComment(MI, OS); return; } // If we just ended a constant pool, mark it as such. ...
false
false
false
false
false
0
hw_rule_rate(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { struct snd_bebob_stream_formation *formations = rule->private; struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); const struct snd_interval *c = hw_param_interval_c(params, SNDRV_PCM_HW_PARAM_CHANNELS); stru...
false
false
false
false
false
0
GetNextPtr(void *NextInBucketPtr) { // The low bit is set if this is the pointer back to the bucket. if (reinterpret_cast<intptr_t>(NextInBucketPtr) & 1) return 0; return static_cast<FoldingSetImpl::Node*>(NextInBucketPtr); }
false
false
false
false
false
0
ab_port_leave(struct team *team, struct team_port *port) { if (ab_priv(team)->active_port == port) { RCU_INIT_POINTER(ab_priv(team)->active_port, NULL); team_option_inst_set_change(ab_priv(team)->ap_opt_inst_info); } }
false
false
false
false
false
0
testing_util_pop_log_hooks (void) { guint i; LogHook *hook; GPtrArray *unhit_hooks; g_return_if_fail (log_hooks != NULL); if (log_hooks->len == 0) return; unhit_hooks = g_ptr_array_new (); for (i = 0; i < log_hooks->len; ++i) { hook = g_ptr_array_index (log_hooks, i); if (!hook->h...
false
false
false
false
false
0
lu(int count) { Polynomial *buf=this->dup(0,0,count); Polynomial *ret=buf->_lu(buf); if(!ret) delete buf; return(ret); }
false
false
false
false
false
0
getpix (image, bitpix, w, h, bzero, bscale, x, y) char *image; /* Image array as 1-D vector */ int bitpix; /* FITS bits per pixel */ /* 16 = short, -16 = unsigned short, 32 = int */ /* -32 = float, -64 = double */ int w; /* Image width in pixels */ int h; /* Image height in pixels */ double bzero; /* Zero...
false
false
false
false
false
0
rtl8169_set_speed_xmii(struct net_device *dev, u8 autoneg, u16 speed, u8 duplex) { struct rtl8169_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int auto_nego, giga_ctrl; DBGP ( "rtl8169_set_speed_xmii\n" ); auto_nego = mdio_read(ioaddr, MII_ADVERTISE); auto_nego &= ~(ADVERTISE_10HALF | ADV...
false
false
false
false
false
0
initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * cblk, struct scsi_cmnd * cmnd) { /* Create corresponding SCB */ struct scatterlist *sglist; struct sg_entry *sg; /* Pointer to SG list */ int i, nseg; long total_len; dma_addr_t dma_addr; /* Fill in the command headers */ cblk-...
false
true
false
false
false
1
slice_buffer_init(slice_buffer * buf, int line_count, int max_allocated_lines, int line_width, IDWTELEM * base_buffer) { int i; buf->base_buffer = base_buffer; buf->line_count = line_count; buf->line_width = line_width; buf->data_count = max_allocated_lines; buf->line = av_mallocz (sizeof(IDWTE...
false
false
false
false
false
0
add_time_slot(struct work_queue *q, timestamp_t start, timestamp_t duration, int type, timestamp_t * accumulated_time, struct list *time_list) { struct time_slot *ts; int count, effective_workers; if(!time_list) return; ts = (struct time_slot *) malloc(sizeof(struct time_slot)); if(ts) { ts->start = start; ...
false
false
false
false
false
0
Is(uchar c) { int chunk_index = c >> 13; switch (chunk_index) { case 0: return LookupPredicate(kConnectorPunctuationTable0, kConnectorPunctuationTable0Size, c); case 1: return LookupPredicate(kConnectorPunctuationTable1, ...
false
false
false
false
false
0
FunctionGetLength(Object* object, void*) { bool found_it = false; JSFunction* function = FindInPrototypeChain<JSFunction>(object, &found_it); if (!found_it) return Smi::FromInt(0); // Check if already compiled. if (!function->is_compiled()) { // If the function isn't compiled yet, the length is not comput...
false
false
false
false
false
0
ipmi_fru_parse_dump_obj (ipmi_fru_parse_ctx_t ctx, fiid_obj_t obj, const char *debug_hdr) { assert (ctx); assert (ctx->magic == IPMI_FRU_PARSE_CTX_MAGIC); assert (obj); assert (debug_hdr); if (ctx->flags & IPMI_FRU_PARSE_FLAGS_DEBUG_DUMP) { char hdr...
true
true
false
false
false
1
ldl_getfields( char *statementp, char *firstfieldp, char *secondfieldp, char *thirdfieldp ) { int delim=g_delim; char *tempfirst; char *tempsecond; char *tempthird; char *bufp=statementp; /* get pointers to individual fields from file */ tempfirst=mystrsep(&bufp, delim); tempsecond=mystrsep(&bufp, delim); t...
false
true
false
false
false
1
realtime_ldap_entry_to_var(struct ldap_table_config *table_config, LDAPMessage *ldap_entry) { BerElement *ber = NULL; struct ast_variable *var = NULL; struct ast_variable *prev = NULL; int is_delimited = 0; int i = 0; char *ldap_attribute_name; struct berval *value; int pos = 0; ldap_attribute_name = ldap_fi...
false
false
false
false
false
0
operator<<(std::ostream& os, const path_t& apath) { const unsigned as(apath.size()); for (unsigned i(0); i<as; ++i) { os << apath[i].length << segment_type_to_cigar_code(apath[i].type); } return os; }
false
false
false
false
false
0
usb3503_reset(struct usb3503 *hub, int state) { if (!state && gpio_is_valid(hub->gpio_connect)) gpio_set_value_cansleep(hub->gpio_connect, 0); if (gpio_is_valid(hub->gpio_reset)) gpio_set_value_cansleep(hub->gpio_reset, state); /* Wait T_HUBINIT == 4ms for hub logic to stabilize */ if (state) usleep_range(4...
false
false
false
false
false
0
cs5535_mfd_probe(struct pci_dev *pdev, const struct pci_device_id *id) { int err, i; err = pci_enable_device(pdev); if (err) return err; /* fill in IO range for each cell; subdrivers handle the region */ for (i = 0; i < ARRAY_SIZE(cs5535_mfd_cells); i++) { int bar = cs5535_mfd_cells[i].id; struct resourc...
false
false
false
false
false
0