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
sanei_hp_handle_getPipefd (HpHandle this, SANE_Int *fd) { if (! hp_handle_isScanning(this)) return SANE_STATUS_INVAL; if (this->cancelled) { DBG(3,"sanei_hp_handle_getPipefd: cancelled. Stop scan\n"); RETURN_IF_FAIL( hp_handle_stopScan(this) ); return SANE_STATUS_CANCELLED; } *fd...
false
false
false
false
false
0
at2_encode8bituncompressed(Octstr *input) { int len, i; Octstr *out = octstr_create(""); len = octstr_len(input); for (i = 0; i < len; i++) { /* each character is encoded in its hex representation (2 chars) */ octstr_append_char(out, at2_numtext( (octstr_get_char(input, i) & 0xF0) >> 4...
false
false
false
false
false
0
SplitRootNode() { /*----------------------------------------------------------------- * Since a root note cannot be split, we add a level of nodes * under it and we'll do the split at that level. *----------------------------------------------------------------*/ TABINDNode *poNewNode = new TABIN...
false
false
false
false
false
0
DeleteEntry(palette *p, int n) { int i; if (n>=p->size) return 0; for(i=n;i<(p->size-1);i++) p->data[i]=p->data[i+1]; p->size--; return 1; }
false
false
false
false
false
0
GXDrawEventLoop(GDisplay *gd) { XEvent event; GXDisplay *gdisp = (GXDisplay *) gd; Display *display = gdisp->display; do { while ( gdisp->top_window_count>0 ) { GXDrawWaitForEvent(gdisp); XNextEvent(display,&event); dispatchEvent(gdisp, &event); } XSync(display,false); GXDrawProcessP...
false
false
false
false
false
0
visitUMaxExpr(const SCEVUMaxExpr *S) { Value *LHS = expand(S->getOperand(S->getNumOperands()-1)); Type *Ty = LHS->getType(); for (int i = S->getNumOperands()-2; i >= 0; --i) { // In the case of mixed integer and pointer types, do the // rest of the comparisons as integer. if (S->getOperand(i)->getType...
false
false
false
false
false
0
GetStrErrno() const { if (Errno > DataStatusErrnoMax) return "Unknown error"; if (Errno > DataStatusErrnoBase) return errnodesc[Errno - DataStatusErrnoBase]; return StrError(Errno); }
false
false
false
false
false
0
ipmi_sel_parse_read_channel_number (ipmi_sel_parse_ctx_t ctx, uint8_t *channel_number) { struct ipmi_sel_system_event_record_data system_event_record_data; if (!ctx || ctx->magic != IPMI_SEL_PARSE_CTX_MAGIC) { ERR_TRACE (ipmi_sel_parse_ctx_errormsg (ctx), ipmi_sel_parse_ctx_errnum (ctx)); return (-...
false
false
false
false
false
0
minimize_bits(u8* dst, u8* src) { u32 i = 0; while (i < MAP_SIZE) { if (*(src++)) dst[i >> 3] |= 1 << (i & 7); i++; } }
false
false
false
false
false
0
arch_align_stack(unsigned long sp) { if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) sp -= get_random_int() % 8192; return sp & ~0xf; }
false
false
false
false
false
0
mmc_get_disc_last_lsn ( const CdIo_t *p_cdio ) { mmc_cdb_t cdb = {{0, }}; uint8_t buf[12] = { 0, }; lsn_t retval = 0; int i_status; /* Operation code */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_TOC); cdb.field[1] = 0; /* lba; msf: 0x2 */ /* Format */ cdb.field[2] = CDIO_MMC_READTOC_FMT_...
false
false
false
false
false
0
str_vinsert(String *str, ssize_t index, const char *format, va_list args) { String *ret; int err; if (!str) return set_errnull(EINVAL); if ((err = str_wrlock(str))) return set_errnull(err); ret = str_vinsert_unlocked(str, index, format, args); if ((err = str_unlock(str))) return set_errnull(err); retu...
false
false
false
false
false
0
model_row_updated_cb (GdaDataModel *model, gint row, GdaDataModelIter *iter) { g_assert (model == iter->priv->data_model); /* sync parameters with the new values in row */ if (iter->priv->row == row) { iter->priv->keep_param_changes = TRUE; gda_data_model_iter_move_to_row (iter, row); iter->priv->keep_param...
false
false
false
false
false
0
dwarf2out_vms_begin_epilogue (unsigned int line ATTRIBUTE_UNUSED, const char *file ATTRIBUTE_UNUSED) { dw_fde_ref fde; char label[MAX_ARTIFICIAL_LABEL_BYTES]; fde = &fde_table[fde_table_in_use - 1]; if (fde->dw_fde_vms_begin_epilogue) return; /* Output a label to mark the endpoint of the code gener...
true
true
false
false
false
1
addCallLimitMenu(QMenu* menu) { QMenu* m; m = menu->addMenu(tr("Min. Call Cost")); addCallLimitAction(m, tr("Same as Node"), 1.0); // xgettext: no-c-format addCallLimitAction(m, tr("50 % of Node"), .5); // xgettext: no-c-format addCallLimitAction(m, tr("20 % of Node"), .2); // xgettext: no-c-format addCallLim...
false
false
false
false
false
0
beginRemoveBias( Dynamic::BiasedPlaylist* parent ) { QModelIndex index = this->index( parent ); beginRemoveRows( index, 0, 0 ); }
false
false
false
false
false
0
DestroyXMLTreeAttributes(char **attributes) { register ssize_t i; /* Destroy a tag attribute list. */ if ((attributes == (char **) NULL) || (attributes == sentinel)) return((char **) NULL); for (i=0; attributes[i] != (char *) NULL; i+=2) { /* Destroy attribute tag and value. */ ...
false
false
false
false
false
0
gconf_cnxn_insert (GConfEngine *conf, const gchar *dir, guint client_id, GConfCnxn *cnxn) { CnxnsData *data; gint id = client_id; data = g_hash_table_lookup (conf->notify_dirs, dir); if (data == NULL) { data = g_new (CnxnsData, 1); data->cnxns = NULL; g_hash_table_insert (conf->notify_di...
false
false
false
false
false
0
nemo_undo_transaction_add_atom (NemoUndoTransaction *transaction, const NemoUndoAtom *atom) { GList *list; g_return_if_fail (NEMO_IS_UNDO_TRANSACTION (transaction)); g_return_if_fail (atom != NULL); g_return_if_fail (G_IS_OBJECT (atom->target)); /* Add the atom to the atom list in the transaction. */ ...
false
false
false
false
false
0
cyapa_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) { struct device *dev = &client->dev; struct cyapa *cyapa; u8 adapter_func; union i2c_smbus_data dummy; int error; adapter_func = cyapa_check_adapter_functionality(client); if (adapter_func == CYAPA_ADAPTER_FUNC_NONE) { dev_err...
false
false
false
false
false
0
__check_agg_selection_timer(struct port *port) { struct bonding *bond = __get_bond_by_port(port); if (bond == NULL) return 0; return BOND_AD_INFO(bond).agg_select_timer ? 1 : 0; }
false
false
false
false
false
0
MultiSolve(bool new_matrix, const Index* ia, const Index* ja, Index nrhs, double* rhs_vals, bool check_NegEVals, Index numberOfNegEVals) { DBG_START_METH("MumpsSolverInterface::MultiSolve", dbg_verbosity); DBG_ASSERT(!check_NegEVals || ProvidesInertia()); DBG_ASSERT(ini...
false
false
false
false
false
0
xdrposix_putint(xdrs, lp) XDR *xdrs; int *lp; { unsigned char *up = (unsigned char *)lp ; #ifdef SWAP netlong mycopy = htonl(*lp); up = (unsigned char *)&mycopy; #endif if (biowrite((biobuf *)xdrs->x_private, up, 4) < 4) return (FALSE); return (TRUE); }
false
false
false
false
false
0
dsp_set_dest_dma_mem( UINT32 memcode, UINT32 value, UINT32 counter ) { if ( memcode < 4 ) { dsp_set_dest_mem_reg( memcode, value ); } else if ( memcode == 4 ) { dsp_reg.internal_prg[ counter & 0x100 ] = value; } }
false
false
false
false
false
0
intel_dp_connector_destroy(struct drm_connector *connector) { struct intel_connector *intel_connector = to_intel_connector(connector); kfree(intel_connector->detect_edid); if (!IS_ERR_OR_NULL(intel_connector->edid)) kfree(intel_connector->edid); /* Can't call is_edp() since the encoder may have been destroyed ...
false
false
false
false
false
0
writePropertyUriSource(const Property* p, const ResourceClass* resourceClass, QTextStream& ts) const { // write the static method that returns the property's Uri ts << "QUrl " << resourceClass->name( m_nameSpace ) << "::" << p->name()[0].toLower() << p->name().mid(1) << "Uri()" << endl << "{" << endl ...
false
false
false
false
false
0
all_tests() { mu_suite_start(); mu_run_test(test_fnv1a); mu_run_test(test_adler32); mu_run_test(test_djb); mu_run_test(test_distribution); return NULL; }
false
false
false
false
false
0
parse_sa_P_opt(char *argv[], int *opt, unsigned int *flags, struct activity *act[]) { int i, p; char *t; p = get_activity_position(act, A_CPU); if (argv[++(*opt)]) { for (t = strtok(argv[*opt], ","); t; t = strtok(NULL, ",")) { if (!strcmp(t, K_ALL)) { /* * Set bit for every processor. * We st...
false
false
false
false
false
0
gst_curl_sink_transfer_set_options_unlocked (GstCurlSink * sink) { #ifdef DEBUG curl_easy_setopt (sink->curl, CURLOPT_VERBOSE, 1); #endif curl_easy_setopt (sink->curl, CURLOPT_URL, sink->url); curl_easy_setopt (sink->curl, CURLOPT_CONNECTTIMEOUT, sink->timeout); curl_easy_setopt (sink->curl, CURLOPT_SOCKOPTDA...
false
false
false
false
false
0
unuse_one_window(struct packed_git *current, int keep_fd) { struct packed_git *p, *lru_p = NULL; struct pack_window *lru_w = NULL, *lru_l = NULL; if (current) scan_windows(current, &lru_p, &lru_w, &lru_l); for (p = packed_git; p; p = p->next) scan_windows(p, &lru_p, &lru_w, &lru_l); if (lru_p) { munmap(lru_...
false
false
false
false
false
0
adt7x10_show_alarm(struct device *dev, struct device_attribute *da, char *buf) { struct sensor_device_attribute *attr = to_sensor_dev_attr(da); int ret; ret = adt7x10_read_byte(dev, ADT7X10_STATUS); if (ret < 0) return ret; return sprintf(buf, "%d\n", !!(ret & attr->index)); }
false
false
false
false
false
0
make_vomiting(xtime, talk) long xtime; boolean talk; { long old = Vomiting; if(!xtime && old) if(talk) You_feel("much less nauseated now."); set_itimeout(&Vomiting, xtime); }
false
false
false
false
false
0
neg_significand (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a) { bool carry = true; int i; for (i = 0; i < SIGSZ; ++i) { unsigned long ri, ai = a->sig[i]; if (carry) { if (ai) { ri = -ai; carry = false; } else ri = ai; } else ri = ~ai; r->sig[i]...
false
false
false
false
false
0
ue_filter3(User_expr *expr, int *result) { int res; if (ue_tmatches(expr, T_NOT)) { res = 0; if (ue_filter3(expr, &res) == -1) return(-1); *result = !res; } else return(ue_filter4(expr, result)); return(0); }
false
false
false
false
false
0
subdiv_fprint(FILE *fout, cell c){ #ifdef LOG_PRINT fprintf(fout,"\n") #endif ; while(c!=0){ cell_fprint(fout,c); c=cell_next(c); } }
false
false
false
false
false
0
get_filtered( git_map *map, git_file fd, git_diff_file *file, git_vector *filters) { int error; git_buf raw = GIT_BUF_INIT, filtered = GIT_BUF_INIT; if ((error = git_futils_readbuffer_fd(&raw, fd, (size_t)file->size)) < 0) return error; if (!filters->length) git_buf_swap(&filtered, &raw); else error = git...
false
false
false
false
false
0
check_object(struct object *obj) { if (!obj) return; if (!(obj->flags & FLAG_LINK)) return; if (!(obj->flags & FLAG_CHECKED)) { unsigned long size; int type = sha1_object_info(obj->sha1, &size); if (type != obj->type || type <= 0) die("object of unexpected type"); obj->flags |= FLAG_CHECKED; retur...
false
false
false
false
false
0
champlain_bounding_box_get_center (ChamplainBoundingBox *bbox, gdouble *latitude, gdouble *longitude) { g_return_if_fail (CHAMPLAIN_BOUNDING_BOX (bbox)); *longitude = (bbox->right + bbox->left) / 2.0; *latitude = (bbox->top + bbox->bottom) / 2.0; }
false
false
false
false
false
0
_mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos) { if (!(info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) && pos != HA_OFFSET_ERROR) pos/=info->s->base.pack_reclength; switch (info->s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: mi_int8store(buff,pos); break; ca...
false
false
false
false
false
0
sc_speller_process_line(GeanyDocument *doc, gint line_number, const gchar *line) { gint pos_start, pos_end; gint wstart, wend; GString *str; gint suggestions_found = 0; gchar c; g_return_val_if_fail(sc_speller_dict != NULL, 0); g_return_val_if_fail(doc != NULL, 0); g_return_val_if_fail(line != NULL, 0); str ...
false
false
false
false
false
0
ftp_lite_put( struct ftp_lite_server *s, const char *path, ftp_lite_off_t offset, ftp_lite_size_t size ) { char buffer[FTP_LITE_LINE_MAX]; int response; FILE *data; if( offset!=0 ) { if( size==FTP_LITE_WHOLE_FILE ) { ftp_lite_send_command(s,"REST %lld",(long long)offset); response = ftp_lite_get_response(s...
false
false
false
false
false
0
rtc_proc_open(struct inode *inode, struct file *file) { int ret; struct rtc_device *rtc = PDE_DATA(inode); if (!try_module_get(THIS_MODULE)) return -ENODEV; ret = single_open(file, rtc_proc_show, rtc); if (ret) module_put(THIS_MODULE); return ret; }
false
false
false
false
false
0
script_exec_line ( struct image *image, size_t offset, const char *label __unused, const char *command ) { int rc; DBGC ( image, "[%04zx] $ %s\n", offset, command ); /* Execute command */ if ( ( rc = system ( command ) ) != 0 ) return rc; return 0; }
false
false
false
false
true
1
deleteStaleLockWithLink() { // This is dangerous, we could be deleting a new lock instead of // the old stale one, let's be very careful // Create temp file KTemporaryFile *ktmpFile = new KTemporaryFile(m_componentData); ktmpFile->setFileTemplate(m_fileName); if (!ktmpFile->open()) { de...
false
false
false
false
false
0
C__serrno() { int rc; int *addr; if ( local_setspec == NULL ) { return(&serrno); } else { addr = NULL; /* * We re-use the old single thread serrno as key */ rc = local_getspec(&serrno,(void **)&addr); if ( rc == -1 || addr == NULL ) { ...
false
false
false
false
false
0
key_user_lookup(kuid_t uid) { struct key_user *candidate = NULL, *user; struct rb_node *parent = NULL; struct rb_node **p; try_again: p = &key_user_tree.rb_node; spin_lock(&key_user_lock); /* search the tree for a user record with a matching UID */ while (*p) { parent = *p; user = rb_entry(parent, struct k...
false
false
false
false
false
0
csg_export_techroom() { int list_size = 0; int idx; ubyte visible; startSection(Section::Techroom); // visible ships list_size = (int)csg->ships_techroom.size(); for (idx = 0; idx < list_size; idx++) { visible = csg->ships_techroom[idx] ? 1 : 0; cfwrite_ubyte(visible, cfp); } // visible weapons list_s...
false
false
false
false
false
0
ff_match_key( char ** p ) { char *ep = ff.pos; char *np; char old_c; *p = NULL; while ( *ep && *ep != ':' ) ep++; if ( ! *ep ) return -1; np = ep-- + 1; while ( ep > ff.pos && isspace( ( unsigned char ) *ep ) ) ep--; if ( ep == ff.pos ) return -1...
false
false
false
false
false
0
encodeOpenType (OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data) { int enclen, octidx = 0, stat; ASN1OCTET zeroByte = 0x00; ASN1OpenType openType; /* If open type contains length zero, add a single zero byte (10.1) */ if (numocts == 0) { openType.numocts = 1; openType.data = &zeroByt...
false
false
false
false
false
0
is_all_button_text (const char *button_text) { g_assert (button_text != NULL); return !strcmp (button_text, SKIP_ALL) || !strcmp (button_text, REPLACE_ALL) || !strcmp (button_text, DELETE_ALL) || !strcmp (button_text, MERGE_ALL); }
false
false
false
false
false
0
registerInstance(UObject* objToAdopt, const UnicodeString& locale, UBool visible, UErrorCode& status) { Locale loc; LocaleUtility::initLocaleFromName(locale, loc); return registerInstance(objToAdopt, loc, LocaleKey::KIND_ANY, visible ? LocaleKeyFactory::VISIBLE : LocaleKeyFactory::INVISIBLE, s...
false
false
false
false
false
0
put(unsigned int new_value) { trace.raw(write_trace.get() | value.get()); value.put(new_value); if(test_compare_mode()) start_compare_mode(); // Actually, re-start with new capture value. }
false
false
false
false
false
0
moveSizeGrip() { CWINDOW *window; QWidget *cont; if (sg == 0) return; window = (CWINDOW *)CWidget::get(this); cont = window->container; if (qApp->isRightToLeft()) sg->move(cont->rect().bottomLeft() - sg->rect().bottomLeft()); else sg->move(cont->rect().bottomRight() - sg->rect().bottomRight()); }
false
false
false
false
false
0
photos_dlna_renderer_share_play_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GTask *task = G_TASK (user_data); PhotosBaseItem *item; GError *error = NULL; mpris_player_call_play_finish (MPRIS_PLAYER (sourc...
false
false
false
false
false
0
allocate(block b, uint32 item) { if(!item) { int i; uint8 bits; for(i = 0; i < BLOCKSIZE; i++) if((bits = b[i]) != (uint8)-1) { int j; for(j = 0; j < 8; j++) if(!(bits & (1 << j))) break; item = i * 8 + j + 1; break; } if(i == BLOCKSIZE) return 0; } b[(item-1) / 8] |= ...
false
false
false
false
false
0
RightMarginalScore_reproduce_i27(const ESL_ALPHABET *abc, float *esc, ESL_DSQ dres) { float *right = NULL; int status; int i,j; float sc; float row[abc->K]; ESL_ALLOC(right, (sizeof(float) * (abc->K+1))); if (dres < abc->K) { for (i=0; i<abc->K; i++) row[i] = esc[i*abc->K+dres]; ...
false
false
false
false
false
0
munge_nonprintable(char *str) { unsigned char *c = (unsigned char *)str; while (*c != '\0') { if ((*c & 0x60) == 0 || *c == '\b') *c = ' '; c++; } }
false
false
false
false
false
0
event_set_init (int *maxevents, unsigned int flags) { if (flags & EVENT_METHOD_FAST) return event_set_init_simple (maxevents, flags); else return event_set_init_scalable (maxevents, flags); }
false
false
false
false
false
0
handle(EventHandler &, const tPVector & tagged, const Hint &) { // First go through the tagged particles for unstable ones tPVector parents; for(int i = 0, N = tagged.size(); i<N; ++i) { if(tagged[i]) { // add to parents if not stable if(!tagged[i]->data().stable() && tagged[i]->data().id...
false
false
false
false
false
0
execute() { if (access) source = cpu_pic->register_bank[register_address]; else if (cpu16->extended_instruction() && register_address < 0x60) source = cpu_pic->registers[register_address + cpu16->ind2.fsr_value]; else source = cpu_pic->registers[register_address]; if( 0 == (source->get() & 0...
false
false
false
false
false
0
epool_init(struct entry_pool *ep, unsigned nr_entries) { unsigned i; ep->entries = vzalloc(sizeof(struct entry) * nr_entries); if (!ep->entries) return -ENOMEM; ep->entries_end = ep->entries + nr_entries; INIT_LIST_HEAD(&ep->free); for (i = 0; i < nr_entries; i++) list_add(&ep->entries[i].list, &ep->free);...
false
false
false
false
false
0
picolcd_reset_resume(struct hid_device *hdev) { int ret; ret = picolcd_reset(hdev); if (ret) dbg_hid(PICOLCD_NAME " resetting our device failed: %d\n", ret); ret = picolcd_fb_reset(hid_get_drvdata(hdev), 0); if (ret) dbg_hid(PICOLCD_NAME " restoring framebuffer content failed: %d\n", ret); ret = picolcd_resum...
false
false
false
false
false
0
AppendSpatiotemparalParameter(MetaData::Pointer st, std::istringstream* iss, double scale) { iss->clear(); std::string name; float val; std::vector<float> values; *iss >> name; float s = static_cast<float>(scale); do { *iss >> val; values.push_back(val * s); } while...
false
false
false
false
false
0
ns_log_configure(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) { isc_result_t result; const cfg_obj_t *channels = NULL; const cfg_obj_t *categories = NULL; const cfg_listelt_t *element; isc_boolean_t default_set = ISC_FALSE; isc_boolean_t unmatched_set = ISC_FALSE; const cfg_obj_t *catname; if (logconf...
false
false
false
false
false
0
m68k_op_movem_16_er_pi(void) { uint i = 0; uint register_list = OPER_I_16(); uint ea = AY; uint count = 0; for(; i < 16; i++) if(register_list & (1 << i)) { REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16(ea))); ea += 2; count++; } AY = ea; USE_CYCLES(count<<CYC_MOVEM_W); }
false
false
false
false
false
0
set_logfile() { const unsigned int verbosity = get_verbosity_mode(); if (verbosity==2 || verbosity==4 || verbosity==6) { if (!logfile) { char filename[2048]; cimg_snprintf(filename,sizeof(filename),"%s%cgmic_log",cimg::temporary_path(),cimg_file_separator); logfile = std::fopen(filename,"a"); ...
false
false
false
false
false
0
Resize() { if (!flag.hidden) { while (update_info.resize) { resize_requested_by_parent(); if (parent) break; } } return ED4_R_OK; }
false
false
false
false
false
0
cavelon_banksw(void) { /* any read/write access in the 0x8000-0xffff region causes a bank switch. Only the lower 0x2000 is switched but we switch the whole region to keep the CPU core happy at the boundaries */ static int cavelon_bank; UINT8 *ROM = memory_region(REGION_CPU1); if (cavelon_bank) ...
false
false
false
false
false
0
enableLogFile(bool enable) { try { // Disable: // ------------------------------- if (!enable) { if (m_logFile) { printf_debug("[CAbstractPTGBasedReactive::enableLogFile] Stopping logging.\n"); // Close file: delete m_logFile; m_logFile = NULL; } else return; // Already disabled. ...
false
false
false
false
false
0
poll_health(unsigned long data) { struct mlx5_core_dev *dev = (struct mlx5_core_dev *)data; struct mlx5_core_health *health = &dev->priv.health; u32 count; if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) { trigger_cmd_completions(dev); mod_timer(&health->timer, get_next_poll_jiffies()); return; } coun...
false
false
false
false
false
0
Open( const char * pszNewName, int bTestOpen ) { /* -------------------------------------------------------------------- */ /* Open the source file. Supress error reporting if we are in */ /* TestOpen mode. */ /* ------------------------------------------...
false
false
false
false
false
0
sata_pmp_init_links (struct ata_port *ap, int nr_ports) { struct ata_link *pmp_link = ap->pmp_link; int i, err; if (!pmp_link) { pmp_link = kzalloc(sizeof(pmp_link[0]) * SATA_PMP_MAX_PORTS, GFP_NOIO); if (!pmp_link) return -ENOMEM; for (i = 0; i < SATA_PMP_MAX_PORTS; i++) ata_link_init(ap, &pmp_...
false
false
false
false
false
0
clear_tasks_mm_cpumask(int cpu) { struct task_struct *p; /* * This function is called after the cpu is taken down and marked * offline, so its not like new tasks will ever get this cpu set in * their mm mask. -- Peter Zijlstra * Thus, we may use rcu_read_lock() here, instead of grabbing * full-fledged task...
false
false
false
false
false
0
test_hash (Test* test, gconstpointer unused) { gpointer hash; gsize n_hash; hash = gkm_certificate_hash (test->certificate, GCRY_MD_SHA1, &n_hash); egg_assert_cmpmem (hash, n_hash, ==, "\x36\x86\x35\x63\xFD\x51\x28\xC7\xBE\xA6\xF0\x05\xCF\xE9\xB4\x36\x68\x08\x6C\xCE", 20); g_free (hash); }
false
false
false
false
false
0
dht_rpc_find_value(knode_t *kn, const kuid_t *id, dht_value_type_t type, kuid_t **skeys, int scnt, dht_rpc_cb_t cb, void *arg, pmsg_free_t mfree, void *marg) { const guid_t *muid; g_assert(scnt >= 0); g_assert((skeys != NULL) == (scnt > 0)); knode_check(kn); muid = rpc_call_prepare(DHT_RPC_FIND_VALUE, kn, rp...
false
false
false
false
false
0
lto_write_options (void) { struct lto_output_stream stream; char *section_name; struct obstack temporary_obstack; unsigned int i, j; char *args; bool first_p = true; section_name = lto_get_section_name (LTO_section_opts, NULL, NULL); lto_begin_section (section_name, false); memset (&stream, 0, sizeof...
false
false
false
false
false
0
h_strfreev(char **str_array) { if (str_array != NULL) { size_t i; for (i = 0; str_array[i] != NULL; i++) { hfree(str_array[i]); } hfree(str_array); } }
false
false
false
false
false
0
got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *packetReceived) { //TODO: pcap_handlers must be of void type. This method of returning data will have to be amended static int count = 1; /* packet counter */ u_char *packet; /* Packet Pointer */ struct data_to_pass data; u_int numBytes; u_...
false
false
false
false
false
0
_filter_out(node_info_t *node_ptr) { static hostlist_t host_list = NULL; if (params.nodes) { if (host_list == NULL) host_list = hostlist_create(params.nodes); if (hostlist_find (host_list, node_ptr->name) == -1) return true; } if (params.dead_nodes && !IS_NODE_NO_RESPOND(node_ptr)) return true; if (...
false
false
false
false
false
0
SelectSphere_ (MolComplexS *mol_complexSP, int mol_complexesN, RuntimeS *runtimeSP, int selection_modeI) { long selected_atomsN = 0; int mol_complexI; MolComplexS *curr_mol_complexSP; size_t atomsN, atomI; AtomS *curr_atomSP; double x = 0.0, y = 0.0, z = 0.0, denom; double center_x, center_y, center_z; doub...
false
false
false
false
false
0
opcode_11111010(const uint8_t *OC, unsigned &Offset, unsigned Length, bool Prologue) { uint32_t Imm = (OC[Offset + 1] << 16) | (OC[Offset + 2] << 8) | (OC[Offset + 3] << 0); SW.startLine() << format("0x%02x 0x%02x 0x%02x 0x%02x ; %s.w sp, sp, #(%u * 4...
false
false
false
false
false
0
trampoline_address (function) tree function; { tree link; tree rtlexp; rtx tramp; struct function *fp; tree fn_context; /* Find an existing trampoline and return it. */ for (link = trampoline_list; link; link = TREE_CHAIN (link)) if (TREE_PURPOSE (link) == function) return adjust_trampol...
false
false
false
false
true
1
SetupNames() { nnames = sizeof regionnames / sizeof (char *); nameused = new int[nnames]; for (int i=0; i<nnames; i++) nameused[i] = 0; ntowns = 0; nregions = 0; }
false
false
false
false
false
0
goo_canvas_widget_new (GooCanvasItem *parent, GtkWidget *widget, gdouble x, gdouble y, gdouble width, gdouble height, ...) { GooCanvasItem *item; GooCanvasWidget *witem; const char *first_property...
false
false
false
false
false
0
cheese_countdown_fade_out (CheeseCountdown* self) { ClutterPropertyTransition* pulse_out = NULL; ClutterPropertyTransition* _tmp0_ = NULL; GValue _tmp1_ = {0}; GValue _tmp2_ = {0}; ClutterText* _tmp3_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = (ClutterPropertyTransition*) clutter_property_transition_new (...
false
false
false
false
false
0
parseBinary(MovieData* md, EMUFILE* is) { commands = (uint8)is->fgetc(); //check for eof if(is->eof()) return false; if(md->fourscore) { is->fread((char*)&joysticks,4); } else { for(int port=0;port<2;port++) { if(md->ports[port] == SI_GAMEPAD) joysticks[port] = (uint8)is->fgetc();...
false
false
false
false
false
0
acceptconn(void *ctx, void *arg) { nssov_info *ni = arg; Connection conn = {0}; OperationBuffer opbuf; Operation *op; int csock; if ( slapd_shutdown ) return NULL; { struct sockaddr_storage addr; socklen_t alen; int j; /* accept a new connection */ alen=(socklen_t)sizeof(struct sockaddr_storage); ...
false
false
false
false
false
0
gnc_split_register_get_desc_help (VirtualLocation virt_loc, gpointer user_data) { SplitRegister *reg = user_data; const char *help; help = gnc_table_get_entry (reg->table, virt_loc); if (!help || *help == '\0') switch (reg->type) { case RECEIVAB...
false
false
false
false
false
0
exec_stmt_fetch(PLpgSQL_execstate *estate, PLpgSQL_stmt_fetch *stmt) { PLpgSQL_var *curvar = NULL; PLpgSQL_rec *rec = NULL; PLpgSQL_row *row = NULL; long how_many = stmt->how_many; SPITupleTable *tuptab; Portal portal; char *curname; int n; /* ---------- * Get the portal of the cursor by name * ---...
false
false
false
false
false
0
DSDPSparseDualMatCreate(int n, int *rnnz, int *snnz, int trank,char UPLQ,int*nnzz, struct DSDPDualMat_Ops **sops1, void**smat1, struct DSDPDualMat_Ops **sops2, void**smat2){ int nnz,info=0; chfac *sp; DSDPFunctionBegin; SymbProc(rnnz,snnz,n,&sp); DSDPCHKERR(info); info=dcholmatcreate...
false
false
false
false
false
0
galois_mul2(unsigned char value) { if (value>>7) { return ((value << 1)^0x1b); } else return (value << 1); }
false
false
false
false
false
0
AuConvertStringToUuid ( char *InString, char *UuidBuffer) { UINT32 i; if (!InString || !UuidBuffer) { return (AE_BAD_PARAMETER); } for (i = 0; i < UUID_BUFFER_LENGTH; i++) { UuidBuffer[i] = (char) (UtHexCharToValu...
false
false
false
false
false
0
elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir) { ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL); void *effect = _transit_effect_wipe_context_new(type, dir); if (!effect) { ERR("Failed to allocate wipe effect! : transit=%p", transi...
false
false
false
false
false
0
InitSimple( AAssociateRQPDU const & rqpdu ) { TransferSyntaxSub ts1; ts1.SetNameFromUID( UIDs::ImplicitVRLittleEndianDefaultTransferSyntaxforDICOM ); assert( rqpdu.GetNumberOfPresentationContext() ); for( unsigned int index = 0; index < rqpdu.GetNumberOfPresentationContext(); index++ ) { // FIXME / HAR...
false
false
false
false
false
0
SendDataFull() { console.XDebug() << "ScalarTriangleFieldSlave::SendDataFull\n"; vector<pair<int,double> > data_vec; // get data data_vec=m_mesh->forAllTrianglesGetIndexed(m_rdf); // send data to master m_comm->send_gather(data_vec,0); console.XDebug() << "end ScalarTriangleFieldSlave::SendDataFull\n"...
false
false
false
false
false
0
get_password_from_file(int file_descript, char *filename, struct parsed_mount_info *parsed_info) { int rc = 0; char buf[sizeof(parsed_info->password) + 1]; if (filename != NULL) { rc = toggle_dac_capability(0, 1); if (rc) return rc; rc = access(filename, R_OK); if (rc) { fprintf(stderr, ...
false
false
false
false
false
0
GetUnstructuredGridFromPointPackingZone ( int numNodes, int numCells, const char * cellType, int zoneIndx, const char * zoneName, vtkMultiBlockDataSet * multZone ) { if ( !cellType || !zoneName || !multZone ) { vtkErrorMacro( << "Zone name / cell type un-specified, or NULL " << "vtkMu...
false
false
false
false
false
0
scrub_page_put(struct scrub_page *spage) { if (atomic_dec_and_test(&spage->refs)) { if (spage->page) __free_page(spage->page); kfree(spage); } }
false
false
false
false
false
0
dm_rx_hw_antena_div_init(struct odm_dm_struct *dm_odm) { struct adapter *adapter = dm_odm->Adapter; u32 value32; if (*(dm_odm->mp_mode) == 1) { dm_odm->AntDivType = CGCS_RX_SW_ANTDIV; phy_set_bb_reg(adapter, ODM_REG_IGI_A_11N, BIT(7), 0); phy_set_bb_reg(adapter, ODM_REG_LNA_SWITCH_11N, BIT(31), 1); return; ...
false
false
false
false
false
0
u_on_upstairs() /* place you on upstairs (or special equivalent) */ { if (xupstair) { u_on_newpos(xupstair, yupstair); } else u_on_sstairs(); }
false
false
false
false
false
0