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
wasp_parse_toplevel( char** r_str, wasp_boolean* r_succ ){ *r_str = wasp_skip_space( *r_str ); char ch = **r_str; if( ch == '.' ){ r_succ = 0; wasp_parse_errmsg = wasp_em_baddot; wasp_parse_incomplete = 0; }else return wasp_parse_value_inner( r_str, r_succ ); }
false
false
false
false
false
0
File_RemoveFileNameDrive(char *pszFileName) { if ( (pszFileName[0]!='\0') && (pszFileName[1]==':') ) return(&pszFileName[2]); else return(pszFileName); }
false
false
false
false
false
0
bdb_set_db(bdb_info info, DB *db, const bdb_database database) { if (info->server == NULL) { info->db[database] = db; } else { GET_SPECIFIC(bdb_connection, con, bdb_init_connection, info->key, "bdb_set_db"); con->db[database] = db; } }
false
false
false
false
false
0
lex_match(LexState *ls, LexToken what, LexToken who, BCLine line) { if (!lex_opt(ls, what)) { if (line == ls->linenumber) { err_token(ls, what); } else { const char *swhat = lj_lex_token2str(ls, what); const char *swho = lj_lex_token2str(ls, who); lj_lex_error(ls, ls->token, LJ_ERR_XMA...
false
false
false
false
false
0
copiedFileWasModified(const KUrl& src, const KUrl& dest, const KDateTime& srcTime, const KDateTime& destTime) { Q_UNUSED(srcTime); // not sure it should appear in the msgbox // Possible improvement: only show the time if date is today const QString timeStr = KGlobal::locale()->formatDateTime(destTime, KLoca...
false
false
false
false
false
0
writemap ( void ) { checkForUniqueUnitIDs( spfld ); if ( !spfld ) displaymessage ( "tspfldloaders::writemap ; no map to write ! ",2); spfld->write ( *stream ); }
false
false
false
true
false
1
inf_tcp_connection_error(InfTcpConnection* connection, GError* error) { InfTcpConnectionPrivate* priv; priv = INF_TCP_CONNECTION_PRIVATE(connection); /* Normally, it would be enough to check one of both conditions, but socket * may be already set with status still being CLOSED during ...
false
false
false
false
false
0
oid_for_workdir_item( git_repository *repo, const git_index_entry *item, git_oid *oid) { int result; git_buf full_path = GIT_BUF_INIT; if (git_buf_joinpath(&full_path, git_repository_workdir(repo), item->path) < 0) return -1; /* calculate OID for file if possible*/ if (S_ISLNK(item->mode)) result = git_od...
false
false
false
false
false
0
git_iterator_for_workdir( git_iterator **out, git_repository *repo, git_iterator_flag_t flags, const char *start, const char *end) { int error; workdir_iterator *wi; if (git_repository__ensure_not_bare(repo, "scan working directory") < 0) return GIT_EBAREREPO; /* initialize as an fs iterator then do overri...
false
false
false
false
false
0
unbind_all (void) { // Unbind all of the <handle, ACE_Event_Handler>s. #ifdef ACE_WIN32 map_type::iterator const end = this->event_handlers_.end (); for (map_type::iterator pos = this->event_handlers_.begin (); pos != end; ) { // Post-increment (*not* pre-increment) before unbind()ing sinc...
false
false
false
false
false
0
delapplist(host, login) char *host; char *login; { char appname[NAME_LEN]; int cidsock; u_short op ; if ((cidsock = connectCid(host,login)) == -1) { printf(" Cannot reach CID \n"); close(cidsock); return 0; } op = htons(CID_OP_DEL_APPLI...
false
false
false
false
false
0
CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid) { ASN1_OBJECT **petype, *etype; petype = cms_get0_econtent_type(cms); if (!petype) return 0; if (!oid) return 1; etype = OBJ_dup(oid); if (!etype) return 0; ASN1_OBJECT_free(*petype); *petype = etype; return 1; }
false
false
false
false
false
0
wm9713_voice_shutdown(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); u16 status, rate; if (WARN_ON(event != SND_SOC_DAPM_PRE_PMD)) return -EINVAL; /* Gracefully shut down the voice interface. */ status = ac97_read(co...
false
false
false
false
false
0
isearch_enable_changed (gpointer callback_data) { NautilusWindowSlot *slot; gboolean enable; slot = NAUTILUS_WINDOW_SLOT (callback_data); enable = g_settings_get_boolean (nautilus_preferences, NAUTILUS_PREFERENCES_ENABLE_INTERACTIVE_SEARCH); if (enable != slot->details->isearch_enable) { if (!enable) isear...
false
false
false
false
false
0
H5A_type(const H5A_t *attr) { H5T_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI(NULL) HDassert(attr); /* Set return value */ ret_value = attr->shared->dt; done: FUNC_LEAVE_NOAPI(ret_value) }
false
false
false
false
false
0
qlcnic_83xx_idc_check_reset_ack_reg(struct qlcnic_adapter *adapter) { int timeout; u32 ack, presence, val; timeout = QLC_83XX_IDC_RESET_TIMEOUT_SECS; ack = QLCRDX(adapter->ahw, QLC_83XX_IDC_DRV_ACK); presence = QLCRDX(adapter->ahw, QLC_83XX_IDC_DRV_PRESENCE); dev_info(&adapter->pdev->dev, "%s: ack = 0x%x, pre...
false
false
false
false
false
0
resetValues(const QString & family, const QString & prop) { CachedValues.remove(family + prop); }
false
false
false
false
false
0
AppendSubType(struct Bundle *bundle,char *typename) { struct SubType *tp,*lp; char *sp; if (INSTALL_SKIP) { return NULL; } Debug("Appending new type section %s\n",typename); if (bundle == NULL) { yyerror("Software error. Attempt to add a type without a bundle\n"); FatalError("Stopped"); } ...
false
false
false
false
false
0
CanvasImageMovable(double x, double y) : Goocanvas::Image(x, y), CanvasItemMovable(), m_snap_corner(CORNER_TOP_LEFT) //arbitrary default. { init(); }
false
false
false
false
false
0
operator=( const XMLNode& A ) { // shallow copy if (this != &A) { if (d) { d->ref_count--; emptyTheNode(0); } d=A.d; if (d) (d->ref_count) ++ ; } return *this; }
false
false
false
false
false
0
esl_gumbel_invsurv(double p, double mu, double lambda) { /* The real calculation is mu - ( log(-1. * log(1-p)) / lambda). * But there's a problem with small p: * for p<1e-15, 1-p will be viewed as 1, so * log ( -log(1-p) ) == log (0) -> inf * Instead, use two approximations; * (1) log( 1-p) ~= -p f...
false
false
false
false
false
0
ib_cmrc_complete_send ( struct ib_device *ibdev __unused, struct ib_queue_pair *qp, struct io_buffer *iobuf, int rc ) { struct ib_cmrc_connection *cmrc = ib_qp_get_ownerdata ( qp ); /* Free the completed I/O buffer */ free_iob ( iobuf ); /* Close the connection on any send errors */ if ( rc != 0 ...
false
false
false
false
false
0
main(int argc, char *argv[]){ int restr[ARG_LEN]; int i; for(i=0; i<ARG_LEN; i++){ restr[i] = atoi(argv[i+1]); printf("Arguments: %d\n",restr[i]); } generator(restr); return 0; }
false
false
false
false
false
0
gpk_update_viewer_model_get_path (GtkTreeModel *model, const gchar *package_id) { GtkTreePath *path = NULL; g_return_val_if_fail (package_id != NULL, NULL); g_object_set_data (G_OBJECT(model), "_path", (gpointer) &path); gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) gpk_update_viewer_find_iter_model_cb, ...
false
false
false
false
false
0
constructProxy(const QRemoteServiceRegister::Entry& entry) { // Client side Q_ASSERT(d->endPointType == ObjectEndPoint::Client); // Request a serialized meta object QServicePackage p; p.d = new QServicePackagePrivate(); p.d->messageId = QUuid::createUuid(); p.d->entry = entry; Respons...
false
false
false
false
false
0
r100_cp_fini(struct radeon_device *rdev) { if (r100_cp_wait_for_idle(rdev)) { DRM_ERROR("Wait for CP idle timeout, shutting down CP.\n"); } /* Disable ring */ r100_cp_disable(rdev); radeon_scratch_free(rdev, rdev->ring[RADEON_RING_TYPE_GFX_INDEX].rptr_save_reg); radeon_ring_fini(rdev, &rdev->ring[RADEON_RING_TY...
false
false
false
false
false
0
Jim_SetResultFormatted(Jim_Interp *interp, const char *format, ...) { /* Initial space needed */ int len = strlen(format); int extra = 0; int n = 0; const char *params[5]; char *buf; va_list args; int i; va_start(args, format); for (i = 0; i < len && n < 5; i++) { int l...
false
false
false
false
true
1
print_ref_item(struct ref_item *item, int maxwidth, int verbose, int abbrev, int current) { char c; int color; struct commit *commit = item->commit; if (!matches_merge_filter(commit)) return; switch (item->kind) { case REF_LOCAL_BRANCH: color = COLOR_BRANCH_LOCAL; break; case REF_REMOTE_BRANCH: c...
true
true
false
false
false
1
operator<<(std::ostream &ostr, Medium* item) { return ostr << " " << setw(8) << right << item->getSignature() << " " << setw(6) << left << item->getType() << " " << setw(20) << left << item->getTitle().substr(0, 20) << " " << setw(6) << left << item->printState() << " " << item->getDetails() ...
false
false
false
false
false
0
do_mget_cmd (char *args, GtkWidget *dialog) { char *text, *start, *end; int token, n; GtkWidget *main_window = gtk_object_get_data(GTK_OBJECT(dialog), "image_window"); struct camera_t *camera = camera_find(main_window, CAMERA_MAIN); if(! camera) { err_printf("no camera connected\n"); return OBS_CMD_ERROR; } ...
false
false
false
false
false
0
get_fl_win_struct( Window win ) { FLI_WIN *fwin = fli_app_win, *lwin = fli_app_win; size_t i; for ( ; fwin && fwin->win != win; lwin = fwin, fwin = fwin->next ) /* empty */ ; /* If we found it we're done */ if ( fwin ) return fwin; /* Otherwise create a new struct...
false
false
false
false
false
0
load_dep_bb(void) { char *line; FILE *fp = fopen_for_read(DEPFILE_BB); if (!fp) return 0; dep_bb_seen = 1; dbg1_error_msg("loading "DEPFILE_BB); /* Why? There is a rare scenario: we did not find modprobe.dep.bb, * we scanned the dir and found no module by name, then we search * for alias (full scan), and...
false
false
false
false
false
0
stream_buffer_finalize (GObject *object) { CamelStreamBufferPrivate *priv; priv = CAMEL_STREAM_BUFFER_GET_PRIVATE (object); if (!(priv->flags & BUF_USER)) g_free (priv->buf); g_free (priv->linebuf); /* Chain up to parent's finalize() method. */ G_OBJECT_CLASS (camel_stream_buffer_parent_class)->finalize (ob...
false
false
false
false
false
0
element_count(bool leaves) { if (!leaves) return d_vars.size(); else { int i = 0; for (Vars_iter j = d_vars.begin(); j != d_vars.end(); j++) { i += (*j)->element_count(leaves); } return i; } }
false
false
false
false
false
0
ldns_dname2canonical(const ldns_rdf *rd) { uint8_t *rdd; uint16_t i; if (ldns_rdf_get_type(rd) != LDNS_RDF_TYPE_DNAME) { return; } rdd = (uint8_t*)ldns_rdf_data(rd); for (i = 0; i < ldns_rdf_size(rd); i++, rdd++) { *rdd = (uint8_t)LDNS_DNAME_NORMALIZE((int)*rdd); } }
false
false
false
false
false
0
md_close (gcry_md_hd_t a) { GcryDigestEntry *r, *r2; if (! a) return; if (a->ctx->debug) md_stop_debug (a); for (r = a->ctx->list; r; r = r2) { r2 = r->next; ath_mutex_lock (&digests_registered_lock); _gcry_module_release (r->module); ath_mutex_unlock (&digests_registered_lo...
false
false
false
false
false
0
addrbook_chkparse_attr_list(AddressBookFile *book, XMLFile *file) { guint prev_level; for (;;) { prev_level = file->level; if (xml_parse_next_tag(file)) longjmp(book->jumper, 1); if (file->level < prev_level) return; if (xml_compare_tag(file, AB_ELTAG_ATTRIBUTE)) { addrbook_chkparse_attribute(book,...
false
false
false
false
false
0
rb_source_filename(f) const char *f; { char *name; if (!st_lookup(source_filenames, (st_data_t)f, (st_data_t *)&name)) { long len = strlen(f) + 1; char *ptr = name = ALLOC_N(char, len + 1); *ptr++ = 0; MEMCPY(ptr, f, char, len); st_add_direct(source_filenames, (st_data_t)ptr, (st_data_t)name); return...
false
false
false
true
false
1
show_mapping() { SHOW_ALL_NL; fputs("\tmapping for 3-d data is ", stderr); switch (mapping3d) { case MAP3D_CARTESIAN: fputs("cartesian\n", stderr); break; case MAP3D_SPHERICAL: fputs("spherical\n", stderr); break; case MAP3D_CYLINDRICAL: fputs("cylindrical\n", stderr); break; } }
false
false
false
false
false
0
CA_listopen(pathname, FromServer, ToServer, request) char *pathname; FILE *FromServer; FILE *ToServer; char *request; { char buff[BUFSIZ]; char *p; int oerrno; FILE *F; (void)unlink(pathname); if ((F = fopen(pathname, "w")) == NULL) return NULL; /* Send a LIST command to ...
false
false
false
false
true
1
smp_callin(void) { int cpuid, phys_id; /* * If waken up by an INIT in an 82489DX configuration * cpu_callout_mask guarantees we don't get here before * an INIT_deassert IPI reaches our local APIC, so it is * now safe to touch our local APIC. */ cpuid = smp_processor_id(); /* * (This works even if the ...
false
false
false
false
false
0
ShutdownXLOG(int code, Datum arg) { ereport(LOG, (errmsg("shutting down"))); if (RecoveryInProgress()) CreateRestartPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE); else { /* * If archiving is enabled, rotate the last XLOG file so that all the * remaining records are archived (postmaster wakes up...
false
false
false
false
false
0
pixFinalAccumulate(PIX *pixs, l_uint32 offset, l_int32 depth) { l_int32 i, j, w, h, wpls, wpld, val; l_uint32 *datas, *datad, *lines, *lined; PIX *pixd; PROCNAME("pixFinalAccumulate"); if (!pixs) return (PIX *)ERROR_PTR("pixs not defined", procNa...
false
false
false
false
false
0
gel_value_matrix_multiply (GelMatrixW *res, GelMatrixW *m1, GelMatrixW *m2, mpw_ptr modulo) { int i, j, k, w, h, m1w; mpw_t tmp; mpw_init(tmp); gel_matrixw_make_private(res, TRUE /* kill_type_caches */); w = gel_matrixw_width (res); h = gel_matrixw_height (res); m1w = gel_matrixw_width (m1); for (j = 0; ...
false
false
false
false
false
0
f_fact(VALUE *vp) { VALUE res; /* initialize VALUE */ res.v_type = V_NUM; res.v_subtype = V_NOSUBTYPE; if (vp->v_type == V_OBJ) { return objcall(OBJ_FACT, vp, NULL_VALUE, NULL_VALUE); } if (vp->v_type != V_NUM) { math_error("Non-real argument for fact()"); /*NOTREACHED*/ } res.v_num = qfact(vp->v_num);...
false
false
false
false
false
0
ipath_alloc_ucontext(struct ib_device *ibdev, struct ib_udata *udata) { struct ipath_ucontext *context; struct ib_ucontext *ret; context = kmalloc(sizeof *context, GFP_KERNEL); if (!context) { ret = ERR_PTR(-ENOMEM); goto bail; } ret = &context->ibucontext; bail: return ret; }
false
false
false
false
false
0
completionCallback(const char *buf, linenoiseCompletions *lc) { size_t startpos = 0; int mask; int i; size_t matchlen; sds tmp; if (strncasecmp(buf,"help ",5) == 0) { startpos = 5; while (isspace(buf[startpos])) startpos++; mask = CLI_HELP_COMMAND | CLI_HELP_GROUP; }...
false
false
false
false
false
0
Handedness(float *pos_ptr, int i, int index1, int index2) { Vector v1, v2, v3, v4, v5; float c; v1 = DXVec(pos_ptr[2*i], pos_ptr[2*i+1], 0.0); v2 = DXVec(pos_ptr[2*index1], pos_ptr[2*index1+1], 0.0); v3 = DXVec(pos_ptr[2*index2], pos_ptr[2*index2+1], 0.0); v4 = DXSub(v2, v1); v5 = DXSub(v3, v1); /* s...
false
false
false
false
false
0
balance_noise(lame_global_flags const *const gfp, gr_info * const cod_info, FLOAT const *distort, FLOAT xrpow[576], int bRefine) { lame_internal_flags *const gfc = gfp->internal_flags; int status; amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine); /* check to make sure we ha...
false
false
false
false
false
0
music_disable(void *data) { if (!data) return -1; ast_free(data); return 0; }
false
false
false
false
false
0
bf_atan(Var arglist, Byte next, void *vdata, Objid progr) { double d, dd; d = *arglist.v.list[1].v.fnum; errno = 0; if (arglist.v.list[0].v.num >= 2) { dd = *arglist.v.list[2].v.fnum; d = atan2(d, dd); } else d = atan(d); free_var(arglist); if (errno == EDOM) return make_error_pack(E_IN...
false
false
false
false
false
0
forget_config(void) { if (cfg != NULL) { char *password = conf_getstr(cfg, "password"); if (password != NULL) (void)memset(password, 0, strlen(password)); conf_free(cfg); } }
false
false
false
false
false
0
eel_d_copy(eel_data_t *data, const eel_data_t *from) { eel_d_freestring(data); switch (from->type) { case EDT_ILLEGAL: case EDT_REAL: case EDT_INTEGER: case EDT_CADDR: case EDT_SYMREF: case EDT_SYMTAB: case EDT_OPERATOR: case EDT_DIRECTIVE: case EDT_SPECIAL: *data = *from; return 1; ...
false
false
false
false
false
0
common_init_after_header(AVCodecContext *avctx){ SnowContext *s = avctx->priv_data; int plane_index, level, orientation; for(plane_index=0; plane_index<3; plane_index++){ int w= s->avctx->width; int h= s->avctx->height; if(plane_index){ w>>= s->chroma_h_shift; ...
false
false
false
false
false
0
setChain( std::vector<unsigned long> chain ) { if( chain.size() ) { for( unsigned i=0; i<chain.size()-1; i++ ) set( chain[i], chain[i+1] ); set( chain[ chain.size()-1 ], AllocTable::Eof ); } }
false
false
false
false
false
0
spread1r (double f (double), void fc (double *, double *, double *), header *hd) { header *result,*st=hd; hd=getvalue(hd); if (error) return; func=f; result=map1r(funceval,fc,hd); if (!error) moveresult(st,result); }
false
false
false
false
false
0
free_private_key(struct private_key *key) { free_AlgorithmIdentifier(&key->alg); if (key->private_key) hx509_private_key_free(&key->private_key); der_free_octet_string(&key->localKeyId); free(key); }
false
false
false
false
false
0
unmarshalString(cdrStream& stream, CORBA::ULong bound, omniCodeSet::UniChar*& us) { CORBA::ULong len; len <<= stream; if (len == 0) { if (orbParameters::strictIIOP) { omniORB::logs(1, "Error: received an invalid zero length string."); OMNIORB_THROW(MARSHAL, MARSH...
false
false
false
false
false
0
OPLLResetChip(YM2413 *chip) { int c,s; int i; chip->eg_timer = 0; chip->eg_cnt = 0; chip->noise_rng = 1; /* noise shift register */ /* setup instruments table */ for (i=0; i<19; i++) { for (c=0; c<8; c++) { chip->inst_tab[i][c] = table[i][c]; } } /* reset with register wr...
false
false
false
false
false
0
selectAndIconify() { Window window = userSelectWindow(true); if (window) { TrayItemSettings settings; settings.balloonTimeout = 4000; settings.iconify = true; settings.skipTaskbar = false; settings.skipPager = false; settings.sticky = false; settings.icon...
false
false
false
false
false
0
ParseVersionNumber(const char*& c, CORBA::Char& majver, CORBA::Char& minver) { const char* p; for (p=c; *p && *p != '@' && *p != ':' && *p != ',' && *p != '/' && *p != '#'; p++); if (*p == '@') { // Found a version number unsigned long l; // Major p = c; if (!isdigit(*p)) OMNIO...
false
false
false
false
false
0
xstrncasecmp_pl(const char *s1, const char *s2, size_t n) { return strncasecmp_pl(fix(s1), fix(s2), n); }
false
true
false
false
false
1
get_log( const char* szLogDevice, short* psLevel ) { string sValue; assert( gpConfig != NULL ); TRY_OR_CLEAR( gpConfig->Get_Log( szLogDevice, sValue ) ); *psLevel = (short)strtol(sValue.c_str(), (char**)NULL, 10); }
false
false
false
false
false
0
server_to_input_buf(str) char_u *str; { char_u *ptr = NULL; char_u *cpo_save = p_cpo; /* Set 'cpoptions' the way we want it. * B set - backslashes are *not* treated specially * k set - keycodes are *not* reverse-engineered * < unset - <Key> sequences *are* interpreted ...
false
false
false
false
false
0
count_bit_ESC(const int *ix, const int *const end, int t1, const int t2, int *const s) { /* ESC-table is used */ int const linbits = ht[t1].xlen * 65536 + ht[t2].xlen; int sum = 0, sum2; do { int x = *ix++; int y = *ix++; if (x != 0) { if (x > 14) { ...
false
false
false
false
false
0
setValue(const SbVec2f & v) { #if COIN_DEBUG if (v[0] > std::numeric_limits<short>::max() || v[0] < -std::numeric_limits<short>::max() || v[1] > std::numeric_limits<short>::max() || v[1] < -std::numeric_limits<short>::max()) { SoDebugError::post("SbVec2s::setValue", "SbVec2f argument out of range for SbVec2...
false
false
false
false
false
0
xkl_config_registry_get_instance(XklEngine * engine) { XklConfigRegistry *config; if (!engine) { xkl_debug(10, "xkl_config_registry_get_instance : engine is NULL ?\n"); return NULL; } config = XKL_CONFIG_REGISTRY(g_object_new (xkl_config_registry_get_type(), "engine", engine, NULL)); retu...
false
false
false
false
false
0
string_array_find_exact_( double *string_array_header, char *test_string, int *test_len, int *result_array, int *result_array_size, int *num_indices ...
false
false
false
false
false
0
hmac_open (gcry_mac_hd_t h) { gcry_err_code_t err; gcry_md_hd_t hd; int secure = (h->magic == CTX_MAGIC_SECURE); unsigned int flags; int md_algo; md_algo = map_mac_algo_to_md (h->spec->algo); flags = GCRY_MD_FLAG_HMAC; flags |= (secure ? GCRY_MD_FLAG_SECURE : 0); err = _gcry_md_open (&hd, md_algo, ...
false
false
false
false
false
0
connection_read_activate( ber_socket_t s ) { int rc; /* * suspend reading on this file descriptor until a connection processing * thread reads data on it. Otherwise the listener thread will repeatedly * submit the same event on it to the pool. */ rc = slapd_clr_read( s, 0 ); if ( rc ) return rc; /* Don...
false
false
false
false
false
0
adc_init_SBx(struct hw *hw, int input, int mic20db) { u16 gpioorg; u16 input_source; u32 adcdata; unsigned int ret; input_source = 0x100; /* default to analog */ switch (input) { case ADC_MICIN: adcdata = 0x1; input_source = 0x180; /* set GPIO7 to select Mic */ break; case ADC_LINEIN: adcdata = 0x2; ...
false
false
false
false
false
0
qla81xx_write_mpi_register(scsi_qla_host_t *vha, uint16_t *mb) { int rval; uint32_t stat, timer; uint16_t mb0 = 0; struct qla_hw_data *ha = vha->hw; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; rval = QLA_SUCCESS; ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1103, "Entered %s.\n", __func__); ...
false
false
false
false
false
0
show_special(keys, len) char_u *keys; int len; { int i; char_u buf[CMDBUFFSIZE + 1]; char_u * p; char_u * w; p = buf; while (*keys) { if (*keys == K_SPECIAL) { for (w = NULL, i = 0; special_keys[i].key != 0; i++) { if ((special_keys[i].key & 0xff) == keys[1]) { w = special_keys...
false
false
false
false
false
0
main( int argc, char *argv[]) { FILE *fp = fopen(argv[1], "r+b"); if ( fp == NULL) { printf( "File cannot be opened\n"); return 0; } traverse(fp); }
false
false
false
false
true
1
plugview_sasl_getopt ( void *context, const char *plugin_name, const char *option, const char **result, unsigned *len ) { if (strcasecmp (option, SASL_OPT_MECH_LIST) == 0) { /* Whitespace separated list of mechanisms to allow (e.g. 'plain otp'). Used to restrict the mechanisms...
false
false
false
false
false
0
il_dbgfs_wd_timeout_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { struct il_priv *il = file->private_data; char buf[8]; int buf_size; int timeout; memset(buf, 0, sizeof(buf)); buf_size = min(count, sizeof(buf) - 1); if (copy_from_user(buf, user_buf, buf_size)) retur...
false
false
false
false
false
0
vnote(const char *file, int line, note_level_t level, const char *fmt, va_list ap) { int saved_errno = errno; note_prefix(file, line, level); vfprintf(stderr, fmt, ap); fputs("\n", stderr); #if 0 fflush(stderr); #endif if (level == NOTE_FATAL) { fatality("FATALITY"); } errno = saved_errno; ...
false
false
false
false
true
1
main_hall_id() { if (Main_hall==NULL) { return -1; } else { return main_hall_get_index(Main_hall->name); } }
false
false
false
false
false
0
set_dirs (char *exe) { char *base; char *config, *lib, *mono; struct stat buf; /* * Only /usr prefix is treated specially */ if (strncmp (exe, MONO_BINDIR, strlen (MONO_BINDIR)) == 0 || (base = compute_base (exe)) == NULL){ fallback (); return; } config = g_build_filename (base, "etc", NULL); lib = g...
false
false
false
false
false
0
gnm_acoth (gnm_float x) { return (gnm_abs (x) > 2) ? gnm_log1p (2 / (x - 1)) / 2 : gnm_log ((x - 1) / (x + 1)) / -2; }
false
false
false
false
false
0
operator=(const TimeZoneTransition& right) { if (this != &right) { fTime = right.fTime; setFrom(*right.fFrom); setTo(*right.fTo); } return *this; }
false
false
false
false
false
0
genfs_state_get_cur(const qpol_iterator_t * iter) { genfs_state_t *gs = NULL; qpol_genfscon_t *genfscon = NULL; if (iter == NULL || qpol_iterator_state(iter) == NULL || genfs_state_end(iter)) { errno = EINVAL; return NULL; } gs = (genfs_state_t *) qpol_iterator_state(iter); genfscon = calloc(1, sizeof(qpol...
false
false
false
false
false
0
sm_realloc(const char *fname, int lineno, void *ptr, unsigned int size) { unsigned osize; void *buf; char *cp = (char *) ptr; Dmsg4(1400, "sm_realloc %s:%d %p %d\n", get_basename(fname), (uint32_t)lineno, ptr, size); if (size <= 0) { e_msg(fname, lineno, M_ABORT, 0, _("sm_realloc size: %d\n"), siz...
false
false
false
false
false
0
blk_integrity_compare(struct gendisk *gd1, struct gendisk *gd2) { struct blk_integrity *b1 = &gd1->queue->integrity; struct blk_integrity *b2 = &gd2->queue->integrity; if (!b1->profile && !b2->profile) return 0; if (!b1->profile || !b2->profile) return -1; if (b1->interval_exp != b2->interval_exp) { pr_er...
false
false
false
false
false
0
e_web_view_preview_init (EWebViewPreview *preview) { GtkWidget *tree_view_sw, *web_view_sw; preview->priv = E_WEB_VIEW_PREVIEW_GET_PRIVATE (preview); preview->priv->escape_values = TRUE; tree_view_sw = in_scrolled_window (gtk_tree_view_new ()); web_view_sw = in_scrolled_window (e_web_view_new ()); gtk_widget_h...
false
false
false
false
false
0
init_persist_pipes(void) { int i; /* * if we are already taken care of, just return */ if (persist_pipes) { return persist_pipes ? 1 : 0; } /* * Otherwise malloc and initialize */ persist_pipes = (struct persist_pipe_type *) malloc(sizeof(struc...
false
false
false
false
false
0
update_stats (void) { int numServers = list_count (Servers); time_t delta; delta = global.current_time - global.last_click; strcpy (Buf, ctime (&Server_Start)); Buf[strlen (Buf) - 1] = 0; log_message ("update_stats: server was started on %s", Buf); strcpy (Buf, ctime (&global.current_...
false
false
false
false
false
0
sensor_reset_optionmenu(Sensor *sensor) { Sensor *sr; if (!optionmenu) return; sr = get_referenced_sensor(); if (sr == sensor) gtk_option_menu_set_history(GTK_OPTION_MENU(optionmenu), SENSOR_PANEL_LOCATION); }
false
false
false
false
false
0
DoCpuProfile(Sampler* sampler, void* raw_sender) { if (!sampler->IsProfiling()) return; SignalSender* sender = reinterpret_cast<SignalSender*>(raw_sender); sender->SendProfilingSignal(sampler->platform_data()->vm_tid()); }
false
false
false
false
false
0
gst_oss_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec) { GstOssSink *oss; struct audio_buf_info info; int mode; int tmp; oss = GST_OSSSINK (asink); /* we opened non-blocking so that we can detect if the device is available * without hanging forever. We now want to remove the non-blocking...
false
false
false
false
true
1
thread_func ( void* arg ) { int i; /* Wait for go-ahead. */ pthread_mutex_lock( &go_ahead); pthread_mutex_unlock(&go_ahead); for( i =0 ; i < N_SCANS ; i++ ) { int main(int ARGC, char *ARGV[]); int next; yyscan_t scanner; FILE * fp; pthread_mutex_lock ...
false
false
false
false
true
1
bar_pane_comment_write(PaneCommentData *pcd) { gchar *comment; if (!pcd->fd) return; comment = text_widget_text_pull(pcd->comment_view); metadata_write_string(pcd->fd, pcd->key, comment); g_free(comment); }
false
false
false
false
false
0
getRecords( StringRef FuncName, ArrayRef<InstrProfRecord> &Data) { auto Iter = Index->find(FuncName); if (Iter == Index->end()) return instrprof_error::unknown_function; Data = (*Iter); if (Data.empty()) return instrprof_error::malformed; return instrprof_error::success; }
false
false
false
false
false
0
set_owner(CARD* owner) { for (iterator ci=begin(); ci!=end(); ++ci) { trace_func_comp(); (**ci).set_owner(owner); } return *this; }
false
false
false
false
false
0
AddArguments(int argc,const char **argv) { for (int i=0; i<argc; ++i) { this->Args.push_back(argv[i]); } }
false
false
false
false
false
0
git_note_create( git_oid *out, git_repository *repo, git_signature *author, git_signature *committer, const char *notes_ref, const git_oid *oid, const char *note) { int error; char *target = NULL; git_commit *commit = NULL; git_tree *tree = NULL; target = git_oid_allocfmt(oid); GITERR_CHECK_ALLOC(target); ...
false
false
false
false
false
0
AcpiOsGetTableByIndex ( UINT32 Index, ACPI_TABLE_HEADER **Table, UINT32 *Instance, ACPI_PHYSICAL_ADDRESS *Address) { OSL_TABLE_INFO *Info; ACPI_STATUS Status; UINT32 i; /* Get main ACPI tables from memory o...
false
false
false
false
false
0
decimal_real_convert (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *a) { const struct real_format *fmt = REAL_MODE_FORMAT (mode); if (a->decimal && fmt->b == 10) return; if (a->decimal) decimal_to_binary (r, a, mode); else decimal_from_binary (r, a); }
false
false
false
false
false
0
bma150_register_polled_device(struct bma150_data *bma150) { struct input_polled_dev *ipoll_dev; int error; ipoll_dev = input_allocate_polled_device(); if (!ipoll_dev) return -ENOMEM; ipoll_dev->private = bma150; ipoll_dev->open = bma150_poll_open; ipoll_dev->close = bma150_poll_close; ipoll_dev->poll = bma1...
false
false
false
false
false
0
make_method(const char *name, DBusHandlerResult (*fn)(DBusConnection *conn, DBusMessage *msg, struct cm_client_info *ci, struct cm_context *ctx), struct cm_tdbush_method_arg *args, struct cm_tdbush_member_annotation *annotations) { struct cm_tdbush_method *ret; ret = malloc(size...
false
false
false
false
false
0