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
CreateIGISurfaceIntegrator(const ParamSet &params) { int nLightPaths = params.FindOneInt("nlights", 64); if (PbrtOptions.quickRender) nLightPaths = max(1, nLightPaths / 4); int nLightSets = params.FindOneInt("nsets", 4); float rrThresh = params.FindOneFloat("rrthreshold", .0001f); int maxDepth = par...
false
false
false
false
false
0
GetID(string Name) { // Search for an ID const Configuration::Item *Top = Database.Tree("CD"); if (Top != 0) Top = Top->Child; for (; Top != 0;) { if (Top->Value == Name) return Top->Tag; Top = Top->Next; } return string(); }
false
false
false
false
false
0
camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, const gchar *desc, ...) { if (driver->priv->logfile) { gchar *str = NULL; if (desc) { va_list ap; va_start (ap, desc); str = g_strdup_vprintf (desc, ap...
false
false
false
false
false
0
iso_read_sector(UINT32 mode, UINT32 fad, UINT8 * dst){ static char buff[2352]; logerror("mode = %i fad = %i ", mode, fad); if(iso_type == 0){ // ISO UINT32 tn; FILE * f; tn = iso_find_track(fad); logerror("track = %i ", tn); f = fopen(iso_track[tn-1].path, "rb"); if(f == NULL)...
true
true
false
false
true
1
compare (const char *f1, const char *f2) { struct stat b1, b2; int status; pid_t pid, rpid; if (stat (f2, &b2) || stat (f1, &b1)) return; if (b1.st_size != b2.st_size) return; pid = fork (); if (pid == 0) execlp ("cmp", "cmp", "-s", f1, f2, NULL); else if (pid < 0) return; do ...
false
false
false
false
false
0
parse_net_addr(const char *s, net_addr_t *addr, char **endptr) { in_addr_t ip; uint8_t ipv6[16]; RUNTIME_ASSERT(s); if ('[' == *s) { char *ep = NULL; bool ok; ok = parse_ipv6_addr(&s[1], ipv6, &ep) && ']' == *ep; if (addr) *addr = net_addr_peek_ipv6(ipv6); if (endptr) *e...
false
false
false
false
false
0
snd_config_make_compound(snd_config_t **config, const char *id, int join) { int err; err = snd_config_make(config, id, SND_CONFIG_TYPE_COMPOUND); if (err < 0) return err; (*config)->u.compound.join = join; return 0; }
false
false
false
false
false
0
spool_berkeleydb_create_context(lList **answer_list, const char *args) { lListElem *context = NULL; DENTER(BDB_LAYER, "spool_berkeleydb_create_context"); /* check input parameter */ if (args != NULL) { lListElem *rule, *type; bdb_info info; char *server = NULL; char *path = NULL;...
false
false
false
false
false
0
ArgusRemoveHashEntry (struct ArgusHashTableHeader *htblhdr) { unsigned short hash = htblhdr->hash; htblhdr->prv->nxt = htblhdr->nxt; htblhdr->nxt->prv = htblhdr->prv; if (htblhdr == ArgusHashTable.array[hash % ArgusHashTable.size]) { if (htblhdr == htblhdr->nxt) ArgusHashTable.array[hash % ...
false
false
false
false
false
0
pattern_fill(unsigned char *buffer, unsigned int pattern, size_t n) { unsigned int i, nb; unsigned char bpattern[sizeof(pattern)], *ptr; if (pattern == (unsigned int) ~0) { for (ptr = buffer; ptr < buffer + n; ptr++) { (*ptr) = random() % (1 << (8 * sizeof(char))); } if (s_flag | v_flag) fputs(_("Te...
true
true
false
false
true
1
mos7720_close(struct usb_serial_port *port) { struct usb_serial *serial; struct moschip_port *mos7720_port; int j; serial = port->serial; mos7720_port = usb_get_serial_port_data(port); if (mos7720_port == NULL) return; for (j = 0; j < NUM_URBS; ++j) usb_kill_urb(mos7720_port->write_urb_pool[j]); /* Free...
false
false
false
false
false
0
direntry_print_vi(struct virtual_item *vi) { int i; struct direntry_uarea *dir_u = vi->vi_uarea; reiserfs_warning(NULL, "reiserfs-16104", "DIRENTRY, index %d, type 0x%x, %h, flags 0x%x", vi->vi_index, vi->vi_type, vi->vi_ih, dir_u->flags); printk("%d entries: ", dir_u->entry_count); for (i = 0; i < dir_u-...
false
false
false
false
true
1
is_userknowntype(httrackp * opt, const char *fil) { char BIGSTK mime[1024]; if (!fil) return 0; if (!strnotempty(fil)) return 0; mime[0] = '\0'; get_userhttptype(opt, mime, fil); if (!strnotempty(mime)) return 0; else if (is_html_mime_type(mime)) return 2; else return 1; }
true
true
false
false
false
1
setLevel(int order, const lset& T1, lset& T2, lgraph& V) { for (lset::const_iterator p = T1.begin(); p!=T1.end(); p++) { setOrder(*p, order, V); T2.insert((*p)->fBackwardLoopDependencies.begin(), (*p)->fBackwardLoopDependencies.end()); } }
false
false
false
false
false
0
terminate_child_async(void) #else void terminate_child_async() #endif { int i; struct client_command cc; bzero(&cc,sizeof(struct client_command)); cc.c_command = R_TERMINATE; for(i=0;i<num_child;i++) { child_idents[i].state = C_STATE_ZERO; cc.c_client_number = (int)i; if(mdebug) printf("Master terminati...
false
false
false
false
false
0
handle_language_element (ParserState *parser_state) { /* FIXME: check that the language name, version, etc. are the * right ones - Paolo */ xmlChar *lang_id, *lang_version; xmlChar *expected_version = BAD_CAST "2.0"; g_return_if_fail (parser_state->error == NULL); lang_version = xmlTextReaderGetAttribute (pars...
false
false
false
false
false
0
cbtls_info(const SSL *s, int where, int ret) { const char *str, *state; int w; EAP_HANDLER *handler = (EAP_HANDLER *)SSL_get_ex_data(s, 0); REQUEST *request = NULL; char buffer[1024]; if (handler) request = handler->request; w = where & ~SSL_ST_MASK; if (w & SSL_ST_CONNECT) str=" TLS_connect"; else if (w ...
false
false
false
false
false
0
nfs3_log_common_res (uint32_t xid, int op, nfsstat3 stat, int pstat) { char errstr[1024]; int ll = nfs3_loglevel (op, stat); if (gf_log_loglevel < ll) return; nfs3_stat_to_errstr (xid, nfs3op_strings[op].str, stat, pstat, errstr); gf_log (GF_NFS3, ll, "%s", errstr); }
true
true
false
false
false
1
seahorse_progress_status_set_operation (SeahorseWidget *swidget, SeahorseOperation *operation) { SeahorseOperation *prev; /* * Note that this is not one off, the operation is monitored until it is * replaced, so if the operation starts up again the progr...
false
false
false
false
false
0
GetVertexShader(int id) { if (id < this->GetNumberOfVertexShaders()) { return this->Internals->VertexShaders[id].GetPointer(); } return NULL; }
false
false
false
false
false
0
unit_change_homecity_handling(struct unit *punit, struct city *new_pcity) { struct city *old_pcity = game_city_by_number(punit->homecity); struct player *old_owner = unit_owner(punit); struct player *new_owner = city_owner(new_pcity); /* Calling this function when new_pcity is same as old_pcity should * be ...
false
false
false
true
false
1
Cudd_SubsetShortPaths( DdManager * dd /* manager */, DdNode * f /* function to be subset */, int numVars /* number of variables in the support of f */, int threshold /* maximum number of nodes in the subset */, int hardlimit /* flag: 1 if threshold is a hard limit */) { DdNode *subset; memOut = 0;...
false
false
false
false
false
0
hanja_key_list_append_from_string(HanjaKeyList *list, const char* str) { guint keyval = 0; guint modifiers = 0; gboolean res; res = ibus_key_event_from_string(str, &keyval, &modifiers); if (res) { hanja_key_list_append(list, keyval, modifiers); } }
false
false
false
false
false
0
nfs3_write_open_resume (void *carg) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int ret = -EFAULT; nfs3_call_state_t *cs = NULL; if (!carg) return ret; cs = (nfs3_call_state_t *)carg; nfs3_check_fh_resolve_status (cs, ...
false
false
false
false
false
0
div_by_zero_error(const rpt_expr::pointer &ep) { sub_context_ty sc; nstring s(sc.subst_intl(i18n("division by zero"))); return rpt_value_error::create(ep->get_pos(), s); }
false
false
false
false
false
0
noTokensLeft() { char * remainder = nextToken(0,0); if (remainder) { fprintf(stderr, "Trailing tokens: the last tokens in your command were not read, check your syntax:\n..."); while (remainder) { fprintf(stderr, " %s", remainder); remainder = nextToken(0,0); } fprintf(stderr, "\n"); exit(1); } }
false
false
false
false
true
1
WriteData(const void *data, SizeType bytes) ITK_OVERRIDE { if ( m_File == ITK_NULLPTR ) { ExceptionObject exception; exception.SetDescription("File cannot be written"); throw exception; } const SizeValueType numberOfBytesToWrite = Math::CastWithRangeCheck< SizeValueType, SizeTy...
false
false
false
false
false
0
_set_render_policy_callback(Evas_Object *obj) { ELM_GLVIEW_DATA_GET(obj, sd); switch (sd->render_policy) { case ELM_GLVIEW_RENDER_POLICY_ON_DEMAND: // Delete idle_enterer if it for some reason is around if (sd->render_idle_enterer) { ecore_idle_enterer_del(sd->re...
false
false
false
false
false
0
header_name (Sheet *sheet, int col, int row) { GnmCell *cell; gchar *str = NULL; cell = sheet_cell_get (sheet, col, row); if (cell) str = value_get_as_string (cell->value); return str; }
false
false
false
false
false
0
gkrellmd_syslog_log(GLogLevelFlags log_level, const gchar *message) { #if defined(WIN32) WORD event_type; const char *p_buf[1]; // Abort if event source is missing if (h_event_log == NULL) return; event_type = EVENTLOG_INFORMATION_TYPE; if (log_level & G_LOG_LEVEL_WARNING) event_type = EVENTLOG_WARNING_TYP...
true
true
false
false
false
1
pathUp(const NodeAllocator& na) { VisualNode* cur = this; while (cur) { cur->setOnPath(true); cur = cur->getParent(na); } }
false
false
false
false
false
0
break_superblocks (void) { sbitmap superblocks; bool need = false; basic_block bb; superblocks = sbitmap_alloc (last_basic_block); bitmap_clear (superblocks); FOR_EACH_BB (bb) if (bb->flags & BB_SUPERBLOCK) { bb->flags &= ~BB_SUPERBLOCK; bitmap_set_bit (superblocks, bb->index); need = true; ...
false
false
false
false
false
0
sbc_set_prot_op_checks(u8 protect, bool fabric_prot, enum target_prot_type prot_type, bool is_write, struct se_cmd *cmd) { if (is_write) { cmd->prot_op = fabric_prot ? TARGET_PROT_DOUT_STRIP : protect ? TARGET_PROT_DOUT_PASS : TARGET_PROT_DOUT_INSERT; switch (protect) { case 0x0: c...
false
false
false
false
false
0
authz_owner_get_file_group(request_rec *r) { /* file-group only figures out the file's group and lets * other modules do the actual authorization (against a group file/db). * Thus, these modules have to hook themselves after * mod_authz_owner and of course recognize 'file-group', too. */ #if !APR_HA...
false
false
false
false
false
0
a2i_GENERAL_NAME(GENERAL_NAME *out, const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, int gen_type, char *value, int is_nc) { char is_string = 0; GENERAL_NAME *gen = NULL; if(!value) { X509V3err(X509V3_F_A2I_GENERAL_NAME,X509V3_R_MISSING_VALUE); return NULL; } if (out) gen = out; e...
false
false
false
false
false
0
fireArray( const int size, double* vect) { int i; for (i=0; i<size; ++i) vect[i] = fire( defaultA, defaultB ); }
false
false
false
false
false
0
ComputeBifurcationVectorAngles(int bifurcationGroupId, vtkDoubleArray* bifurcationVectors, vtkDoubleArray* inPlaneBifurcationVectors, vtkDoubleArray* outOfPlaneBifurcationVectors, vtkDoubleArray* inPlaneBifurcationVectorAngles, vtkDoubleArray* outOfPlaneBifurcationVectorAngles) { vtkDataArray* referenceSystemNormalAr...
false
false
false
false
false
0
get_host_info(HOST_INFO& h) { int retval; char buf[256]; SET_LOCALE sl; RPC rpc(this); retval = rpc.do_rpc("<get_host_info/>"); if (retval) return retval; while (rpc.fin.fgets(buf, 256)) { if (match_tag(buf, "<host_info>")) { return h.parse(rpc.xp); } if ...
false
false
false
false
false
0
EnvSetWatchItem( void *theEnv, char *itemName, unsigned newState, struct expr *argExprs) { struct watchItem *wPtr; /*======================================================*/ /* If the new state isn't on or off, then return FALSE. */ /*======================================================*/ i...
false
false
false
false
false
0
load_reg(struct kmod_file *file) { struct stat st; if (fstat(file->fd, &st) < 0) return -errno; file->size = st.st_size; file->memory = mmap(0, file->size, PROT_READ, MAP_PRIVATE, file->fd, 0); if (file->memory == MAP_FAILED) return -errno; return 0; }
false
false
false
false
false
0
read_arheader(archentry) char *archentry; { char * endptr; struct ar_hdr arheader; if(fread((char *)&arheader, sizeof(arheader), 1, ifd) != 1) return 0; strncpy(archentry, arheader.ar_name, sizeof(arheader.ar_name)); archentry[sizeof(arheader.ar_name)] = 0; endptr = archentry + sizeof(arhead...
false
false
false
false
true
1
DoShowCallTip(int caretPos) { if (!IsAttached() || !m_InitDone) return; if (!Manager::Get()->GetEditorManager()) return; cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor(); if (!ed) return; if ( !IsProviderFor(ed) ) return; // calculat...
false
false
false
false
false
0
e_send_options_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type type) { ESendOptionsDialogPrivate *priv; GtkWidget *toplevel; g_return_val_if_fail (sod != NULL || E_IS_SEND_OPTIONS_DIALOG (sod), FALSE); priv = sod->priv; /* Make sure our cus...
false
false
false
false
false
0
router_append_dirobj_signature(char *buf, size_t buf_len, const char *digest, size_t digest_len, crypto_pk_t *private_key) { char *signature; size_t i, keysize; int siglen; keysize = crypto_pk_keysize(private_key); signature = tor_malloc(keysize); siglen = crypto_pk_private_s...
false
false
false
false
false
0
make_edge( long vnum1, long vnum2, struct lp_style_type *lp, int style, int next) { p_edge thisedge = nextfrom_dynarray(&edges); p_vertex v1 = vlist + vnum1; p_vertex v2 = vlist + vnum2; thisedge->style = style; thisedge->lp = lp; thisedge->next = next; /* ensure z ordering...
false
false
false
false
false
0
gen_split_2233 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands) { rtx operand0; rtx operand1; rtx operand2; rtx operand3; rtx operand4; rtx operand5; rtx operand6; rtx operand7; rtx _val = 0; start_sequence (); #line 10936 "../../src/gcc/config/arm/arm.md" { enum machine_mode mode = SELECT_CC_...
false
false
false
false
false
0
bpa10x_flush(struct hci_dev *hdev) { struct bpa10x_data *data = hci_get_drvdata(hdev); BT_DBG("%s", hdev->name); usb_kill_anchored_urbs(&data->tx_anchor); return 0; }
false
false
false
false
false
0
_pick_step_cores(struct step_record *step_ptr, job_resources_t *job_resrcs_ptr, int job_node_inx, uint16_t task_cnt) { int bit_offset, core_inx, i, sock_inx; uint16_t sockets, cores; int cpu_cnt = (int) task_cnt; bool use_all_cores; static int last_core_inx; if (!step_ptr->core_bitmap_job) step...
false
false
false
false
false
0
addAction( QString name, IconAction *action ) { d->sortedActions << name; if ( action ) { action->setObjectName( name ); d->actions.insert( name, action ); d->connect( action, SIGNAL( destroyed(QObject *) ), d, SLOT( actionDestroyed(QObject *) ) ); } }
false
false
false
false
false
0
setup_zero_width_cluster(PangoItem *item, PangoGlyphInfo *glyph, int last_cellcount, int last_cluster_width, int last_glyph_rbearing) { PangoRectangle ink_rect; PangoRectangle logical_rect; int width; width = last_cellcount * gui.char_width * PANGO_SCALE; glyph->geometry.x_offset = -...
false
false
false
false
false
0
GetScriptWrapper(Handle<Script> script) { if (script->wrapper()->proxy() != NULL) { // Return the script wrapper directly from the cache. return Handle<JSValue>( reinterpret_cast<JSValue**>(script->wrapper()->proxy())); } // Construct a new script wrapper. Counters::script_wrappers.Increment();...
false
false
false
false
false
0
xmms_file_destroy (xmms_xform_t *xform) { xmms_file_data_t *data; g_return_if_fail (xform); data = xmms_xform_private_data_get (xform); if (!data) return; if (data->fd != -1) close (data->fd); g_free (data); }
false
false
false
false
false
0
applySbox(byte vector[LINEAR_SIZE]) { int i; for(i = 0; i < LINEAR_SIZE; i++) vector[i] = SBOX[vector[i]]; }
false
false
false
false
false
0
f_words(union argument *arg) { struct value a, b, result; int nwords = 0; int ntarget; char *s; (void) arg; if (pop(&b)->type != INTGR) int_error(NO_CARET, "internal error : non-INTGR argument"); ntarget = b.v.int_val; if (pop(&a)->type != STRING) int_error(NO_CARET, "internal error ...
false
false
false
false
false
0
Scm_MakeGtkRadioGroup(GObject *radio) { GSList *glist = NULL; ScmGtkRadioGroup *group; if (GTK_IS_RADIO_BUTTON(radio)) { glist = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio)); } else if (GTK_IS_RADIO_MENU_ITEM(radio)) { glist = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(radi...
false
false
false
true
false
1
InitFile(int level, const char* filename) { DeInit(); fDebugLevel = level; fDebugFile = filename; // Register cleanup if (!fIsExitRegistered) { fIsExitRegistered = true; atexit(&plDebug::DeInit); } }
false
false
false
false
false
0
GetFileNames(VectorSizeType group) { if ( m_ScanTime < m_ArchetypeMTime ) { this->Scan(); } if ( group < m_Groupings.size() ) { m_FileNames = m_Groupings[group]; } else { m_FileNames.clear(); } return m_FileNames; }
false
false
false
false
false
0
setValue(const SbVec3f& origin, const SbVec3f& point) { this->pos = origin; this->dir = point - origin; #if COIN_DEBUG if(origin == point) { SoDebugError::postWarning("SbLine::setValue", "The two points defining the line is " "equal => line is inval...
false
false
false
false
false
0
pwd_getpwnam(PyObject *self, PyObject *args) { char *name; struct passwd *p; if (!PyArg_ParseTuple(args, "s:getpwnam", &name)) return NULL; if ((p = getpwnam(name)) == NULL) { PyErr_Format(PyExc_KeyError, "getpwnam(): name not found: %s", name); return NULL; ...
false
false
false
false
false
0
GeneralSolv(GeneralMatrix* gm1, GeneralMatrix* gm2, BaseMatrix* sm, MatrixType mtx) { REPORT Tracer tr("GeneralSolv"); Compare(gm1->type().i() * gm2->type(),mtx); int nr = gm1->Nrows(); if (nr != gm1->Ncols()) Throw(NotSquareException(*gm1)); int nc = gm2->Ncols(); if (gm1->Ncols() != gm2->Nrows...
false
false
false
true
true
1
pl3_file_browser_set_enabled(int enabled) { cfg_set_single_value_as_int(config, "file-browser", "enable", enabled); if (enabled) { GtkTreeView *tree = playlist3_get_category_tree_view(); pl3_file_browser_add((GtkWidget *) tree); } else if (!enabled) { pl3_file_browser_destroy(); } }
false
false
false
false
false
0
libsyssys_lchown(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj path_scm; const char * path; ScmObj owner_scm; int owner; ScmObj group_scm; int group; ScmObj SCM_SUBRARGS[3]; int SCM_i; SCM_ENTER_SUBR("sys-lchown"); for (SCM_i=0; SCM_i<3; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i)...
false
false
false
false
false
0
createWidgetFromUIFile(QWidget* parent, const QString& filename) { QFile file(filename); if( ! file.exists() ) { kDebug() << QString("Kross::FormModule::createWidgetFromUIFile: There exists no such file \"%1\"").arg(filename); return 0; } if( ! file.open(QFile::ReadOnly) ) { kDeb...
false
false
false
false
false
0
Folder_get_messages(clawsmail_FolderObject *self, PyObject *args) { GSList *msglist, *walk; PyObject *retval; Py_ssize_t pos; if(!self->folderitem) return NULL; msglist = folder_item_get_msg_list(self->folderitem); retval = PyTuple_New(g_slist_length(msglist)); if(!retval) { procmsg_msg_list_fre...
false
false
false
false
false
0
fcgi_util_fs_set_uid_n_gid(pool *p, fcgi_server *s, uid_t uid, gid_t gid) { #ifndef WIN32 struct passwd *pw; struct group *gr; if (fcgi_wrapper == NULL) return NULL; if (uid == 0 || gid == 0) { return "invalid uid or gid, see the -user and -group options"; } s->uid = uid; ...
false
false
false
false
false
0
rd_close_remdata(REMDATA_S **rd) { if(!(rd && *rd)) return; rd_trim_remdata(rd); if((*rd)->lf && (*rd)->flags & DEL_FILE) our_unlink((*rd)->lf); /* this closes the stream and frees memory */ rd_free_remdata(rd); }
false
false
false
false
false
0
rend_service_launch_establish_intro(rend_service_t *service, rend_intro_point_t *intro) { origin_circuit_t *launched; log_info(LD_REND, "Launching circuit to introduction point %s for service %s", safe_str_client(extend_info_describe(intro->extend_info)), ...
false
false
false
false
false
0
numCommonMantissaBits(const DoubleBits& db) const { for (int i=0;i<52;i++) { //int bitIndex=i+12; if (getBit(i)!=db.getBit(i)) return i; } return 52; }
false
false
false
false
false
0
finish_vtbls (tree t) { tree list; tree vbase; /* We lay out the primary and secondary vtables in one contiguous vtable. The primary vtable is first, followed by the non-virtual secondary vtables in inheritance graph order. */ list = build_tree_list (TYPE_BINFO_VTABLE (t), NULL_TREE); accumulate_...
false
false
false
false
false
0
write_entry(struct cache_entry *ce, char *path, const struct checkout *state, int to_tempfile) { unsigned int ce_mode_s_ifmt = ce->ce_mode & S_IFMT; int fd, ret, fstat_done = 0; char *new; struct strbuf buf = STRBUF_INIT; unsigned long size; size_t wrote, newsize = 0; struct stat st; switch (ce_mode_s_ifmt) { ...
false
true
false
false
true
1
imcomp_convert_tile_tsbyte( fitsfile *outfptr, void *tiledata, long tilelen, int nullcheck, void *nullflagval, int nullval, int zbitpix, double scale, double zero, int *intlength, int *status) { /* Prepare the input tile array of pixels for compression. /* Convert ...
false
false
false
false
false
0
event_dispatcher(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GtkTreePath *path; GtkTreeIter iter; GtkTreeModel *model; if (!event) return; if(popupshow) return; if (event->window == gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget)) && !gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (w...
false
false
false
false
false
0
qla2x00_rft_id(scsi_qla_host_t *vha) { int rval; struct qla_hw_data *ha = vha->hw; ms_iocb_entry_t *ms_pkt; struct ct_sns_req *ct_req; struct ct_sns_rsp *ct_rsp; if (IS_QLA2100(ha) || IS_QLA2200(ha)) return qla2x00_sns_rft_id(vha); /* Issue RFT_ID */ /* Prepare common MS IOCB */ ms_pkt = ha->isp_ops->prep...
false
false
false
false
false
0
copy_arrays(int i, int j, int delflag) { if (vecflag) vstore[j] = vstore[i]; else for (int m = 0; m < nvalues; m++) astore[j][m] = astore[i][m]; }
false
false
false
false
false
0
iface_to_index (struct nl_sock *nl_sock, const char *iface) { struct nl_cache *link_cache = NULL; int err, ifindex; /* name to index */ err = rtnl_link_alloc_cache (nl_sock, AF_UNSPEC, &link_cache); if (err < 0) { nm_log_warn (LOGD_HW, "failed to allocate link cache: (%d) %s", err, nl_geterror (e...
false
false
false
false
false
0
doit() { int i, q; POSITION *pos; MOVE m; memset( &m, 0, sizeof( MOVE ) ); /* Init the queues. */ for (i = 0; i < NQUEUES; ++i) { Qhead[i] = NULL; } Maxq = 0; /* Queue the initial position to get started. */ hash_layout(); pilesort(); m.card_index = -1; m.turn_index = -1; pos = new_pos...
false
false
false
false
false
0
smsc95xx_write_eeprom(struct usbnet *dev, u32 offset, u32 length, u8 *data) { u32 val; int i, ret; BUG_ON(!dev); BUG_ON(!data); ret = smsc95xx_eeprom_confirm_not_busy(dev); if (ret) return ret; /* Issue write/erase enable command */ val = E2P_CMD_BUSY_ | E2P_CMD_EWEN_; ret = smsc95xx_write_reg(dev, E...
true
true
false
false
false
1
ar1021_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct ar1021_i2c *ar1021; struct input_dev *input; int error; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { dev_err(&client->dev, "i2c_check_functionality error\n"); return -ENXIO; } ar1021 = devm_kzallo...
false
false
false
false
false
0
clearClipMask(){ if(!surface){ fxerror("FXDCWindow::clearClipMask: DC not connected to drawable.\n"); } clip=rect; XSetClipRectangles(DISPLAY(getApp()),(GC)ctx,0,0,(XRectangle*)&clip,1,Unsorted); flags|=GCClipMask; mask=NULL; cx=0; cy=0; }
false
false
false
false
false
0
answer(SPtr<TClntMsg> reply) { SPtr <TClntOptStatusCode> ptrOptCode; ptrOptCode = (Ptr*) reply->getOption(OPTION_STATUS_CODE); switch (ptrOptCode->getCode() ) { case STATUSCODE_SUCCESS: this->addrsAccepted(); this->IsDone = true; break; case STATUSCODE_NOTONLINK: this->addrsRejected(); this->Is...
false
false
false
false
false
0
rtl92se_card_disable(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); enum nl80211_iftype opmode; u8 wait = 30; rtlpriv->intf_ops->enable_aspm(hw...
false
false
false
false
false
0
Set( wxString const &filename, wxString const &parameters, wxString const &action ) { chooseFilePanel_->SetFile( filename ); parameterTextCtrl_->SetValue( parameters ); if( action == wxT("CLOSE") )Close(); else if( action == wxT("APPLY") )Apply(); }
false
false
false
false
false
0
attribute_flags_to_string (GFileAttributeInfoFlags flags) { GString *s; int i; gboolean first; struct { guint32 mask; char *descr; } flag_descr[] = { { G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE, N_("Copy with file") }, { G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED, N_("Keep wi...
false
false
false
false
false
0
gf_isom_get_data_reference(GF_ISOFile *the_file, u32 trackNumber, u32 StreamDescriptionIndex, const char **outURL, const char **outURN) { GF_TrackBox *trak; GF_DataEntryURLBox *url; GF_DataEntryURNBox *urn; u32 drefIndex; GF_Err e; *outURL = *outURN = NULL; if (!StreamDescriptionIndex || !trackNumber) return G...
false
false
false
false
false
0
readFloat() { if (BinaryFormat) { if (!BinaryNumCount) { const u16 tmp = readBinWord(); // 0x07 or 0x42 if (tmp == 0x07) BinaryNumCount = readBinDWord(); else BinaryNumCount = 1; // single int } --BinaryNumCount; if (FloatSize == 8) { #ifdef __BIG_ENDIAN__ c8 ctmp[8]; ...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__skins__TVisionSkin_Window_IsMouseMoving(struct __ecereNameSpace__ecere__com__Instance * this, int x, int y, int w, int h) { unsigned int result = 0x0; if(((unsigned int)((((struct __ecereNameSpace__ecere__gui__Window *)(((char *)this + __ecereClass___ecereNameSpace__ecere__g...
false
false
false
false
false
0
render(render_guts_t* guts, int indentation) const { rope_t ret("do"); // Technically this shouldn't be renderBlock(true, ...) but requiring braces makes it easier to render it all... ret += this->_childNodes.front()->renderBlock(true, guts, indentation); if (guts->sanelineno) { this->_childNodes.back()->re...
false
false
false
false
false
0
_transition(t_CKDOUBLE a, t_CKDOUBLE alpha, t_CKDOUBLE b, t_CKINT n, t_CKDOUBLE *output) { t_CKINT i; t_CKDOUBLE delta, interval = 0.0; delta = b - a; if (n <= 1) { //warn("maketable (curve)", "Trying to transition over 1 array slot; " // "time between p...
false
false
false
false
false
0
deleteSome(int numberToDelete, const int * which) { if (objective_) { int i ; char * deleted = new char[numberColumns_]; int numberDeleted = 0; CoinZeroN(deleted, numberColumns_); for (i = 0; i < numberToDelete; i++) { int j = which[i]; ...
false
false
false
false
false
0
add_arg_libgfortran (bool force_static ATTRIBUTE_UNUSED) { #ifdef HAVE_LD_STATIC_DYNAMIC if (force_static) append_option (OPT_Wl_, LD_STATIC_OPTION, 1); #endif append_option (OPT_l, FORTRAN_LIBRARY, 1); #ifdef HAVE_LD_STATIC_DYNAMIC if (force_static) append_option (OPT_Wl_, LD_DYNAMIC_OPTION, 1); #endif }
false
false
false
false
false
0
vce_v1_0_resume(struct radeon_device *rdev) { uint64_t addr = rdev->vce.gpu_addr; uint32_t size; int i; WREG32_P(VCE_CLOCK_GATING_A, 0, ~(1 << 16)); WREG32_P(VCE_UENC_CLOCK_GATING, 0x1FF000, ~0xFF9FF000); WREG32_P(VCE_UENC_REG_CLOCK_GATING, 0x3F, ~0x3F); WREG32(VCE_CLOCK_GATING_B, 0); WREG32_P(VCE_LMI_FW_PERI...
false
false
false
false
false
0
FixupStruct (ObjStruct *inputStruct) { ObjStruct *subStruct; int items; #ifdef COMP_DEBUG DXDebug ("C", "FixupStruct"); #endif if (inputStruct == NULL) return OK; switch(inputStruct->class) { case CLASS_GROUP: if (inputStruct->members != NULL) { subStruct = inputStruct->members; ...
false
false
false
false
false
0
GetFrameworkFlags() { if(!this->Makefile->IsOn("APPLE")) { return std::string(); } std::set<cmStdString> emitted; #ifdef __APPLE__ /* don't insert this when crosscompiling e.g. to iphone */ emitted.insert("/System/Library/Frameworks"); #endif std::vector<std::string> includes; const char *config = t...
false
false
false
false
false
0
effect_start_cb (PluginHandle * plugin, EffectStartState * state) { AUDDBG ("Starting %s at %d channels, %d Hz.\n", plugin_get_name (plugin), * state->channels, * state->rate); EffectPlugin * header = plugin_get_header (plugin); g_return_val_if_fail (header != NULL, TRUE); header->start (state->cha...
false
false
false
false
false
0
gst_registry_remove_plugin (GstRegistry * registry, GstPlugin * plugin) { g_return_if_fail (GST_IS_REGISTRY (registry)); g_return_if_fail (GST_IS_PLUGIN (plugin)); GST_DEBUG_OBJECT (registry, "removing plugin %p (%s)", plugin, gst_plugin_get_name (plugin)); GST_OBJECT_LOCK (registry); registry->plugin...
false
false
false
false
false
0
i40e_mirrorrule_op(struct i40e_hw *hw, u16 opcode, u16 sw_seid, u16 rule_type, u16 id, u16 count, __le16 *mr_list, struct i40e_asq_cmd_details *cmd_details, u16 *rule_id, u16 *rules_used, u16 *rules_free) { struct i40e_aq_desc desc; struct i40e_aqc_add_delete_mirror_rule *cmd = (struct i40e_aqc_add_...
false
false
false
false
false
0
airFPValToParts_d(unsigned int *signP, unsigned int *expoP, unsigned int *mant0P, unsigned int *mant1P, double v) { _airDoubleEndianLittle dlit; _airDoubleEndianBig dbig; dlit.v = dbig.v = v; FP_GET_D(*signP, *expoP, *mant0P, *mant1P, dlit, dbig); }
false
false
false
false
false
0
gamgi_mesa_rotate_object (gamgi_object *object, double *quaternion, double *rotate, double *center) { gamgi_direction *direction; gamgi_plane *plane; /***************************************** * rotate object around geometric center * *****************************************/ switch (object->class) { case GAMG...
false
false
false
false
false
0
pkix_pl_ByteArray_ToHexString( PKIX_PL_ByteArray *array, PKIX_PL_String **pString, void *plContext) { char *tempText = NULL; char *stringText = NULL; /* "[XX XX XX ...]" */ PKIX_UInt32 i, outputLen, bufferSize; PKIX_ENTER(BYTEARRAY, "pkix_pl_ByteArray_ToHexString...
false
false
false
false
false
0
_kdc_r_log(kdc_request_t r, int level, const char *fmt, ...) { va_list ap; char *s; va_start(ap, fmt); s = kdc_log_msg_va(r->context, r->config, level, fmt, ap); if(s) free(s); va_end(ap); }
false
false
false
false
false
0