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
add(WinClient &winclient) { ClientPattern *p = new ClientPattern(); Application *app = new Application(winclient.isTransient(), false); // by default, we match against the WMClass of a window (instance and class strings) string win_name = ::escapeRememberChars(p->getProperty(ClientPattern::NAME, winc...
false
false
false
false
false
0
check_grant_all_columns(THD *thd, ulong want_access_arg, Field_iterator_table_ref *fields) { Security_context *sctx= thd->security_ctx; ulong want_access= want_access_arg; const char *table_name= NULL; const char* db_name; GRANT_INFO *grant; /* Initialized only to make gcc ha...
false
false
false
false
false
0
traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recurse, const trav_visitor_t *visitor) { H5O_info_t oinfo; /* Object info for starting group */ /* Get info for starting object */ if(H5Oget_info_by_name(file_id, grp_name, &oinfo, H5P_DEFAULT) < 0) return -1;...
false
false
false
false
false
0
rpdl_print_page_copies(gx_device_printer * pdev, FILE * prn_stream, int num_coipes) { gx_device_lprn *const lprn = (gx_device_lprn *) pdev; int code = 0; int bpl = gdev_mem_bytes_per_scan_line(pdev); int maxY = lprn->BlockLine / lprn->nBh * lprn->nBh; /* printer initialize */ if (pdev->PageCoun...
false
false
false
false
false
0
EnvGetNextActivation( void *theEnv, void *actPtr) { struct defruleModule *theModuleItem; if (actPtr == NULL) { theModuleItem = (struct defruleModule *) GetModuleItem(theEnv,NULL,DefruleData(theEnv)->DefruleModuleIndex); if (theModuleItem == NULL) return(NULL); return((void *) theM...
false
false
false
false
false
0
minorCode2String(const minorCodeLookup table[], CORBA::ULong code) { int i = 0; while (table[i].value != code) { if (table[i].name) i++; else break; } return table[i].name; }
false
false
false
false
false
0
sparse_keymap_setup(struct input_dev *dev, const struct key_entry *keymap, int (*setup)(struct input_dev *, struct key_entry *)) { size_t map_size = 1; /* to account for the last KE_END entry */ const struct key_entry *e; struct key_entry *map, *entry; int i; int error; for (e = keymap; e->type != KE_END; ...
false
true
false
false
false
1
warn() { warningMessage( "Inconsistency in ResourceTransfer"); }
false
false
false
false
false
0
capinc_tty_init(void) { struct tty_driver *drv; int err; if (capi_ttyminors > CAPINC_MAX_PORTS) capi_ttyminors = CAPINC_MAX_PORTS; if (capi_ttyminors <= 0) capi_ttyminors = CAPINC_NR_PORTS; capiminors = kzalloc(sizeof(struct capiminor *) * capi_ttyminors, GFP_KERNEL); if (!capiminors) return -ENOM...
false
false
false
false
false
0
amdlibCopyP2VM (amdlibP2VM_MATRIX *srcP2vm, amdlibP2VM_MATRIX *dstP2vm, amdlibERROR_MSG errMsg) { int nbTel; int nbBases; int i; amdlibLogTrace("amdlibCopyP2VM()"); /* Init the number of telescopes and baselines according to...
false
true
false
false
false
1
crypto_kernel_status() { err_status_t status; kernel_cipher_type_t *ctype = crypto_kernel.cipher_type_list; kernel_auth_type_t *atype = crypto_kernel.auth_type_list; kernel_debug_module_t *dm = crypto_kernel.debug_module_list; /* run FIPS-140 statistical tests on rand_source */ printf("testing ran...
false
false
false
false
false
0
irq_get_irq_data(unsigned int irq) { struct irq_desc *desc = irq_to_desc(irq); return desc ? &desc->irq_data : NULL; }
false
false
false
false
false
0
editIndent() { QPointer<IndentDialog> indentDialog = new IndentDialog(this, tr("Indent")); if (!indentDialog->exec()) { delete indentDialog; return; } const QString insertString = indentDialog->insertChar(); const int numOfInserts = indentDialog->numOfInserts(); delete indentDialog; bool go = true; QText...
false
false
false
false
false
0
mgsl_reset_rx_dma_buffers( struct mgsl_struct *info ) { unsigned int i; for ( i = 0; i < info->rx_buffer_count; i++ ) { *((unsigned long *)&(info->rx_buffer_list[i].count)) = DMABUFFERSIZE; // info->rx_buffer_list[i].count = DMABUFFERSIZE; // info->rx_buffer_list[i].status = 0; } info->current_rx_buffer = 0; ...
false
false
false
false
false
0
e_table_get_state_object (ETable *e_table) { ETableState *state; GPtrArray *columns; gint full_col_count; gint i, j; columns = e_table_specification_ref_columns (e_table->spec); state = e_table_state_new (e_table->spec); g_clear_object (&state->sort_info); state->sort_info = g_object_ref (e_table->sort_info)...
false
false
false
false
false
0
stop_attack_firm(short firmRecno) { if(nation_hand_over_flag) return; Unit *unitPtr; for(int i=size(); i>0; --i) { if(is_deleted(i)) continue; unitPtr = operator[](i); if(!unitPtr->is_visible()) continue; if((unitPtr->action_para==firmRecno && unitPtr->action_mode==ACTION_ATTACK_FIRM) || (un...
false
false
false
false
false
0
make_local_coordsys(const char* pszName, UNITLABEL code) { const char* pszUnitID = this->code_to_id(code); return ( pszUnitID != NULL && this->make_local_coordsys(pszName, pszUnitID)); }
false
false
false
false
false
0
test_revwalk_signatureparsing__do_not_choke_when_name_contains_angle_brackets(void) { git_reference *ref; git_oid commit_oid; git_commit *commit; const git_signature *signature; /* * The branch below points at a commit with angle brackets in the committer/author name * committer <Yu V. Bin Haacked> <foo@examp...
false
false
false
false
false
0
mono_gchandle_slot_metadata (volatile gpointer *slot_addr, gboolean is_weak) { gpointer slot; gpointer metadata; retry: slot = *slot_addr; if (!MONO_GC_HANDLE_OCCUPIED (slot)) return NULL; if (MONO_GC_HANDLE_IS_OBJECT_POINTER (slot)) { GCObject *obj = (GCObject *)MONO_GC_REVEAL_POINTER (slot, is_weak); /* Se...
false
false
false
false
false
0
flip_it(void) { /* We work directly on either lpDDSBack (no lpDDSPrimary as in the original game): the double buffer (Back) is directly managed by SDL; SDL_Flip is used to refresh the physical screen. */ if (!truecolor) gfx_palette_apply_phys(); if (truecolor_fade_brightness < 256) gfx_...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__Button_NotifyClicked__00000015(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * button, int x, int y, unsigned int mods) { struct __ecereNameSpace__ecere__gui__dialogs__CreateDirectoryDialog * __ecerePointer___e...
false
false
false
false
false
0
hash_string(const unsigned char *s, int n) { int h = 0; while(*s) h += (h << 7) + *s++; h = (h * SOMEPRIME) % n; h = (h >= 0) ? h : h + n; return (h % n); }
false
false
false
false
false
0
p_map(li_object *args) { li_object *proc, *clists, *clists_iter; li_object *list, *list_iter; li_object *cars, *cars_iter; int loop; proc = li_car(args); clists = li_cdr(args); list = list_iter = li_null; assert_procedure(proc); /* iterate clists */ loop = 1; while (loop) { ...
false
false
false
false
false
0
build_sort_field_base_menu (SortFlowState *state) { gint start; gint end; gint index; GtkWidget *menu = gtk_menu_new (); GList* items = NULL; if (state->sel != NULL) { if (state->is_cols) { start = state->sel->v_range.cell.a.col; end = state->sel->v_range.cell.b.col; index = state->sel->v_range.cell....
false
false
false
false
false
0
reversed_next(reversedobject *ro) { PyObject *item; Py_ssize_t index = ro->index; if (index >= 0) { item = PySequence_GetItem(ro->seq, index); if (item != NULL) { ro->index--; return item; } if (PyErr_ExceptionMatches(PyExc_IndexError) || ...
false
false
false
false
false
0
get_word_be(struct s5p_jpeg_buffer *buf, unsigned int *word) { unsigned int temp; int byte; byte = get_byte(buf); if (byte == -1) return -1; temp = byte << 8; byte = get_byte(buf); if (byte == -1) return -1; *word = (unsigned int)byte | temp; return 0; }
false
false
false
false
false
0
read_buffer(int fd, unsigned char* buffer) { size_t rd; unsigned buflen; for (buflen = 0; buflen < CVM_BUFSIZE; buffer += rd, buflen += rd) { rd = read(fd, buffer, CVM_BUFSIZE-buflen); if (rd == (unsigned)-1) return 0; if (rd == 0) break; } return buflen; }
false
true
false
false
true
1
NeXTDecode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s) { register unsigned char *bp, *op; register tsize_t cc; register int n; tidata_t row; tsize_t scanline; (void) s; /* * Each scanline is assumed to start off as all * white (we assume ...
false
false
false
false
false
0
getProduction() const { if ( productionCache.empty() && !internalUnitProduction.empty() ) { for ( int height = 0; height < 8; ++height ) if ( (1 << height) & baseType->height ) for ( Production::const_iterator i = internalUnitProduction.begin(); i != internalUnitProduction.end(); ++i ) ...
false
false
false
false
false
0
gst_mixer_track_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstMixerTrack *mixer_track; mixer_track = GST_MIXER_TRACK (object); switch (prop_id) { case ARG_UNTRANSLATED_LABEL: g_object_set_data_full (G_OBJECT (mixer_track), MIXER_TRACK_OBJEC...
false
false
false
false
false
0
tgdb_initialize(const char *debugger, int argc, char **argv, int *debugger_fd, int *inferior_fd) { /* Initialize the libtgdb context */ struct tgdb *tgdb = initialize_tgdb_context(); char config_dir[FSUTIL_PATH_MAX]; /* Create config directory */ if (tgdb_initialize_config_dir(tgdb, config_...
false
false
false
false
false
0
decodePageSplitRecord(PageSplitRecord *decoded, XLogRecord *record) { char *begin = XLogRecGetData(record), *ptr; int j, i = 0; decoded->data = (gistxlogPageSplit *) begin; decoded->page = (NewPage *) palloc(sizeof(NewPage) * decoded->data->npage); ptr = begin + sizeof(gistxlogPageSplit); for (i ...
false
false
false
false
false
0
doProcess() { #if MRPT_HAS_ARIA ASSERTMSG_(THE_ROBOT!=NULL, "Robot is not connected") TTimeStamp tnow = mrpt::system::now(); const bool do_get_observations = (m_last_do_process==INVALID_TIMESTAMP) || (mrpt::system::timeDifference(m_last_do_process, tnow)>=1.0/m_capture_rate); // Collect odometry: // -----------...
false
false
false
false
false
0
remove_preds_and_fake_succs (constraint_graph_t graph) { unsigned int i; /* Clear the implicit ref and address nodes from the successor lists. */ for (i = 0; i < FIRST_REF_NODE; i++) { if (graph->succs[i]) bitmap_clear_range (graph->succs[i], FIRST_REF_NODE, FIRST_REF_NODE * 2); } ...
false
false
false
false
false
0
split_line(line, max_argument_count, argument_count, arguments) char *line; int max_argument_count; int *argument_count; char *arguments[]; { char *p = line; int i; i = 0; for (;;) { while (*p == ' ' || *p == '\t') p++; if (*p == '\0' || max_argument_count <= i) break; argu...
false
false
false
false
false
0
arm_fill_f32( float32_t value, float32_t * pDst, uint32_t blockSize) { uint32_t blkCnt; /* loop counter */ #ifndef ARM_MATH_CM0_FAMILY /* Run the below code for Cortex-M4 and Cortex-M3 */ float32_t in1 = value; float32_t in2 = value; float32_t in3 = value; ...
false
false
false
false
false
0
gst_multiudpsink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstMultiUDPSink *udpsink; udpsink = GST_MULTIUDPSINK (object); switch (prop_id) { case PROP_BYTES_TO_SERVE: g_value_set_uint64 (value, udpsink->bytes_to_serve); break; case PROP_BYTES_SE...
false
false
false
false
false
0
discovery_start_udp(void) { int error = create_server_socket(); if (error) return error; peer_server_add_listener(local_peer_changed, NULL); post_event_with_delay(udp_refresh_timer, NULL, PEER_DATA_REFRESH_PERIOD * 1000000); ifc_cnt = build_ifclist(udp_server_socket, MAX_IFC, ifc_list); memset(s...
false
false
false
false
false
0
evsig_cb(evutil_socket_t fd, short what, void *arg) { static char signals[1024]; ev_ssize_t n; int i; int ncaught[NSIG]; struct event_base *base; base = arg; memset(&ncaught, 0, sizeof(ncaught)); while (1) { n = recv(fd, signals, sizeof(signals), 0); if (n == -1) { int err = evutil_socket_geterror(fd)...
false
false
false
false
false
0
MessageEnd() { m_finished = true; if (m_definiteLength) { if (m_length != 0) BERDecodeError(); } else { // remove end-of-content octets word16 i; if (m_inQueue.GetWord16(i) != 2 || i != 0) BERDecodeError(); } }
false
false
false
false
false
0
recv_signaling(SIG_ENTITY *sig) { static unsigned char buffer[MAX_Q_MSG]; int size; size = read(sig->signaling,buffer,MAX_Q_MSG); if (size < 1) { perror("read signaling"); return; } diag(COMPONENT,DIAG_DEBUG,"FROM NET (%d.%d.%d): %s PDU (%d bytes)", S_PVC(sig),pdu_name[size > 3 && !(siz...
true
true
false
false
true
1
add_to_modcallable(modcallable **parent, modcallable *this, int component, const char *name) { modgroup *g; rad_assert(this != NULL); if (*parent == NULL) { modcallable *c; g = rad_malloc(sizeof *g); memset(g, 0, sizeof(*g)); g->grouptype = GROUPTYPE_SIMPLE; c = mod_grouptocallable(g); c->next = NU...
false
true
false
false
false
1
engine_from_locale (void) { const gchar *locale; const gchar *locale_engine[][2] = { { "as_IN", "m17n:as:phonetic" }, { "bn_IN", "m17n:bn:inscript" }, { "gu_IN", "m17n:gu:inscript" }, { "hi_IN", "m17n:hi:inscript" }, { "ja_J...
false
false
false
false
false
0
cp_register_argtype(const char *name, const char *desc, int flags, cp_parsefunc parse, cp_storefunc store, int internal, void *user_data = 0) { if (cp_argtype *t = const_cast<cp_argtype *>(cp_find_argtype(name))) { t->use_count++; if (strcmp(desc, t->description) != 0 || flags != t->flags ||...
false
false
false
false
false
0
slic_xmit_start(struct sk_buff *skb, struct net_device *dev) { struct sliccard *card; struct adapter *adapter = netdev_priv(dev); struct slic_hostcmd *hcmd = NULL; u32 status = 0; void *offloadcmd = NULL; card = adapter->card; if ((adapter->linkstate != LINK_UP) || (adapter->state != ADAPT_UP) || (card->st...
false
false
false
false
false
0
ins_char(c) int c; { #if defined(FEAT_MBYTE) || defined(PROTO) char_u buf[MB_MAXBYTES + 1]; int n; n = (*mb_char2bytes)(c, buf); /* When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte. * Happens for CTRL-Vu9900. */ if (buf[0] == 0) buf[0] = '\n'; ins_char_bytes(buf, ...
false
false
false
false
false
0
Transport_DSAP(TSS_HCONTEXT tspContext, /* in */ TPM_ENTITY_TYPE entityType, /* in */ TCS_KEY_HANDLE keyHandle, /* in */ TPM_NONCE *nonceOddDSAP, /* in */ UINT32 entityValueSize, /* in */ BYTE * entityValue, /* in */ TCS_AUTHHANDLE *authHandle, /* out */ TPM_N...
false
false
false
false
false
0
mi1_ext_read(struct net_device *dev, int phy_addr, int mmd_addr, u16 reg_addr) { struct port_info *pi = netdev_priv(dev); struct adapter *adapter = pi->adapter; int ret; mutex_lock(&adapter->mdio_lock); ret = mi1_wr_addr(adapter, phy_addr, mmd_addr, reg_addr); if (!ret) { t3_write_reg(adapter, A_MI1_OP, V_M...
false
false
false
false
false
0
subreg_highpart_offset (enum machine_mode outermode, enum machine_mode innermode) { unsigned int offset = 0; int difference = (GET_MODE_SIZE (innermode) - GET_MODE_SIZE (outermode)); if (GET_MODE_SIZE (innermode) < GET_MODE_SIZE (outermode)) abort (); if (difference > 0) { if (! WORDS_BIG_ENDIAN...
false
false
false
false
false
0
array_get_size(PHP_VALUE_NODE *array) { if ( array->type != PHP_VAL_ARRAY ) { return 0; } PHP_ARRAY_TYPE *arr_ptr = (PHP_ARRAY_TYPE *)array->ptr_val; return arr_ptr->array.size(); }
false
false
false
false
false
0
dump(const unsigned char *payload, int len, int indent=0) { int i, off = 0; while (off < len) { for (int k=0; k<indent; k++) fprintf(stream, " "); fprintf(stream, "%04X ", off); for (i=0; i<16; i++) { if ((i+off) < len) fprintf(stream, "%02X ", payload[i+off]); else ...
false
false
false
false
false
0
gst_multi_fd_sink_client_queue_data (GstMultiFdSink * sink, GstTCPClient * client, gchar * data, gint len) { GstBuffer *buf; buf = gst_buffer_new (); GST_BUFFER_DATA (buf) = (guint8 *) data; GST_BUFFER_MALLOCDATA (buf) = (guint8 *) data; GST_BUFFER_SIZE (buf) = len; GST_LOG_OBJECT (sink, "[fd %5d] que...
false
false
false
false
false
0
getValueProperty (ExecState * /*exec*/, int token) const { switch (token) { default: dbgout("Scriptface::getValueProperty: Unknown property id %1", token); } return jsUndefined(); }
false
false
false
false
false
0
MSAGetGC(MSA *msa, char *tag) { int tagidx; if (msa->gc_idx == NULL) return NULL; if ((tagidx = GKIKeyIndex(msa->gc_idx, tag)) < 0) return NULL; return msa->gc[tagidx]; }
false
false
false
false
false
0
btrfslabel (const char *device, const char *label) { int r; CLEANUP_FREE char *err = NULL; r = command (NULL, &err, str_btrfs, "filesystem", "label", device, label, NULL); if (r == -1) { reply_with_error ("%s", err); return -1; } return 0; }
false
false
false
false
false
0
GetWindowFunctionAsString() { const char *result = ""; switch (this->WindowFunction) { case VTK_LANCZOS_WINDOW: result = "Lanczos"; case VTK_KAISER_WINDOW: result = "Kaiser"; case VTK_COSINE_WINDOW: result = "Cosine"; case VTK_HANN_WINDOW: result = "Hann"; case VTK_H...
false
false
false
false
false
0
soc_tplg_is_eof(struct soc_tplg *tplg) { const u8 *end = tplg->hdr_pos; if (end >= tplg->fw->data + tplg->fw->size) return 1; return 0; }
false
false
false
false
false
0
thread (StgClosure **p) { StgClosure *q0; StgPtr q; StgWord iptr; bdescr *bd; q0 = *p; q = (StgPtr)UNTAG_CLOSURE(q0); // It doesn't look like a closure at the moment, because the info // ptr is possibly threaded: // ASSERT(LOOKS_LIKE_CLOSURE_PTR(q)); if (HEAP_ALLOCED(q)...
false
false
false
false
false
0
__ecereMethod_Project_GetConfig(struct Project * this, char * configName) { struct ProjectConfig * result = (((void *)0)); if(configName && configName[0] && ((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)this->configurations + 24)))->count) { { struct __ecereNameSpace__ecere__com__Iterator cfg = { this->...
false
false
false
false
false
0
read_input_config(const char *config_name, fs_hash_table *config, const char *platform) { const char *path = fs_hash_table_lookup(g_input_config_paths, config_name); if (path == NULL) { fs_log("config file for %s was not found\n", config_name); return 0; } fs_log("read config for...
false
false
false
false
false
0
setActivePreset( const QModelIndex& index ) { if ( m_activePresetIndex ) delete m_activePresetIndex; m_activePresetIndex = new QPersistentModelIndex( index ); }
false
false
false
false
false
0
clearLessons() { for(int i=0; i<_setup.lessonNr; i++){ delete [] _setup.lessonTitle[i]; } delete [] _setup.lessonTitle; if(_config) delete _config; }
false
false
false
false
false
0
diff_cache(struct rev_info *revs, struct cache_entry **ac, int entries, const char **pathspec, int cached, int match_missing) { while (entries) { struct cache_entry *ce = *ac; int same = (entries > 1) && ce_same_name(ce, ac[1]); if (revs->diffopt.quiet && revs->diffopt.has_changes) br...
false
false
false
false
false
0
autohelperowl_attackpat149(int trans, int move, int color, int action) { int a, b, C; UNUSED(color); UNUSED(action); a = AFFINE_TRANSFORM(610, trans, move); b = AFFINE_TRANSFORM(682, trans, move); C = AFFINE_TRANSFORM(609, trans, move); return !ATTACK_MACRO(C) && (!somewhere(OTHER_COLOR(color), 0, 1, b...
false
false
false
false
false
0
compound() /* have just seen "{" */ { struct symstruct *locmark; store_t regmark; #ifdef FRAMEPOINTER offset_T framepmark; offset_T softspmark; #else /* softsp == sp here unless level == ARGLEVEL so mark is unnec */ /* this is also true if funcsaveregsize != 0 but the tests are too messy */ #en...
false
false
false
false
false
0
print_aff_c(__isl_take isl_printer *p, __isl_keep isl_aff *aff) { unsigned total; total = isl_local_space_dim(aff->ls, isl_dim_all); if (!isl_int_is_one(aff->v->el[0])) p = isl_printer_print_str(p, "("); p = print_ls_partial_affine_c(p, aff->ls, aff->v->el + 1, 1 + total); if (!isl_int_is_one(aff->v->el[0])) {...
false
false
false
false
false
0
gen_presence_absence_set (rtx def, int presence_p, int final_p) { decl_t decl; char **str_cpu_units; char ***str_patterns; int cpu_units_length; int length; int patterns_length; int i; str_cpu_units = get_str_vect ((char *) XSTR (def, 0), &cpu_units_length, ',', FALSE); if (str_cpu_units == NULL)...
false
false
false
false
false
0
e1000e_set_d3_lplu_state(struct e1000_hw *hw, bool active) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; u16 data; if (!(hw->phy.ops.read_reg)) goto out; ret_val = e1e_rphy(hw, IGP02E1000_PHY_POWER_MGMT, &data); if (ret_val) goto out; if (!active) { data &= ~IGP02E1000_PM_D3_LPLU...
false
false
false
false
false
0
printline(int i, int length) { int j; for (j=0; j<length; j++) { putchar(buffer[i+j]); } printf("\n"); }
false
false
false
false
false
0
NextRow(MatrixRowCol& mrc) { REPORT if (+(mrc.cw*StoreOnExit)) { REPORT this->RestoreRow(mrc); } mrc.rowcol++; if (mrc.rowcol<nrows_val) { REPORT this->GetRow(mrc); } else { REPORT mrc.cw -= StoreOnExit; } }
false
false
false
false
false
0
net_device_edit (NetObject *object) { const gchar *uuid; gchar *cmdline; GError *error = NULL; NetDevice *device = NET_DEVICE (object); NMConnection *connection; connection = net_device_get_find_connection (device); uuid = nm_connection_get_uuid (connection); ...
false
false
false
false
false
0
search_or_wait() { #define SQUARE1 9 #define SQUARE2 25 #define SQUARE3 49 #define DIMENSION 7 int curXLoc = next_x_loc(), curYLoc = next_y_loc(); short surrArray[SQUARE3]; int xShift, yShift, checkXLoc, checkYLoc, hasFree, i, shouldWait; short unitRecno; Unit *unitPtr; Location *locPtr; //----------------...
false
false
false
false
false
0
dacs_atexit(void (*func)(void *arg), void *arg) { Atexit_entry *e; if (dacs_atexit_callouts == NULL) dacs_atexit_callouts = dsvec_init(NULL, sizeof(Atexit_entry *)); e = ALLOC(Atexit_entry); e->func = func; e->arg = arg; dsvec_add_ptr(dacs_atexit_callouts, e); }
false
false
false
false
false
0
binheap_insert(struct binheap *bh, void *p) { unsigned u; assert(bh != NULL); assert(bh->magic == BINHEAP_MAGIC); assert(bh->length >= bh->next); if (bh->length == bh->next) binheap_addrow(bh); assert(bh->length > bh->next); u = bh->next++; A(bh, u) = p; binheap_update(bh, u); (void)binheap_trickleup(bh, u...
false
false
false
true
false
1
OnInit() { SetAppName(wxT("ChipW")); SetVendorName(wxT("Glarbex")); std::srand(std::time(NULL)); wxInitAllImageHandlers(); playtestmgr = new PlayTestManager; docmgr = new wxDocManager; new wxDocTemplate(docmgr, wxT("Level set"), wxT("*.ccl;*.dat"), wxT(""), wxT("ccl"), wxT("Level set"), wxT(...
false
false
false
false
false
0
parseName( char * VHDL_name ) { char *p; char *Found; p = (char *) mbkalloc (strlen (VHDL_name) + 1); strcpy (p, VHDL_name); Found = strchr (p, '('); if (Found != NULL) { Found[0] = ' '; Found = strchr (p, ')'); Found[0] = '\0'; } return (p); }
false
false
false
false
false
0
updateCheckerEnd(bool error) { Q_UNUSED(error); // TODO: improve this for FreeMedForms (delete only label and progressbar) delete statusBar(); }
false
false
false
false
false
0
cryptd_create_hash(struct crypto_template *tmpl, struct rtattr **tb, struct cryptd_queue *queue) { struct hashd_instance_ctx *ctx; struct ahash_instance *inst; struct shash_alg *salg; struct crypto_alg *alg; u32 type = 0; u32 mask = 0; int err; cryptd_check_internal(tb, &type, &mask); salg = shash_a...
false
false
false
false
false
0
SplitVecOp_CONCAT_VECTORS(SDNode *N) { DebugLoc DL = N->getDebugLoc(); // The input operands all must have the same type, and we know the result the // result type is valid. Convert this to a buildvector which extracts all the // input elements. // TODO: If the input elements are power-two vectors, we cou...
false
false
false
false
false
0
DisplayAliases() { if( alias_.size() == 0 )WriteOutput( wxT("No aliases are currently defined") ); std::map<wxString,wxString>::const_iterator end = alias_.end(); for( std::map<wxString,wxString>::const_iterator i=alias_.begin(); i!=end; ++i ) WriteOutput( wxString()<<wxT("ALIAS: ")<<(*i).first<<wxT(" -> ")<<...
false
false
false
false
false
0
OnMiddleButtonDown() { int forward=0; int X = this->Interactor->GetEventPosition()[0]; int Y = this->Interactor->GetEventPosition()[1]; // Okay, make sure that the pick is in the current renderer if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y)) { this->State = vtkLineWidget:...
false
false
false
false
false
0
l3ni1_call_proc(struct l3_process *pc, u_char pr, void *arg) { struct sk_buff *skb = arg; int id, ret; if ((id = l3ni1_get_channel_id(pc, skb)) >= 0) { if ((0 == id) || ((3 == id) && (0x10 == pc->para.moderate))) { if (pc->debug & L3_DEB_WARN) l3_debug(pc->st, "setup answer with wrong chid %x", id); pc-...
false
false
false
false
false
0
Contains(const char *charBytes, size_t len) const { PLATFORM_ASSERT(len <= 4); if (!startByteHasReprs[static_cast<unsigned char>(charBytes[0])]) return false; MapRepresentation::const_iterator it = mapReprs.find(KeyFromString(charBytes, len)); return it != mapReprs.end(); }
false
false
false
false
false
0
m_outlines(GtkWidget *, cchar *) { int outlines_dialog_event(zdialog* zd, cchar *event); void * outlines_thread(void *); cchar *title = ZTX("Add Image Outlines"); zfuncs::F1_help_topic = "outlines"; EFoutlines.funcname = "outlines"; EFoutlines.Farea = 2; ...
false
false
false
false
false
0
ath10k_pci_request_irq_msix(struct ath10k *ar) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); int ret, i; ret = request_irq(ar_pci->pdev->irq + MSI_ASSIGN_FW, ath10k_pci_msi_fw_handler, IRQF_SHARED, "ath10k_pci", ar); if (ret) { ath10k_warn(ar, "failed to request MSI-X fw irq %d: %d\n", ar_p...
false
false
false
false
false
0
excel_read_RK (BiffQuery *q, ExcelReadSheet *esheet) { XL_CHECK_CONDITION (q->length >= 6 + 4); excel_sheet_insert_val (esheet, q, biff_get_rk (q->data + 6)); }
false
false
false
false
false
0
populateRunning() { QString command = QString(".status storage=\"" + m_storage + "\" running"); if (mainWin->m_commandDebug) Pmsg1(000, "sending command : %s\n",command.toUtf8().data()); QStringList results; textEditRunning->clear(); if (m_console->dir_cmd(command, results)) { foreach (QStri...
false
false
false
false
false
0
rend_mid_introduce(or_circuit_t *circ, const uint8_t *request, size_t request_len) { or_circuit_t *intro_circ; char serviceid[REND_SERVICE_ID_LEN_BASE32+1]; char nak_body[1]; log_info(LD_REND, "Received an INTRODUCE1 request on circuit %d", circ->p_circ_id); if (circ->_base.pur...
true
true
false
false
false
1
get_light(gint num,gdouble v[]) { gint i; v[0] = v[1] = v[2] = 0; if(num<0 || num>2) return FALSE; switch(num) { case 0 : for(i=0;i<3;i++) v[i] = light0_position[i]; break; case 1 : for(i=0;i<3;i++) v[i] = light1_position[i]; break; case 2 : for(i=0;i<3;i++) v[i] = light2_p...
false
false
false
false
false
0
rt2500usb_beacondone(struct urb *urb) { struct queue_entry *entry = (struct queue_entry *)urb->context; struct queue_entry_priv_usb_bcn *bcn_priv = entry->priv_data; if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &entry->queue->rt2x00dev->flags)) return; /* * Check if this was the guardian beacon, * if that was ...
false
false
false
false
false
0
object_no_collides(void *other, void *newrect) { Model_object *o = (Model_object *)other; Rect otherrect; if (IS_DELETED(o)) return TRUE; new_rect_from_object_cur(&otherrect, o); return !rects_collide(&otherrect, (Rect *)newrect); }
false
false
false
false
false
0
send_psa_frame(t30_state_t *s) { if (test_ctrl_bit(s->far_dis_dtc_frame, 35) && s->tx_info.polled_sub_address[0]) { span_log(&s->logging, SPAN_LOG_FLOW, "Sending polled sub-address '%s'\n", s->tx_info.polled_sub_address); send_20digit_msg_frame(s, T30_PSA, s->tx_info.polled_sub_address); ...
false
false
false
false
false
0
pch_udc_dev_isr(struct pch_udc_dev *dev, u32 dev_intr) { int vbus; /* USB Reset Interrupt */ if (dev_intr & UDC_DEVINT_UR) { pch_udc_svc_ur_interrupt(dev); dev_dbg(&dev->pdev->dev, "USB_RESET\n"); } /* Enumeration Done Interrupt */ if (dev_intr & UDC_DEVINT_ENUM) { pch_udc_svc_enum_interrupt(dev); dev_db...
false
false
false
false
false
0
sys_getsockopt(struct tcb *tcp) { if (entering(tcp)) { tprintf("%ld, ", tcp->u_arg[0]); printxval(socketlayers, tcp->u_arg[1], "SOL_???"); tprintf (", "); switch (tcp->u_arg[1]) { case SOL_SOCKET: printxval(sockoptions, tcp->u_arg[2], "SO_???"); break; #ifdef SOL_IP case SOL_IP: printxval(sockipop...
false
false
false
false
false
0
create_basic_memory_bitmaps(void) { struct memory_bitmap *bm1, *bm2; int error = 0; if (forbidden_pages_map && free_pages_map) return 0; else BUG_ON(forbidden_pages_map || free_pages_map); bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL); if (!bm1) return -ENOMEM; error = memory_bm_create(bm1, GF...
false
false
false
false
false
0
invIntegOverP(const double r, const IdList & , unsigned int PDFfactor) const { switch(PDFfactor) { case 0: return r/colourFactor(); case 1: return exp(r/colourFactor()); case 2: return 1.-exp(-r/colourFactor()); case 3: return 1./(1.+exp(-r/colourFactor())); default: throw Exc...
false
false
false
false
false
0
build_addr_func (tree function) { tree type = TREE_TYPE (function); /* We have to do these by hand to avoid real pointer to member functions. */ if (TREE_CODE (type) == METHOD_TYPE) { if (TREE_CODE (function) == OFFSET_REF) { tree object = build_address (TREE_OPERAND (function, 0)); return...
false
false
false
false
true
1
yajl_alloc(const yajl_callbacks * callbacks, const yajl_parser_config * config, const yajl_alloc_funcs * afs, void * ctx) { unsigned int allowComments = 0; unsigned int validateUTF8 = 0; yajl_handle hand = NULL; yajl_alloc_funcs afsBuffer; /* first order of busi...
false
false
false
false
false
0
opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color) { opj_jp2_cdef_info_t *info; OPJ_UINT16 i, n, cn, asoc, acn; info = color->jp2_cdef->info; n = color->jp2_cdef->n; for(i = 0; i < n; ++i) { /* WATCH: acn = asoc - 1 ! */ if((asoc = info[i].asoc) == 0) continue; cn = info[i].cn; acn =...
false
true
false
false
false
1
adf_enable_sriov(struct adf_accel_dev *accel_dev) { struct pci_dev *pdev = accel_to_pci_dev(accel_dev); int totalvfs = pci_sriov_get_totalvfs(pdev); struct adf_hw_device_data *hw_data = accel_dev->hw_device; struct adf_bar *pmisc = &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; void __iomem *pmisc_add...
false
false
false
false
false
0