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
fprint_trail(FILE *fp, Trail t) { Trail t2; fprintf(fp, "Trail:"); t2 = t; while (t2 != NULL) { fprintf(fp, " <%d,%p>", t2->varnum, t2->context); t2 = t2->next; } fprintf(fp, ".\n"); }
false
false
false
false
false
0
getAtomicLoadArithTargetConstant(SelectionDAG *CurDAG, SDLoc dl, enum AtomicOpc &Op, MVT NVT, SDValue Val, const X86Subtarget *S...
false
false
false
false
false
0
message_list_list_search (message_list_list_ty *mllp, const char *msgctxt, const char *msgid) { message_ty *best_mp; int best_weight; /* 0: not found, 1: found without msgstr, 2: translated */ size_t j; best_mp = NULL; best_weight = 0; for (j = 0; j < mllp->nitems; ++j) { ...
false
false
false
false
false
0
ssh_string_burn(struct ssh_string_struct *s) { if (s == NULL) { return; } memset(s->data, 'X', ssh_string_len(s)); }
false
false
false
false
false
0
memGetMetaRefresh(memBuf_t *mp) { char *cp; static char *buf = NULL; char *bufptr; static size_t bufsize = 0; char *metaRefresh = NULL; if (!buf) { bufsize = 1024; buf = myMalloc(bufsize); } /* look for all "meta" tags until Refresh found */ while (!metaRefresh && (cp = memStr(mp, "<meta")) != NULL) { ...
false
false
false
false
false
0
solo_jpeg_config(struct solo_dev *solo_dev) { if (solo_dev->type == SOLO_DEV_6010) { solo_reg_write(solo_dev, SOLO_VE_JPEG_QP_TBL, (2 << 24) | (2 << 16) | (2 << 8) | 2); } else { solo_reg_write(solo_dev, SOLO_VE_JPEG_QP_TBL, (4 << 24) | (3 << 16) | (2 << 8) | 1); } spin_lock_init(&solo_dev-...
false
false
false
false
false
0
nal_reader_get_ue (NalReader * nr, guint32 * val) { guint i = 0; guint8 bit; guint32 value; if (G_UNLIKELY (!nal_reader_get_bits_uint8 (nr, &bit, 1))) { return FALSE; } while (bit == 0) { i++; if G_UNLIKELY ((!nal_reader_get_bits_uint8 (nr, &bit, 1))) return FALSE; } if (...
false
false
false
false
false
0
x86_64_function_called_by(ulong rip) { struct syment *sp; char buf[BUFSIZE], *p1; ulong value, offset; unsigned char byte; value = 0; sp = NULL; if (!readmem(rip, KVADDR, &byte, sizeof(unsigned char), "call byte", QUIET|RETURN_ON_ERROR)) return sp; if (byte != 0xe8) return sp;...
false
false
false
false
false
0
get_scrollbar_height (StScrollView *scroll, gfloat for_width) { StScrollViewPrivate *priv = scroll->priv; if (CLUTTER_ACTOR_IS_VISIBLE (priv->hscroll)) { gfloat min_size; clutter_actor_get_preferred_height (CLUTTER_ACTOR (priv->hscroll), for_width, ...
false
false
false
false
false
0
HexCharValue(char c) { if ('0' <= c && c <= '9') return c - '0'; if ('a' <= c && c <= 'f') return 10 + c - 'a'; ASSERT('A' <= c && c <= 'F'); return 10 + c - 'A'; }
false
false
false
false
false
0
addVSInvocations( Function* vsMain, const int groupOrder ) { FunctionInvocation* funcInvocation = NULL; int internalCounter = 0; funcInvocation = OGRE_NEW FunctionInvocation(SGX_FUNC_INSTANCED_VIEWPORTS_TRANSFORM, groupOrder, internalCounter++); funcInvocation->pushOperand(mVSInPosition, Operand::O...
false
false
false
false
false
0
main(int argc, char **argv) { SEL *sel1, *sel2, *sel3, *sel4; SELA *sela; PIX *pix, *pixd; PIXA *pixa; static char mainName[] = "flipselgen"; if (argc != 1) return ERROR_INT(" Syntax: flipselgen", mainName, 1); sela = selaCreate(0); sel1 = selCreateFromSt...
false
false
false
false
false
0
ddsche_write_ent_mf_taskq_ptr_inc_module(csbe_context *cx, Hmdf_context *hcx) { char name[64]; Func_table *fpt; fpt = search_func_table(hcx->hmdf->block->module->entry); ddsche_make_mf_taskq_ptr_inc_module_name(name, ...
true
true
false
false
false
1
fjes_hw_unregister_buff_addr(struct fjes_hw *hw, int dest_epid) { union fjes_device_command_req *req_buf = hw->hw_info.req_buf; union fjes_device_command_res *res_buf = hw->hw_info.res_buf; struct fjes_device_shared_info *share = hw->hw_info.share; enum fjes_dev_command_response_e ret; int timeout; int result; ...
false
false
false
false
false
0
text_object_bracket(Text *txt, size_t pos, char type) { char c, open, close; int opened = 1, closed = 1; Filerange r = text_range_empty(); switch (type) { case '(': case ')': open = '('; close = ')'; break; case '{': case '}': open = '{'; close = '}'; break; case '[': case ']': open = '['; close = ']'; ...
false
false
false
false
true
1
range_list_print_to_string(const lList *this_list, dstring *string, bool ignore_step, bool comma_as_separator, bool print_always_as_range) { DENTER(RANGE_LAYER, "range_list_print_to_string"); if (string != NULL) { if (this_list != NULL) { lListE...
false
false
false
false
false
0
sdio_reset(struct mmc_host *host) { int ret; u8 abort; /* SDIO Simplified Specification V2.0, 4.4 Reset for SDIO */ ret = mmc_io_rw_direct_host(host, 0, 0, SDIO_CCCR_ABORT, 0, &abort); if (ret) abort = 0x08; else abort |= 0x08; ret = mmc_io_rw_direct_host(host, 1, 0, SDIO_CCCR_ABORT, abort, NULL); return...
false
false
false
false
false
0
status_pass1_begin(Recog *recog, void *dummy) { if (!recog->jconf->decodeopt.realtime_flag) { VERMES("### Recognition: 1st pass (LR beam)\n"); } wst = 0; if (recog->jconf->decodeopt.segment) { /* short pause segmentation */ if (have_progout) { writelen = 0; } } }
false
false
false
false
false
0
cc_timedata_max_mag(struct cc_timedata *d, double min_time, double max_time) { int i; double max; int max_i = -1; int set = 0; if (d->num == 0) return -1; for (i = 0; i < d->num; i++) if (min_time <= d->data[i].time && d->data[i].time <= max_time) if (!set || fabs(d->data[i].value) > max) { max_i = i;...
false
false
false
false
false
0
try_to_fill_dive(struct dive *dive, const char *name, char *buf) { int len = strlen(name); start_match("dive", name, buf); if (MATCH(".date", divedate, &dive->when)) return; if (MATCH(".time", divetime, &dive->when)) return; if (MATCH(".datetime", divedatetime, &dive->when)) return; if (MATCH(".maxdepth", ...
false
false
false
false
false
0
ReleaseImages() { Lock(); m_uiImages = 0; if (image) image->Release(); image = 0; while (ovlist.size() > 0) { SDL_Overlay* o = (SDL_Overlay*) ovlist.back()->GetUserData(); // leave initially allocate if (o != m_ov) SDL_FreeYUVOverlay(o); ovlist.back()->Release(); ovlist.pop_back();...
false
false
false
false
false
0
test_refs_reflog_reflog__reading_the_reflog_from_a_reference_with_no_log_returns_an_empty_one(void) { git_reference *subtrees; git_reflog *reflog; git_buf subtrees_log_path = GIT_BUF_INIT; cl_git_pass(git_reference_lookup(&subtrees, g_repo, "refs/heads/subtrees")); git_buf_join_n(&subtrees_log_path, '/', 3, git_...
false
false
false
false
false
0
TRANS_affectation(bool dup) { static TRANS_STATEMENT statement[] = { //{ RS_NEW, TRANS_new }, { RS_OPEN, TRANS_open }, { RS_SHELL, TRANS_shell }, { RS_EXEC, TRANS_exec }, { RS_RAISE, TRANS_raise }, { RS_PIPE, TRANS_pipe }, { RS_LOCK, TRANS_lock }, { RS_MEMORY, TRANS_memory }, //{ RS_READ, TRANS_read ...
false
false
false
false
false
0
efi_file_read ( EFI_FILE_PROTOCOL *this, UINTN *len, VOID *data ) { struct efi_file *file = container_of ( this, struct efi_file, file ); size_t remaining; /* If this is the root directory, then construct a directory entry */ if ( ! file->image ) return efi_file_read_dir ( file, len, data ); /* Read from...
false
false
false
false
false
0
SetTxOffset(double Offset,CText *p) { int TempOffset = (int) ((Offset * 1e6) + .5); unsigned int AbsOffset; unsigned char NewOffsetBits; int Ret = 0; // Assume the best AbsOffset = TempOffset < 0 ? -TempOffset : TempOffset; do { if(TempOffset == -20000000) { // negative 20 Mhz offset ...
false
false
false
false
false
0
ima_set_cache_status(struct integrity_iint_cache *iint, int func, enum integrity_status status) { switch (func) { case MMAP_CHECK: iint->ima_mmap_status = status; break; case BPRM_CHECK: iint->ima_bprm_status = status; break; case MODULE_CHECK: iint->ima_module_status = status; break; case FIRMWAR...
false
false
false
false
false
0
p_gimp_curves_explicit (gint32 drawable_id, gint32 channel, gint32 num_bytes, gint8 *curve_points) { static char *l_procname = "gimp_curves_explicit"; GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedur...
false
false
false
false
false
0
__op_rep_exit(env) ENV *env; { DB_REP *db_rep; REP *rep; /* Check if locks have been globally turned off. */ if (F_ISSET(env->dbenv, DB_ENV_NOLOCKING)) return (0); db_rep = env->rep_handle; rep = db_rep->region; REP_SYSTEM_LOCK(env); /* If we have a reference, it better not already be 0. */ DB_ASSERT(env...
false
false
false
false
false
0
dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk, xlator_t *tovol, xlator_t *fromvol, loc_t *loc) { dht_local_t *local = NULL; dict_t *dict = NULL; int need_unref = 0; int ret = 0; local = frame->local; lo...
false
false
false
false
false
0
sec_pkcs12_decoder_create_cert(SEC_PKCS12DecoderContext *p12dcx, SECItem *derCert) { sec_PKCS12SafeBag *certBag; SECOidData *oid; SGNDigestInfo *digest; SECItem *keyId; SECStatus rv; if(!p12dcx || p12dcx->error || !derCert) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return NULL; }...
false
false
false
false
false
0
IsFinite(double n, const wxString &msg) const { if (!wxFinite(n)) { if (!msg.IsEmpty()) { wxPlotEvent event(wxEVT_PLOT_ERROR, GetId(), (wxPlotCtrl*)this); event.SetString(msg); (void)DoSendEvent( event ); } return false; } return true...
false
false
false
false
false
0
wt_status_prepare(struct wt_status *s) { unsigned char sha1[20]; const char *head; memset(s, 0, sizeof(*s)); head = resolve_ref("HEAD", sha1, 0, NULL); s->branch = head ? xstrdup(head) : NULL; s->reference = "HEAD"; s->fp = stdout; s->index_file = get_index_file(); }
false
false
false
false
false
0
OnTLPChanging( wxWindow* newTLP ) { if ( newTLP == m_tlp ) return; wxLongLong currentTime = ::wxGetLocalTimeMillis(); // // Parent changed so let's redetermine and re-hook the // correct top-level window. if ( m_tlp ) { m_tlp->Disconnect( wxEVT_CLOSE_WINDOW, ...
false
false
false
false
false
0
findTaggedAliasListsOffset(const char *alias, const char *standard, UErrorCode *pErrorCode) { uint32_t idx; uint32_t listOffset; uint32_t convNum; UErrorCode myErr = U_ZERO_ERROR; uint32_t tagNum = getTagNumber(standard); /* Make a quick guess. Hopefully they used a TR22 canonical alias. */ ...
false
false
false
false
false
0
mega_support_cluster(adapter_t *adapter) { unsigned char raw_mbox[sizeof(struct mbox_out)]; mbox_t *mbox; mbox = (mbox_t *)raw_mbox; memset(mbox, 0, sizeof(raw_mbox)); memset((void *)adapter->mega_buffer, 0, MEGA_BUFFER_SIZE); mbox->m_out.xferaddr = (u32)adapter->buf_dma_handle; /* * Try to get the initia...
false
false
false
false
false
0
mbfl_mime_header_decode( mbfl_string *string, mbfl_string *result, enum mbfl_no_encoding outcode) { int n; unsigned char *p; struct mime_header_decoder_data *pd; mbfl_string_init(result); result->no_language = string->no_language; result->no_encoding = outcode; pd = mime_header_decoder_new(outcode)...
false
false
false
false
false
0
plugin_init (GstPlugin * plugin) { if (!gst_element_register (plugin, "ximagesink", GST_RANK_SECONDARY, GST_TYPE_XIMAGESINK)) return FALSE; GST_DEBUG_CATEGORY_INIT (gst_debug_ximagesink, "ximagesink", 0, "ximagesink element"); GST_DEBUG_CATEGORY_INIT (gst_debug_ximagepool, "ximagepool", 0, ...
false
false
false
false
false
0
findNodes(dtPolyRef id, dtNode** nodes, const int maxNodes) { int n = 0; unsigned int bucket = dtHashRef(id) & (m_hashSize-1); dtNodeIndex i = m_first[bucket]; while (i != DT_NULL_IDX) { if (m_nodes[i].id == id) { if (n >= maxNodes) return n; nodes[n++] = &m_nodes[i]; } i = m_next[i]; } return...
false
false
false
false
false
0
tryToSwap(diag_iter& it, diag_iter& itadd) { itadd = it; --itadd; lapack_int n = getDim(); lapack_int ifst = (*it).getIndex() + 1; lapack_int ilst = (*itadd).getIndex() + 1; double* work = new double[n]; lapack_int info; dtrexc("V", &n, getT().base(), &n, getQ().base(), &n, &ifst, &ilst, work, &info); d...
false
false
false
false
false
0
rinkj_epson_set_common (RinkjEscp *z) { int status = 0; if (z->printer_weave >= 0) /* set microweave */ status = rinkj_byte_stream_printf (z->out, "\033(i\001%c%c", 0, z->printer_weave); if (status == 0 && z->unidir >= 0) /* set unidirectional */ status = r...
false
false
false
false
false
0
generateFile(Address *from, Address *to) { if (analy->active) return OUTPUT_GENERATE_ERR_ANALYSER_NOT_FINISHED; if (!from->isValid() || !to->isValid()) return OUTPUT_GENERATE_ERR_INVAL; Stream *out = getGenerateStream(); if (!out) return OUTPUT_GENERATE_ERR_INVAL; header(); int line = 0; int len = 0; while (fro...
false
false
false
false
false
0
special_get_rate(struct snd_bebob *bebob, unsigned int *rate) { int err, trials; trials = 0; do { err = avc_general_get_sig_fmt(bebob->unit, rate, AVC_GENERAL_PLUG_DIR_IN, 0); } while (err == -EAGAIN && ++trials < 3); return err; }
false
false
false
false
false
0
whoisStart(FwdState * fwd) { WhoisState *p; int fd = fwd->server_fd; char *buf; size_t l; CBDATA_INIT_TYPE(WhoisState); p = cbdataAlloc(WhoisState); p->request = fwd->request; p->entry = fwd->entry; p->fwd = fwd; storeLockObject(p->entry); comm_add_close_handler(fd, whoisClos...
false
false
false
false
false
0
evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl) { u32 a; char buf[32]; EVUTIL_ASSERT(in || inaddr_name); EVUTIL_ASSERT(!(in && inaddr_name)); if (in) { a = ntohl(in->s_addr); evutil_snprintf(buf, sizeof(buf), "%d.%...
true
true
false
false
false
1
new_shape_file ( bool single // Not a FLEX file. ) { GtkFileSelection *fsel = Create_file_selection( single ? "Write new .shp file" : "Write new .vga file", (File_sel_okay_fun) create_shape_file, (gpointer) single); // This doesn't work very well in GTK 1.2. Try again later. // gtk_file_selection_co...
false
false
false
false
false
0
bdf_grid_invert_pixel(bdf_glyph_grid_t *grid, short x, short y, int val) #else bdf_grid_invert_pixel(grid, x, y, val) bdf_glyph_grid_t *grid; short x, y; int val; #endif { short bpr, di; unsigned char *masks; if (grid == 0 || x < 0 || x >= grid->grid_width || y < 0 || y >= grid->grid_height) ...
false
false
false
true
false
1
setString(const char* string) { ASSERT(this); if (DXValue::IsValidValue(string, (Type)DXType::StringType)) { this->clear(); this->type.setType(DXType::StringType); this->string = DuplicateString(string); return TRUE; } else { return FALSE; } }
false
false
false
false
false
0
dglEdgeGet_Attr(dglGraph_s * pGraph, dglInt32_t * pnEdge) { pGraph->iErrno = 0; if (pnEdge) { switch (pGraph->Version) { case 1: return DGL_EDGE_ATTR_PTR_v1(pnEdge); #ifdef DGL_V2 case 2: case 3: return DGL_EDGE_ATTR_PTR_v2(pnEdge); #endif } pGraph->iErrno = DGL_ERR_BadVersion; return NULL; ...
false
false
false
false
false
0
bogosort(void *base, size_t nmemb, size_t size, int (*cmp)(const void*, const void*), unsigned int seed) { well rng; well_init(&rng, seed); size_t attempts = 0; while (!sorted(base, nmemb, size, cmp)) { ++attempts; knuth_shuffle(base, nmemb, size, &rng); } return attempts; }
false
false
false
false
false
0
get_obj_action (string objname, string actname, string &rv) const { //string backup_object = this_object; //this_object = objname; cerr << "get_obj_action (" << objname << ", " << actname << ")\n"; string tok; uint c1, c2; for (uint i = state.props.size() - 1; i + 1 > 0; i --) if (state.props[i]...
false
false
false
false
false
0
get_long_variable_value(const char *key, SERVER_REC *server, void *item, int *free_ret) { EXPANDO_FUNC func; const char *ret; SETTINGS_REC *rec; *free_ret = FALSE; /* expando? */ func = expando_find_long(key); if (func != NULL) { current_expando = key; return func(server, item, free_ret); ...
false
false
false
false
false
0
ath6kl_dump_registers(struct ath6kl_device *dev, struct ath6kl_irq_proc_registers *irq_proc_reg, struct ath6kl_irq_enable_reg *irq_enable_reg) { ath6kl_dbg(ATH6KL_DBG_IRQ, ("<------- Register Table -------->\n")); if (irq_proc_reg != NULL) { ath6kl_dbg(ATH6KL_DBG_IRQ, "Host Int status: ...
false
false
false
false
false
0
hrtimers_init(void) { hrtimer_cpu_notify(&hrtimers_nb, (unsigned long)CPU_UP_PREPARE, (void *)(long)smp_processor_id()); register_cpu_notifier(&hrtimers_nb); }
false
false
false
false
false
0
ps_unicodes_char_next( PS_Unicodes table, FT_UInt32 *unicode ) { FT_UInt result = 0; FT_UInt32 char_code = *unicode + 1; { FT_UInt min = 0; FT_UInt max = table->num_maps; FT_UInt mid; PS_UniMap* map; FT_UInt32 base_glyph; ...
false
false
false
false
false
0
ss_disabled_slot(int slot_num, bool ship_selection) { int status; if ( Wss_num_wings <= 0 ){ return 0; } Assert( Ss_wings != NULL ); // HACK HACK HACK - call the team select function in multiplayer if(Game_mode & GM_MULTIPLAYER) { return multi_ts_disabled_slot(slot_num); } status = Ss_wings[slot_num/M...
false
false
false
false
false
0
mono_array_new_4 (MonoMethod *cm, guint32 length1, guint32 length2, guint32 length3, guint32 length4) { MonoDomain *domain = mono_domain_get (); uintptr_t lengths [4]; intptr_t *lower_bounds; int pcount; int rank; MONO_ARCH_SAVE_REGS; pcount = mono_method_signature (cm)->param_count; rank = cm->klass->rank; ...
false
false
false
false
false
0
GameOver() { Refresh(); SpeedTimer.Stop(); LeftRightTimer.Stop(); DownTimer.Stop(); UpTimer.Stop(); SetPause(true); wxMessageBox(_("Game over")); }
false
false
false
false
false
0
gst_inter_audio_sink_stop (GstBaseSink * sink) { GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink); GST_DEBUG ("stop"); g_mutex_lock (&interaudiosink->surface->mutex); gst_adapter_clear (interaudiosink->surface->audio_adapter); g_mutex_unlock (&interaudiosink->surface->mutex); gst_inter_sur...
false
false
false
false
false
0
sp_compile(THD *thd, String *defstr, ulong sql_mode, Stored_program_creation_ctx *creation_ctx) { sp_head *sp; ulong old_sql_mode= thd->variables.sql_mode; ha_rows old_select_limit= thd->variables.select_limit; sp_rcontext *old_spcont= thd->spcont; Silence_deprecated_warning warning...
false
false
false
true
false
1
vm_get_game_type_for_file(const char *filename) { osfildef *fp; char buf[16]; int ret; /* try opening the filename exactly as given */ fp = osfoprb(filename, OSFTBIN); /* if the file doesn't exist, tell the caller */ if (fp == 0) return VM_GGT_NOT_FOUND; /* re...
false
false
false
false
false
0
AcpiUtDisplayPredefinedMethod ( char *Buffer, const ACPI_PREDEFINED_INFO *ThisName, BOOLEAN MultiLine) { UINT32 ArgCount; /* * Get the argument count and the string buffer * containing all argument types */ ArgCount...
false
false
false
false
false
0
accepted_callback(void* arg,globus_ftp_control_handle_t *handle,globus_object_t *error) { GridFTP_Commands *it = (GridFTP_Commands*)arg; if(error != GLOBUS_SUCCESS) { logger.msg(Arc::ERROR, "Accept failed: %s", Arc::globus_object_to_string(error)); delete it; return; }; int remote_host[16] = { 0, 0,...
false
false
false
false
false
0
tcm_loop_queue_status(struct se_cmd *se_cmd) { struct tcm_loop_cmd *tl_cmd = container_of(se_cmd, struct tcm_loop_cmd, tl_se_cmd); struct scsi_cmnd *sc = tl_cmd->sc; pr_debug("tcm_loop_queue_status() called for scsi_cmnd: %p" " cdb: 0x%02x\n", sc, sc->cmnd[0]); if (se_cmd->sense_buffer && ((se_cmd->se_...
false
false
false
false
false
0
RECGetFieldDefinition( FILE *fp, char *pszFieldname, int *pnType, int *pnWidth, int *pnPrecision ) { const char *pszLine = CPLReadLine( fp ); int nTypeCode; OGRFieldType eFType = OFTString; if( pszLine == NULL ) return FALSE; if( strlen(pszLine) < 44 ) ...
false
false
false
false
false
0
L12__GET_VALUE_TYPE__collectfn() {register object *base=vs_base; register object *sup=base+VM12; VC12 vs_check; bds_check; {object V67; V67=(base[0]); vs_top=sup; goto TTL; TTL:; {register object x= (V67),V68= (((object)VV[21])->s.s_dbind); while(V68!=Cnil) if(x==(V68->c.c_car)){ goto T184; }else V68=V68->c...
false
false
false
false
false
0
reload_combine_purge_reg_uses_after_ruid (unsigned regno, int ruid) { int j, k, idx = reg_state[regno].use_index; if (idx < 0) return; j = k = RELOAD_COMBINE_MAX_USES; while (j-- > idx) { if (reg_state[regno].reg_use[j].ruid >= ruid) { k--; if (k != j) reg_state[regno].reg_use[k] = reg...
false
false
false
false
false
0
set_max_length(int length) { if (length < 0) return; max_length = length; if (max_length != 0 && (int)text.length() > max_length) { // do NOT undo in this case! text.erase(max_length, text.length()); if (cursor_position > (int)text.length()) cursor_position = text.length(); } }
false
false
false
false
false
0
GdipCreateHBITMAPFromBitmap (GpBitmap* bitmap, HBITMAP *hbmReturn, ARGB background) { /* * Note: the handle must survive disposing the bitmap. This means that there's no interoperable way to free this memory. * For libgdiplus you must use GdipDisposeImage on the handle, while on Windows you should call the Delete...
false
false
false
false
false
0
mono_class_has_finalizer (MonoClass *klass) { if (!klass->has_finalize_inited) { MonoClass *class = klass; mono_loader_lock (); /* Interfaces and valuetypes are not supposed to have finalizers */ if (!(MONO_CLASS_IS_INTERFACE (class) || class->valuetype)) { MonoMethod *cmethod = NULL; if (class->paren...
false
false
false
false
false
0
variable_diffusion (GfsDomain * domain, GfsSourceDiffusion * d, GfsAdvectionParams * par, GfsVariable * rhs, GfsFunction * alpha) { GfsVariable * rhoc, * axi; rhoc = gfs_temporary_variable (domain); axi = GFS_IS_AXI (domain) && par->v->component == FTT_Y ? gfs_temporary_variable (domain) : NULL; ...
false
false
false
false
false
0
iwl_mvm_tdls_sta_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta) { unsigned long used_hw_queues; struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); unsigned int wdg_timeout = iwl_mvm_get_wd_timeout(mvm, NULL, true, false); u32 ac; lockdep_assert_held(&mvm->mutex); used_hw_queues = iwl_mvm_...
false
false
false
false
false
0
static_cells_move (gamgi_atom *atom, int *old, int *new, gamgi_rcp *rcp) { gamgi_slist **cells; gamgi_slist *slist, *before; int index; /******************************************** * check if old, new cells are the same * * * * unlist from old cell, list into new cell *...
false
false
false
true
false
1
wasp_tcp_connect( wasp_value host, wasp_value service ){ int result; struct addrinfo hints; struct addrinfo* addr; char* service_str; wasp_string host_str; if( wasp_is_integer( host ) ){ wasp_quad addr = wasp_integer_fv( host ); host_str = wasp_formatf( "isisisi", ...
false
false
false
true
false
1
bnx2_setup_phy(struct bnx2 *bp) { if (bp->loopback == MAC_LOOPBACK) return 0; if (bp->phy_flags & PHY_SERDES_FLAG) { return (bnx2_setup_serdes_phy(bp)); } else { return (bnx2_setup_copper_phy(bp)); } }
false
false
false
false
false
0
logout(mail::callback &callback) { disconnect(""); callback.success("Ok."); }
false
false
false
false
false
0
hexasciitofloat(float& fval, const char * ascii) { // Convert all ASCII numbers to their numerical representations char asciinums[8]; for(unsigned int i=0; i<8; ++i) { if(!hexasciitoint(asciinums[i], ascii[i])) { ...
false
false
false
false
false
0
dcache_readdir(struct file *file, struct dir_context *ctx) { struct dentry *dentry = file->f_path.dentry; struct dentry *cursor = file->private_data; struct list_head *p, *q = &cursor->d_child; if (!dir_emit_dots(file, ctx)) return 0; spin_lock(&dentry->d_lock); if (ctx->pos == 2) list_move(q, &dentry->d_sub...
false
false
false
false
false
0
map_update_unknown_key (GHashTable *map, GrlKeyID key, GrlSource *source) { GList *unsolvable_keys = NULL; GList *each_unsolvable_key; GList *each_key; GList *map_nodes; GList *delete_nodes = NULL; GList *each_node; GList *keylist; MapNode *node; map_nodes = g_hash_table_lookup (map, GRLKEYID_TO_POIN...
false
false
false
false
false
0
lkkbd_toggle_leds(struct lkkbd *lk) { struct serio *serio = lk->serio; unsigned char leds_on = 0; unsigned char leds_off = 0; CHECK_LED(lk, leds_on, leds_off, LED_CAPSL, LK_LED_SHIFTLOCK); CHECK_LED(lk, leds_on, leds_off, LED_COMPOSE, LK_LED_COMPOSE); CHECK_LED(lk, leds_on, leds_off, LED_SCROLLL, LK_LED_SCROLLLO...
false
false
false
false
false
0
crypt_dump(struct crypt_device *cd) { int i; if (!isLUKS(cd->type)) { //FIXME log_err(cd, _("This operation is supported only for LUKS device.\n")); return -EINVAL; } log_std(cd, "LUKS header information for %s\n\n", cd->device); log_std(cd, "Version: \t%d\n", cd->hdr.version); log_std(cd, "Cipher name...
false
false
false
false
false
0
reset_server_counts(void) { const char * fcn_name = "reset_server_counts()"; hbool_t success = TRUE; /* will set to FALSE if appropriate. */ struct mssg_t mssg; if ( success ) { /* compose the message */ mssg.req = REQ_RW_COUNT_RESET_CODE; mssg.src = world_mpi_rank;...
false
false
false
false
false
0
gt_bitinstream_reinit(GtBitInStream *bitstream, size_t offset) { size_t mapsize = (size_t) (bitstream->pagesize * bitstream->pages_to_map); gt_assert(offset < bitstream->filesize); gt_assert((offset % bitstream->pagesize) == 0); bitstream->cur_filepos = offset; gt_fa_xmunmap(bits...
false
false
false
false
false
0
read_image_block (pixma_t * s, uint8_t * data) { int count, temp; count = pixma_read (s->io, data, IMAGE_BLOCK_SIZE); if (count < 0) return count; if (count == IMAGE_BLOCK_SIZE) { int error = pixma_read (s->io, &temp, 0); if (error < 0) { PDBG (pixma_dbg (1, "WAR...
false
false
false
false
false
0
GetValue(Expression* expression) { ASSERT(IsCompileTimeValue(expression)); Handle<FixedArray> result = FACTORY->NewFixedArray(2, TENURED); ObjectLiteral* object_literal = expression->AsObjectLiteral(); if (object_literal != NULL) { ASSERT(object_literal->is_simple()); if (object_literal->fast_elements()...
false
false
false
false
false
0
panel_launcher_get_uri (const char *location) { char *path; char *uri; if (!g_ascii_strncasecmp (location, "file:", strlen ("file:"))) return g_strdup (location); if (!g_path_is_absolute (location)) path = panel_make_full_path (NULL, location); else path = g_strdup (location); uri = g_filename_to_uri (pa...
false
false
false
false
false
0
infc_request_manager_dispose(GObject* object) { InfcRequestManager* request_manager; InfcRequestManagerPrivate* priv; request_manager = INFC_REQUEST_MANAGER(object); priv = INFC_REQUEST_MANAGER_PRIVATE(request_manager); g_hash_table_destroy(priv->requests); priv->requests = NULL; if(parent_class->dispo...
false
false
false
false
false
0
KilledUnit(Unit* /*pVictim*/) override { if (urand(0, 4)) { return; } DoScriptText(SAY_SLAY, m_creature); }
false
false
false
false
false
0
RemovePacketComponent(int in_id) { string str; if (component_id_map.find(in_id) != component_id_map.end()) { return -1; } str = component_id_map[in_id]; component_id_map.erase(component_id_map.find(in_id)); component_str_map.erase(component_str_map.find(str)); return 1; }
false
false
false
false
false
0
Java_com_sleepycat_db_internal_db_1javaJNI_Db_1exists(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jobject jarg3, jint jarg4) { jint jresult = 0 ; struct Db *arg1 = (struct Db *) 0 ; DB_TXN *arg2 = (DB_TXN *) 0 ; DBT *arg3 = (DBT *) 0 ; u_int32_t arg4 ; DBT_LOCKED ldb...
false
false
false
false
false
0
read() { while (!at_eof()) { auto NumHeadSamples = readNumber<uint64_t>(); if (std::error_code EC = NumHeadSamples.getError()) return EC; auto FName(readStringFromTable()); if (std::error_code EC = FName.getError()) return EC; Profiles[*FName] = FunctionSamples(); FunctionSamples...
false
false
false
false
false
0
shutdown(void) { int i; if (styledata != NULL) { delete styledata; styledata = (JML_CHAR*)NULL; } for(i=0;i<num_possible_styles;i++) { free((void *)possible_styles[i]); } free((void *)possible_styles); }
false
false
false
false
false
0
atl2_read_mac_addr(struct atl2_hw *hw) { if (get_permanent_address(hw)) { /* for test */ /* FIXME: shouldn't we use eth_random_addr() here? */ hw->perm_mac_addr[0] = 0x00; hw->perm_mac_addr[1] = 0x13; hw->perm_mac_addr[2] = 0x74; hw->perm_mac_addr[3] = 0x00; hw->perm_mac_addr[4] = 0x5c; hw->perm_mac_ad...
false
false
false
false
false
0
set_margins() { u16 t, b; t = param[0]; if (t < 1) t = 1; b = param[1]; if (b < 1 || b > height) b = height; if (pending_scroll) update(); scroll_top = t - 1; scroll_bot = b - 1; if (cursor_y < scroll_top) move_cursor(cursor_x, scroll_top); if (cursor_y > scroll_bot) move_cursor(cursor_x, scroll_bot); }
false
false
false
false
false
0
isFontMono() const { if(font){ #if defined(WIN32) ///// WIN32 ///// return !(((TEXTMETRIC*)font)->tmPitchAndFamily&TMPF_FIXED_PITCH); #elif defined(HAVE_XFT_H) ///// XFT ///// XGlyphInfo i_extents,m_extents; XftTextExtents8(DISPLAY(getApp()),(XftFont*)font,(const FcChar8*)"i",1,&i_exten...
false
false
false
false
false
0
msg_err(fig, head) lofig_list *fig; chain_list *head; { locon_list *ptcon = NULL; losig_list *ptsig; chain_list *scan,*slf; ptype_list *ptl; for( scan = head; scan; scan = scan->NEXT ) { ptcon = NULL; ptsig = (losig_list*)(scan->DATA); ptl = getptype( ptsig->USER, LOFIGCHAIN ); for( slf = (chain_list*)...
false
false
false
false
false
0
GetLength() const { unsigned int len; switch(VMField) { case VM::VM1: len = VMToLength<VM::VM1>::Length; break; case VM::VM2: len = VMToLength<VM::VM2>::Length; break; case VM::VM3: len = VMToLength<VM::VM3>::Length; break; case VM::VM4: len = VMToLength<VM::VM4>::Length; ...
false
false
false
false
false
0
fc_seq_ls_rjt(struct fc_frame *rx_fp, enum fc_els_rjt_reason reason, enum fc_els_rjt_explan explan) { struct fc_lport *lport; struct fc_els_ls_rjt *rjt; struct fc_frame *fp; lport = fr_dev(rx_fp); fp = fc_frame_alloc(lport, sizeof(*rjt)); if (!fp) return; rjt = fc_frame_payload_get(fp, sizeof(*rjt)); me...
false
false
false
false
false
0
SetOrigLSAcceptor (const BacktrackingLSAcceptor& orig_ls_acceptor) { orig_filter_ls_acceptor_ = dynamic_cast<const FilterLSAcceptor*>(&orig_ls_acceptor); DBG_ASSERT(orig_filter_ls_acceptor_); }
false
false
false
false
false
0
gdef_read_control_block(GDEFControlBlock *block, const guchar **p, gsize size, GError **error) { if (size < CONTROL_BLOCK_SIZE) { g_set_error(error, GWY_MODULE_FILE_ERROR, GWY_MODULE_FILE_ERROR_DATA, _("Control block...
false
false
false
false
false
0
grl_bookmarks_source_search (GrlSource *source, GrlSourceSearchSpec *ss) { GRL_DEBUG ("grl_bookmarks_source_search"); GrlBookmarksSource *bookmarks_source; OperationSpec *os; GError *error = NULL; bookmarks_source = GRL_BOOKMARKS_SOURCE (source); if (!bookmarks_source->priv->d...
false
false
false
false
false
0