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
test_mgr_old_a(int flag) { int32 fid; /* HDF file ID */ int32 grid; /* GRID for the interface */ int32 ret; /* generic return value */ char oldrlefile[512] = ""; char *srcdir = getenv("srcdir"); /* Generate the correct name for the test file, by prepending ...
true
true
false
false
true
1
xsltCopyStackElem(xsltStackElemPtr elem) { xsltStackElemPtr cur; cur = (xsltStackElemPtr) xmlMalloc(sizeof(xsltStackElem)); if (cur == NULL) { xsltTransformError(NULL, NULL, NULL, "xsltCopyStackElem : malloc failed\n"); return(NULL); } memset(cur, 0, sizeof(xsltStackElem)); cur->context = e...
false
false
false
false
false
0
getFromTagNum( FLMUINT uiTagNum, FLMUNICODE * puzTagName, char * pszTagName, FLMUINT uiNameBufSize, FLMUINT * puiType, FLMUINT * puiSubType) { FLM_TAG_INFO * pTagInfo; if (!m_bTablesSorted) { sortTags(); } if ((pTagInfo = findTagByNum( uiTagNum)) != NULL) { if (puiType) { *puiType = pTagIn...
false
false
false
false
false
0
refresh() { if (m_stats) { m_elements[0]->setText(QString::number(m_stats->misses())); m_elements[1]->setText(QString::number(m_stats->hits())); } else { m_elements[0]->setText("0"); m_elements[1]->setText("0"); } }
false
false
false
false
false
0
process_file (fname) char *fname; { Node *result; int return_seen = 0; start_state = NULL; current_fname = fname; current_linenum = 1; /* Init buffer variables. */ data_in_buffer = 0; bufpos = 0; eof_seen = 0; /* Enter build-in variables. */ enter_system_variable ("filename", fname); /*...
false
false
false
false
false
0
parse_der_private_key_rsa (GcrParser *self, GBytes *data) { gint res = GCR_ERROR_UNRECOGNIZED; GNode *asn = NULL; gulong version; GcrParsed *parsed; parsed = push_parsed (self, TRUE); asn = egg_asn1x_create_and_decode (pk_asn1_tab, "RSAPrivateKey", data); if (!asn) goto done; par...
false
false
false
false
false
0
AddProgressCallback (int transfer,ProgressCallback cb,uint8_t agg) { FileTransfer* trans = FileTransfer::file(transfer); if (!trans) return; trans->cb_agg[trans->cb_installed] = agg; trans->callbacks[trans->cb_installed++] = cb; }
false
false
false
false
false
0
vertical_changed_cb (GtkToggleButton *btn, GogHistogramPlot *model) { if (gtk_toggle_button_get_active (btn) != model->vertical) { model->vertical = !model->vertical; gog_object_request_update (GOG_OBJECT (model)); /* force axis bounds reevaluation */ model->x.minima = model->y.minima = G_MAXDOUBLE; } }
false
false
false
false
false
0
__rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp) { struct rcu_node *rnp = rdp->mynode; rdp->n_rcu_pending++; /* Check for CPU stalls, if enabled. */ check_cpu_stall(rsp, rdp); /* Is this CPU a NO_HZ_FULL CPU that should ignore RCU? */ if (rcu_nohz_full_cpu(rsp)) return 0; /* Is the RCU core waiti...
false
false
false
false
false
0
GetRankedHit(struct tophit_s *h, int rank, double *r_pvalue, float *r_score, double *r_motherp, float *r_mothersc, char **r_name, char **r_acc, char **r_desc, int *r_sqfrom, int *r_sqto, int *r_sqlen, int *r_hmmfrom, int *r_hmmto, int *r_hmmlen, int *r_domidx, int *r_ndom, st...
false
false
false
false
false
0
addTopCode() { if ( functionName.length() == 0 ) { outStream << "def add_errors():" << endl << endl; } else { outStream << "def " << functionName << "():" << endl << endl; } outStream << " errors = dict()" << endl; outStream << " error_names = dict()" << endl << endl; }
false
false
false
false
false
0
dib8000_small_fine_tune(struct dib8000_state *state) { u16 i; const s16 *ncoeff; struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_write_word(state, 352, state->seg_diff_mask); dib8000_write_word(state, 353, state->seg_mask); /* P_small_coef_ext_enable=ISDB-Tsb, P_small_narrow_band=...
false
false
false
false
false
0
nfs4_layoutreturn_done(struct rpc_task *task, void *calldata) { struct nfs4_layoutreturn *lrp = calldata; struct nfs_server *server; dprintk("--> %s\n", __func__); if (!nfs41_sequence_done(task, &lrp->res.seq_res)) return; server = NFS_SERVER(lrp->args.inode); switch (task->tk_status) { default: task->tk_...
false
false
false
false
false
0
SET_OBJECT(uint16_t obj1, uint16_t obj2, int offset) { if(zversion <= 3) STORE_BYTE(OBJECT(obj1) + offset, obj2); else STORE_WORD(OBJECT(obj1) + offset, obj2); }
false
false
false
false
false
0
strip_whitespace (string) char *string; { while (whitespace (*string)) string++; remove_trailing_whitespace (string); return (string); }
false
false
false
false
false
0
doMask(LayerList maskLayerIDs, const QString &maskName, const QString & gerberSuffix, ItemBase * board, PCBSketchWidget * sketchWidget, const QString & filename, const QString & exportDir, bool displayMessageBoxes, QString & clipString) { // don't want these in the mask laqyer QList<ItemBase *> copperLogoItems; ske...
false
false
false
false
false
0
_e_int_menus_clients_add_by_class(Eina_List *borders, E_Menu *m) { Eina_List *l = NULL, *ico = NULL; E_Border *bd; E_Menu *subm = NULL; E_Menu_Item *mi = NULL; char *class = NULL; EINA_LIST_FOREACH(borders, l, bd) { if ((bd->iconic) && (e_config->clientlist_separate_iconified...
false
false
false
false
false
0
gsl_histogram_fwrite (FILE * stream, const gsl_histogram * h) { int status = gsl_block_raw_fwrite (stream, h->range, h->n + 1, 1); if (status) return status; status = gsl_block_raw_fwrite (stream, h->bin, h->n, 1); return status; }
false
false
false
false
false
0
mono_gc_run_finalize (void *obj, void *data) { MonoObject *exc = NULL; MonoObject *o; #ifndef HAVE_SGEN_GC MonoObject *o2; #endif MonoMethod* finalizer = NULL; MonoDomain *caller_domain = mono_domain_get (); MonoDomain *domain; RuntimeInvokeFunction runtime_invoke; o = (MonoObject*)((char*)obj + GPOINTER_TO_UI...
false
false
false
false
false
0
feature_node_iterator_new_base(const GtFeatureNode *fn) { GtFeatureNodeIterator *fni; gt_assert(fn); fni = gt_malloc(sizeof *fni); fni->fn = (GtFeatureNode*) gt_genome_node_ref((GtGenomeNode*) fn); fni->feature_stack = gt_array_new(sizeof (GtFeature...
false
false
false
false
false
0
create_app_main_window(const gchar *title){ main_window.window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(main_window.window), title); gint w, h, x, y; if (get_preferences_manager_window_maximized(main_window.prefmg)) { gtk_window_maximize(GTK_WINDOW(main_window.window)); } els...
false
false
false
false
false
0
dma_data_view_destroy (GtkWidget *object) { DmaDataView *view; g_return_if_fail (IS_DMA_DATA_VIEW (object)); view = DMA_DATA_VIEW (object); gtk_widget_unparent (view->address); gtk_widget_destroy (view->address); gtk_widget_unparent (view->data); gtk_widget_destroy (view->data); gtk_widget_unparent (view->as...
false
false
false
false
false
0
setReg(unsigned Reg) { if (getReg() == Reg) return; // No change. // Otherwise, we have to change the register. If this operand is embedded // into a machine function, we need to update the old and new register's // use/def lists. if (MachineInstr *MI = getParent()) if (MachineBasicBlock *MBB = MI->ge...
false
false
false
false
false
0
get_server_answer(const bgav_options_t * opt, int fd, char ** server_msg, int * server_msg_alloc,int connect_timeout) { char status[5]; char status_neu[5]; status[4] = '\0'; status_neu[4] = '\0'; if(!bgav_read_line_fd(opt, fd, server_msg, se...
false
false
false
false
false
0
preferences_dialog_destination_changed_cb (GthImportPreferencesDialog *dialog, GthImportDestinationButton *self) { GFile *destination; GFile *destination_example; destination = gth_import_preferences_dialog_get_destination (dialog); destination_example = gth_import_preferences_dialog_get_destination_exampl...
false
false
false
false
false
0
acpi_check_resource_conflict(const struct resource *res) { acpi_adr_space_type space_id; acpi_size length; u8 warn = 0; int clash = 0; if (acpi_enforce_resources == ENFORCE_RESOURCES_NO) return 0; if (!(res->flags & IORESOURCE_IO) && !(res->flags & IORESOURCE_MEM)) return 0; if (res->flags & IORESOURCE_IO)...
false
false
false
false
false
0
InitBufferPool(void) { bool foundBufs, foundDescs; BufferDescriptors = (BufferDesc *) ShmemInitStruct("Buffer Descriptors", NBuffers * sizeof(BufferDesc), &foundDescs); BufferBlocks = (char *) ShmemInitStruct("Buffer Blocks", NBuffers * (Size) BLCKSZ, &foundBufs); if (foundDescs || foundBufs...
false
false
false
false
false
0
include_symbol(Symbol *sym) { int type = 0; if (!sym) return 0; if (sym->type == SymIdentifier) { if (sym->name[0] == '_' && !(symbol_map & SM_UNDERSCORE)) return 0; if (sym->storage == StaticStorage) type |= SM_STATIC; if (sym->arity == -1 && sym->storage != Auto...
false
false
false
false
false
0
gst_caps_features_new_valist (const gchar * feature1, va_list varargs) { GstCapsFeatures *features; g_return_val_if_fail (feature1 != NULL, NULL); features = gst_caps_features_new_empty (); while (feature1) { gst_caps_features_add (features, feature1); feature1 = va_arg (varargs, const gchar *); } ...
false
false
false
false
false
0
htmlize(HtmlStream & os) const { os << MTag("table", "class='matrix'") << '\n'; // we do not print the delimiters but instead try to hack them string const rows = convert<string>(nrows()); string const lattrib = "class='ldelim' rowspan='" + rows + "'"; string const rattrib = "class='rdelim' rowspan='" + r...
false
false
false
false
false
0
RemoveGlobalBookmark(ExState &State) { char name[256] = ""; if (State.GetStrParam(this, name, sizeof(name)) == 0) if (MView->Win->GetStr("Remove Global Bookmark", sizeof(name), name, HIST_BOOKMARK) == 0) return 0; if (markIndex.remove(name) == 0) { Msg(S_ERROR, "Error removing global bookma...
false
false
false
false
false
0
main(int argc, char *argv[]) { FILE *old, *new; char newpath[MAXLINE], line[MAXLINE]; char *oldpass, *newpass, *ch; int ii = 1; int c; int flag = 0; if (argc < 2) usage(); while ( (c=getopt(argc, argv, "h?d:m:")) != -1) { switch(c) { case 'm': flag |= FLAG_MD5; ii = 2; break; case 'd':...
true
true
false
false
true
1
endswith(const char *str, const char *postfix) { int slen = strlen(str); int plen = strlen(postfix); const char *pstr; if (slen < plen) return 0; pstr = &str[slen - plen]; return strcmp(str, postfix) == 0; }
false
false
false
false
false
0
nxt_motor_set_rotation(nxt_t *nxt, int motor, int rotation) { if (!NXT_VALID_MOTOR(motor) || rotation<0) { return NXT_FAIL; } nxt->motors[motor].tacho_limit = rotation; return nxt_motor_autoset(nxt, motor); }
false
false
false
false
false
0
server_mkdir(server_ty *sp, string_ty *client_side, string_ty *server_side) { // // If the directory exists, do nothing. // if (sp->np->directory_find_client_side(client_side)) return; // // Make sure the parent directory exists. // server_mkdir_above(sp, client_side, server_side); ...
false
false
false
false
false
0
mergesort(uint32_t n, uint32_t *in, uint32_t *out) { if(n == 1) { *out = *in; return; } uint32_t nl = n / 2; uint32_t nu = n - nl; mergesort(nl, out, in); mergesort(nu, &out[nl], &in[nl]); merge(n, nl, in, nu, &in[nl], out); }
false
false
false
false
false
0
wordsplit_find_env (struct wordsplit *wsp, const char *name, size_t len) { size_t i; if (!(wsp->ws_flags & WRDSF_ENV)) return NULL; if (wsp->ws_flags & WRDSF_ENV_KV) { /* A key-value pair environment */ for (i = 0; wsp->ws_env[i]; i++) { size_t elen = strlen (wsp->ws_env[i]); if (elen...
false
false
false
false
false
0
im_delete_preedit(void) { char_u bskey[] = {CSI, 'k', 'b'}; char_u delkey[] = {CSI, 'k', 'D'}; if (State & NORMAL) { im_preedit_cursor = 0; return; } for (; im_preedit_cursor > 0; --im_preedit_cursor) add_to_input_buf(bskey, (int)sizeof(bskey)); for (; im_preedit_trailing > 0; --im_pre...
false
false
false
false
false
0
mca_pml_ob1_get_posted_recvq_size (const struct mca_base_pvar_t *pvar, void *value, void *obj_handle) { ompi_communicator_t *comm = (ompi_communicator_t *) obj_handle; mca_pml_ob1_comm_t *pml_comm = comm->c_pml_comm; int comm_size = ompi_comm_size (comm); unsigned *values = (unsigned *) value; mca_p...
false
false
false
false
false
0
Mono_Posix_Syscall_getpwnam (const char *name, struct Mono_Posix_Syscall__Passwd *pwbuf) { struct passwd *pw; if (pwbuf == NULL) { errno = EFAULT; return -1; } errno = 0; pw = getpwnam (name); if (pw == NULL) return -1; if (copy_passwd (pwbuf, pw) == -1) { errno = ENOMEM; return -1; } return 0; }
false
false
false
false
false
0
set_new_default_account(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gint *account_id) { PrefsAccount *account = NULL; PangoWeight weight; gtk_tree_model_get(model, iter, ACCOUNT_DATA, &account, -1); if (*account_id == account->account_id) weight = PANGO_WEIGHT...
false
false
false
false
false
0
xorDigest(unsigned char *digest, void *ptr, size_t len) { SHA1_CTX ctx; unsigned char hash[20], *s = ptr; int j; SHA1Init(&ctx); SHA1Update(&ctx,s,len); SHA1Final(hash,&ctx); for (j = 0; j < 20; j++) digest[j] ^= hash[j]; }
true
true
false
false
false
1
component_match_add(struct device *dev, struct component_match **matchptr, int (*compare)(struct device *, void *), void *compare_data) { struct component_match *match = *matchptr; if (IS_ERR(match)) return; if (!match || match->num == match->alloc) { size_t new_size = match ? match->alloc + 16 : 15; match...
false
false
false
false
false
0
assert_uri_exists (EBookClient *book, const gchar *uid) { EContact *contact; EContactPhoto *photo; const gchar *filename; GError *error = NULL; if (!e_book_client_get_contact_sync (book, uid, &contact, NULL, &error)) g_error ("Unable to get contact: %s", error->message); g_as...
false
false
false
false
false
0
transient_server_callback(IPC_Channel *client, gpointer user_data) { int lpc = 0; IPC_Message *msg = NULL; char *buffer = NULL; IPC_Message *reply = NULL; int llpc = 0; cl_log(LOG_DEBUG, "channel: %p", client); cl_log(LOG_DEBUG, "Client status %d (disconnect=%d)", client->ch_status, IPC_DISCONNECT); ...
false
true
false
false
false
1
des_test() { const byte vector[] = { /* "now is the time for all " w/o trailing 0 */ 0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74, 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20, 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 }; byte plain[24]; byte cipher[24]; Des enc; Des dec; cons...
false
false
false
false
false
0
RecursiveSave( int depth, int to, int *record, TreeDataType *ptd ) { int first, i; /* to find first interval */ for ( first = record[ depth - 1 ] + 1; ptd->interval[ first ].from < to && first < ptd->nInterval; first++ ) ; if ( first == ptd->nInterval ) { SaveRecord( record + 1, depth - 1, ptd ); retur...
false
false
false
false
false
0
procode(FILE *outfile) #endif { prolog(outfile, allargs); if (nentry > 1) entry_goto(outfile); }
false
false
false
false
false
0
headroom(int *la) { int l; if (*la == 0) { return 31; } l = 30 - av_log2(FFABS(*la)); *la <<= l; return l; }
false
false
false
false
false
0
ccid_pinpad_operation (int slot, int class, int ins, int p0, int p1, pininfo_t *pininfo) { unsigned char apdu[4]; int err, sw; unsigned char result[2]; size_t resultlen = 2; apdu[0] = class; apdu[1] = ins; apdu[2] = p0; apdu[3] = p1; err = ccid_transceive_secure (reader_table[slot].ccid.hand...
true
true
false
false
false
1
binder_get_ref(struct binder_proc *proc, u32 desc, bool need_strong_ref) { struct rb_node *n = proc->refs_by_desc.rb_node; struct binder_ref *ref; while (n) { ref = rb_entry(n, struct binder_ref, rb_node_desc); if (desc < ref->desc) { n = n->rb_left; } else if (desc > ref->desc) { n = n->rb_right...
false
false
false
false
false
0
SetFlags(SequentialContainer *gen,unsigned newFlags) { unsigned result; if (gen == NULL) { iError.RaiseError("iGeneric.SetFlags",CONTAINER_ERROR_BADARG); return 0; } result = gen->Flags; gen->Flags = newFlags; return result; }
false
false
false
false
false
0
guess_periodic_target_update(void) { uint unused; guess_target_bw = GNET_PROPERTY(bw_guess_out); if (!GNET_PROPERTY(guess_maximize_bw)) return; /* * If there is more unused bandwidth configured for Gnutella output * than they configured as a GUESS hint, set the target to that amount * of unused bandwidth...
false
false
false
false
false
0
predict_score(void) { int j; high_score the_score; high_score scores[MAX_HISCORES]; /* Read scores, place current score */ highscore_read(scores, N_ELEMENTS(scores)); build_score(&the_score, "nobody (yet!)", NULL); if (p_ptr->is_dead) j = highscore_where(&the_score, scores, N_ELEMENTS(scores)); else j =...
false
false
false
false
false
0
gnome_canvas_text_set_markup (GnomeCanvasText *textitem, const gchar *markup) { PangoAttrList *attr_list = NULL; gchar *text = NULL; GError *error = NULL; if (markup && !pango_parse_markup (markup, -1, 0, &attr_list, &text, NULL, &error)) { g_...
false
false
false
false
false
0
wake() { m_sleeping = false; Dprintf(("TMRL::wake\n")); if ( t1con->get_tmr1on() && t1con->get_tmr1cs() < 2) { update(); } }
false
false
false
false
false
0
libmodfind_module(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj name_scm; ScmSymbol* name; ScmObj SCM_SUBRARGS[1]; int SCM_i; SCM_ENTER_SUBR("find-module"); for (SCM_i=0; SCM_i<1; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i); } name_scm = SCM_SUBRARGS[0]; if (!SCM_SYMBOLP(name_scm)) ...
false
false
false
false
false
0
acquireServer(giopWorker* w) { // Theory of operation: // // One or more threads may serve the same strand. However, only // one thread works on the same GIOP_S instance. This invariant // is enforced by this function. // // There may be one or more GIOP_S instances linked to this // strand. They can be...
false
false
false
false
false
0
model_section_removed (ENameSelectorDialog *name_selector_dialog, const gchar *name) { gint section_index; section_index = find_section_by_name (name_selector_dialog, name); g_assert (section_index >= 0); free_section (name_selector_dialog, section_index); g_array_remove_index ( name_sel...
false
false
false
false
false
0
initbuf(buffer *buf) { if (buf && buf->buf == NULL) { buf->buf = (char*) calloc(BUF_SIZE,sizeof(char)); buf->len = BUF_SIZE; buf->used = 0; } return buf->buf?0:NO_MEMORY; }
false
false
false
false
false
0
digi(int fd, struct uart_t *u, struct termios *ti) { struct timespec tm = {0, 50000}; char cmd[5]; /* DigiAnswer set baud rate command */ cmd[0] = HCI_COMMAND_PKT; cmd[1] = 0x07; cmd[2] = 0xfc; cmd[3] = 0x01; switch (u->speed) { case 57600: cmd[4] = 0x08; break; case 115200: cmd[4] = 0x09; break; d...
false
false
false
false
false
0
e1000e_sw_lcd_config_ich8lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; u32 i, data, cnf_size, cnf_base_addr, sw_cfg_mask; s32 ret_val; u16 word_addr, reg_data, reg_addr, phy_page = 0; ret_val = hw->phy.ops.acquire(hw); if (ret_val) return ret_val; /* * Initialize the PHY from the NVM on...
false
false
false
false
false
0
avl_tree_free_helper (avl_node * node, avl_free_key_fun_type free_key_fun) { if (node->left) { avl_tree_free_helper (node->left, free_key_fun); } if (free_key_fun) free_key_fun (node->key); if (node->right) { avl_tree_free_helper (node->right, free_key_fun); } thread_rwlock_destroy (&node->rwl...
false
false
false
false
false
0
u_freebranch(buf, uhp, uhpp) buf_T *buf; u_header_T *uhp; u_header_T **uhpp; /* if not NULL reset when freeing this header */ { u_header_T *tofree, *next; /* If this is the top branch we may need to use u_freeheader() to update * all the pointers. */ if (uhp == buf->b_u_old...
false
false
false
false
false
0
mwifiex_update_autoindex_ies(struct mwifiex_private *priv, struct mwifiex_ie_list *ie_list) { u16 travel_len, index, mask; s16 input_len, tlv_len; struct mwifiex_ie *ie; u8 *tmp; input_len = le16_to_cpu(ie_list->len); travel_len = sizeof(struct mwifiex_ie_types_header); ie_list->len = 0; while (input...
false
true
false
false
false
1
kernelCreateFromPix(PIX *pix, l_int32 cy, l_int32 cx) { l_int32 i, j, w, h, d; l_uint32 val; L_KERNEL *kel; PROCNAME("kernelCreateFromPix"); if (!pix) return (L_KERNEL *)ERROR_PTR("pix not defined", procName, NULL); pixGetDimensions(p...
false
false
false
false
false
0
cma_add_preset_callback(GtkWidget *w, gpointer data) { struct cma_dialog *pdialog = (struct cma_dialog *) data; const char *default_name; GtkWidget *parent = gtk_widget_get_toplevel(pdialog->shell); int index; if ((index = gtk_tree_selection_get_row(pdialog->selection)) != -1) { default_name = cmafec_pre...
false
false
false
false
false
0
aim_putcap(aim_bstream_t *bs, fu32_t caps) { int i; if (!bs) return -EINVAL; for (i = 0; aim_bstream_empty(bs); i++) { if (aim_caps[i].flag == AIM_CAPS_LAST) break; if (caps & aim_caps[i].flag) aimbs_putraw(bs, aim_caps[i].data, 0x10); } return 0; }
false
false
false
false
false
0
slurm_sort_char_list_desc(void *v1, void *v2) { char *name_a = *(char **)v1; char *name_b = *(char **)v2; int diff = strcmp(name_a, name_b); if (diff > 0) return -1; else if (diff < 0) return 1; return 0; }
false
false
false
false
false
0
n_iv_cands (struct ivopts_data *data) { return VEC_length (iv_cand_p, data->iv_candidates); }
false
false
false
false
false
0
SetRange(double minval, double maxval) { if (this->InputRange[0] != minval || this->InputRange[1] != maxval) { this->InputRange[0] = minval; this->InputRange[1] = maxval; this->Modified(); } }
false
false
false
false
false
0
ks8842_handle_rx(struct net_device *netdev, struct ks8842_adapter *adapter) { u16 rx_data = ks8842_read16(adapter, 16, REG_RXMIR) & 0x1fff; netdev_dbg(netdev, "%s Entry - rx_data: %d\n", __func__, rx_data); while (rx_data) { ks8842_rx_frame(netdev, adapter); rx_data = ks8842_read16(adapter, 16, REG_RXMIR) & 0x1...
false
false
false
false
false
0
rt2400pci_config_cw(struct rt2x00_dev *rt2x00dev, const int cw_min, const int cw_max) { u32 reg; rt2x00mmio_register_read(rt2x00dev, CSR11, &reg); rt2x00_set_field32(&reg, CSR11_CWMIN, cw_min); rt2x00_set_field32(&reg, CSR11_CWMAX, cw_max); rt2x00mmio_register_write(rt2x00dev, CSR11, reg); }
false
false
false
false
false
0
getAttributeValueAsReference( const DWARFCompileUnit* cu, const uint16_t attr, uint64_t fail_value) const { DWARFFormValue form_value; if (getAttributeValue(cu, attr,...
false
false
false
false
false
0
GDdiminfo(int32 gridID, char *dimname) { intn status; /* routine return status variable */ int32 fid; /* HDF-EOS file ID */ int32 sdInterfaceID; /* HDF SDS interface ID */ int32 gdVgrpID; /* Grid root Vgroup ID */ int32 size; /* Dimension size */ ...
false
false
false
false
false
0
clear_pending_hscx_ints(struct IsdnCardState *cs) { int val, eval; val = cs->BC_Read_Reg(cs, 1, HSCX_ISTA); debugl1(cs, "HSCX B ISTA %x", val); if (val & 0x01) { eval = cs->BC_Read_Reg(cs, 1, HSCX_EXIR); debugl1(cs, "HSCX B EXIR %x", eval); } if (val & 0x02) { eval = cs->BC_Read_Reg(cs, 0, HSCX_EXIR); de...
false
false
false
false
false
0
sendStart(Batch& batch) { batch.start = Sys::now(); int nfiles = 0; fxStr files; for (JobIter iter(batch.jobs); iter.notDone(); iter++) { Job& job(iter); traceJob(job, "SEND IN BATCH to %s", (const char*)batch.dest); job.pid = 0; job.start = 0; Trigger::post(Trigger::SEND_BEGIN, job); if (n...
false
false
false
false
false
0
obj_object_by_name(G3DModel *model, const gchar *name) { G3DObject *object; G3DMaterial *material; GSList *oitem; #if DEBUG > 4 g_debug("looking for object '%s'", name); #endif for(oitem = model->objects; oitem != NULL; oitem = oitem->next) { object = oitem->data; if(strcmp(object->name, name) == 0) retur...
false
false
false
false
false
0
duplicate_mark(duplicate_key_t *dkey, time_t mark, unsigned long uid) { char buf[1024], data[100]; int idlen = strlen(dkey->id); int tolen = strlen(dkey->to); int datelen = strlen(dkey->date); int r; if (!duplicate_dbopen) return; if (idlen + tolen + datelen > (int) sizeof(buf) - 30) retu...
true
true
false
false
false
1
_pack_complete_batch_script_msg( complete_batch_script_msg_t * msg, Buf buffer, uint16_t protocol_version) { if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { jobacctinfo_pack(msg->jobacct, protocol_version, PROTOCOL_TYPE_SLURM, buffer); pack32(msg->job_id, buffer); pack32(msg->job_rc, buffer); pack...
false
false
false
false
false
0
wm_remove_window_property( CoreWindowStack *stack, void *wm_data, void *stack_data, CoreWindow *window, void *window_data, const char *key, ...
false
false
false
false
false
0
sendrealdata(int arrayno, int blocknumber, int blkndx, int target, int tarray, int tblock,int nwblock, MPI_Comm *comm, int msgtype, MPI_Request *request) { /* Sends the data in arrayno, blocknumber to the target processor's tarray, tblock. The data will be sum...
false
false
false
false
false
0
JogShuttle_inputCallback( gpointer data, gint source, GdkInputCondition condition ) { JogShuttle * js = static_cast<JogShuttle *>( data ); g_return_if_fail( js != NULL ); js->inputCallback( source, condition ); }
false
false
false
false
false
0
vsnprintf(char* str, size_t size, const char *format, va_list arg_ptr) { int n; struct str_data sd = { str, 0, size?size-1:0 }; struct arg_printf ap = { &sd, (int(*)(void*,size_t,void*)) swrite }; n=__v_printf(&ap,format,arg_ptr); if (str && size && n>=0) { if (size!=(size_t)-1 && ((size_t)n>=size)) str[s...
false
false
false
false
true
1
unlock_reader (int slot) { if (slot < 0 || slot >= DIM (lock_table) || !lock_table[slot].initialized) log_bug ("unlock_reader called for invalid slot %d\n", slot); apdu_set_progress_cb (slot, NULL, NULL); if (!pth_mutex_release (&lock_table[slot].lock)) log_error ("failed to release APP lock for s...
false
false
false
false
false
0
totem_playlist_has_previous_mrl (TotemPlaylist *playlist) { GtkTreeIter iter; g_return_val_if_fail (TOTEM_IS_PLAYLIST (playlist), FALSE); if (update_current_from_playlist (playlist) == FALSE) return FALSE; if (playlist->priv->shuffle == FALSE) { gtk_tree_model_get_iter (playlist->priv->model, &iter, ...
false
false
false
false
false
0
window() { if (!pr) return NULL; if (top_level) return (gMainWindow *)pr; return ((gMenu *)pr)->window(); }
false
false
false
false
false
0
answer_txt(knot_nameserver_t *nameserver, knot_packet_t *response, uint8_t *response_wire, size_t *response_size) { const knot_dname_t *qname = knot_packet_qname(response); const char *response_str = get_txt_response_string(nameserver, qname); if (response_str == NULL || response_str[0] == '\0'...
false
false
false
false
false
0
importDirective(Node *n) { String *modname = Getattr(n, "module"); if (modname && clos_uses) { // Find the module node for this imported module. It should be the // first child but search just in case. Node *mod = firstChild(n); while (mod && Strcmp(nodeType(mod), "module") != 0) mod = nextS...
false
false
false
false
false
0
minterval1 (header *hd) { header *st=hd,*result=0; int i,j; long n,k; double *m1,*m; hd=getvalue(hd); if (error) return; if (hd->type==s_real) { result=new_interval(round_down(*realof(hd)), round_up(*realof(hd)),""); } else if (hd->type==s_matrix) { i=dimsof(hd)->r; j=dimsof(hd)->c; result=new_imatrix(i...
false
false
false
false
false
0
get_predet_parent (const equation_system *sys, int v, int *lag) { int i; for (i=0; i<sys->plist[0]; i++) { if (v == sys->pre_vars[i].id) { *lag = sys->pre_vars[i].lag; return sys->pre_vars[i].src; } } *lag = 0; return -1; }
false
false
false
false
false
0
dht_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata) { xlator_t *subvol = NULL; int op_errno = -1; dht_local_t *local = NULL; VALIDATE_OR_GOTO (frame, err); VALIDATE_OR_GOTO (this, err); VALIDATE_OR_GOTO (fd, err); local = dht_...
false
false
false
false
false
0
brcmf_init_escan(struct brcmf_cfg80211_info *cfg) { brcmf_fweh_register(cfg->pub, BRCMF_E_ESCAN_RESULT, brcmf_cfg80211_escan_handler); cfg->escan_info.escan_state = WL_ESCAN_STATE_IDLE; /* Init scan_timeout timer */ init_timer(&cfg->escan_timeout); cfg->escan_timeout.data = (unsigned long) cfg; cfg->escan_...
false
false
false
false
false
0
efx_ethtool_fill_self_tests(struct efx_nic *efx, struct efx_self_tests *tests, u8 *strings, u64 *data) { struct efx_channel *channel; unsigned int n = 0, i; enum efx_loopback_mode mode; efx_fill_test(n++, strings, data, &tests->phy_alive, "phy", 0, "alive", NULL); efx_fill_test(n++, ...
false
false
false
false
false
0
ps_setdash (char *pattern, PSL_LONG offset) { /* Line structure in Postscript units * offset from plotpoint in PS units * Examples: * pattern = "4 4", offset = 0: * 4 units of line, 4 units of space, start at current point * pattern = "5 3 1 3", offset = 2: * 5 units line, 3 units space, 1 unit line, 3...
false
true
false
false
false
1
bios_10_07xx(struct regs *regs) { unsigned short page; #ifdef DEBUG_INT10 dprintf("VGA Function 07: Scroll window down.\n"); #endif page = var_get(curr_page); if (AL == 0) { /* Clear screen. */ clear(page, CL, CH, DL, DH, BH); } else { /* Scroll lines. */ scroll(page, CL, CH, DL, DH, SCROLL_DOWN...
false
false
false
false
false
0
getCountForSolved() const { int countdown = 10; if (isUndoing()) { countdown = -1; } else if (isLoading()) { countdown = 0; } else if (m_levelScript->dialogs()->areRunning()) { countdown = 30; } return countdown; }
false
false
false
false
false
0
DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI) { // Recursively deleting a PHI may cause multiple PHIs to be deleted // or RAUW'd undef, so use an array of WeakVH for the PHIs to delete. SmallVector<WeakVH, 8> PHIs; for (BasicBlock::iterator I = BB->begin(); PHINode *PN = dyn_cast<PHINode>(...
false
false
false
false
false
0
getpdevstruct (uaecptr request) { int i = get_long (request + 24); if (i < 0 || i >= MAX_OPEN_DEVICES || pdevst[i].inuse == 0) { write_log (_T("uaescsi.device: corrupt iorequest %08X %d\n"), request, i); return 0; } return &pdevst[i]; }
false
false
false
false
false
0
readBoundsInfo(DataStreamPtr& stream, Mesh* pMesh) { Vector3 min, max; // float minx, miny, minz readFloats(stream, &min.x, 1); readFloats(stream, &min.y, 1); readFloats(stream, &min.z, 1); // float maxx, maxy, maxz readFloats(stream, &max.x, 1); readF...
false
false
false
false
false
0