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
coeff(int narg, char **arg) { if (narg != 2) error->all(FLERR,"Incorrect args for angle coefficients"); if (!allocated) allocate(); int ilo,ihi; force->bounds(arg[0],atom->nangletypes,ilo,ihi); double k_one = force->numeric(FLERR,arg[1]); int count = 0; for (int i = ilo; i <= ihi; i++) { k[i] = k_o...
false
false
false
false
false
0
core_init (const char * aout_name) { int core_sym_bytes; asymbol *synthsyms; long synth_count; core_bfd = bfd_openr (aout_name, 0); if (!core_bfd) { perror (aout_name); done (1); } if (!bfd_check_format (core_bfd, bfd_object)) { fprintf (stderr, _("%s: %s: not in executable ...
false
false
false
false
false
0
udf_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) { struct inode *inode = udf_new_inode(dir, mode); if (IS_ERR(inode)) return PTR_ERR(inode); if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) inode->i_data.a_ops = &udf_adinicb_aops; else inode->i_data.a_ops = &udf_...
false
false
false
false
false
0
SetGlobalGenerator(cmGlobalGenerator *gg) { if(!gg) { cmSystemTools::Error("Error SetGlobalGenerator called with null"); return; } // delete the old generator if (this->GlobalGenerator) { delete this->GlobalGenerator; // restore the original environment variables CXX and CC // Rest...
false
false
false
false
false
0
xmlSecOpenSSLX509StoreAdoptCert(xmlSecKeyDataStorePtr store, X509* cert, xmlSecKeyDataType type) { xmlSecOpenSSLX509StoreCtxPtr ctx; int ret; xmlSecAssert2(xmlSecKeyDataStoreCheckId(store, xmlSecOpenSSLX509StoreId), -1); xmlSecAssert2(cert != NULL, -1); ctx = xmlSecOpenSSLX509StoreGetCtx(store); ...
false
false
false
false
false
0
dom_tree_to_gnc_numeric(xmlNodePtr node) { gchar *content = dom_tree_to_text(node); gnc_numeric *ret; if (!content) return NULL; ret = g_new(gnc_numeric, 1); if (string_to_gnc_numeric(content, ret)) { g_free(content); return ret; } else { g_free(cont...
false
false
false
false
false
0
get_arg FCN((result,s,ldelim,rdelim)) outer_char*result C0("Resulting argument string") outer_char*s C0("Input argument") outer_char ldelim C0("Left argument delimiter") outer_char rdelim C1("Right argument delimiter") { outer_char*s0; int blevel; if(!s) { err0_print(ERR_C,OC("get_arg: Null arg pointer"),0); longjmp...
false
false
false
false
false
0
mpzspv_init (spv_size_t len, mpzspm_t mpzspm) { unsigned int i; mpzspv_t x = (mpzspv_t) malloc (mpzspm->sp_num * sizeof (spv_t)); if (x == NULL) return NULL; for (i = 0; i < mpzspm->sp_num; i++) { x[i] = (spv_t) sp_aligned_malloc (len * sizeof (sp_t)); if (x[i] == NULL) { wh...
false
true
false
false
false
1
vprintf(int kind, const char* format, va_list va) { char buf[256]; const char* now_timestamp = precision_time_to_string(dtime()); if (!v_message_wanted(kind)) return; if (pid) { sprintf(buf, " [PID=%-5d]", pid); } else { buf[0] = 0; } fprintf(output, "%s%s %s%s ", now_timesta...
false
false
false
false
false
0
autoRefresh() { if ( d_data->autoReplot ) replot(); }
false
false
false
false
false
0
c2u_iso2022kr_convchar(unsigned int c, int state) { unsigned int hi = (c >> 8); unsigned int lo = c & 0x00FF; /* Control characters */ if (c < (unsigned int)0x0020) return (unicode_char)c; /* US-ASCII */ else if (state == KS_STATE_ASCII && c < (unsigned int)0x0080) return (unicode_char)c; /* KS X 1001 */ e...
false
false
false
false
false
0
countSequenceOccurrences(const std::string& w, const BWT* pBWT) { BWTInterval fwd_interval = findInterval(pBWT, w); BWTInterval rc_interval = findInterval(pBWT, reverseComplement(w)); size_t count = 0; if(fwd_interval.isValid()) count += fwd_interval.size(); if(rc_interval.isValid()) ...
false
false
false
false
false
0
check_privilege(DBusConnection *conn, DBusMessage *msg, const GDBusMethodTable *method, void *iface_user_data) { const GDBusSecurityTable *security; for (security = security_table; security && security->privilege; security++) { struct security_data *secdata; gboolean interaction; if (security->priv...
false
false
false
false
false
0
gkm_module_get_write_protected (GkmModule *self) { const CK_TOKEN_INFO* info; g_return_val_if_fail (GKM_IS_MODULE (self), TRUE); g_return_val_if_fail (GKM_MODULE_GET_CLASS (self)->get_token_info, TRUE); info = (GKM_MODULE_GET_CLASS (self)->get_token_info) (self); g_return_val_if_fail (info, TRUE); return info-...
false
false
false
true
false
1
gpio_nand_get_io_sync_of(struct platform_device *pdev) { struct resource *r; u64 addr; if (of_property_read_u64(pdev->dev.of_node, "gpio-control-nand,io-sync-reg", &addr)) return NULL; r = devm_kzalloc(&pdev->dev, sizeof(*r), GFP_KERNEL); if (!r) return NULL; r->start = addr; r->end = r->start ...
false
false
false
false
false
0
next_field(char *ptr, int barrier) { int i=0; /* we are probably pointing to the last char * of the current field, so look for whitespace */ while (!isspace(*ptr) && i < barrier) { ptr++; /* step over the current char */ i++; } /* now look for the next field */ ...
false
false
false
false
false
0
log_header_out(request_rec *r, char *a) { const char *cp = NULL; if (!strcasecmp(a, "Content-type") && r->content_type) { cp = ap_field_noparam(r->pool, r->content_type); } else if (!strcasecmp(a, "Set-Cookie")) { cp = find_multiple_headers(r->pool, r->headers_out, a); } else { ...
false
false
false
false
false
0
ssl_hook_UserCheck(request_rec *r) { SSLConnRec *sslconn = myConnConfig(r->connection); SSLSrvConfigRec *sc = mySrvConfig(r->server); SSLDirConfigRec *dc = myDirConfig(r); char *clientdn; const char *auth_line, *username, *password; /* * Additionally forbid access (again) * when stric...
false
false
false
false
false
0
DXGetClippedInfo(Clipped c, Object *render, Object *clipping) { CHECK(c, CLASS_CLIPPED); if (render) *render = c->render; if (clipping) *clipping = c->clipping; return c; }
false
false
false
false
false
0
of_CMPX(vthread_t thr, vvp_code_t cp) { vvp_bit4_t eq = BIT4_1; unsigned idx1 = cp->bit_idx[0]; unsigned idx2 = cp->bit_idx[1]; for (unsigned idx = 0 ; idx < cp->number ; idx += 1) { vvp_bit4_t lv = thr_get_bit(thr, idx1); vvp_bit4_t rv = thr_get_bit(thr, idx2); if ((lv != rv...
false
false
false
false
false
0
handle_noreturn_attribute (tree *node, tree name, tree ARG_UNUSED (args), int ARG_UNUSED (flags), bool *no_add_attrs) { tree type = TREE_TYPE (*node); /* See FIXME comment in c_common_attribute_table. */ if (TREE_CODE (*node) == FUNCTION_DECL) TREE_THIS_VOLATILE (*node) = 1; else if (TREE_CODE (type...
false
false
false
false
false
0
cost_agg(Path *path, PlannerInfo *root, AggStrategy aggstrategy, const AggClauseCosts *aggcosts, int numGroupCols, double numGroups, Cost input_startup_cost, Cost input_total_cost, double input_tuples) { double output_tuples; Cost startup_cost; Cost total_cost; AggClauseCosts dummy_aggcosts; /* Use...
false
false
false
false
false
0
glade_property_class_make_enum_from_string (GType type, const char *string) { GEnumClass *eclass; GEnumValue *ev; gchar *endptr; gint ret = 0; ret = strtoul(string, &endptr, 0); if (endptr != string) /* parsed a number */ return ret; eclass = g_type_class_ref(type); ev = g_enum_get_va...
false
false
false
false
false
0
proxy_trans(request_rec *r) { int i; struct proxy_alias *ent; proxy_dir_conf *dconf; proxy_server_conf *conf; if (r->proxyreq) { /* someone has already set up the proxy, it was possibly ourselves * in proxy_detect */ return OK; } if ((r->unparsed_uri[0] ==...
false
false
false
false
false
0
EmitShellScript(char **argv, Module *M) { if (Verbose) errs() << "Emitting Shell Script\n"; #if defined(_WIN32) // Windows doesn't support #!/bin/sh style shell scripts in .exe files. To // support windows systems, we copy the llvm-stub.exe executable from the // build tree to the destination file. std::...
false
false
false
false
false
0
applyForce(const Vec3 &f) { if (m_triangles.size() > 0) { const Vec3 portionF = f*(1.0/m_triangles.size()); for ( std::vector<Triangle *>::iterator it = m_triangles.begin(); it != m_triangles.end(); ++it ){ (*it)->applyForce(portionF); } } }
false
false
false
false
false
0
dpm_modfsinpoolconf (char *server, char *fs, int status, int weight) { struct dpm_fs *elemp; int fs_idx; char fs_path[CA_MAXHOSTNAMELEN+81]; int fs_veclen; int *fs_vector; int must_build_fsv = 0; int pool_idx = -1; int rc = -1; struct rfstatfs64 st; if (Cthread_mutex_lock (&poolconf_mutex) < 0) return (-1)...
false
false
false
false
false
0
ar5523_free_rx_bufs(struct ar5523 *ar) { struct ar5523_rx_data *data; ar5523_cancel_rx_bufs(ar); while (!list_empty(&ar->rx_data_free)) { data = (struct ar5523_rx_data *) ar->rx_data_free.next; list_del(&data->list); usb_free_urb(data->urb); } }
false
false
false
false
false
0
opj_v4dwt_interleave_h(opj_v4dwt_t* restrict w, OPJ_FLOAT32* restrict a, OPJ_INT32 x, OPJ_INT32 size){ OPJ_FLOAT32* restrict bi = (OPJ_FLOAT32*) (w->wavelet + w->cas); OPJ_INT32 count = w->sn; OPJ_INT32 i, k; for(k = 0; k < 2; ++k){ if ( count + 3 * x < size && ((size_t) a & 0x0f) == 0 && ((size_t) bi & 0x0f) ==...
false
false
false
false
false
0
stsc_dump(GF_Box *a, FILE * trace) { GF_SampleToChunkBox *p; u32 i, nb_samples; p = (GF_SampleToChunkBox *)a; fprintf(trace, "<SampleToChunkBox EntryCount=\"%d\">\n", p->nb_entries); DumpBox(a, trace); gf_full_box_dump(a, trace); nb_samples = 0; for (i=0; i<p->nb_entries; i++) { fprintf(trace, "<SampleToChu...
false
false
false
false
false
0
ssl_server_port_args(worker_t *worker, char *portinfo, char **new_portinfo, char *rest) { apr_status_t status; char *port; char *copy = apr_pstrdup(worker->pbody, portinfo); char *sslstr = apr_strtok(copy, ":", &port); worker->socket->is_ssl = worker_set_server_meth...
false
false
false
false
false
0
on_select_key_file_clicked (GtkButton *button, gpointer user_data) { GtkWidget *dialog; const gchar *fpm_directory; dialog = gtk_file_chooser_dialog_new (_("Select Key File"), GTK_WINDOW(glb_win_misc), GTK_FILE_CH...
false
false
false
false
false
0
prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) { /* The mutex is no longer ...
false
true
false
false
false
1
LoneKing (int side, int loser) /************************************************************************** * * One side has a lonely king and the other has no pawns, but enough * mating material. We give an additional bonus of 150 points for the * winning side to attract the search to such positions. * ******...
false
false
false
false
false
0
MOVWP(UINT32 m, UINT32 n) { sh2.r[n] = (UINT32)(INT32)(INT16) RW( sh2.r[m] ); if (n != m) sh2.r[m] += 2; }
false
false
false
false
false
0
fix_length_and_dec() { uint32 char_length= args[0]->max_char_length(); agg_arg_charsets_for_string_result(collation, args, 1); DBUG_ASSERT(collation.collation != NULL); set_if_bigger(char_length, 4); fix_char_length(char_length); tmp_value.set_charset(collation.collation); }
false
false
false
false
false
0
get_exception_catch_class (MonoJitExceptionInfo *ei, MonoJitInfo *ji, MonoContext *ctx) { MonoClass *catch_class = ei->data.catch_class; MonoType *inflated_type; MonoGenericContext context; /*MonoJitExceptionInfo::data is an union used by filter and finally clauses too.*/ if (!catch_class || ei->flags != MONO_EXC...
false
false
false
false
false
0
can_address_p (tree t) { /* If we're at the end, it is vacuously addressable. */ if (! handled_component_p (t)) return 1; /* Bitfields are never addressable. */ else if (TREE_CODE (t) == BIT_FIELD_REF) return 0; /* Fields are addressable unless they are marked as nonaddressable or the contain...
false
false
false
false
true
1
init_condition(struct nvbios_init *init) { struct nvkm_bios *bios = init->bios; u8 cond = nvbios_rd08(bios, init->offset + 1); trace("CONDITION\t0x%02x\n", cond); init->offset += 2; if (!init_condition_met(init, cond)) init_exec_set(init, false); }
false
false
false
false
false
0
acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu) { struct acpi_processor_performance *perf; perf = to_perf_data(data); if (cpu_khz) { /* search the closest match to cpu_khz */ unsigned int i; unsigned long freq; unsigned long freqn = perf->states[0].core_frequency * 1000; for (i ...
false
false
false
false
false
0
dhcp6opt_name(int type) { static char genstr[sizeof("opt_65535") + 1]; /* XXX thread unsafe */ if (type > 65535) return "INVALID-option"; switch(type) { case DH6OPT_CLIENTID: return "client-ID"; case DH6OPT_SERVERID: return "server-ID"; case DH6OPT_IA_NA: return "IA_NA"; case DH6OPT_IA_TA: return "IA...
false
false
false
false
false
0
SerializeToXML(ostringstream& out) { out << "<StatelessChangelist>"; for (StatelessChangelistIterator it = changes_.begin(); it != changes_.end(); ++it) { out << "<change>"; out << "<target>" << MakeWellFormedXML(it->first.first) << "</target>"; out << "<condition>" << MakeWellFormedXML(it->first.second...
false
false
false
false
false
0
MV_CreateVolumeTable ( int index, int volume, int MaxVolume ) { int val; int level; int i; level = ( volume * MaxVolume ) / MV_MaxTotalVolume; if ( MV_Bits == 16 ) { for( i = 0; i < 65536; i += 256 ) { val = i - 0x8000; val *= level; ...
false
false
false
false
false
0
sel_add_loop_preheaders (void) { int i; basic_block bb; VEC(basic_block, heap) *preheader_blocks = LOOP_PREHEADER_BLOCKS (current_loop_nest); for (i = 0; VEC_iterate (basic_block, preheader_blocks, i, bb); i++) { VEC_safe_push (basic_block, heap, last_added_blocks, bb); sel_ad...
false
false
false
false
false
0
init_fax(void) { if (fax_inited) return; fprintf(stderr, "initializing FAX procedures and alloc'ing core-space\n"); lpm = 120; ixoc = 288; devi = 400; mod_mode = MOD_FM | FIL_MIDL; dmaxval = 63; compval = dmaxval >> 1; core_dta = malloc(CORESIZE); core_start = core_dta; core_wptr = core_dta; cor...
false
false
false
false
false
0
dp_lookup(int callno, const char *context, const char *callednum, const char *callerid, int skiplock) { unsigned short dpstatus = 0; struct iax_ie_data ied1; int mm; memset(&ied1, 0, sizeof(ied1)); mm = ast_matchmore_extension(NULL, context, callednum, 1, callerid); /* Must be started */ if (ast_parking_ext_val...
false
false
false
false
false
0
attach_init_test_initialization_flags (void **entry, void *ptr) { tree block = (tree)ptr; struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; if (block != error_mark_node) { if (TREE_CODE (block) == BIND_EXPR) { tree body = BIND_EXPR_BODY (block); DECL_CHAIN (ite->value...
false
false
false
false
true
1
cddb_cache_file_name(cddb_conn_t *c, cddb_disc_t *disc) { char *fn = NULL; int len; /* calculate needed buffer size (+11 for two slashes, disc id and terminating zero */ len = strlen(c->cache_dir) + strlen(CDDB_CATEGORY[disc->category]) + 11; /* reserve enough memory */ fn = (char*)mallo...
false
false
false
false
false
0
gst_audio_src_ring_buffer_acquire (GstAudioRingBuffer * buf, GstAudioRingBufferSpec * spec) { GstAudioSrc *src; GstAudioSrcClass *csrc; GstAudioSrcRingBuffer *abuf; gboolean result = FALSE; src = GST_AUDIO_SRC (GST_OBJECT_PARENT (buf)); csrc = GST_AUDIO_SRC_GET_CLASS (src); if (csrc->prepare) re...
false
false
false
false
false
0
remove_symbol(hashtab_key_t key, hashtab_datum_t datum, void *args) { struct symbol_pruning_state *s = args; switch (s->symbol_type) { case SYM_ROLES: { role_datum_destroy((role_datum_t *) datum); break; } case SYM_TYPES: { type_datum_destroy((type_datum_t *) datum); break; } case SYM_USERS: { user_...
false
false
false
false
false
0
SDLGui_DrawText(SGOBJ *tdlg, int objnum) { SDL_Rect coord; int textc, backgroundc; if (tdlg[objnum].state & SG_SELECTED) { textc = whitec; backgroundc = darkgreyc; } else if (tdlg[objnum].state & SG_DISABLED) { textc = darkgreyc; backgroundc = greyc; } else { textc ...
false
false
false
false
false
0
defaults() { for(int cat = 0; cat < rowCount(); cat++) { QModelIndex catidx = index(cat, 0); for(int act = 0; act < rowCount(catidx); act++) { QModelIndex actidx = index(act, 1, catidx); setData(actidx, actidx.data(DefaultShortcutRole), ActiveShortcutRole); } } }
false
false
false
false
false
0
xgene_edac_pmd_l1_inject_ctrl_write(struct file *file, const char __user *data, size_t count, loff_t *ppos) { struct edac_device_ctl_info *edac_dev = file->private_data; struct xgene_edac_pmd_ctx *ctx = edac_dev->pvt_info; void __iomem *cpux_pg_f; int i; for (i = 0; i < MAX_CPU_PER_PMD; i++) { ...
false
false
false
false
false
0
gedit_document_get_location (GeditDocument *doc) { g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL); return doc->priv->location == NULL ? NULL : g_file_dup (doc->priv->location); }
false
false
false
false
false
0
contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { EContact *contact; GError *error = NULL; GMainLoop *loop = (GMainLoop *) user_data; if (!e_book_client_get_contact_finish (E_BOOK_CLIENT (source_object), result, &contact, &error)) g_error ("...
false
false
false
false
false
0
chunkqueue_append_shared_buffer(chunkqueue *cq, buffer *mem) { chunk *c; if (mem->used == 0) return 0; c = chunkqueue_get_unused_chunk(cq); c->type = MEM_CHUNK; c->offset = 0; buffer_free(c->mem); // free just allocated buffer c->mem = mem; // use shared buffer mem->ref_count ++; chunkqueue_append_chunk(cq,...
false
false
false
false
false
0
GetNext(wxBlockInt &block) { wxCHECK_MSG(m_type == wxBISI_BLOCK, false, wxT("wrong selection type")); if (m_block_index+1 < int(m_blocks.GetCount())) { ++m_block_index; block = m_blocks[m_block_index]; return true; } return false; }
false
false
false
false
false
0
gsb_automem_spin_button_new_full ( gint *value, gdouble lower, gdouble upper, gdouble step_increment, gdouble page_increment, gdouble page_size, gdouble climb_rate, GCallback hook, gpointer data ) { GtkWidget *spin; GtkAdjustment *adjustment; gint i...
false
false
false
false
false
0
pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx) { long _idx; char* key; int nitems, i; char* compare_key; char* p1; char* p2; PyObject* item; if (PyLong_Check(idx)) { _idx = PyLong_AsLong(idx); item = PyTuple_GetItem(self->data, _idx); Py_XINCREF(item...
false
false
false
false
true
1
_e_qa_border_eval_pre_post_fetch_cb(void *data __UNUSED__, void *border) { E_Border *bd = border; E_Quick_Access_Entry *entry; if ((!bd->new_client) || (bd->internal)) return; if ((!bd->client.icccm.class) || (!bd->client.icccm.class[0])) return; if ((!bd->client.icccm.name) || (!bd->client.icccm.name[0...
false
false
false
false
false
0
dbuf_delete(struct dbuf_queue *qptr, size_t count) { dlink_node *ptr; struct dbuf_block *first; assert(qptr->total_size >= count); if (count == 0) return; /* free whole blocks first.. */ while (1) { if (!count) return; ptr = qptr->blocks.head; first = ptr->data; if (count < fir...
false
false
false
false
false
0
init(void) { char *dname; FILE *in; if (!inited) { inited = 1; dname = getenv("JBOFIHE_DICTIONARY"); if (!dname) { dname = DEFAULT_DICTIONARY; } in = fopen(dname, "rb"); if (!in) { fprintf(stderr, "Cannot open dictionary\n"); } else { read_database(in); fclose...
false
false
false
false
false
0
addParam(gridkey key, const string& arg, float defaultValue) { m_args[arg] = key; CHECK(m_grid.find(key) == m_grid.end()); m_grid[key].push_back(defaultValue); }
false
false
false
false
false
0
handler(Display *display, XErrorEvent *xev) { if (initializing && xev->request_code == X_ChangeWindowAttributes && xev->error_code == BadAccess) { msg(_("Another window manager already running, exiting...")); exit(1); } DBG { char message[80], req[80], number[80...
false
false
false
false
false
0
unity_webapps_permissions_get_all_domains (void) { gchar *res; GSettings *settings; JsonGenerator *generator; JsonNode *root; JsonObject *obj; gchar **allowed = NULL, **dontask = NULL; if (unity_webapps_permissions_schema_exists ()) { settings = _unity_webapps_permissions_new_settings(); if (!settings) ...
false
false
false
false
false
0
mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db) { mutex_lock(&dev->priv.pgdir_mutex); __set_bit(db->index, db->u.pgdir->bitmap); if (bitmap_full(db->u.pgdir->bitmap, MLX5_DB_PER_PAGE)) { dma_free_coherent(&(dev->pdev->dev), PAGE_SIZE, db->u.pgdir->db_page, db->u.pgdir->db_dma); list_del(&db->...
false
false
false
false
false
0
on_column_remove_clicked (GtkButton *sender, gpointer e) { g_return_if_fail(displayed_columns_view); gint i; GtkTreeView *view = GTK_TREE_VIEW (displayed_columns_view); GtkTreeModel *model = gtk_tree_view_get_model (view); GtkTreeIter iter; if(!tree_get_current_iter (view, &iter) || !gtk_list_...
false
false
false
false
false
0
regroup(stmt_ty *that) { stmt_compound_ty *this; stmt_ty **line; size_t nlines; size_t j; trace(("compound::regroup()\n{\n")); this = (stmt_compound_ty *)that; line = this->line; nlines = this->nlines; this->line = 0; this->nlines = 0; this->nlines_...
false
false
false
false
false
0
usb_wakeup_notification(struct usb_device *hdev, unsigned int portnum) { struct usb_hub *hub; if (!hdev) return; hub = usb_hub_to_struct_hub(hdev); if (hub) { set_bit(portnum, hub->wakeup_bits); kick_hub_wq(hub); } }
false
false
false
false
false
0
run_printer(_ipp_printer_t *printer) /* I - Printer */ { int num_fds; /* Number of file descriptors */ struct pollfd polldata[3]; /* poll() data */ int timeout; /* Timeout for poll() */ _ipp_client_t *client; /* New client */ /* * Setup poll() data for the Bonjour service socket and IPv4/6 listeners....
false
false
false
false
false
0
allotment(GlyphIndex index, DimensionName d, Allotment& a) const { AllocationTable* table = impl_->allocations_; if (table != nil) { AllocationInfo* info = table->most_recent(); if (info != nil) { Allocation* allocations = info->component_allocations(); a = allocations[index].allotment(d); } } ...
false
false
false
false
false
0
gst_mpdparser_free_url_type_node (GstURLType * url_type_node) { if (url_type_node) { if (url_type_node->sourceURL) xmlFree (url_type_node->sourceURL); g_slice_free (GstRange, url_type_node->range); g_slice_free (GstURLType, url_type_node); } }
false
false
false
false
false
0
GridValue(RNScalar x, RNScalar y) const { // Check if within bounds if ((x < 0) || (x > grid_resolution[0]-1)) return 0.0; if ((y < 0) || (y > grid_resolution[1]-1)) return 0.0; // Bilinear interpolation int ix1 = (int) x; int iy1 = (int) y; int ix2 = ix1 + 1; int iy2 = iy1 + 1; if (ix2 >=...
false
false
false
false
false
0
cb_zeroall(GtkAction *action) { int fd; struct spcharge spc; if (!Confirm(100)) /* {xmspuser zero all charges} */ return; if ((fd = grab_file(O_WRONLY|O_APPEND)) < 0) return; time(&spc.spch_when); spc.spch_what = SPCH_ZEROALL; spc.spch_user = -1; write(fd, (char *) &spc, sizeof(spc)); close(fd); }
false
false
false
false
false
0
copyFile(const string cfgFile, const string oldCfgFile) { ifstream newF; ofstream oOldF; //try to open input file newF.open(cfgFile.c_str(), ios::in|ios::binary); if (newF.fail()) Log(Error) << "Can't open file "<<cfgFile <<", when trying to save new config file." << LogEnd; else { ...
false
false
false
false
false
0
nfs42_proc_allocate(struct file *filep, loff_t offset, loff_t len) { struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_ALLOCATE], }; struct inode *inode = file_inode(filep); int err; if (!nfs_server_capable(inode, NFS_CAP_ALLOCATE)) return -EOPNOTSUPP; mutex_lock(&inode->i_mutex); err ...
false
false
false
false
false
0
sp_shmbuf_dec (ShmPipe * self, ShmBuffer * buf, ShmBuffer * prev_buf) { buf->use_count--; if (buf->use_count == 0) { /* Remove from linked list */ if (prev_buf) prev_buf->next = buf->next; else self->buffers = buf->next; shm_alloc_space_block_dec (buf->ablock); sp_shm_area_dec (sel...
false
false
false
false
false
0
newXmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog) { #ifndef DISABLE_OUTLINE fputs("<outline>\n", output); for (int i = 0; i < outlines->getLength(); i++) { OutlineItem *item = (OutlineItem*)outlines->get(i); GooString *titleStr = HtmlFont::HtmlFilter(item->getTitle...
false
false
false
false
false
0
find_first_read_for_contig(const std::string& contig_id, export_stream_reader& exr) { do { if ((exr.exline()) && (contig_id == exr.exline()->match_chromosome())) return; } while (exr.next()); log_os << "ERROR: expected at least one read for GROUPER contig: " ...
false
false
false
false
false
0
fl_create_positioner( int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char * label ) { FL_OBJECT *ob; FLI_POSITIONER_SPEC *sp; ob = fl_make_object( FL_POSIT...
false
false
false
false
false
0
snd_emux_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, unsigned long ioarg) { struct snd_emux_port *p; struct snd_emux *emu; if (snd_BUG_ON(!arg)) return -ENXIO; p = arg->private_data; if (snd_BUG_ON(!p)) return -ENXIO; emu = p->emu; if (snd_BUG_ON(!emu)) return -ENXIO; switch (cmd) { c...
false
false
false
false
false
0
exo_icon_view_set_search_column (ExoIconView *icon_view, gint search_column) { g_return_if_fail (EXO_IS_ICON_VIEW (icon_view)); g_return_if_fail (search_column >= -1); if (G_LIKELY (icon_view->priv->search_column != search_column)) { icon_view->priv->search_colu...
false
false
false
false
false
0
siimage_selreg(ide_hwif_t *hwif, int r) { unsigned long base = (unsigned long)hwif->hwif_data; base += 0xA0 + r; if (hwif->host_flags & IDE_HFLAG_MMIO) base += hwif->channel << 6; else base += hwif->channel << 4; return base; }
false
false
false
false
false
0
amd_fifo_setup(struct ata_port *ap) { struct ata_device *adev; struct pci_dev *pdev = to_pci_dev(ap->host->dev); static const u8 fifobit[2] = { 0xC0, 0x30}; u8 fifo = fifobit[ap->port_no]; u8 r; ata_for_each_dev(adev, &ap->link, ENABLED) { if (adev->class == ATA_DEV_ATAPI) fifo = 0; } if (pdev->device ==...
false
false
false
false
false
0
pvalue_rank(hit) struct hit *hit; { struct temp *temp; int i, qnblock, mblock, t, min, nres, lastrank, ntemp; double n, r, p, prob; min = hit->min_res; nres = hit->max_res - min + 1; /*-------Assuming blimps is run with repeats -------------*/ /* qnblock *= SeqType*QLen; */ qnblock = hit->nblo...
false
false
false
false
false
0
funckey(struct view *view, int Fk) { struct mode_default *mode = (struct mode_default *) view->mode; if (Fk > FUNCTION_FKEYS) return FALSE; if (mode->variant && !mode->value) { macro_end_recording(CONTROL('@')); macro_free(function_key[Fk]); function_key[Fk] = macro_record(); return TRUE; } return macro...
false
false
false
false
false
0
save(ofstream & fp) const { uint wr = WVTREE_NOPTRS_HDR; saveValue(fp,wr); saveValue<size_t>(fp,n); saveValue(fp,max_v); saveValue(fp,height); am->save(fp); for(uint i=0;i<height;i++) bitstring[i]->save(fp); occ->save(fp); }
false
false
false
false
false
0
mcxBsearchCeil ( const void *key , const void *base , dim nmemb , dim size , int (*cmp)(const void *, const void *) ) { ofs lft /* fixme (consider -1 initialization) */ ; dim bar, rgt ; if (!nmemb || cmp(key, ((char*)base) + (nmemb-1) * size) > 0) return NULL ; if (cmp(key, b...
false
false
false
false
false
0
td_ta_reset_stats (const td_thragent_t *ta) { /* XXX We have to figure out what has to be done. */ LOG ("td_ta_reset_stats"); /* Test whether the TA parameter is ok. */ if (! ta_ok (ta)) return TD_BADTA; return TD_OK; }
false
false
false
false
false
0
finish_mangling (const bool warn) { if (warn_abi && warn && G.need_abi_warning) warning ("the mangled name of `%D' will change in a future " "version of GCC", G.entity); /* Clear all the substitutions. */ G.substitutions = 0; /* Null-terminate the string. */ write_char ('\0'); return (c...
false
false
false
false
false
0
clean_enumerate (gpointer data){ FilebrowserBackend *filebackend= FILEBROWSER_BACKEND(data); FilebrowserBackendDetails *directory = FILEBROWSER_BACKEND_GET_PRIVATE(filebackend); if (directory->enumerator){ g_file_enumerator_close(directory->enumerator,directory->cancellable,NULL); g_object_unref(directory...
false
false
false
false
false
0
si_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) { if(operation == ASN1_OP_FREE_POST) { PKCS7_SIGNER_INFO *si = (PKCS7_SIGNER_INFO *)*pval; EVP_PKEY_free(si->pkey); } return 1; }
false
false
false
false
false
0
kadmin_delprinc(int argc, char *argv[]) { kadm5_ret_t retval; krb5_principal princ = NULL; char *canon = NULL; char reply[5]; if (! (argc == 2 || (argc == 3 && !strcmp("-force", argv[1])))) { fprintf(stderr, _("usage: delete_principal [-force] principal\n")); return; ...
true
true
true
false
false
1
gedit_message_type_check (GType gtype, const gchar *propname, GType value_type) { GObjectClass *klass; gboolean ret; GParamSpec *spec; g_return_val_if_fail (g_type_is_a (gtype, GEDIT_TYPE_MESSAGE), FALSE); g_return_val_if_fail (propname != NULL,...
false
false
false
false
false
0
ExportIPTC_IntellectualGenre ( const SXMPMeta & xmp, IPTC_Manager * iptc ) { std::string xmpValue; XMP_OptionBits xmpFlags; bool found = xmp.GetProperty ( kXMP_NS_IPTCCore, "IntellectualGenre", &xmpValue, &xmpFlags ); if ( ! found ) { iptc->DeleteDataSet ( kIPTC_IntellectualGenre ); return; } if ( ! XMP_...
false
false
false
false
false
0
HandleCharacterDeletedOldCommand(char* args) { int32 keepDays = sWorld.getConfig(CONFIG_UINT32_CHARDELETE_KEEP_DAYS); if (!ExtractOptInt32(&args, keepDays, sWorld.getConfig(CONFIG_UINT32_CHARDELETE_KEEP_DAYS))) { return false; } if (keepDays < 0) { return false; } Player::DeleteOldCha...
false
false
false
false
false
0
inc_read_store(JCR *jcr) { P(rstore_mutex); if (jcr->rstore->NumConcurrentJobs < jcr->rstore->MaxConcurrentJobs) { jcr->rstore->NumConcurrentReadJobs++; jcr->rstore->NumConcurrentJobs++; Dmsg1(200, "Inc rncj=%d\n", jcr->rstore->NumConcurrentJobs); V(rstore_mutex); return true; } ...
false
false
false
false
false
0
foldMemoryOperand(MachineBasicBlock::iterator MI, const SmallVectorImpl<unsigned> &Ops) { // TargetInstrInfo::foldMemoryOperand only expects explicit, non-tied // operands. SmallVector<unsigned, 8> FoldOps; for (unsigned i = 0, e = Ops.size(); i != e; ++i) { unsigned Id...
false
false
false
false
false
0
CDB___os_r_attach(dbenv, infop, rp) DB_ENV *dbenv; REGINFO *infop; REGION *rp; { /* Round off the requested size for the underlying VM. */ OS_VMROUNDOFF(rp->size); #ifdef DB_REGIONSIZE_MAX /* Some architectures have hard limits on the maximum region size. */ if (rp->size > DB_REGIONSIZE_MAX) { CDB___db_err(db...
false
false
false
false
false
0
InstallMailserverPath(char *path) { if (!IsInstallable(CLASSBUFF)) { Debug1("Not installing %s, no match\n",path); return; } if (VMAILSERVER[0] != '\0') { FatalError("Redefinition of mailserver"); } strcpy(VMAILSERVER,path); Debug1("Installing mailserver (%s) for group (%s)",path,GROUPBUFF); }
false
false
false
false
false
0