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
BuildFields () { DBInt ret = DBSuccess; DBObjTable *table, *refTable; DBObjRecord *tableRec; DBObjTableField *field; DBObjectLIST<DBObjTableField> *tableFLDs; for (table = TablesPTR->First ();table != (DBObjTable *) NULL;table = TablesPTR->Next ()) { tableFLDs = table->Fields (); for (field = tableFLDs->...
false
false
false
false
false
0
FlmGetUnicodeStorageLength( const FLMUNICODE * puzStr) { FLMBYTE chrSet; FLMUINT uiStorageLength = 0; FLMUINT16 wp60Buf[12]; flmAssert( puzStr != NULL); // Two passes are needed to store a UNICODE string: 1st pass // determines the storage length (via FlmGetUnicodeStorageLength) 2nd // pass stores the stri...
false
false
false
false
false
0
out( MifOutputByteStream &os ) { os << '\n' << MifOutputByteStream::INDENT << "<TblFormat "; os.indent(); CHECK_PROPERTY( TblTag ); CHECK_PROPERTY( TblLIndent ); CHECK_PROPERTY( TblRIndent ); CHECK_PROPERTY( TblSpBefore ); CHECK_PROPERTY( TblSpAfter ); CHECK_PROPERTY( TblAlignment ); ...
false
false
false
false
false
0
WritePage(const char* filename, plPageInfo* page) { hsFileStream* S = new hsFileStream(); S->open(filename, fmWrite); S->setVer(getVer()); std::vector<short> types = keys.getTypes(page->getLocation()); page->setClassList(types); //keys.sortKeys(page->getLocation()); page->write(S); page-...
false
false
false
false
false
0
qxl_release_from_id_locked(struct qxl_device *qdev, uint64_t id) { struct qxl_release *release; spin_lock(&qdev->release_idr_lock); release = idr_find(&qdev->release_idr, id); spin_unlock(&qdev->release_idr_lock); if (!release) { DRM_ERROR("failed to find id in release_idr\n"); return NULL; } retu...
false
false
false
false
false
0
drv_CW_init(const char *section, const int quiet) { WIDGET_CLASS wc; int ret; info("%s: %s", Name, "$Rev: 929 $"); /* display preferences */ CHAR0 = 1; /* ASCII of first user-defineable char */ GOTO_COST = 3; /* number of bytes a goto command requires */ INVALIDATE = 1; /* re-defined c...
true
true
false
false
false
1
get_keyword(gchar *str, gint max) { gint i, j, n, len, num_tokens; gchar **buff; gint *list; #if DEBUG_GET_KEYWORD printf("extracted: "); #endif list = g_malloc((max+1) * sizeof(gint)); buff = tokenize(str, &num_tokens); n=1; i=0; while(i < num_tokens) { /* default keyword code - nothing */ *(list+n) = -1; j=0...
false
false
false
false
false
0
g_mount_spec_to_dbus_with_path (GMountSpec *spec, const char *path) { GVariantBuilder builder; GVariant *v; int i; g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); for (i = 0; i < spec->items->len; i++) { GMountSpecItem *item = &g_array_index (spec->items, GMountSpecItem, i); g...
false
false
false
false
false
0
ipcache_alloc_item (address_t *ip) { struct ipcache_item *rp; g_assert(ip); rp = (struct ipcache_item *) malloc (sizeof (struct ipcache_item)); if (!rp) { fprintf (stderr, "malloc() failed: %s\n", strerror (errno)); exit (-1); } memset (rp, 0, sizeof (struct ipcache_item)); rp->state =...
false
false
false
false
false
0
vty_accept(thread_t *thread) { struct sockaddr_storage sock; socklen_t len; int vty_sock, ret, val; unsigned int on = 1; int accept_sock = THREAD_FD(thread); /* Handle Read Timeout */ if (thread->type == THREAD_READ_TIMEOUT) { vty_event(VTY_SERV, accept_sock, NULL); return 0; } /* We continue hearing vty...
false
false
false
false
false
0
PostGarbageCollectionProcessing(Isolate* isolate, GlobalHandles* global_handles) { if (state_ != Node::PENDING) return false; WeakReferenceCallback func = callback(); if (func == NULL) { Release(global_handles); return false; } void* par = parameter...
false
false
false
false
false
0
get_jmp_destination( Quadruple *qr , Pe_statement ***dpestmppp , Block **idbpp , Block **dbpp , Block **sbpp ) { Statement *dstmp, *stmp; Block *sbp0; Block_list *sbl, *dbl, *bl0; if...
false
false
false
false
false
0
AtTermStart(StyleContext &sc) { return sc.currentPos == 0 || isspacechar(sc.chPrev); }
false
false
false
false
false
0
est_crput(CURIA *curia, int zmode, int id, const char *vbuf, int vsiz, int dmode){ char *zbuf; int zsiz; assert(curia && id > 0 && vbuf && vsiz >= 0); switch(zmode){ case ESTDFZLIB: if(!(zbuf = est_deflate(vbuf, vsiz, &zsiz, -1))){ dpecode = ESTEMISC; return FALSE; } if(!crput(curia, (...
false
false
false
false
false
0
double_exponent(double d) { union {double d;int i[2];} u; if (d == 0.0) return(0); u.d=d; return (((u.i[HIND] & 0x7ff00000) >> 20) - 1022); }
false
false
false
false
false
0
cmph_config_set_tmp_dir(cmph_config_t *mph, cmph_uint8 *tmp_dir) { if (mph->algo == CMPH_BRZ) { brz_config_set_tmp_dir(mph, tmp_dir); } }
false
false
false
false
false
0
xmms_medialib_decode_url (char *url) { int i = 0, j = 0; g_return_val_if_fail (url, TRUE); while (url[i]) { unsigned char chr = url[i++]; if (chr == '+') { url[j++] = ' '; } else if (chr == '%') { char ts[3]; char *t; ts[0] = url[i++]; if (!ts[0]) return FALSE; ts[1] = url[i++]; if...
false
false
false
false
false
0
bLoadSigSrc( void ) { Component oCpnt; wxString os1; size_t sz1; // Scan the circuit description for a source component for( sz1=0; sz1<m_osaNetLst.GetCount( )-1; sz1++, os1.Empty( ) ) { os1 = m_osaNetLst.Item( sz1 ); // Is this a signal source? if( os1.IsEmpty( ) ) ...
false
false
false
false
false
0
get_sm_pid(void) { const char *session_manager_var = getenv("SESSION_MANAGER"); const char *sm_pid_str_ptr; int sm_pid = 0; if (!SessionSupport) { return 0; } if (!session_manager_var) { return 0; } sm_pid_str_ptr = strchr(session_manager_var, ','); if (!sm_pid_str_ptr) { return 0; } while (sm_pid...
false
false
false
false
true
1
AllocateEmptyJSArray() { Object* result = AllocateJSArray(); if (result->IsFailure()) return result; JSArray* result_array = JSArray::cast(result); result_array->set_length(Smi::FromInt(0)); result_array->set_elements(Heap::empty_fixed_array()); return result_array; }
false
false
false
false
false
0
print_deferred_heredocs (cstring) const char *cstring; { REDIRECT *hdtail; for (hdtail = deferred_heredocs; hdtail; hdtail = hdtail->next) { cprintf (" "); print_heredoc_header (hdtail); } if (cstring[0] != ';' || cstring[1]) cprintf ("%s", cstring); if (deferred_heredocs) cp...
false
false
false
false
false
0
UTF16Swp_to_UTF32Nat ( const UTF16Unit * utf16In, const size_t utf16Len, UTF32Unit * utf32Out, const size_t utf32Len, size_t * utf16Read, size_t * utf32Written ) { const UTF16Unit * utf16Pos = utf16In; UTF32Unit * utf32Pos = utf32Out; size_t...
false
false
false
false
false
0
chip_direction_output(struct gpio_chip *c, unsigned offset, int val) { struct cs5535_gpio_chip *chip = container_of(c, struct cs5535_gpio_chip, chip); unsigned long flags; spin_lock_irqsave(&chip->lock, flags); __cs5535_gpio_set(chip, offset, GPIO_INPUT_ENABLE); __cs5535_gpio_set(chip, offset, GPIO_OUTPUT_ENAB...
false
false
false
false
false
0
ajDomNodeListInsert(AjPDomNodeList list, AjPDomNode newchild, AjPDomNode refchild) { AjPDomNodeEntry e = NULL; AjPDomNodeEntry s = NULL; if(!list) return NULL; if(list->filter) { ajDebug("ajDomNodeListInsert: Filtered list error\n"); ret...
false
false
false
false
false
0
insertBoundaryPoint(int argIndex, const Coordinate& coord) { Node *n=nodes->addNode(coord); // nodes always have labels Label& lbl = n->getLabel(); // the new point to insert is on a boundary int boundaryCount=1; // determine the current location for the point (if any) int loc = lbl.getLocation(argIndex,Positi...
false
false
false
false
false
0
RefreshFont (void) { int x,y; byte data[16][16][4]; // // tiny blank texture // for (x=0 ; x<16 ; x++) { for (y=0 ; y<16 ; y++) { data[y][x][0] = 255; data[y][x][1] = 255; data[y][x][2] = 255; data[y][x][3] = blanktexture[x][y]; } } draw_chars = GL_FindImage (va("fonts/%...
false
false
false
false
false
0
length_OCSPInnerRequest(const OCSPInnerRequest *data) { size_t ret = 0; { size_t Top_tag_oldret = ret; ret = 0; ret += length_OCSPCertID(&(data)->reqCert); ret += Top_tag_oldret; } if((data)->singleRequestExtensions){ size_t Top_tag_oldret = ret; ret = 0; ret += length_Extensions((data)->singleRequestExtensions); ret +...
false
false
false
false
false
0
avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){ if((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8) return 0; av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h); return -1; }
false
false
false
false
false
0
get_socket_list_from_proto(int **ipList, int protocol) { struct socket_info *si; struct socket_info** list; int num_ip_octets = 4; int numberOfSockets = 0; int currentRow = 0; /* I hate to use #ifdefs, but this is necessary because of the way * get_sock_info_list() is defined. */ #ifndef USE_TCP i...
false
false
false
false
false
0
flushinp_test(WINDOW *win) /* Input test, adapted from John Burnell's PDCurses tester */ { int w, h, bx, by, sw, sh, i; WINDOW *subWin; wclear(win); getmaxyx(win, h, w); getbegyx(win, by, bx); sw = w / 3; sh = h / 3; if ((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) ...
false
false
false
false
false
0
widget_scandir( const char *dir, struct widget_dirent ***namelist, int (*select_fn)(const char*) ) { compat_dir directory; int allocated, number; int i; int done = 0; *namelist = malloc( 32 * sizeof(**namelist) ); if( !*namelist ) return -1; allocated = 32; number = 0; directory = compat_opend...
true
true
true
false
false
1
job_count() { JCR *jcr; int count = 0; lock_jcr_chain(); for (jcr = (JCR *)jcrs->first(); (jcr = (JCR *)jcrs->next(jcr)); ) { if (jcr->JobId > 0) { count++; } } unlock_jcr_chain(); return count; }
false
false
false
false
false
0
bitsize(char g, int WKO_device, WKO_ULONG version) { if (version != 1 && version != 7) { switch (g) { case 'P' : return (12); break; case 'H' : return (8); break; case 'C' : return (8); break; case 'S' : return (11); break; case 'A' : return (20); break; case...
false
false
false
false
false
0
ewma_init(struct ewma *avg, unsigned long factor, unsigned long weight) { if(!is_power_of_2(weight) || !is_power_of_2(factor)) error(1, 0, "weight and factor have to be a power of two!"); avg->weight = ilog2(weight); avg->factor = ilog2(factor); avg->internal = 0; }
false
false
false
false
false
0
fn_param_maxval (const ufunc *fun, int i) { return (i < 0 || i >= fun->n_params)? NADBL : fun->params[i].max; }
false
false
false
false
false
0
msproxy_init(void) { const char *function = "msproxy_init()"; struct itimerval timerval; struct sigaction sigact, oldsigact; if (atexit(msproxy_sessionsend) != 0) { swarn("%s: atexit()", function); return -1; } if (sigaction(SIGALRM, NULL, &oldsigact) != 0) { swarn("%s: sigaction(SIGALRM)", function); r...
true
true
false
false
true
1
cmpmul (mpc_srcptr x, mpc_srcptr y, mpc_rnd_t rnd) /* computes the product of x and y with the naive and Karatsuba methods */ /* using the rounding mode rnd and compares the results and return */ /* values. */ /* In our current test suite, th...
false
false
false
false
false
0
symbol_build_supp_rates(u8 *buf, const __le16 *rates) { int i; u8 rate; buf[0] = WLAN_EID_SUPP_RATES; for (i = 0; i < 5; i++) { rate = le16_to_cpu(rates[i]); /* NULL terminated */ if (rate == 0x0) break; buf[i + 2] = rate; } buf[1] = i; return i + 2; }
false
false
false
false
false
0
start_fixer (int read_fd, tFixDesc* p_fixd, char* pz_fix_file) { tCC* pz_cmd_save; char* pz_cmd; if ((p_fixd->fd_flags & FD_SUBROUTINE) != 0) return internal_fix (read_fd, p_fixd); if ((p_fixd->fd_flags & FD_SHELL_SCRIPT) == 0) { pz_cmd = NULL; pz_cmd_save = NULL; } else { ...
false
false
false
false
false
0
printTypmod(const char *typname, int32 typmod, Oid typmodout) { char *res; /* Shouldn't be called if typmod is -1 */ Assert(typmod >= 0); if (typmodout == InvalidOid) { /* Default behavior: just print the integer typmod with parens */ res = psnprintf(strlen(typname) + MAX_INT32_LEN + 3, "%s(%d)", ty...
false
false
false
false
false
0
draw( ParticleInfo *p) { // XTRACE(); if( _enableDraw) { ParticleInfo pi; interpolate( p, pi); glPushMatrix(); glTranslatef( pi.position.x, pi.position.y, pi.position.z); if( _moveState != eIdle) { float gf = GameState::frameFraction; Point3D _dirInterp; _dirInterp.x = _prevDir.x +...
false
false
false
false
false
0
get_filesystems(const char *filename, char ***filesystems, const char *pattern) { FILE *f; char line[128]; f = fopen(filename, "r"); if (!f) return 0; while (fgets(line, sizeof(line), f)) { char name[sizeof(line)]; int rc; if (*line == '#' || strncmp(line, "nodev", 5) == 0) continue; if (sscanf(lin...
true
true
false
false
true
1
stream_open(STREAM *stream, const char *path, int mode) { int fd; int fmode; if (mkfifo(path, 0666) != 0) { if (errno != EEXIST) return TRUE; } fmode = 0; switch (mode & ST_MODE) { case ST_READ: fmode |= O_RDONLY; break; case ST_WRITE: fmode |= O_WRONLY; break; case ST_READ_WRITE: fmode...
false
false
false
false
true
1
btrfs_async_reclaim_metadata_space(struct work_struct *work) { struct btrfs_fs_info *fs_info; struct btrfs_space_info *space_info; u64 to_reclaim; int flush_state; fs_info = container_of(work, struct btrfs_fs_info, async_reclaim_work); space_info = __find_space_info(fs_info, BTRFS_BLOCK_GROUP_METADATA); to_rec...
false
false
false
false
false
0
equiv_address_substitution (struct address_info *ad) { rtx base_reg, new_base_reg, index_reg, new_index_reg, *base_term, *index_term; HOST_WIDE_INT disp, scale; bool change_p; base_term = strip_subreg (ad->base_term); if (base_term == NULL) base_reg = new_base_reg = NULL_RTX; else { base_reg ...
false
false
false
false
false
0
SiS_HaveBridge(struct SiS_Private *SiS_Pr) { unsigned short flag; if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { return true; } else if(SiS_Pr->SiS_VBType & VB_SISVB) { flag = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x00); if((flag == 1) || (flag == 2)) return true; } return false; }
false
false
false
false
false
0
calc_lookup_values_from_cond(THD *thd, COND *cond, TABLE_LIST *table, LOOKUP_FIELD_VALUES *lookup_field_vals) { if (!cond) return 0; if (cond->type() == Item::COND_ITEM) { if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC) { List_iterator<Item> li...
false
false
false
false
false
0
init_context_once(void *ctx) { krb5_context context = ctx; char **dirs; #ifdef _WIN32 dirs = rk_UNCONST(sysplugin_dirs); #else dirs = krb5_config_get_strings(context, NULL, "libdefaults", "plugin_dir", NULL); if (dirs == NULL) dirs = rk_UNCONST(sysplugin_dirs); #endif _krb5_load_plugin...
false
false
false
false
false
0
attr_syntax_equal( struct asyntaxinfo *asi1, struct asyntaxinfo *asi2 ) { unsigned long flagmask; flagmask = ~( SLAPI_ATTR_FLAG_STD_ATTR | SLAPI_ATTR_FLAG_NOLOCKING | SLAPI_ATTR_FLAG_OVERRIDE ); if ( schema_strcmp( asi1->asi_oid, asi2->asi_oid ) != 0 || schema_strcmp( asi1->asi_name, asi2->asi_name ) != 0 ...
false
false
false
false
false
0
FetchHdr(struct sess *sp) { struct vbc *vc; struct worker *w; char *b; struct http *hp; int retry = -1; int i; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); w = sp->wrk; AN(sp->director); AZ(sp->obj); if (sp->objcore != NULL) { /* pass has no objcore */ CHECK_OBJ_NOTNULL...
false
false
false
true
false
1
phy_read(unsigned long iobase, u8 phy_addr, u8 offset, u32 chip_id) { int i; u16 phy_data; unsigned long ioaddr; if (chip_id == PCI_DM9132_ID) { /* DM9132 Chip */ ioaddr = iobase + 0x80 + offset * 4; phy_data = inw(ioaddr); } else { /* DM9102/DM9102A Chip */ ioaddr = iobase + DCR9; /* Send 33 s...
false
false
false
false
false
0
var_ns_create(char *ns, Kwv *kwv) { char *n; Var_ns *v; extern int acs_is_readonly_namespace(char *ns); if (ns == NULL) { #ifdef DEFAULT_NAMESPACE n = DEFAULT_NAMESPACE; #else log_msg((LOG_ERROR_LEVEL, "Invalid variable reference: namespace is required")); return(NULL); #endif } else n = ns; if ...
false
false
false
false
false
0
mkdir_p (char *dir) { char *p; char *q = xmalloc (strlen (dir) + 1); int retval; if (q == NULL) return ENOMEM; retval = 0; /* * Skip over leading slash if present. We won't bother to try to * make '/'. */ p = dir + 1; while (1) { while (*p != '/' && *p != '\0') ...
false
true
false
false
false
1
intel_fbc_calculate_cfb_size(struct drm_i915_private *dev_priv, struct intel_fbc_state_cache *cache) { int lines; intel_fbc_get_plane_source_size(cache, NULL, &lines); if (INTEL_INFO(dev_priv)->gen >= 7) lines = min(lines, 2048); /* Hardware needs the full buffer stride, not just the active area. */ retur...
false
false
false
false
false
0
mv_one_file(int vid, const char *zOrig, const char *zNew){ int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q %s", zNew, filename_collation()); if( x>=0 ){ if( x==0 ){ fossil_fatal("cannot rename '%s' to '%s' since another file named '%s'" " is currently under ma...
false
false
false
false
false
0
convertMeshToTangents() { // now calculate tangents for (u32 b=0; b < LocalBuffers.size(); ++b) { if (LocalBuffers[b]) { LocalBuffers[b]->convertToTangents(); const s32 idxCnt = LocalBuffers[b]->getIndexCount(); u16* idx = LocalBuffers[b]->getIndices(); video::S3DVertexTangents* v = ...
false
false
false
false
false
0
fiid_obj_field_len_bytes (fiid_obj_t obj, const char *field) { int len; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if ((len = fiid_obj_field_len (obj, field)) < 0) return (-1); if (len % 8) { ...
false
false
false
false
false
0
endElementLoadSchemaCbk(const char *pszName) { if (bStopParsing) return; nWithoutEventCounter = 0; depthLevel--; if (inInterestingElement) { if (gpxGeomType == GPX_WPT && strcmp(pszName, "wpt") == 0) { inInterestingElement = FALSE; inExtensions = FALSE; ...
false
false
false
false
false
0
wdidle3_msecs_to_timeout (unsigned int secs) { unsigned char timeout; if (secs == 0) timeout = 0; /* disabled */ else if (secs < 8) timeout = 80; /* 8.0 seconds minimum */ else if (secs <= (WDC_TIMEOUT_THRESHOLD / 10)) timeout = secs * 10; /* 8.0 to 12.7 seconds */ else { secs += 29; /* round up to nex...
false
false
false
false
false
0
ilRegisterMipNum(ILuint Num) { ILimage *Next, *Prev; ilBindImage(ilGetCurName()); // Make sure the current image is actually bound. ilCloseImage(iCurImage->Mipmaps); // Close any current mipmaps. iCurImage->Mipmaps = NULL; if (Num == 0) // Just gets rid of all the mipmaps. return IL_TRUE; iCurImage->Mipma...
false
false
false
false
false
0
SetName(AString *s) { if (s) { AString *newname = s->getlegal(); if (!newname) { delete s; return; } *newname += AString(" (") + num + ")"; delete s; delete name; name = newname; } }
false
false
false
false
false
0
DXAddMacro (node *macro) { node *par; int nin; int nout; int ret; if (macro == NULL) { DXWarning ("#4640"); return (-1); } /* Count the number of input and output parameters */ for (nin = 0, par = macro->v.macro.in; par; par = par->next, nin++) ; for (nout = 0, par = ma...
false
false
false
false
false
0
config_mime(struct configuration *p, struct mime **ms, int class) { struct mime *m; char *name; const char *t; if ((t = gettoken(p)) != t_open) return t; while ((t = gettoken(p)) != t_close) { if (t != t_string) return t; if ((name = strdup(p->tokbuf)) == 0) return e_memory; if ((t = gettoken(p)) !=...
false
false
false
false
false
0
_PyTime_ObjectToDenominator(PyObject *obj, time_t *sec, long *numerator, double denominator, _PyTime_round_t round) { assert(denominator <= LONG_MAX); if (PyFloat_Check(obj)) { double d, intpart, err; /* volatile avoids unsafe optimization on float enabled by gcc -O3 ...
false
false
false
false
false
0
web_view_get_frame_selection_html (WebKitDOMElement *iframe) { WebKitDOMDocument *document; WebKitDOMDOMWindow *window; WebKitDOMDOMSelection *selection; WebKitDOMNodeList *frames; gulong ii, length; document = webkit_dom_html_iframe_element_get_content_document ( WEBKIT_DOM_HTML_IFRAME_ELEMENT (iframe)); win...
false
false
false
false
false
0
fm_irq_afjump_setfreq(struct fmdev *fmdev) { u16 frq_index; u16 payload; fmdbg("Swtich to %d KHz\n", fmdev->rx.stat_info.af_cache[fmdev->rx.afjump_idx]); frq_index = (fmdev->rx.stat_info.af_cache[fmdev->rx.afjump_idx] - fmdev->rx.region.bot_freq) / FM_FREQ_MUL; payload = frq_index; if (!fm_send_cmd(fmdev,...
false
false
false
false
false
0
transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt *stmt) { Query *result = makeNode(Query); List *extras_before = NIL, *extras_after = NIL; result->commandType = CMD_UTILITY; result->utilityStmt = (Node *) stmt; /* * Don't allow both SCROLL and NO SCROLL to be specified */ if ((st...
false
false
false
false
false
0
ompi_btl_openib_fd_unmonitor(int fd, ompi_btl_openib_fd_event_callback_fn_t *callback, void *context) { cmd_t cmd; /* Sanity check */ if (fd < 0) { return OMPI_ERR_BAD_PARAM; } cmd.pc_cmd = CMD_REMOVE_FD; cmd.pc_fd = fd;...
false
false
false
false
false
0
wave_close(WAVE_FILE *file) { if (wave_formats[file->format].close_func != NULL) wave_formats[file->format].close_func(file); fclose(file->fp); free(file); }
false
false
false
false
false
0
run_account_picker_dialog (GNCImportMainMatcher *info, GtkTreeModel *model, GtkTreeIter *iter, GNCImportTransInfo *trans_info) { Account *old_acc, *new_acc; gboolean ok_pressed; g_assert (trans_info); old_acc = gnc_import_T...
false
false
false
false
false
0
modify(krb5_context ctx, void *data, enum kadm5_hook_stage stage, kadm5_principal_ent_t entry, uint32_t mask) { bool enabled; if (mask & KADM5_ATTRIBUTES && stage == KADM5_HOOK_STAGE_POSTCOMMIT) { enabled = !(entry->attributes & KRB5_KDB_DISALLOW_ALL_TIX); return sync_status(data, ctx, e...
false
false
false
false
false
0
compressFile(QString fileCompressed, QString file) { // Creo lo zip QuaZip zip(fileCompressed); QDir().mkpath(QFileInfo(fileCompressed).absolutePath()); if(!zip.open(QuaZip::mdCreate)) { QFile::remove(fileCompressed); return false; } // Aggiungo il file if(!compressFile(...
false
false
false
false
false
0
sgfPrintRemainingProperties(FILE *file, SGFNode *node) { SGFProperty *prop; for (prop = node->props; prop; prop = prop->next) if (!(prop->name & 0x20)) sgf_print_property(file, node, prop->name, 0); }
false
false
false
false
false
0
trackfilter_split_init_rte_name(route_head *track, const time_t time) { char buff[128], tbuff[128]; struct tm tm; tm = *localtime(&time); (opt_interval != 0) ? strftime(tbuff, sizeof(tbuff), "%Y%m%d%H%M%S", &tm) : strftime(tbuff, sizeof(tbuff), "%Y%m%d", &tm); if ((opt_title != NULL) && (strlen(opt_tit...
false
false
false
false
false
0
onDataReady() { QVariant data = utubeEngine->readAll()["data"]; mView = new QGraphicsTextItem(); mView->setHtml(data.toString()); this->addWidget (mView); emit dataChanged(); }
false
false
false
false
false
0
make_new_paragraph() { CL_RichEdit_Paragraph * par = new CL_RichEdit_Paragraph( richedit->get_width() - bounds_width ); pars.push_back( par ); }
false
false
false
false
false
0
NewAttribute(const char *name) { if (!node_) return XMLNode(); if (node_->type != XML_ELEMENT_NODE) return XMLNode(); const char *name_ = strchr(name, ':'); xmlNsPtr ns = NULL; if ((name_ != NULL) && (name_ != name)) { std::string ns_(name, name_ - name); ns = xmlSearchNs(nod...
false
false
false
false
false
0
gg_svg_set_brush (cairo_t * cairo, struct gg_svg_style *style) { /* setting up a Brush for Cairo */ cairo_pattern_t *pattern; if (style->fill_url != NULL && style->fill_pointer != NULL) { struct gg_svg_gradient *grad = style->fill_pointer; struct gg_svg_gradient_stop *stop; if (grad->type == GG_S...
false
false
false
false
false
0
nm_client_get_devices (NMClient *client) { g_return_val_if_fail (NM_IS_CLIENT (client), NULL); _nm_object_ensure_inited (NM_OBJECT (client)); return handle_ptr_array_return (NM_CLIENT_GET_PRIVATE (client)->devices); }
false
false
false
false
false
0
CL_PMTrace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end) { trace_t t; // check against world t = CM_BoxTrace (start, end, mins, maxs, 0, MASK_PLAYERSOLID); if (t.fraction < 1.0f) t.ent = (struct edict_s *)1; // check all other solid models CL_ClipMoveToEntities (start, mins, maxs, end, &t); return t;...
false
false
false
false
false
0
xmlSecOpenSSLKWDes3BlockEncrypt(void * context, const xmlSecByte * iv, xmlSecSize ivSize, const xmlSecByte * in, xmlSecSize inSize, xmlSecByte * out, xmlSecSize outSize) { xmlSecOpenSSLKWDes3CtxPtr ctx = (xmlSecOpenSSLKWDes...
false
false
false
false
false
0
copy_call_graph_list(Call_graph *call_head) { Call_graph *ret = NULL, *new = NULL; Call_graph *call, *tail = NULL; for (call = call_head; call; call = call->next) { new = copy_call_graph(call); if (ret == NULL) { ret = new; } else { tail->next = new; } tail = new; } return(ret); }
false
false
false
false
false
0
ne_set_useragent(ne_session *sess, const char *token) { if (sess->user_agent) ne_free(sess->user_agent); sess->user_agent = ne_malloc(strlen(UAHDR) + strlen(AGENT) + strlen(token) + 1); #ifdef HAVE_STPCPY strcpy(stpcpy(stpcpy(sess->user_agent, UAHDR), token), AGENT); #else ...
false
true
false
false
false
1
amdgpu_mode_dumb_mmap(struct drm_file *filp, struct drm_device *dev, uint32_t handle, uint64_t *offset_p) { struct drm_gem_object *gobj; struct amdgpu_bo *robj; gobj = drm_gem_object_lookup(dev, filp, handle); if (gobj == NULL) { return -ENOENT; } robj = gem_to_amdgpu_bo(gobj); if (amdgpu_ttm_tt_has...
false
false
false
false
false
0
View() { AString temp; temp = AString("Faction ") + num + AString(" : ") + *name; Awrite(temp); }
false
false
false
false
false
0
GetWidth() const { if(IsFiltered()) return -1; return width; }
false
false
false
false
false
0
coalesce_cost (int frequency, bool optimize_for_size) { /* Base costs on BB frequencies bounded by 1. */ int cost = frequency; if (!cost) cost = 1; if (optimize_for_size) cost = 1; return cost; }
false
false
false
false
false
0
Transform2( size_t nrCells, void *buf, CSF_CR destCellRepr, /* the output representation */ CSF_CR currCellRepr) /* at start of while this is the representation read in the MAP-file */ { /* subsequent looping changes the to the new * converted type */ while(currCellRepr != destCellRepr) { switch(c...
false
false
false
false
false
0
iszonesecure(dns_db_t *db, rbtdb_version_t *version, dns_dbnode_t *origin) { #ifndef BIND9 UNUSED(db); UNUSED(version); UNUSED(origin); return; #else dns_rdataset_t keyset; dns_rdataset_t nsecset, signsecset; isc_boolean_t haszonekey = ISC_FALSE; isc_boolean_t hasnsec = ISC_FALSE; isc_result_t result; dns_r...
false
false
false
false
false
0
camlidl_abstract0_ap_abstract0_is_bottom( value _v_man, value _v_a) { ap_manager_ptr man; /*in*/ ap_abstract0_ptr a; /*in*/ int _res; value _vres; struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL }; camlidl_ctx _ctx = &_ctxs; camlidl_ml2c_manager_ap_manager_ptr(_v_man, &man, _ctx); camlidl...
false
false
false
false
false
0
Vect__new_line_struct() { struct line_pnts *p; p = (struct line_pnts *)malloc(sizeof(struct line_pnts)); /* alloc_points MUST be initialized to zero */ if (p) p->alloc_points = p->n_points = 0; if (p) p->x = p->y = p->z = NULL; return p; }
false
false
false
false
false
0
vsp1_bru_create(struct vsp1_device *vsp1) { struct v4l2_subdev *subdev; struct vsp1_bru *bru; int ret; bru = devm_kzalloc(vsp1->dev, sizeof(*bru), GFP_KERNEL); if (bru == NULL) return ERR_PTR(-ENOMEM); bru->entity.type = VSP1_ENTITY_BRU; ret = vsp1_entity_init(vsp1, &bru->entity, 5); if (ret < 0) return ...
false
false
false
false
false
0
compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize, const LodePNG_CompressSettings& settings) { unsigned char* buffer = 0; size_t buffersize = 0; unsigned error = LodePNG_zlib_compress(&buffer, &buffersize, in, insize, &settings); if(buffer) { ...
false
false
false
false
false
0
updateFont(Font oldfid_) { MSCompositeText::updateFont(oldfid_); Font fid=font(); const char *fontString=server()->fontName(fid); if (fontString!=0) { MSString fs(fontString); unsigned pos=0; if ((pos=fs.indexOf("-bold",0))==fs.length()) { unsigned ipos=fs.length(); if ((pos=fs.indexOf(...
false
false
false
false
false
0
xusbatm_capture_intf(struct usbatm_data *usbatm, struct usb_device *usb_dev, struct usb_interface *intf, int altsetting, int claim) { int ifnum = intf->altsetting->desc.bInterfaceNumber; int ret; if (claim && (ret = usb_driver_claim_interface(&xusbatm_usb_driver, intf, usbatm))) { usb_err(usbatm, "%s: failed to...
false
false
false
false
false
0
bindata_fieldarrayr(Symbol* basetype, Datasrc* src, Odometer* odom, int index, Bytebuffer* memory, Datalist* fillsrc) { int i; int rank = odom->rank; unsigned int size = odom->declsize[index]; int lastdim = (index == (rank - 1)); /* last dimension*/ ASSERT(size != 0); for(i=0;i<size;i+...
false
false
false
false
false
0
rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, enum rf_content content, enum radio_path rfpath) { int i; u32 *radioa_array_table; u32 *radiob_array_table; u16 radioa_arraylen, radiob_arraylen; struct rtl_priv *rtlpriv = rtl_priv(hw); radioa_arraylen = RADIOA_2T_ARRAYLENGTH; radioa_a...
false
false
false
false
false
0
buildtsigalias(apLosig) struct losig *apLosig; { struct losig *pLosig; struct chain *pChain; long sigNumber; if (LV_htSigAlias || LV_tSigAlias) { eprinth ("buildtsigalias"); eprintf ("\n Attempt to re-allocate the signal alias name table.\n"); EXIT (1); } sigNumber = 0; for (p...
false
false
false
false
false
0
g3_draw_poly(int nv,vertex **pointlist,uint tmap_flags) { int i; vertex **bufptr; ccodes cc; Assert( G3_count == 1 ); if(!Cmdline_nohtl && (tmap_flags & TMAP_HTL_3D_UNLIT)) { gr_tmapper( nv, pointlist, tmap_flags ); return 0; } //don't clip in HT&L mode, the card does it for us if(!Cmdline_nohtl && (tmap_...
false
false
false
false
false
0
iniparser_load(const char * ininame) { FILE * in ; char line [ASCIILINESZ+1] ; char section [ASCIILINESZ+1] ; char key [ASCIILINESZ+1] ; char tmp [ASCIILINESZ+1] ; char val [ASCIILINESZ+1] ; int last=0 ; int len ; int lineno=0 ; int errs=0; dictionary * ...
false
false
false
false
true
1