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
calculateResult( int maxIterations, int count, double final, double exponent ) { if ( count == 0 ) return 0.0; double value = ( maxIterations - count ) + ( BailoutLog - log( log( sqrt( final ) ) ) ) / log( exponent ); return sqrt( value ); }
false
false
false
false
false
0
VP8TBufferClear(VP8TBuffer* const b) { if (b != NULL) { VP8Tokens* p = b->pages_; while (p != NULL) { VP8Tokens* const next = p->next_; WebPSafeFree(p); p = next; } VP8TBufferInit(b, b->page_size_); } }
false
false
false
false
false
0
splotAssignPointsToBins (GGobiData * d, splotd * sp, ggobid * gg) { if (sp == gg->current_splot) assign_points_to_bins (d, sp, gg); }
false
false
false
false
false
0
Addressing_Print(short Size, char Mode, char Register, char *Str) { unsigned long Result=0; short Scale; struct _InstructionExtensionWord *EWordPtr = (void *)&Result; switch(Mode) { case 0: /* Dy */ sprintf(Str, "D%d", Register); break; case 1: /* Ay */ sprintf(Str, "A%d", Register); break; case 2: /* (...
false
true
false
false
false
1
stmmac_set_bfsize(int mtu, int bufsize) { int ret = bufsize; if (mtu >= BUF_SIZE_4KiB) ret = BUF_SIZE_8KiB; else if (mtu >= BUF_SIZE_2KiB) ret = BUF_SIZE_4KiB; else if (mtu > DEFAULT_BUFSIZE) ret = BUF_SIZE_2KiB; else ret = DEFAULT_BUFSIZE; return ret; }
false
false
false
false
false
0
interrupted (int sig) { exit_sig = sig; if (exit_flag) { fprintf(stderr, "extra[%d] signal: %d\n", exit_flag, sig); exit_flag++; if (use_threads) { usleep2(250 * 1000); } else if (exit_flag <= 2) { return; } if (rm_flagfile) { unlink(rm_flagfile); rm_flagfile = NULL; } exit(4); } exit_fl...
false
false
false
false
false
0
mergelines_node (struct merge_node *restrict node, size_t total_lines, FILE *tfp, char const *temp_output) { struct line *lo_orig = node->lo; struct line *hi_orig = node->hi; size_t to_merge = MAX_MERGE (total_lines, node->level); size_t merged_lo; size_t merged_hi; if (node->level > MERGE...
false
false
false
false
false
0
vect_strided_load_supported (tree vectype, unsigned HOST_WIDE_INT count) { enum machine_mode mode = TYPE_MODE (vectype); /* vect_permute_load_chain requires the group size to be a power of two. */ if (exact_log2 (count) == -1) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "the size...
false
false
false
false
false
0
layer_from_name(gint32 image_ID, gchar * name) { gint i; gint num_layers; gint * layer_list; if ((name == NULL) || (strncmp(name, "", VALS_MAX_NAME_LENGTH) == 0)) { return 0; } layer_list = gimp_image_get_layers(image_ID, &num_layers); for (i = 0; i < num_layers; i++) { if (strncmp(name,...
false
false
false
false
false
0
screen_glyph(struct vc_data *vc, int offset) { u16 w = scr_readw(screenpos(vc, offset, 1)); u16 c = w & 0xff; if (w & vc->vc_hi_font_mask) c |= 0x100; return c; }
false
false
false
false
false
0
__padata_set_cpumasks(struct padata_instance *pinst, cpumask_var_t pcpumask, cpumask_var_t cbcpumask) { int valid; struct parallel_data *pd; valid = padata_validate_cpumask(pinst, pcpumask); if (!valid) { __padata_stop(pinst); goto out_replace; } valid = padata_validate_cpumask(pinst, cbcpumask); ...
false
false
false
false
false
0
lha_pm2_decoder_read(void *data, uint8_t *buf) { LHAPM2Decoder *decoder = data; size_t result; int code; // On first pass through, build initial lookup trees. if (decoder->tree_state == PM2_REBUILD_UNBUILT) { // First bit in stream is discarded? read_bit(&decoder->bit_stream_reader); rebuild_tree(decoder...
false
false
false
false
false
0
_mesa_swizzle_ubyte_image(struct gl_context *ctx, GLuint dimensions, GLenum srcFormat, GLenum srcType, GLenum baseInternalFormat, const GLubyte *rgba2dst, GLuint dstComponents, GLint dstRowStride, GLubyte **dstSlices, GLint srcWidth, GLint srcHeight...
false
false
false
false
false
0
gen_valid (int gen) { /* is generator id valid? */ int i = 0; if (gen > Gen_MaxValid) return (FALSE); while (badgen[i] && badgen[i] != gen) i++; return (badgen[i] == 0); }
false
false
false
false
false
0
state_from_keymap(char keymap[32]) { static Boolean initted = False; static KeyCode kc_Shift_L, kc_Shift_R; static KeyCode kc_Meta_L, kc_Meta_R; static KeyCode kc_Alt_L, kc_Alt_R; int pseudo_state = 0; if (!initted) { kc_Shift_L = XKeysymToKeycode(display, XK_Shift_L); kc_Shift_R = XKeysymToKeycode(display, ...
true
true
false
false
false
1
currentDir() const { if( d->currentPath.isLocalFile() ) return d->currentPath.toLocalFile(); else return d->currentPath.url(); }
false
false
false
false
false
0
avgDiamondHeight(int i, int j, int stride){ if (i == 0){ return (this->terrain[this->side_size-1-stride][j] + this->terrain[i+stride][j] + this->terrain[i][j-stride] + this->terrain[i][j+stride]) / 4.0f; } else if (i == this->side_size-1){ return (this->...
false
false
false
false
false
0
fileattr_modify (char *list, const char *attrname, const char *attrval, int namevalsep, int entsep) { char *retval; char *rp; size_t attrname_len = strlen (attrname); /* Portion of list before the attribute to be replaced. */ char *pre; char *preend; /* Portion of list after the attribute ...
false
false
false
false
false
0
gel_add_alias (const char *func, const char *alias) { GelHelp *help, *ahelp; help = gel_get_help (func, TRUE /* insert */); if G_UNLIKELY (help->aliasfor != NULL) { gel_errorout (_("Trying to set an alias for an alias")); return; } ahelp = gel_get_help (alias, TRUE /* insert */); if (ahelp->aliasfor != NULL...
false
false
false
false
false
0
make_path(char *dirs, char *filename) { unsigned int size = 8; char *buffer = (char *) malloc (size), *last = strrchr(dirs, '/'), *format = NULL; if (last != 0 && strlen(last) == 1) format = "%s%s"; else format = "%s/%s"; while (1) { /* try to print in the allocated space. */ int nchars = snprin...
false
false
false
false
false
0
iconify(void) { if (mapped()==MSTrue) { _mapped=MSFalse; XIconifyWindow(display(),window(),DefaultScreen(display())); } }
false
false
false
false
false
0
detect (GeglOperation *operation, gint x, gint y) { GeglChant *self = GEGL_CHANT (operation); GeglNode *output = self->output; GeglRectangle bounds; bounds = gegl_node_get_bounding_box (output); /* hopefully this is as corre...
false
false
false
false
false
0
Read(int from_pos, char* dest_buf, int buf_size) { if (buf_size == 0) return 0; int read_pos = from_pos; int block_read_index = BlockIndex(from_pos); int block_read_pos = PosInBlock(from_pos); int dest_buf_pos = 0; // Read until dest_buf is filled, or write_pos_ encountered. while (read_pos < write_pos_ &...
false
false
false
false
false
0
char_default_alphabet_decode(unsigned char* dest, const unsigned char* src, int len) { int j, pos = 0; MBSTATE mbs; MBSTATE_DEC_CLEAR(mbs); for (j = 0; j < len; j++) { wchar_t wc; int length; if (char_is_escape(src[j])) { wc = char_def_alphabet_ext_decode(src[++j]); } else { wc = char_def_alphabet_...
false
false
false
false
false
0
soap_double2s(struct soap *soap, double n) { char *s; if (soap_isnan(n)) return "NaN"; if (soap_ispinfd(n)) return "INF"; if (soap_isninfd(n)) return "-INF"; s = soap->tmpbuf; #if defined(HAVE_SPRINTF_L) sprintf_l(s, soap->c_locale, soap->double_format, n); #else sprintf(s, soap->double_format, ...
false
false
false
false
false
0
_e_mod_menu_volume_cb(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__) { E_Volume *vol = data; Evas_Object *fm; m = _e_mod_menu_top_get(m); fm = e_object_data_get(E_OBJECT(m)); if (vol->mounted) { if (fm && ((fileman_config->vie...
true
true
false
false
false
1
gtktextbuffer_gtk_text_buffer_get_selection_bounds(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj buffer_scm; GtkTextBuffer* buffer; ScmObj start_scm; GtkTextIter* start; ScmObj end_scm; GtkTextIter* end; ScmObj SCM_SUBRARGS[3]; int SCM_i; SCM_ENTER_SUBR("gtk-text-buffer-get-selection-bounds");...
false
false
false
false
false
0
patBtyvs(p) /* Strip bound type vars from pat */ Cell p; { if (whatIs(p)==BIGLAM) { List bts = hd(btyvars) = fst(snd(p)); for (p=snd(snd(p)); nonNull(bts); bts=tl(bts)) { Int beta = newTyvars(1); tyvar(beta)->kind = snd(hd(bts)); snd(hd(bts)) = mkInt(beta); } } return p; }
false
false
false
false
false
0
encode_sigset(sigset_t * set) { value res = Val_int(0); int i; Begin_root(res) for (i = 1; i < NSIG; i++) if (sigismember(set, i) > 0) { value newcons = alloc_small(2, 0); Field(newcons, 0) = Val_int(caml_rev_convert_signal_number(i)); Field(newcons, 1) = res; res = newc...
false
false
false
false
false
0
AVI_read_data(avi_t *AVI, char *vidbuf, long max_vidbuf, char *audbuf, long max_audbuf, long *len) { /* * Return codes: * * 1 = video data read * 2 = audio data read * 0 = reached EOF * -1 = video buffer too small * -2 = audio buffer too s...
false
false
false
false
true
1
integrate_decl_tree (tree let, struct inline_remap *map) { tree t; tree new_block; tree *next; new_block = make_node (BLOCK); VARRAY_PUSH_TREE (map->block_map, new_block); next = &BLOCK_VARS (new_block); for (t = BLOCK_VARS (let); t; t = TREE_CHAIN (t)) { tree d; d = copy_decl_for_inlin...
false
false
false
false
false
0
mlx5_init_qp_table(struct mlx5_core_dev *dev) { struct mlx5_qp_table *table = &dev->priv.qp_table; memset(table, 0, sizeof(*table)); spin_lock_init(&table->lock); INIT_RADIX_TREE(&table->tree, GFP_ATOMIC); mlx5_qp_debugfs_init(dev); }
false
false
false
false
false
0
GetColumnTypeFromHandle( int tblHandle, int colHandle ) { if ( tblHandle < 0 || tblHandle >= this->GetNumberOfTables() ) { vtkErrorMacro( "Cannot get type of a column in non-existent table " << tblHandle ); return -1; } if ( colHandle < 0 || colHandle >= static_cast<int>( this->Internals->Tables[...
false
false
false
false
false
0
ModEndMsg(Program *p, char *bell, int len) { if (_dxd_exShowBells) { bell[0] = 'e'; bell[1] = 'n'; bell[2] = 'd'; bell[3] = ' '; bell[4] = ' '; _dxf_ExSPack(PACK_INTERRUPT, p->graphId, bell, len); } }
false
false
false
false
false
0
getXmlDescription(Rules& r){ Q_UNUSED(r); QString s="<ConstraintTeacherMaxBuildingChangesPerWeek>\n"; s+=" <Weight_Percentage>"+CustomFETString::number(weightPercentage)+"</Weight_Percentage>\n"; s+=" <Teacher>"+protect(this->teacherName)+"</Teacher>\n"; s+=" <Max_Building_Changes_Per_Week>"+CustomFETString::num...
false
false
false
false
false
0
init(const char * wordchars) { for (int i = 0; i < MAXPREVLINE; i++) { line[i][0] = '\0'; } actual = 0; head = 0; token = 0; state = 0; utf8 = 0; checkurl = 0; unsigned int j; for (j = 0; j < 256; j++) { wordcharacters[j] = 0; } if (!wordchars) wordchars = "qwertzuiopasdfghjklyxcvbn...
false
false
false
false
false
0
L41() {register object *base=vs_base; register object *sup=base+VM41; VC41 vs_check; {object V65; V65=(base[0]); vs_top=sup; goto TTL; TTL:; {object V66; object V67; register object V68; register object V69; if(!(type_of(V65)==t_symbol)){ goto T36;} V66= symbol_name((V65)); goto T34; goto T36; T36:; if(...
false
false
false
false
false
0
setSupportsBackwardsFind( bool supports ) { // ########## Shouldn't this hide the checkbox instead? if (supports) d->enabled |= KFind::FindBackwards; else d->enabled &= ~KFind::FindBackwards; d->findBackwards->setEnabled( supports ); d->findBackwards->setChecked( supports && (options() & KFind::Find...
false
false
false
false
false
0
debug_sched(const char *trigger) { char tmpfilename[256]; #ifndef _USING_FCGI_ FILE *fp; #else FCGI_FILE *fp; #endif if (!boinc_file_exists(config.project_path("%s", trigger))) { return; } sprintf(tmpfilename, "sched_reply_%06d_%06d", g_request->hostid, g_request->rpc_seqno ...
false
false
false
false
false
0
remote_ls(const char *path, int flags, void (*userFunc)(struct remote_ls_ctx *ls), void *userData) { char *url = xmalloc(strlen(repo->url) + strlen(path) + 1); struct active_request_slot *slot; struct slot_results results; struct strbuf in_buffer = STRBUF_INIT; struct buffer out_buffer = { STRBUF_I...
false
true
false
false
false
1
regsolver(planner *plnr, INT r, int dec) { S *slv = (S *)X(mksolver_ct)(sizeof(S), r, dec, mkcldw, 0); REGISTER_SOLVER(plnr, &(slv->super)); if (X(mksolver_ct_hook)) { slv = (S *)X(mksolver_ct_hook)(sizeof(S), r, dec, mkcldw, 0); REGISTER_SOLVER(plnr, &(slv->super)); } }
false
false
false
false
false
0
ListMethods(Tcl_Interp *interp, XOTclObject *obj, char *pattern, int noProcs, int noCmds, int noMixins, int inContext) { XOTclClasses *pl; if (obj->nsPtr) { Tcl_HashTable *cmdTable = Tcl_Namespace_cmdTable(obj->nsPtr); ListMethodKeys(interp, cmdTable, pattern, noProcs, noCmds, 0, 0, 0); } i...
false
false
false
false
false
0
nextfile(void) { if (infile != stdin) fclose(infile); infile = NULL; argno++; }
true
true
false
false
true
1
fz_unshare_stroke_state_with_len(fz_context *ctx, fz_stroke_state *shared, int len) { int single, unsize, shsize, shlen, drop; fz_stroke_state *unshared; fz_lock(ctx, FZ_LOCK_ALLOC); single = (shared->refs == 1); fz_unlock(ctx, FZ_LOCK_ALLOC); shlen = shared->dash_len - nelem(shared->dash_list); if (shlen < 0)...
false
true
false
false
false
1
match(char *regex, char *string) { char *rp = regex, *sp = string, ch, *save; while (*rp != '\0') { switch (ch = *rp++) { case '*': if ('\0' == *sp) /* match empty string at end of `string' */ return ('\0' == *rp); /* but only if we're done wit...
false
false
false
false
false
0
closeModelessDlgs() { // Delete all the open modeless dialogs for(UT_sint32 i=0; i <= NUM_MODELESSID; i++) { if(m_IdTable[i].id >= 0) { if(getModelessDialog(i) != static_cast<XAP_Dialog_Modeless *>(NULL)) { getModelessDialog(i)->destroy(); } m_IdTable[i].id = -1; m_IdTable[i].pDialog = NULL; ...
false
false
false
false
false
0
maildir_autoresponse_list_free(char **a) { unsigned i; for (i=0; a[i]; i++) free(a[i]); free(a); }
false
true
false
false
false
1
LeaveFrame(StackFrame::Type type) { if (emit_debug_code()) { Move(kScratchRegister, Smi::FromInt(type)); cmpq(Operand(rbp, StandardFrameConstants::kMarkerOffset), kScratchRegister); Check(equal, "stack frame types must match"); } movq(rsp, rbp); pop(rbp); }
false
false
false
false
false
0
extractMin() { fnode* old = heap; heap = removeMin(heap); Type ret = old->data; delete old; // cout <<"Extract out "<<ret->id<<endl; return ret->id; }
false
false
false
false
false
0
handleDirtyRings() { if(!initialized || gpg.isActive()) return; if(secdirty) gpg.doSecretKeys(); else if(pubdirty) gpg.doPublicKeys(); }
false
false
false
false
false
0
handleEvent(unsigned /*eventType*/) { if (_connectionState == READ_HEADER) if ( ! readHeader()) return 0; if (_connectionState == READ_REQUEST) if ( ! readRequest()) return 0; if (_connectionState == WRITE_RESPONSE) if ( ! writeResponse()) return 0; return (_connectionState == WRITE_RESPONSE) ...
false
false
false
false
false
0
parseMaterial(const YAML::Node& node) { Material *m = new Material(); if(const YAML::Node * texnode = node.FindValue("texture")){ std::string file; *texnode >> file; m->loadTexture(file); cout << "Texture: " << m->texture->width() << "x" << m->texture->height() << endl; }else{ node["color"...
false
false
false
false
false
0
it_init_hostnames (itp) ITEMLIST *itp; { STRINGLIST *sl; sl = strlist_create (0); sl->list = get_hostname_list (); sl->list_len = sl->list ? strvec_len (sl->list) : 0; sl->list_size = sl->list_len; itp->slist = sl; itp->flags |= LIST_DONTFREEMEMBERS|LIST_DONTFREE; return 0; }
false
false
false
false
false
0
formPrintHtmlOutput(Form::FormMain *formMain) { QString out; // If a print mask is available, create tokens for the form if (!formMain->spec()->value(Form::FormItemSpec::Spec_HtmlPrintMask).toString().isEmpty()) { out = formMain->spec()->value(Form::FormItemSpec::Spec_HtmlPrintMask).toString(); ...
false
false
false
false
false
0
stp_mxmlNewOpaque(stp_mxml_node_t *parent, /* I - Parent node or STP_MXML_NO_PARENT */ const char *opaque) /* I - Opaque string */ { stp_mxml_node_t *node; /* New node */ /* * Range check input... */ if (!parent || !opaque) return (NULL); /* * Create the node and set the element nam...
false
false
false
false
false
0
display( FLMUINT uiNumParams, const char ** ppszParams) { RCODE rc = FERR_OK; FLMUINT uiBlkAddress = 0; FLMUINT uiLowTransID = 0; FLMUINT uiHighTransID = 0; FFILE * pFile = NULL; FLMBOOL bFlaimLocked = FALSE; SCACHE LocalSCacheBlock; char * pucData = NULL; char * pucDataLine; char szData[97...
false
false
false
false
false
0
InstallFunction(Handle<JSObject> target, const char* name, InstanceType type, int instance_size, Handle<JSObject> prototype, ...
false
false
false
false
false
0
ensure_tail (GeglPathPrivate *priv) { GeglPathList *tail; tail = priv->tail ? priv->tail : priv->path; while (tail && tail->next) tail=tail->next; priv->tail = tail; return tail; }
false
false
false
false
false
0
alloc_segment(CELL size) { int pagesize = getpagesize(); char *array = mmap(NULL,pagesize + size + pagesize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE,-1,0); if(array == (char*)-1) out_of_memory(); if(mprotect(array,pagesize,PROT_NONE) == -1) fatal_error("Cannot protect low guard page",(...
false
false
false
false
false
0
my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *e; long long_val; uint sign= 0; ulonglong uval = (ulonglong)val; if (radix < 0) { ...
true
true
false
false
false
1
get_new_connection_name (const GSList *existing, const char *format, const char *preferred) { GSList *names = NULL; const GSList *iter; char *cname = NULL; int i = 0; gboolean preferred_found = FALSE; for (iter = existing; iter; iter = g_slist_next (iter)) { NM...
false
false
false
false
false
0
tool_option_copy(const ToolOption *from) { ToolOption *to; g_return_val_if_fail(from, (ToolOption*)0); to = tool_option_new(from->name, from->label, G_VALUE_TYPE(from->value)); g_value_copy(from->value, to->value); return to; }
false
false
false
false
false
0
imellipse(GFilt g, int rno, int sno, int flag, int type, double x, double y, double xcen, double ycen, double xrad, double yrad, double angle) { Scan scan; /* avoid -W unused parameter warning */ if( 0 ){ angle = angle; } if( xrad == yrad ){ return(imcircle(g, rno, sno, flag, type, x, ...
false
false
false
false
false
0
gdome_cds_subTreeDispatchEvent (GdomeCDATASection *self, GdomeEvent *evt, GdomeException *exc) { if (self == NULL) { *exc = GDOME_NULL_POINTER_ERR; return; } if (((Gdome_xml_Node *)self)->n == NULL) { *exc = GDOME_INVALID_STATE_ERR; return; } *exc = 0; ((Gdome_xml_CDATASection *)self)->vtab->super.super.s...
false
false
false
false
false
0
cgroup_init(void) { struct cgroup_subsys *ss; unsigned long key; int ssid; BUG_ON(percpu_init_rwsem(&cgroup_threadgroup_rwsem)); BUG_ON(cgroup_init_cftypes(NULL, cgroup_dfl_base_files)); BUG_ON(cgroup_init_cftypes(NULL, cgroup_legacy_base_files)); get_user_ns(init_cgroup_ns.user_ns); mutex_lock(&cgroup_mutex...
false
false
false
true
false
1
get_sci_line_code_end_position(ScintillaObject *sci, gint line) { gint start = sci_get_position_from_line(sci, line); gint lexer = sci_get_lexer(sci); gint pos; for (pos = sci_get_line_end_position(sci, line) - 1; pos > start; pos--) { gint style = sci_get_style_at(sci, pos); if (highlighting_is_code_style(l...
false
false
false
false
false
0
garmin_gpi_rd_deinit(void) { if (rdata->category) { xfree(rdata->category); } if (rdata->group) { xfree(rdata->group); } xfree(rdata); gbfclose(fin); }
false
false
false
false
false
0
get_new_line_malloc (u_char **target, u_char *source, int length) { int must_free=0; if (length<2) // No room for \r\n { log_debug (5, "get_new_line_malloc: line too short."); return LINE_INCOMPLETE; } if (target!=NULL) { if (*target != NULL) free (*target); *target = (u_char *) malloc ...
false
false
false
false
false
0
mainloopiteration() { int r; struct conn_sslcon *ccon; time_t ttnt; // Wait for an event to occur logmsg(LOGGER_DEBUG, "Entering main loop iteration"); ttnt = trigger_interval - (time(NULL) - last_trigger); if(ttnt <= 0) ttnt = 1; logmsg(LOGGER_DEBUG, "mainsendrecv with timeout %d", ttnt * 1000); r = conn_main...
false
false
false
false
false
0
CDB___absname(pref, name, newnamep) char *pref, *name, **newnamep; { size_t l_pref, l_name; int isabspath, ret; char *newname; l_name = strlen(name); isabspath = CDB___os_abspath(name); l_pref = isabspath ? 0 : strlen(pref); /* Malloc space for concatenating the two. */ if ((ret = CDB___os_malloc(l_pref + l_...
false
false
false
false
false
0
dib7000m_write_word(struct dib7000m_state *state, u16 reg, u16 val) { int ret; if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { dprintk("could not acquire lock"); return -EINVAL; } state->i2c_write_buffer[0] = (reg >> 8) & 0xff; state->i2c_write_buffer[1] = reg & 0xff; state->i2c_write_buffer[2]...
false
false
false
false
false
0
ath5k_get_chan_pcal_surrounding_piers(struct ath5k_hw *ah, struct net80211_channel *channel, struct ath5k_chan_pcal_info **pcinfo_l, struct ath5k_chan_pcal_info **pcinfo_r) { struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; struct ath5k_chan_pcal_info *pcinfo; u8 idx_l, idx_r; u8 mode, max, ...
false
false
false
false
false
0
enlighten_(SDL_Surface * dest, SDL_Surface * orig, int offset) { Uint8 r, g, b, a; int lightx, lighty; double sqdistbase, sqdist, shading; if (orig->format->BytesPerPixel == 1) { fprintf(stderr, "enlighten: orig surface must not have a palette\n"); ...
false
false
false
false
false
0
pollApp( const QString & appId ) { //kDebug( debugArea() ) ; OrgKdeKIMInterface * appStub = m_im_client_stubs.value( appId ); QStringList contacts = m_im_client_stubs.value( appId )->allContacts(); QStringList::iterator it = contacts.begin(); QStringList::iterator end = contacts.end(); for ( ; it != end; ++it ) ...
false
false
false
false
false
0
stream_info_async_cb (GObject *obj, GAsyncResult *res, gpointer data) { RBChunkLoader *loader = RB_CHUNK_LOADER (data); GFileInfo *info; GError *error = NULL; info = g_file_input_stream_query_info_finish (G_FILE_INPUT_STREAM (obj), res, &error); if (info != NULL) { loader->priv->total = g_file_info_get_attribut...
false
false
false
false
false
0
init_once_userfaultfd_ctx(void *mem) { struct userfaultfd_ctx *ctx = (struct userfaultfd_ctx *) mem; init_waitqueue_head(&ctx->fault_pending_wqh); init_waitqueue_head(&ctx->fault_wqh); init_waitqueue_head(&ctx->fd_wqh); seqcount_init(&ctx->refile_seq); }
false
false
false
false
false
0
gp2a_device_open(struct input_dev *dev) { struct gp2a_data *dt = input_get_drvdata(dev); int error; error = gp2a_enable(dt); if (error < 0) { dev_err(&dt->i2c_client->dev, "unable to activate, err %d\n", error); return error; } gp2a_report(dt); return 0; }
false
false
false
false
false
0
mnt_copy_fs(struct libmnt_fs *dest, const struct libmnt_fs *src) { const struct libmnt_fs *org = dest; if (!dest) { dest = mnt_new_fs(); if (!dest) return NULL; } /*DBG(FS, mnt_debug_h(dest, "copy from %p", src));*/ dest->id = src->id; dest->parent = src->parent; dest->devno =...
false
false
false
false
false
0
x11_free_buffers(char *b1, char *b2) { if (allocated) { XSync(d->display, 0); allocated = 0; free_image(d); } }
false
false
false
false
false
0
LibMatchDevicePaths ( IN EFI_DEVICE_PATH *Multi, IN EFI_DEVICE_PATH *Single ) { EFI_DEVICE_PATH *DevicePath, *DevicePathInst; UINTN Size; if (!Multi || !Single) { return FALSE; } DevicePath = Multi; while ((DevicePathInst = DevicePathInstance (&DevicePat...
false
false
false
false
false
0
ast2obj_comprehension(void* _o) { comprehension_ty o = (comprehension_ty)_o; PyObject *result = NULL, *value = NULL; if (!o) { Py_INCREF(Py_None); return Py_None; } result = PyType_GenericNew(comprehension_type, NULL, NULL); if (!result) r...
false
false
false
false
false
0
AddLightsToRenderer(vtkRenderer *renderer) { if(renderer != NULL) { renderer->AddLight(this->HeadLight); renderer->AddLight(this->KeyLight); renderer->AddLight(this->FillLight); renderer->AddLight(this->BackLight0); renderer->AddLight(this->BackLight1); } }
false
false
false
false
false
0
unw_print_abreg (char *cp, unsigned int abreg) { static const char * const special_reg[16] = { "pr", "psp", "@priunat", "rp", "ar.bsp", "ar.bspstore", "ar.rnat", "ar.unat", "ar.fpsr", "ar.pfs", "ar.lc", "Unknown11", "Unknown12", "Unknown13", "Unknown14", "Unknown15" }; switch ((abreg >> 5) & 0x3) ...
true
true
false
false
false
1
xmlModuleErrMemory(xmlModulePtr module, const char *extra) { const char *name = NULL; if (module != NULL) { name = (const char *) module->name; } __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE, XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra, ...
false
false
false
false
false
0
AjouteFin ( int Som, struct Liste * L ) { struct Chainon * C = ( struct Chainon * ) malloc ( sizeof ( struct Chainon ) ); C->Sommet = Som ; C->suiv = NULL ; if ( L->der ) L->der->suiv = C ; else L->prems = C ; L->der = C; return ; }
false
false
false
false
false
0
_mesa_update_clamp_fragment_color(struct gl_context *ctx) { struct gl_framebuffer *fb = ctx->DrawBuffer; /* Don't clamp if: * - there is no colorbuffer * - all colorbuffers are unsigned normalized, so clamping has no effect * - there is an integer colorbuffer */ if (!fb || !fb->_HasSNormOrFloa...
false
false
false
false
false
0
kkillall(void) { struct kproc *p; for (p = pready; p; p = p->kp_next) { if (!(p->kp_flags & KIPROC)) { kill(p->kp_pid, SIGCONT); kill(p->kp_pid, SIGHUP); } } for (p = pblock; p; p = p->kp_next) { if (!(p->kp_flags & KIPROC)) { kill(p->kp_pid, SIGCONT); kill(p->kp_pid, SIGHUP); } } }
false
false
false
false
false
0
GetPropertyRect( const wxPGProperty* p1, const wxPGProperty* p2 ) const { wxRect r; if ( m_width < 10 || m_height < 10 || !m_pState->m_properties->GetCount() || p1 == (wxPGProperty*) NULL ) return wxRect(0,0,0,0); int vy = 0; // // Return rect which encloses the given pr...
false
false
false
false
false
0
vt_canon_true_dep (dataflow_set *set, rtx mloc, rtx maddr, rtx loc) { if (GET_CODE (loc) != MEM) return false; rtx addr = vt_canonicalize_addr (set, XEXP (loc, 0)); if (!canon_true_dependence (mloc, GET_MODE (mloc), maddr, loc, addr)) return false; return true; }
false
false
false
false
false
0
obj_connect(t_object *source, int outno, t_object *sink, int inno) { t_inlet *i; t_outlet *o; t_pd *to; t_outconnect *oc, *oc2; for (o = source->ob_outlet; o && outno; o = o->o_next, outno--) ; if (!o) return (0); if (sink->ob_pd->c_firstin) { if (!inno) { ...
false
false
false
false
false
0
upAboutToShow() { QMenu *popup = _upAction->menu(); popup->clear(); StackBrowser* b = _stackSelection ? _stackSelection->browser() : 0; HistoryItem* hi = b ? b->current() : 0; TraceFunction* f = hi ? hi->function() : 0; QAction* action; if (!f) { popup->addAction(tr("(No Stack)")); return; } ...
false
false
false
false
false
0
sq_addref(HSQUIRRELVM v,HSQOBJECT *po) { if(!ISREFCOUNTED(type(*po))) return; #ifdef NO_GARBAGE_COLLECTOR __AddRef(po->_type,po->_unVal); #else _ss(v)->_refs_table.AddRef(*po); #endif }
false
false
false
false
false
0
update_patternmatch(RLI *rli, char *lfn) { UPDATEPAT *p; if (loglevel > 2) logit(LOG_DEBUG, "update_patternmatch: %s %s", rli->url, lfn); if (!rli->patternlist) return GLOBUS_TRUE; for (p = rli->patternlist; p; p = p->nxt) if (fnmatch(p->pattern, lfn, FNM_PATHNAME) == 0) return GLOBUS_TRUE;...
false
false
false
false
false
0
stonith_action_async_done(mainloop_child_t * p, pid_t pid, int core, int signo, int exitcode) { stonith_action_t *action = mainloop_child_userdata(p); if (action->timer_sigterm > 0) { g_source_remove(action->timer_sigterm); } if (action->timer_sigkill > 0) { g_source_remove(action->time...
false
false
false
false
false
0
qxl_ttm_tt_populate(struct ttm_tt *ttm) { int r; if (ttm->state != tt_unpopulated) return 0; r = ttm_pool_populate(ttm); if (r) return r; return 0; }
false
false
false
false
false
0
hawki_cal_distortion_get_image_apertures (cpl_image * image, double sigma_det) { cpl_apertures * apertures = NULL; cpl_mask * kernel = NULL; cpl_mask * object_mask = NULL; cpl_image * labels = NULL; cpl_size nobj; double median; double me...
false
false
false
false
false
0
emitCondCode(CondCode cc, DataType ty, int pos) { uint8_t enc; assert(pos >= 32 || pos <= 27); switch (cc) { case CC_LT: enc = 0x1; break; case CC_LTU: enc = 0x9; break; case CC_EQ: enc = 0x2; break; case CC_EQU: enc = 0xa; break; case CC_LE: enc = 0x3; break; case CC_LEU: enc = 0xb; bre...
false
false
false
false
false
0
test_number (void) { GError *error = NULL; const gchar *data = "[valid]\n" "key1=0\n" "key2=1\n" "key3=-1\n" "key4=2324431\n" "key5=-2324431\n" "key6=000111\n" "dkey1=000111\n" "dkey2=145.45\n" "dkey3=-3453.7\n" "[invalid]\n" "key1=0xffff\n" "key2=0.5\n" "ke...
false
false
false
false
false
0
append_msg(char *mbox, int size) { int lup; prot_printf(pout,"A003 APPEND %s (\\Seen) {" SIZE_T_FMT "}\r\n", mbox,size+strlen(HEADERS)); /* do normal header foo */ prot_printf(pout,HEADERS); for (lup=0;lup<size/10;lup++) prot_printf(pout,"0123456789"); prot_printf(pout,"\r\n"); ...
false
false
false
false
false
0
tegra_sflash_resume(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct tegra_sflash_data *tsd = spi_master_get_devdata(master); int ret; ret = pm_runtime_get_sync(dev); if (ret < 0) { dev_err(dev, "pm runtime failed, e = %d\n", ret); return ret; } tegra_sflash_writel(tsd, tsd->co...
false
false
false
false
false
0