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
orinoco_commit(struct orinoco_private *priv) { struct net_device *dev = priv->ndev; struct hermes *hw = &priv->hw; int err; if (priv->broken_disableport) { schedule_work(&priv->reset_work); return 0; } err = hermes_disable_port(hw, 0); if (err) { printk(KERN_WARNING "%s: Unable to disable port " ...
false
false
false
false
false
0
stringer (int bits_appendzero) { const int bitsize = bits_appendzero & ~7; const int append_zero = bits_appendzero & 1; unsigned int c; #if !defined(NO_LISTING) && defined (OBJ_ELF) char *start; #endif #ifdef md_flush_pending_output md_flush_pending_output (); #endif #ifdef md_cons_align md_cons_align (1)...
false
false
true
false
true
1
ajSortUintDecI(const ajuint *a, ajuint *p, ajuint n) { ajuint s; ajuint i; ajint j; ajuint t; for(s=n/2; s>0; s /= 2) for(i=s; i<n; ++i) for(j=i-s;j>=0 && a[p[j]]<a[p[j+s]]; j-=s) { t = p[j]; p[j] = p[j+s]; p[j+s] = t; } return; }
false
false
false
false
false
0
motion_notify_event(GtkWidget *widget, GdkEventMotion *event) { gint x, y; GdkModifierType mask; GtkTextIter iter; guint offset; gint buffer_x, buffer_y; GdkRectangle location; gboolean too_far=FALSE; #ifdef __WIN32__ HCURSOR hCursor; #else GdkCursor *cursor; #endif // LOG(LOG_DEBUG, "IN : motion_notify_eve...
false
false
false
false
false
0
aes_ecb_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out, const unsigned char *in, size_t len) { size_t bl = ctx->cipher->block_size; size_t i; EVP_AES_KEY *dat = (EVP_AES_KEY *)ctx->cipher_data; if (len<bl) return 1; for (i=0,len-=bl;i<=len;i+=bl) (*dat->block)(in+i,out+i,&dat->ks); return 1; }
false
false
false
false
false
0
minivm_counter_func_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) { char *username, *domain, *countername; char userpath[BUFSIZ]; int res; *buf = '\0'; username = ast_strdupa(data); if ((countername = strchr(username, ':'))) { *countername = '\0'; countername++; } i...
true
true
false
false
false
1
insn_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data) { rtx * pinsn = (rtx *) data; if (*pinsn && reg_mentioned_p (x, *pinsn)) *pinsn = NULL_RTX; }
false
false
false
false
false
0
lp3944_led_set_brightness(struct led_classdev *led_cdev, enum led_brightness brightness) { struct lp3944_led_data *led = ldev_to_led(led_cdev); dev_dbg(&led->client->dev, "%s: %s, %d\n", __func__, led_cdev->name, brightness); led->status = !!brightness; schedule_work(&led->work); }
false
false
false
false
false
0
ves_icall_System_Reflection_Module_GetGlobalType (MonoReflectionModule *module) { MonoDomain *domain = mono_object_domain (module); MonoClass *klass; MONO_ARCH_SAVE_REGS; g_assert (module->image); if (module->image->dynamic && ((MonoDynamicImage*)(module->image))->initial_image) /* These images do not have a...
false
false
false
false
false
0
getOwnPropertySlot( KJS::ExecState *exec, const KJS::Identifier &propertyName, KJS::PropertySlot &slot ) { // qDebug() << "getOwnPropertySlot called"; QObject *obj = object<QObject>(); const QMetaObject *meta = obj->metaObject(); int propIndex = meta->indexOfProperty( propertyName.ascii() ); if (...
false
false
false
false
false
0
wiz_wish() /* Unlimited wishes for debug mode by Paul Polderman */ { if (wizard) { boolean save_verbose = flags.verbose; flags.verbose = FALSE; makewish(); flags.verbose = save_verbose; (void) encumber_msg(); } else pline("Unavailable command '^W'."); return 0; }
false
false
false
false
false
0
gdict_window_cmd_edit_select_all (GSimpleAction *action, GVariant *parameter, gpointer user_data) { GdictWindow *window = user_data; g_assert (GDICT_IS_WINDOW (window)); if (gtk_widget_has_focus (window->entry)) gtk_editable_sele...
false
false
false
false
false
0
parse_nk(struct hive *hdesc, int vofs, int blen) { struct nk_key *key; int i; printf("== nk at offset %0x\n",vofs); /* #define D_OFFS2(o) ( (void *)&(key->o)-(void *)hdesc->buffer-vofs ) */ #define D_OFFS(o) ( (void *)&(key->o)-(void *)hdesc->buffer-vofs ) key = (struct nk_key *)(hdesc->buffer + vofs); ...
false
false
false
false
true
1
gnumeric_choose (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv) { int index; GnmValue *v; int i; if (argc < 1) return value_new_error_VALUE (ei->pos); #warning TODO add array eval v = gnm_expr_eval (argv[0], ei->pos, GNM_EXPR_EVAL_SCALAR_NON_EMPTY); if (!v) return NULL; if (!VALUE_IS_FLO...
false
false
false
false
false
0
add_request(ResRQ *new) { if (!new) return -1; if (!first) first = last = new; else { last->next = new; last = new; } new->next = NULL; reinfo.re_requests++; return 0; }
false
false
false
false
false
0
gwy_3d_label_set_text(Gwy3DLabel *label, const gchar *text) { g_return_if_fail(GWY_IS_3D_LABEL(label)); if (gwy_strequal(text, label->text->str)) return; g_string_assign(label->text, text); g_object_notify(G_OBJECT(label), "text"); }
false
false
false
false
false
0
xmmsc_medialib_entry_property_remove_with_source (xmmsc_connection_t *c, int id, const char *source, const char *key) { x_check_conn (c, NULL); return xmmsc_send_cmd (...
false
false
false
false
false
0
removeNodeProperty(gpointer key, gpointer value, gpointer data) { EleArr *ele; VisuNode *node; VisuNodeProperty *prop; node = (VisuNode*)data; prop = (VisuNodeProperty*)value; ele = _getEleArr(prop->array, node->posElement); g_return_if_fail(ele->nStoredNodes > 0); DBG_fprintf(stderr, "Visu Node: re...
false
false
false
false
false
0
is_pointer_arg (fncall *call, fnargs *args, int rtype) { ufunc *u = call->fun; if (call->retname != NULL) { int i; for (i=0; i<args->argc; i++) { if (types_match(u->params[i].type, rtype)) { if (!strcmp(u->params[i].name, call->retname)) { return 1; } } } } return 0; }
false
false
false
false
false
0
dnet_interrupt(int irq, void *dev_id) { struct net_device *dev = dev_id; struct dnet *bp = netdev_priv(dev); u32 int_src, int_enable, int_current; unsigned long flags; unsigned int handled = 0; spin_lock_irqsave(&bp->lock, flags); /* read and clear the DNET irq (clear on read) */ int_src = dnet_readl(bp, INTR...
false
false
false
false
false
0
par_check_int(int npar, int *parlist, int *flaglist, int par) { int i, found; found = 0; for ( i = 0; i < npar; i++ ) if ( par == parlist[i] ) { found = 1; flaglist[i] = TRUE;/* break;*/} return (found); }
false
false
false
false
false
0
load_ucode_intel_ap(void) { struct mc_saved_data *mc_saved_data_p; struct ucode_cpu_info uci; unsigned long *mc_saved_in_initrd_p; enum ucode_state ret; #ifdef CONFIG_X86_32 mc_saved_in_initrd_p = (unsigned long *)__pa_nodebug(mc_saved_in_initrd); mc_saved_data_p = (struct mc_saved_data *)__pa_nodebug(&mc_saved_...
false
false
false
false
false
0
convert_regs_2 (basic_block block) { basic_block *stack, *sp; bool cfg_altered = false; /* We process the blocks in a top-down manner, in a way such that one block is only processed after all its predecessors. The number of predecessors of every block has already been computed. */ stack = XNEWVEC ...
false
false
false
false
false
0
test1_thread (gpointer use_thread_context) { SoupSession *session; GMainContext *async_context; char *uri; SoupMessage *msg; GMainLoop *loop; /* Wait for main thread to be waiting on test1_cond */ g_mutex_lock (&test1_mutex); g_mutex_unlock (&test1_mutex); async_context = g_main_context_new (); if (use_thre...
false
false
false
false
false
0
draw_arrowsCmd() { if (_nword != 2) { demonstrate_command_usage(); NUMBER_WORDS_ERROR; return false; } if (!_columns_exist || _colU.size() <= 0) { warning("`draw arrows' noticed that no column data exist."); return true; } if (!scales_defined()) { #if 0 // Fix SF bug #129856 (I hope!) no_scales_erro...
false
false
false
false
false
0
addr_to_string (ACE_TCHAR s[], size_t size, int ipaddr_format) const { ACE_TRACE ("ACE_INET_Addr::addr_to_string"); // XXX Can we (should we) include the scope id for IPv6 addresses? char hoststr[MAXHOSTNAMELEN+1]; bool result = false; if (ipaddr...
false
false
false
false
false
0
coeff(int narg, char **arg) { if (narg < 5 || narg > 7) error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); int ilo,ihi,jlo,jhi; force->bounds(arg[0],atom->ntypes,ilo,ihi); force->bounds(arg[1],atom->ntypes,jlo,jhi); double a_one = force->numeric(FLERR,arg[2]); double r...
false
false
false
false
false
0
coda_open(struct inode *coda_inode, struct file *coda_file) { struct file *host_file = NULL; int error; unsigned short flags = coda_file->f_flags & (~O_EXCL); unsigned short coda_flags = coda_flags_to_cflags(flags); struct coda_file_info *cfi; cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL); if (!cfi) ...
false
false
false
false
false
0
ssl_init_FindCAList(server_rec *s, apr_pool_t *ptemp, const char *ca_file, const char *ca_path) { STACK_OF(X509_NAME) *ca_list; /* * Start with a empty stack/list where new * ent...
false
false
false
false
false
0
delegated_channels_cb (TpBaseClient *client, GPtrArray *channels, gpointer user_data) { TpAccountChannelRequest *self = user_data; TpChannel *channel; g_return_if_fail (channels->len == 1); /* TpBaseClient is supposed to check we are actually handling the channel * before calling this callback so w...
false
false
false
false
false
0
loadGroupDefinition(const String& filename) { DataStreamPtr stream = Root::getSingleton().openFileStream(filename, getResourceGroup()); StreamSerialiser ser(stream); loadGroupDefinition(ser); }
false
false
false
false
false
0
main(int argc, char **argv) { cst_track *lpc; cst_wave *sig, *sig2; cst_sts *sts; if (argc != 6) { fprintf(stderr,"usage: find_sts lpc_min lpc_range LPC WAVEFILE STS\n"); return 1; } lpc_min = atof(argv[1]); lpc_range = atof(argv[2]); lpc = new_track(); cst_track_load_est(lp...
false
false
false
false
false
0
sound_free(SOUND_DATA **p) { if (p && *p) { unsigned i; for (i = 0 ; i < (*p)->num_sounds; i++) { X_FREE((*p)->sounds[i].samples); } X_FREE((*p)->sounds); X_FREE(*p); } }
false
false
false
false
false
0
trace_module_add_enums(struct module *mod) { if (!mod->num_trace_enums) return; /* * Modules with bad taint do not have events created, do * not bother with enums either. */ if (trace_module_has_bad_taint(mod)) return; trace_insert_enum_map(mod, mod->trace_enums, mod->num_trace_enums); }
false
false
false
false
false
0
addBitsToStreamReversed(size_t* bitpointer, ucvector* bitstream, unsigned value, size_t nbits) { size_t i; for(i = 0; i < nbits; i++) addBitToStream(bitpointer, bitstream, (unsigned char)((value >> (nbits - 1 - i)) & 1)); }
false
false
false
false
false
0
git_command_append_error (GitCommand *self, const gchar *error_line) { if (strlen (self->priv->error_string->str) > 0) g_string_append_printf (self->priv->error_string, "\n%s", error_line); else g_string_append (self->priv->error_string, error_line); }
false
false
false
false
false
0
tenm_clear_window(tenm_color color) { if (SDL_FillRect(dpy, NULL, color) != 0) { fprintf(stderr, "tenm_clear_window: SDL_FillRect failed (%s)\n", SDL_GetError()); return 1; } return 0; }
false
false
false
false
false
0
execute_command_line_and_wait(const std::string& command, const SlotProgress& slot_progress, std::string& output) { //Initialize output parameter: output = std::string(); //Show UI progress feedback while we wait for the command to finish: std::auto_ptr<const Impl::SpawnInfo> info; try { info = Imp...
false
false
false
false
false
0
maze_getmove_kb (Pos *pos, int key, byte **movp, int **rmovp) { static byte move[10]; int curx = -1, cury = -1; int incx = -1, incy = -1; int x, y; maze_get_cur_pos (pos->board, &curx, &cury); g_assert (curx >= 0 && cury >= 0); switch (key) { case GDK_Up: incx = 0; incy = 1; break; case GDK_Down: incx = 0; ...
false
false
false
false
false
0
visitNodes(NodeVisitor& v) const throw (Exception) { for (ConfigNode::cmap_t::iterator i = node->cmap.begin(); i != node->cmap.end(); i++) if (!v.visitNode(i->first, i->second)) break; }
false
false
false
false
false
0
append_key (GVariantBuilder *builder, MetaTree *tree, const char *path, const char *key) { MetaKeyType keytype; char *str; char **strv; keytype = meta_tree_lookup_key_type (tree, path, key); if (keytype == META_KEY_TYPE_STRING) { str = meta_tree_lookup_string (tree, path, key); ...
false
false
false
false
false
0
huff_decode(huff_tables *pH) { int symbol; // Check first 8-bits: do we have a complete symbol? if ((symbol = pH->look_up[m_bit_buf >> 24]) < 0) { // Decode more bits, use a tree traversal to find symbol. int ofs = 23; do { symbol = pH->tree[-(int)(symbol + ((m_bit_buf >...
false
false
false
false
false
0
channels() const { List<ChannelType> l; Map<ChannelType, ChannelData>::ConstIterator it = d->channels.begin(); for(; it != d->channels.end(); ++it) l.append((*it).first); return l; }
false
false
false
false
false
0
snd_ac97_proc_regs_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx) { int reg, val; for (reg = 0; reg < 0x80; reg += 2) { val = snd_ac97_read(ac97, reg); snd_iprintf(buffer, "%i:%02x = %04x\n", subidx, reg, val); } }
false
false
false
false
false
0
check_perf_bit(uint32_t val, int bit, const char *bitname, bool set) { if (!!(val & (1 << bit)) != set) { printf(" (bit %2d) PERF: %s should be %s\n", bit, bitname, set ? "set" : "unset"); } else { printf(" (bit %2d) OK: %s\n", bit, bitname); } }
false
false
false
false
false
0
mce_gen_pool_add(struct mce *mce) { struct mce_evt_llist *node; if (!mce_evt_pool) return -EINVAL; node = (void *)gen_pool_alloc(mce_evt_pool, sizeof(*node)); if (!node) { pr_warn_ratelimited("MCE records pool full!\n"); return -ENOMEM; } memcpy(&node->mce, mce, sizeof(*mce)); llist_add(&node->llnode, &...
false
true
false
false
false
1
inf_text_gtk_buffer_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec) { InfTextGtkBuffer* buffer; InfTextGtkBufferPrivate* priv; buffer = INF_TEXT_GTK_BUFFER(object); priv = INF_TEXT_...
false
false
false
false
false
0
link_personas_tests_finalize (GObject* obj) { LinkPersonasTests * self; #line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_LINK_PERSONAS_TESTS, LinkPersonasTests); #line 35 "/home/treitter/collabora/folks/tests/eds/link-personas.vala" _g_main_loop_unre...
false
false
false
false
false
0
try_to_simplify_commit(struct rev_info *revs, struct commit *commit) { struct commit_list **pp, *parent; int tree_changed = 0, tree_same = 0; /* * If we don't do pruning, everything is interesting */ if (!revs->prune) return; if (!commit->tree) return; if (!commit->parents) { if (rev_same_tree_as_emp...
false
false
false
false
false
0
dyeRGBtoHSV(float *H, float *S, float *V, float R, float G, float B) { float max, min, delta; max = AIR_MAX(R,G); max = AIR_MAX(B,max); min = AIR_MIN(R,G); min = AIR_MIN(B,min); *V = max; if (max != 0) *S = (max - min)/max; else *S = 0; if (0 == *S) { *H = 0; return; ...
false
false
false
false
false
0
lnode_pool_init(lnodepool_t *pool, lnode_t *nodes, listcount_t n) { listcount_t i; assert (n != 0); pool->pool = nodes; pool->fre = nodes; pool->size = n; for (i = 0; i < n - 1; i++) { nodes[i].next = nodes + i + 1; } nodes[i].next = NULL; nodes[i].prev = nodes; /* to make sure no...
false
false
false
false
false
0
visu_scalar_field_new_fromFile(const gchar *filename, GList **fieldList, GHashTable *table, GError **error) { gboolean validFormat; GList *tmpLst; g_return_val_if_fail(filename, FALSE); g_return_val_if_fail(*fieldList == (GList*)0, FALSE); g_return_val_if_fail(error &&...
false
false
false
false
false
0
ssl23_read(SSL *s, void *buf, int len) { int n; clear_sys_error(); if (SSL_in_init(s) && (!s->in_handshake)) { n=s->handshake_func(s); if (n < 0) return(n); if (n == 0) { SSLerr(SSL_F_SSL23_READ,SSL_R_SSL_HANDSHAKE_FAILURE); return(-1); } return(SSL_read(s,buf,len)); } else { ssl_undef...
false
false
false
false
false
0
hash_name(char *name) { Reg u_int hashv = 0; for (; *name && *name != '.'; name++) hashv += *name; hashv %= ARES_CACSIZE; return (hashv); }
false
false
false
false
false
0
selectSoftware(const std::list<Software>& swList) { SoftwareRequirement* sr = new SoftwareRequirement(); bool status = isSatisfiedSelect(swList, sr); if (status) { *this = *sr; } delete sr; return status; }
false
false
false
false
false
0
FeasibilityAnalysis(BBInfo &BBI, SmallVectorImpl<MachineOperand> &Pred, bool isTriangle, bool RevBranch) { // If the block is dead or unpredicable, then it cannot be predicated. if (BBI.IsDone || BBI.IsUnpredicable) return false; // ...
false
false
false
false
false
0
set_greedy_suggestion_threshold(const std::string& value) { logger << INFO << "GREEDY_SUGGESTION_THRESHOLD: " << value << endl; int result = Utility::toInt(value); if( result < 0 ) { logger << ERROR << "GREEDY_SUGGESTION_THRESHOLD value out of range." << value << endl; // REVISIT: throw exception abort()...
false
false
false
false
false
0
new_edge(vertex *A, vertex *B){ edge *ret; if(edge_pool==0){ int i; edge_pool = calloc(CHUNK,sizeof(*edge_pool)); for(i=0;i<CHUNK-1;i++) /* last addition's next points to nothing */ edge_pool[i].next=edge_pool+i+1; } ret=edge_pool; edge_pool=ret->next; ret->A=A; ret->B=B; ret->act...
false
false
false
false
false
0
hoverEnterEvent( QGraphicsSceneHoverEvent* e ) { Q_D( TextScrollingWidget ); if( !isAnimating() && d->delta ) QTimer::singleShot( 150, this, SLOT(_delayedForwardAnimation()) ); e->accept(); }
false
false
false
false
false
0
applicable0(const solver *ego_, const problem *p_) { const problem_rdft *p = (const problem_rdft *) p_; UNUSED(ego_); return (1 && p->sz->rnk == 1 && p->vecsz->rnk <= 1 && (p->kind[0] == REDFT01 || p->kind[0] == REDFT10 || p->kind[0] == RODFT01 || p->kind[0] == RODFT10) ); }
false
false
false
false
false
0
wi_open(char *iface) { struct wif *wi; wi = file_open(iface); if (wi == (struct wif*) -1) return NULL; if (!wi) wi = net_open(iface); if (!wi) wi = wi_open_osdep(iface); if (!wi) return NULL; strncpy(wi->wi_interface, iface, sizeof(wi->wi_interface)-1); wi->wi_interface[sizeof(wi->wi_interface)-1] = 0...
false
false
false
false
false
0
camel_text_index_rename (const gchar *old, const gchar *new) { gchar *oldname, *newname; gsize oldname_len, newname_len; gint err; /* TODO: camel_text_index_rename should find out if we have an active index and use that instead */ oldname_len = strlen (old) + 12; newname_len = strlen (n...
false
false
false
false
false
0
daemonize() { pid_t pid, sid, parent; openlog(DAEMON_NAME, LOG_PID, LOG_LOCAL5); syslog(LOG_INFO, "Starting daemon"); /* already a daemon */ if ( getppid() == 1 ) return; /* Drop user if there is one, and we were run as root */ if ( getuid() == 0 || geteuid() == 0 ) { struct passw...
false
false
false
false
true
1
dleyna_task_queue_start(const dleyna_task_queue_key_t *queue_id) { dleyna_task_queue_t *queue; dleyna_task_processor_t *processor = queue_id->processor; DLEYNA_LOG_DEBUG("Enter - Starting queue <%s,%s>", queue_id->source, queue_id->sink); if (processor->quitting) goto exit; queue = g_hash_table_lookup(pro...
false
false
false
false
false
0
sp_read_data(spctx_t* ctx, const char** data) { int r; ASSERT(ctx); ASSERT(data); *data = NULL; switch(r = spio_read_line(ctx, &(ctx->client), SPIO_QUIET)) { case 0: sp_messagex(ctx, LOG_ERR, "unexpected end of data from client"); return -1; case -1: ...
false
false
false
false
false
0
hpsa_alloc_sas_node(struct device *parent_dev) { struct hpsa_sas_node *hpsa_sas_node; hpsa_sas_node = kzalloc(sizeof(*hpsa_sas_node), GFP_KERNEL); if (hpsa_sas_node) { hpsa_sas_node->parent_dev = parent_dev; INIT_LIST_HEAD(&hpsa_sas_node->port_list_head); } return hpsa_sas_node; }
false
false
false
false
false
0
fiasco_image_new (const char *filename) /* * FIASCO image constructor. * Allocate memory for the FIASCO image structure and * load the specified image `filename'. The image has to be in * raw pgm or ppm format. * * Return value: * pointer to the new image structure * or NULL in case of an error */ { tr...
false
false
false
false
false
0
panel_button_press_event(GtkWidget *widget, GdkEventButton *event, panel *p) { ENTER; if (event->type == GDK_BUTTON_PRESS && event->button == 3 && event->state & GDK_CONTROL_MASK) { DBG("ctrl-btn3\n"); configure(p->xc); RET(TRUE); } RET(FALSE); }
false
false
false
false
false
0
ttm_bo_flush_all_fences(struct ttm_buffer_object *bo) { struct reservation_object_list *fobj; struct fence *fence; int i; fobj = reservation_object_get_list(bo->resv); fence = reservation_object_get_excl(bo->resv); if (fence && !fence->ops->signaled) fence_enable_sw_signaling(fence); for (i = 0; fobj && i < ...
false
false
false
false
false
0
create(void* (*fn)(void*), void* arg, priority_t pri) { omni_thread* t = new omni_thread(fn, arg, pri); t->start(); return t; }
false
false
false
false
false
0
LookupValue(vtkVariant value, vtkIdList* ids) { this->UpdateLookup(); ids->Reset(); // First look into the cached updates, to see if there were any // cached changes. Find an equivalent element in the set of cached // indices for this value. Some of the indices may have changed // values since the cache wa...
false
false
false
false
false
0
dw_NextLine(FILE *f, int n) { char *buffer, *ptr; if (!(ptr=buffer=(char*)dw_malloc(1024*sizeof(char)))) dw_Error(MEM_ERR); else { while (ptr && (n-- > 0)) while (ptr=fgets(buffer,1024 ,f)) if (ptr[strlen(ptr)-1] == '\n') break; dw_free(buffer); } }
false
false
false
false
false
0
synchronize_sched_expedited(void) { unsigned long s; struct rcu_node *rnp; struct rcu_state *rsp = &rcu_sched_state; /* Take a snapshot of the sequence number. */ s = rcu_exp_gp_seq_snap(rsp); rnp = exp_funnel_lock(rsp, s); if (rnp == NULL) return; /* Someone else did our work for us. */ rcu_exp_gp_seq_s...
false
false
false
false
false
0
H5A_attr_release_table(H5A_attr_table_t *atable) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Sanity check */ HDassert(atable); /* Release attribute info, if any. */ if(atable->nattrs > 0) { size_t u; /* Local index variable */ ...
false
false
false
false
false
0
lgl_template_frame_cd_new (const gchar *id, gdouble r1, gdouble r2, gdouble w, gdouble h, gdouble waste) { ...
false
false
false
false
false
0
Has2D(bool Not3D) { bool hasX,hasY; OBAtom *atom; vector<OBAtom*>::iterator i; hasX = hasY = false; for (atom = BeginAtom(i);atom;atom = NextAtom(i)) { if (!hasX && !IsNearZero(atom->x())) hasX = true; if (!hasY && !IsNearZero(atom->y())) hasY = true; ...
false
false
false
false
false
0
EmitData(raw_ostream &Out, key_type_ref, data_type_ref V, offset_type) { using namespace llvm::support; endian::Writer<little> LE(Out); for (const auto &ProfileData : *V) { const InstrProfRecord &ProfRecord = ProfileData.second; LE.write<uint64_t>(ProfileData.first); // F...
false
false
false
false
false
0
parse_reverse(const char *value, list_t *queries, const query_t *conf) { query_t *query = NULL; // Create reverse name. char *reverse = get_reverse_name(value); if (reverse == NULL) { return KNOT_EINVAL; } // Create reverse query for given address. query = query_create(reverse, conf); free(reverse); if ...
false
false
false
false
false
0
GetLogFileBackupName(char *filename, char *backupname) { time_t t; struct tm *tm; char smallname[LOG_FILENAME_MAX_LENGTH]; char extension[LOG_FILENAME_MAX_LENGTH]; char *lastdot; if ((filename == NULL) || (backupname == NULL)) { return 1; } /* Create a timestamp with the current date and time. */ ...
false
false
false
false
false
0
ftrace_modify_all_code(int command) { int update = command & FTRACE_UPDATE_TRACE_FUNC; int err = 0; /* * If the ftrace_caller calls a ftrace_ops func directly, * we need to make sure that it only traces functions it * expects to trace. When doing the switch of functions, * we need to update to the ftrace_op...
false
false
false
false
false
0
reset(ResetMode mode) { if(c) c->reset(); server = false; mechlist.clear(); server_realm = QString(); allowClientSendFirst = false; disableServerSendLast = true; actionTrigger.stop(); op = -1; actionQueue.clear(); need_update = false; first = false; authed = false; out.clear(); out_pen...
false
false
false
false
false
0
quota_parse_limits (quota_priv_t *priv, xlator_t *this, dict_t *xl_options) { int32_t ret = -1; char *str = NULL; char *str_val = NULL; char *path = NULL; uint64_t value = 0; limits_t *quota_lim = NULL; ...
false
false
false
false
false
0
_fd_rdwr_setup(void **testdata, int do_unlink) { int retval = -1; struct fd_struct *f; char *filename; filename = crut_aprintf("%s.%d", TEST_PREFIX, 0); f = open_fd_struct(filename, O_RDWR | O_CREAT | O_EXCL, do_unlink); if (f == NULL) { goto out; } /* write some stuff to the f...
false
false
false
false
false
0
add_sdp_session(sdp_info_t* _sdp, int session_num, str* cnt_disp) { sdp_session_cell_t *session; int len; len = sizeof(sdp_session_cell_t); session = (sdp_session_cell_t*)pkg_malloc(len); if (session == NULL) { LM_ERR("No memory left\n"); return NULL; } memset( session, 0, len); session->session_num = ses...
false
false
false
false
false
0
account_get_reply_account(MsgInfo *msginfo, gboolean reply_autosel) { PrefsAccount *account = NULL; /* select the account set in folderitem's property (if enabled) */ if (msginfo->folder->prefs && msginfo->folder->prefs->enable_default_account) account = account_find_from_id(msginfo->folder->prefs->default_account...
false
false
false
false
false
0
gtk_clutter_embed_unmap_event (GtkWidget *widget, GdkEventAny *event) { GtkClutterEmbedPrivate *priv = GTK_CLUTTER_EMBED (widget)->priv; GtkWidgetClass *parent_class; gboolean res = FALSE; parent_class = GTK_WIDGET_CLASS (gtk_clutter_embed_parent_class); if (parent_class->unm...
false
false
false
false
false
0
ce_find_wpt(const waypoint* wpt) { queue* elem, *tmp; QUEUE_FOR_EACH(&ce_mark_head, elem, tmp) { ce_mark* mark = (ce_mark*) elem; if ((mark->wp->shortname == wpt->shortname) && (mark->wp->latitude == wpt->latitude) && (mark->wp->longitude == wpt->longitude)) { return mark->wp; } ...
false
false
false
false
false
0
inorder_traversal(ompi_rb_tree_t *tree, ompi_rb_tree_condition_fn_t cond, ompi_rb_tree_action_fn_t action, ompi_rb_tree_node_t * node) { if (node == tree->nill) { return; } inorder_traversal(tree, cond, actio...
false
false
false
false
false
0
ButtonArrayMaxWidth(ButtonArray *array) { Button *temp; int x=0; for(temp=array->head;temp!=NULL;temp=temp->next) x=max(temp->tw,x); return x; }
false
false
false
false
false
0
vtkWrap_IsQtObject(ValueInfo *val) { unsigned int t = (val->Type & VTK_PARSE_BASE_TYPE); if (t == VTK_PARSE_QOBJECT && val->Class[0] == 'Q' && isupper(val->Class[1])) { return 1; } return 0; }
false
false
false
false
false
0
build_simple_rel(PlannerInfo *root, int relid, RelOptKind reloptkind) { RelOptInfo *rel; RangeTblEntry *rte; /* Rel should not exist already */ Assert(relid > 0 && relid < root->simple_rel_array_size); if (root->simple_rel_array[relid] != NULL) elog(ERROR, "rel %d already exists", relid); /* Fetch RTE for rel...
false
false
false
false
false
0
unregister_vtable_reflection_type (MonoVTable *vtable) { MonoObject *type = vtable->type; if (type->vtable->klass != mono_defaults.monotype_class) MONO_GC_UNREGISTER_ROOT_IF_MOVING (vtable->type); }
false
false
false
false
false
0
expand_builtin_constant_p (exp) tree exp; { tree arglist = TREE_OPERAND (exp, 1); enum machine_mode value_mode = TYPE_MODE (TREE_TYPE (exp)); rtx tmp; if (arglist == 0) return const0_rtx; arglist = TREE_VALUE (arglist); /* We have taken care of the easy cases during constant folding. This c...
false
false
false
false
true
1
compare_one_secret (NMSettingVPN *a, NMSettingVPN *b, NMSettingCompareFlags flags) { GHashTable *a_secrets, *b_secrets; GHashTableIter iter; const char *key, *val; a_secrets = NM_SETTING_VPN_GET_PRIVATE (a)->secrets; b_secrets = NM_SETTING_VPN_GET_PRIVATE (b)->secrets; g_...
false
false
false
false
false
0
hb_buffer_set_flags (hb_buffer_t *buffer, hb_buffer_flags_t flags) { if (unlikely (hb_object_is_inert (buffer))) return; buffer->flags = flags; }
false
false
false
false
false
0
composeRGBAPixel(l_int32 rval, l_int32 gval, l_int32 bval, l_int32 aval, l_uint32 *ppixel) { PROCNAME("composeRGBAPixel"); if (!ppixel) return ERROR_INT("&pixel not defined", procName, 1); *ppixel = (rval << L_RED_SHI...
false
false
false
false
false
0
tostring(const ServiceType st) { switch (st) { case COMPUTING: return istring("computing"); case INDEX: return istring("index"); } return ""; }
false
false
false
false
false
0
info_arc (LLINT * xc, LLINT * yc, int *theta1, int *theta2, int *dir, double x1, double y1, double x2, double y2, double x3, double y3) { double denom, x, y, t1, t2, t3; denom = x1 * (y3 - y2) + x2 * (y1 - y3) + x3 * (y2 - y1); x = 0.5 * ((SQR (x1) + SQR (y1)) * (y3 - y2) + (SQR (x2) + SQR (y2)) * (y1 -...
false
false
false
false
false
0
operator-=(const Time& rhs) { tv_sec -= rhs.tv_sec; tv_usec -= rhs.tv_usec; if(tv_usec < 0) { --tv_sec; tv_usec += ONE_SEC_IN_USEC; } return *this; }
false
false
false
false
false
0
Next() { assert(valid_); if (direction_ == kReverse) { // Switch directions? direction_ = kForward; // iter_ is pointing just before the entries for this->key(), // so advance into the range of entries for this->key() and then // use the normal skipping code below. if (!iter_->Valid()) { ...
false
false
false
false
false
0