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
cafe_smbus_read_data(struct cafe_camera *cam, u16 addr, u8 command, u8 *value) { unsigned int rval; unsigned long flags; struct mcam_camera *mcam = &cam->mcam; spin_lock_irqsave(&mcam->dev_lock, flags); rval = TWSIC0_EN | ((addr << TWSIC0_SID_SHIFT) & TWSIC0_SID); rval |= TWSIC0_OVMAGIC; /* Make OV sensors wor...
false
false
false
false
false
0
mask_color_updated_cb(GtkWidget *sel, MaskColorSelectorData *mcsdata) { GdkColor gdkcolor; guint16 gdkalpha; GwyRGBA rgba; gwy_debug("mcsdata = %p", mcsdata); if (gtk_color_selection_is_adjusting(GTK_COLOR_SELECTION(sel))) return; gtk_color_selection_get_current_color(GTK_COLOR_SELECTI...
false
false
false
false
false
0
OnRemoveScript(cb_unused wxCommandEvent& event) { wxListCtrl* list = XRCCTRL(*this, "chkStartupScripts", wxListCtrl); long sel = list->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); list->DeleteItem(sel); m_ScriptsVector.erase(m_ScriptsVector.begin() + sel); if (sel > list->GetItemCount(...
false
false
false
false
false
0
sge_unparse_checkpoint_option( lListElem *job, lList **pcmdline, lList **alpp ) { lListElem *ep_opt = NULL; char *cp; int i; char str[1024 + 1]; u_long32 ul; DENTER(TOP_LAYER, "sge_unparse_checkpoint_option"); if ((i = lGetUlong(job, JB_checkpoint_attr))) { if ((cp = sge_unparse_checkpo...
false
false
false
false
false
0
LEXER_set_next_token( LEXCONTEXT *pc, int init_token_value ) { if (init_token_value != -1) { pc->send_init_token = 1; pc->init_token_value = init_token_value; } }
false
false
false
false
false
0
getLayout(int *array) { GtkPaned *iter; int vl, sum, nhandle, shandle; int n; gtk_widget_style_get (border, "handle-size", &shandle, (void *)NULL); iter = next(NULL); if (iter) { sum = 0; nhandle = 0; n = 0; for(;;) { vl = get_child_width(iter); //gtk_paned_get_position(iter); iter = n...
false
false
false
false
true
1
gst_app_sink_set_drop (GstAppSink * appsink, gboolean drop) { GstAppSinkPrivate *priv; g_return_if_fail (GST_IS_APP_SINK (appsink)); priv = appsink->priv; g_mutex_lock (priv->mutex); if (priv->drop != drop) { priv->drop = drop; /* signal the change */ g_cond_signal (priv->cond); } g_mutex_u...
false
false
false
false
false
0
_gsasl_digest_md5_server_finish (Gsasl_session * sctx, void *mech_data) { _Gsasl_digest_md5_server_state *state = mech_data; if (!state) return; digest_md5_free_challenge (&state->challenge); digest_md5_free_response (&state->response); digest_md5_free_finish (&state->finish); free (state); }
false
false
false
false
false
0
poppler_document_get_form_field (PopplerDocument *document, gint id) { Page *page; unsigned pageNum; unsigned fieldNum; FormPageWidgets *widgets; FormWidget *field; FormWidget::decodeID (id, &pageNum, &fieldNum); page = document->doc->getPage (pageNum); if (!page) return NULL; ...
false
false
false
false
false
0
MultiSolve(bool new_matrix, const Index* airn, const Index* ajcn, Index nrhs, double* rhs_vals, bool check_Ne...
false
false
false
false
false
0
client_function() { Netc client; client.set_ip("192.168.1.101",true); client.init_socket(); client.set_port(5300,true); client.set_server_ip("192.168.1.101",true); client.set_socket_opt(); while( !client.connect_server() ) { printf ( "connecting\n" ); usleep(500000); } client.close_socket(); }
false
false
false
false
false
0
cl_fd_list_cleanup(cl_raw_list_t **list_p) { cl_fd_list_elem_t* elem = NULL; elem = cl_fd_list_get_first_elem(*list_p); if (elem != NULL) { CL_LOG(CL_LOG_WARNING, "The list was NOT empty. Unregister all external file descriptors before cleanup next time, please"); } while(elem){ cl_fd_list_...
false
false
false
false
true
1
__talloc_link(const void *context, struct talloc_chunk *tc) { if (likely(context)) { struct talloc_chunk *parent = talloc_chunk_from_ptr(context); if (parent->child) { parent->child->parent = NULL; tc->next = parent->child; tc->next->prev = tc; } else { ...
false
false
false
false
false
0
guessSerial() { #ifdef UNIX DIR *d = opendir(DEVPATH); char *dev = NULL; { struct dirent foo; dev = malloc(sizeof(foo.d_name)); } char found = 0; if(d) { struct dirent *entry; while((entry = readdir(d))) { if(strncmp(entry->d_name, DEVPREFIX, strlen(DEVPREFIX)) == 0) { found = 1; strcpy(dev, ...
false
true
false
false
false
1
mdb_choose_index(MdbTableDef *table, int *choice) { unsigned int i; MdbIndex *idx; int cost = 0; int least = 99; *choice = -1; for (i=0;i<table->num_idxs;i++) { idx = g_ptr_array_index (table->indices, i); cost = mdb_index_compute_cost(table, idx); //printf("cost for %s is %d\n", idx->name, cost); if (co...
false
false
false
false
false
0
typeChar(int idPDG) { int type = 0; if(abs(idPDG) == 1000024) type = 1; else if (abs(idPDG) == 1000037)type = 2; return type; }
false
false
false
false
false
0
gdome_xmlLinkAttr(xmlNode *elem, xmlAttr *attr) { xmlAttr *cur = NULL; if (elem == NULL || attr == NULL) return -1; gdome_xmlSetParent((xmlNode *)attr, (xmlNode *)elem); gdome_xmlSetOwner((xmlNode *)attr, gdome_xmlGetOwner(elem)); if(gdome_xmlGetAttrList(elem) == NULL) { gdome_xmlSetAttrList(elem, ...
false
false
false
false
false
0
mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode, unsigned int channel, u8 ato, bool atox, unsigned int *sample) { u32 adc0, adc1, old_adc0; int i, ret; struct mc13xxx_adcdone_data adcdone_data = { .mc13xxx = mc13xxx, }; init_completion(&adcdone_data.done); dev_dbg(mc13xxx->dev, "%s\n",...
false
false
false
false
false
0
async_lcp_peek(struct asyncppp *ap, unsigned char *data, int len, int inbound) { int dlen, fcs, i, code; u32 val; data += 2; /* skip protocol bytes */ len -= 2; if (len < 4) /* 4 = code, ID, length */ return; code = data[0]; if (code != CONFACK && code != CONFREQ) return; dlen = get_unaligned_be16(...
false
false
false
false
false
0
postAttack( bool reactionFire ) { if ( !reactionFire ) attacked = true; if ( typ->hasFunction( ContainerBaseType::MoveAfterAttack ) ) decreaseMovement ( maxMovement() * attackmovecost / 100 ); else if ( reactionfire.getStatus() == ReactionFire::off ) setMovement ( 0 ); }
false
false
false
false
false
0
__ibv_close_device(struct ibv_context *context) { int async_fd = context->async_fd; int cmd_fd = context->cmd_fd; int cq_fd = -1; if (abi_ver <= 2) { struct ibv_abi_compat_v2 *t = context->abi_compat; cq_fd = t->channel.fd; free(context->abi_compat); } context->device->ops.free_context(context); cl...
false
false
false
false
false
0
_fmpz_poly_mul_trunc_n(fmpz_poly_t output, const fmpz_poly_t input1, const fmpz_poly_t input2, const unsigned long trunc) { if ((input1->length == 0) || (input2->length == 0)) { _fmpz_poly_zero(output); return; } if ((input1->length <= 3) && (input2->l...
false
false
false
false
false
0
introspect(DBusConnection *connection, DBusMessage *message, void *user_data) { struct generic_data *data = user_data; DBusMessage *reply; if (data->introspect == NULL) generate_introspection_xml(connection, data, dbus_message_get_path(message)); reply = dbus_message_new_method_return(message); if (r...
false
false
false
false
false
0
GetNextFeature() { while( iNextReadFID < nMaxFeatureCount ) { OGRFeature *poFeature = papoFeatures[iNextReadFID++]; if( poFeature == NULL ) continue; if( (m_poFilterGeom == NULL || FilterGeometry( poFeature->GetGeometryRef() ) ) && (m_poAttrQuery =...
false
false
false
false
false
0
ib_cache_event(struct ib_event_handler *handler, struct ib_event *event) { struct ib_update_work *work; if (event->event == IB_EVENT_PORT_ERR || event->event == IB_EVENT_PORT_ACTIVE || event->event == IB_EVENT_LID_CHANGE || event->event == IB_EVENT_PKEY_CHANGE || event->event == IB_EVEN...
false
false
false
false
false
0
edge_connection_new(int type, int socket_family) { edge_connection_t *edge_conn = tor_malloc_zero(sizeof(edge_connection_t)); tor_assert(type == CONN_TYPE_EXIT); connection_init(time(NULL), TO_CONN(edge_conn), type, socket_family); return edge_conn; }
false
false
false
false
false
0
CL_AddPainPic2(void) { double time_difference; // get current time and stats paininfo.ct = time(NULL); paininfo.ch = cl.frame.playerstate.stats[STAT_HEALTH]; paininfo.ca = cl.frame.playerstate.stats[STAT_ARMOR]; // initialize the paininfo struct if (!paininfo_init) { paininfo.lh = paininfo.ch; paininfo.l...
false
false
false
false
false
0
zend_stack_destroy(zend_stack *stack) { int i; if (stack->elements) { for (i = 0; i < stack->top; i++) { efree(stack->elements[i]); } efree(stack->elements); stack->elements = NULL; } return SUCCESS; }
false
false
false
false
false
0
overlapBounds(const float* amin, const float* amax, const float* bmin, const float* bmax) { bool overlap = true; overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap; overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap; overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ...
false
false
false
false
false
0
torus_display_period_init() { int i; if ( web.torus_display_period ) return; web.torus_display_period = dmatrix(0,SDIM-1,0,SDIM-1); web.inverse_display_periods = dmatrix(0,SDIM-1,0,SDIM-1); for ( i = 0 ; i < SDIM ; i++ ) web.torus_display_period[i][i] = web.inverse_display_periods[i][i] = 1.0; }
false
false
false
false
false
0
survey_timer_hdl(unsigned long data) { struct adapter *padapter = (struct adapter *)data; struct cmd_obj *ph2c; struct sitesurvey_parm *psurveyPara; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; /* issue rtw_sitesurvey_cmd */ if (pmlmeext->sitesurv...
false
false
false
false
false
0
getCompleteString() const { char buf[100]; char *p = &buf[0]; if (qualifier != EvqTemporary && qualifier != EvqGlobal) p += sprintf(p, "%s ", getQualifierString()); sprintf(p, "%s", getBasicString()); if (array) p += sprintf(p, " array"); if (matrix) p += sprintf(p, "matrix%dX%d", ...
false
false
false
false
false
0
ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product) { struct ath_hw *ah = priv->ah; struct ath_common *common = ath9k_hw_common(ah); int qnum; /* * Check if BTCOEX is globally disabled. */ if (!common->btcoex_enabled) { ah->btcoex_hw.scheme = ATH_BTCOEX_CFG_NONE; return; } if (product && ...
false
false
false
false
false
0
ui_main() { if( data.init_done ) return; data.init_done = 1; # if defined(NEKO_WINDOWS) { WNDCLASSEX wcl; HINSTANCE hinst = GetModuleHandle(NULL); memset(&wcl,0,sizeof(wcl)); wcl.cbSize = sizeof(WNDCLASSEX); wcl.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; wcl.lpfnWndProc = WindowProc; wcl.cbClsE...
false
false
false
false
false
0
rmaps_lama_get_mppr_for_key(orte_node_t *node, rmaps_lama_level_type_t lama_key) { int i; for( i = 0; i < lama_mppr_num_levels; ++i ) { if( lama_key == lama_mppr_levels[i].type ) { return lama_mppr_levels[i].max_resources; } } return -1; }
false
false
false
false
false
0
search_gui_magnet_add_source(struct magnet_resource *magnet, record_t *record) { struct results_set *rs; g_return_if_fail(magnet); g_return_if_fail(record); record_check(record); rs = record->results_set; if (!(ST_FIREWALL & rs->status)) { magnet_add_sha1_source(magnet, record->sha1, rs->addr, rs->port, ...
false
false
false
false
false
0
print_nofopt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 fhandle) { if (opt && RTA_PAYLOAD(opt)) fprintf(f, "fh %08x [Unknown filter, optlen=%u] ", fhandle, (unsigned) RTA_PAYLOAD(opt)); else if (fhandle) fprintf(f, "fh %08x ", fhandle); return 0; }
false
false
false
false
false
0
gretl_regexp_replace (const char *orig, const char *match, const char *repl, int *err) { GRegex *regex; GError *error = NULL; char *mod = NULL; regex = g_regex_new(match, 0, 0, &error); if (error == NULL) { mod = g_regex_replace(regex, orig, -1, 0, repl, 0, &error); } ...
false
false
false
false
false
0
ir_add_symbol_internal(int id, const TString& name, const TTypeInfo *info, const TType& type, TSourceLoc line) { TIntermSymbol* node = new TIntermSymbol(id, name, info, type); node->setLine(line); return node; }
false
false
false
false
false
0
GetBounds() { this->UpdatePaths(); double bounds[6]; bool nobounds = true; bounds[0] = VTK_DOUBLE_MAX; bounds[1] = VTK_DOUBLE_MIN; bounds[2] = VTK_DOUBLE_MAX; bounds[3] = VTK_DOUBLE_MIN; bounds[4] = VTK_DOUBLE_MAX; bounds[5] = VTK_DOUBLE_MIN; if (!this->IsIdentity) { this->PokeMatrices(th...
false
false
false
false
false
0
newempty (void) { NODE *n = new_node(EMPTY); if (n != NULL) { n->v.idnum = 0; } return n; }
false
false
false
false
false
0
vector_transform (pv q, const pv x, const Matrix M) { int i, j; memset (q, 0, sizeof (*q) * MATRIX_DIM); /* for each column */ for (j = 0; j < MATRIX_DIM; ++j) { /* for each row */ for (i = 0; i < MATRIX_DIM; ++i) q[i] += M[i + MATRIX_DIM * j] * x[j]; } }
false
false
false
false
false
0
Start(bool bRun, const Player* pPlayer, const Quest* pQuest, bool bInstantRespawn, bool bCanLoopPath) { if (m_creature->getVictim()) { script_error_log("EscortAI attempt to Start while in combat."); return; } if (HasEscortState(STATE_ESCORT_ESCORTING)) { script_error_log("Es...
false
false
false
false
false
0
handle_get_seat_id (GdmDBusDisplay *skeleton, GDBusMethodInvocation *invocation, GdmDisplay *display) { char *seat_id; seat_id = NULL; gdm_display_get_seat_id (display, &seat_id, NULL); if (seat_id == NULL) { sea...
false
false
false
false
false
0
std_hash_table_steal(struct std_hashtable *hash_table, const void *key) { struct ghashnode **node, *dest; if (!hash_table) return 0; node = std_hash_table_lookup_node(hash_table, key); if (*node) { dest = *node; (*node) = dest->next; std_hash_node_destroy(dest, NULL, NU...
false
false
false
false
false
0
sarrayPadToSameSize(SARRAY *sa1, SARRAY *sa2, char *padstring) { l_int32 i, n1, n2; PROCNAME("sarrayPadToSameSize"); if (!sa1 || !sa2) return ERROR_INT("both sa1 and sa2 not defined", procName, 1); n1 = sarrayGetCount(sa1); n2 = sarrayGetCount(sa2...
false
false
false
false
false
0
heightfn(htmldata_t * p, char *v) { long u; if (doInt(v, "HEIGHT", 0, MAX_USHORT, &u)) return 1; p->height = (unsigned short) u; return 0; }
false
false
false
false
false
0
remove_white_space(struct lib_context *lc, char *str, size_t size) { int c; char *in = str, *out = str; in[size] = 0; while ((c = *in++)) { if (!isspace(c)) *out++ = c; } *out = 0; return str; }
false
false
false
false
false
0
getWeakLearnerName(const string& shypFileName) { // open file ifstream inFile(shypFileName.c_str()); if (!inFile.is_open()) { cerr << "ERROR: Cannot open strong hypothesis file <" << shypFileName << ">!" << endl; exit(1); } // Declares the stream tokenizer nor_utils::StreamTokenizer st(inFile, "...
false
false
false
false
false
0
bond_netpoll_cleanup(struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); struct list_head *iter; struct slave *slave; bond_for_each_slave(bond, slave, iter) if (bond_slave_is_up(slave)) slave_disable_netpoll(slave); }
false
false
false
false
false
0
doinit() { for(int ix=1;ix<7;++ix) { addToList(-ix,ix,21,39); } FFVTVertex::doinit(); tcHwADDPtr hwADD=dynamic_ptr_cast<tcHwADDPtr>(generator()->standardModel()); if(!hwADD) throw Exception() << "Must have ADDModel in ADDModelFFGGRVertex::doinit()" << Exception::runerror; kappa_ = 2./hwAD...
false
false
false
false
false
0
iuport_lock (qport, pinfo) struct uuconf_port *qport; pointer pinfo; { struct spass *q = (struct spass *) pinfo; q->fmatched = TRUE; if (! fconn_init (qport, q->qconn, UUCONF_PORTTYPE_UNKNOWN)) return UUCONF_NOT_FOUND; else if (! fconn_lock (q->qconn, FALSE, FALSE)) { uconn_free (q->qc...
false
false
false
false
false
0
autostr_vprintf(struct auto_string *str, unsigned long offset, const char *fmt, va_list args) { unsigned long size; va_list tmp_args; int nr, err = 0; retry: size = autostr_remaining(str, offset); va_copy(tmp_args, args); nr = vsnprintf(str->value + offset, size, fmt, tmp_args); va_end(tmp_args); i...
false
false
false
false
true
1
mbc1_write_6000_7fff(Uint16 adr,Uint8 v) { if (!v) mbc1_mem_mode=MBC1_16_8_MEM_MODE; else if (v==1) mbc1_mem_mode=MBC1_4_32_MEM_MODE; }
false
false
false
false
false
0
disc2_precalc(flam3_xform *xf) { double add = xf->disc2_twist; double k; xf->disc2_timespi = xf->disc2_rot * M_PI; sincos(add,&xf->disc2_sinadd,&xf->disc2_cosadd); xf->disc2_cosadd -= 1; if (add > 2 * M_PI) { k = (1 + add - 2*M_PI); xf->disc2_cosadd *= k; xf->disc2_sinadd *= k; ...
false
false
false
false
false
0
destroy_cm_id(struct iw_cm_id *cm_id) { struct iwcm_id_private *cm_id_priv; unsigned long flags; cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); /* * Wait if we're currently in a connect or accept downcall. A * listening endpoint should never block here. */ wait_event(cm_id_priv->connect_wait,...
false
false
false
false
false
0
unix_accept(ipc_t* ipc) { int fd; struct sockaddr_un sock_addr; memset(&sock_addr, 0, sizeof(sock_addr)); // ENOENT means file does not exist if (unlink(ipc->path) < 0 && errno != ENOENT) { local_log_errno(LOG_ERR, "Unlink path failed!"); return -1; } if ((ipc->fd = soc...
false
true
false
false
false
1
SaveString ( Obj string ) { UInt i, len = GET_LEN_STRING(string); UInt1 *p = (UInt1*)CHARS_STRING(string); SaveUInt(len); for (i=0; i<len; i++) SAVE_BYTE(p[i]); }
false
false
false
false
false
0
poll_unregister(pollObject *self, PyObject *o) { PyObject *key; int fd; fd = PyObject_AsFileDescriptor( o ); if (fd == -1) return NULL; /* Check whether the fd is already in the array */ key = PyInt_FromLong(fd); if (key == NULL) return NULL; if (PyDict_DelItem(self->d...
false
false
false
false
false
0
SECMOD_FindSlotByID(SECMODModule *module, CK_SLOT_ID slotID) { int i; PK11SlotInfo *slot = NULL; if (!moduleLock) { PORT_SetError(SEC_ERROR_NOT_INITIALIZED); return slot; } SECMOD_GetReadLock(moduleLock); for (i=0; i < module->slotCount; i++) { PK11SlotInfo *cSlot = module->slots[i]; i...
false
false
false
false
false
0
fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) { struct super_block *sb = inode->i_sb; const int limit = sb->s_maxbytes >> MSDOS_SB(sb)->cluster_bits; struct fat_entry fatent; struct fat_cache_id cid; int nr; BUG_ON(MSDOS_I(inode)->i_start == 0); *fclus = 0; *dclus = MSDOS_I(inode)-...
false
false
false
false
false
0
MountHomeBinServers() { struct Mountables *mp; char host[CF_MAXVARSIZE]; char mountdir[CF_BUFSIZE]; char maketo[CF_BUFSIZE]; struct Item *ip; /* * HvB: Bas van der Vlies */ char mountmode[CF_BUFSIZE]; if (! GOTMOUNTINFO) { CfLog(cfinform,"Incomplete mount info due to RPC failure.\n",""); sn...
false
false
false
false
false
0
GetPersonalitiesList() { wxArrayString list; wxDir::GetAllFiles(ConfigManager::GetFolder(sdConfig), &list, _T("*.conf"), wxDIR_FILES); for(size_t i = 0; i < list.GetCount(); ++i) list[i] = wxFileName(list[i]).GetName(); return list; }
false
false
false
false
false
0
write_vm(vm the_vm) { unsigned i; dbio_write_var(the_vm->local); dbio_printf("%u %d %u %u\n", the_vm->top_activ_stack, the_vm->root_activ_vector, the_vm->func_id, the_vm->max_stack_size); for (i = 0; i <= the_vm->top_activ_stack; i++) write_activ(the_vm->activ_stack[i]); }
false
false
false
false
false
0
apply_policy_on_bearers(GSList *policy_bearers, GSList *bearers, GSList **list) { enum connman_service_type bearer; GSList *it; int err; *list = NULL; for (it = bearers; it != NULL; it = it->next) { bearer = GPOINTER_TO_INT(it->data); err = filter_bearer(policy_bearers, bearer, list); if (err < 0) ...
false
false
false
false
false
0
check_twosfx(const char * word, int len, char in_compound, const FLAG needflag) { int tmpl; // length of tmpword struct hentry * he; // hash entry of root word or NULL char tmpword[MAXWORDUTF8LEN + 4]; // on entry prefix is 0 length or already matches the be...
false
false
false
false
false
0
gsl_odeiv2_step_free (gsl_odeiv2_step * s) { RETURN_IF_NULL (s); s->type->free (s->state); free (s); }
false
false
false
false
false
0
pxe_mangle_name(char *dst, const char *src) { size_t len = FILENAME_MAX-1; while (len-- && not_whitespace(*src)) *dst++ = *src++; *dst = '\0'; }
false
false
false
false
false
0
lock_torture_writer(void *arg) { struct lock_stress_stats *lwsp = arg; static DEFINE_TORTURE_RANDOM(rand); VERBOSE_TOROUT_STRING("lock_torture_writer task started"); set_user_nice(current, MAX_NICE); do { if ((torture_random(&rand) & 0xfffff) == 0) schedule_timeout_uninterruptible(1); cxt.cur_ops->task_b...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); FraqtiveMainWindow *_t = static_cast<FraqtiveMainWindow *>(_o); switch (_id) { case 0: _t->fractalType(); break; case 1:...
false
false
false
false
false
0
apache2_brigade_limit_set(apreq_handle_t *handle, apr_size_t bytes) { ap_filter_t *f = get_apreq_filter(handle); struct filter_ctx *ctx; if (f->ctx == NULL) apreq_filter_make_context(f); ctx = f->ctx; if (ctx->body_status == APR_EINIT || ctx->brigade...
false
false
false
false
false
0
Swig_cppconstructor_base_call(const_String_or_char_ptr name, ParmList *parms, int skip_self) { String *func; String *nname; int i = 0; int comma = 0; Parm *p = parms; SwigType *pt; if (skip_self) { if (p) p = nextSibling(p); i++; } nname = SwigType_namestr(name); func = NewStringEmpty(...
false
false
false
false
false
0
check_security_stage_status(iscsi_session_t *session, struct iscsi_acl *auth_client) { int debug_status = 0; switch (acl_recv_end(auth_client, session)) { case AUTH_STATUS_CONTINUE: /* continue sending PDUs */ break; case AUTH_STATUS_PASS: break; case AUTH_STATUS_NO_ERROR: /* treat this as an error...
false
false
false
false
false
0
AcpiUtUpdateRefCount ( ACPI_OPERAND_OBJECT *Object, UINT32 Action) { UINT16 OriginalCount; UINT16 NewCount = 0; ACPI_CPU_FLAGS LockFlags; ACPI_FUNCTION_NAME (UtUpdateRefCount); if (!Object) { return; } /...
false
false
false
false
false
0
dav_generic_get_locks(dav_lockdb *lockdb, const dav_resource *resource, int calltype, dav_lock **locks) { apr_pool_t *p = lockdb->info->pool; apr_datum_t key; dav_error *err; dav_lo...
false
false
false
false
false
0
raid_device_added (UDisksLinuxMDRaidObject *object, UDisksLinuxDevice *device) { g_assert (object->sync_action_source == NULL); g_assert (object->degraded_source == NULL); /* udisks_debug ("start watching %s", g_udev_device_get_sysfs_path (device->udev_device)); */ object->sync_action_...
false
false
false
false
false
0
nvkm_xtensa_new_(const struct nvkm_xtensa_func *func, struct nvkm_device *device, int index, bool enable, u32 addr, struct nvkm_engine **pengine) { struct nvkm_xtensa *xtensa; if (!(xtensa = kzalloc(sizeof(*xtensa), GFP_KERNEL))) return -ENOMEM; xtensa->func = func; xtensa->addr = addr; *pengine = &xtensa...
false
false
false
false
false
0
gwy_brick_new_alike(GwyBrick *model, gboolean nullme) { GwyBrick *brick; GwyBrickPrivate *priv, *new_priv; g_return_val_if_fail(GWY_IS_BRICK(model), NULL); brick = g_object_new(GWY_TYPE_BRICK, NULL); brick->xres = model->xres; brick->yres = model->yres; brick->zres = mo...
false
false
false
false
false
0
finish (ACE_Filecache_Object *&file) { if (file == 0) return file; ACE_OFF_T loc = ACE::hash_pjw (file->filename_) % this->size_; ACE_SYNCH_RW_MUTEX &hashlock = this->hash_lock_[loc]; if (file != 0) switch (file->action_) { case ACE_Filecache_Object::ACE_WRITING: { ACE_WR...
false
false
false
false
false
0
jack_read_frame_time (const jack_client_t *client, jack_frame_timer_t *copy) { int tries = 0; long timeout = 1000; do { /* throttle the busy wait if we don't get the answer very quickly. XXX This is disgusting. on a UP system, it needs to sleep if the first try didn't work. on an SMP sy...
false
false
false
false
false
0
Scm_InitStaticClassWithMeta(ScmClass *klass, const char *name, ScmModule *mod, ScmClass *meta, ScmObj supers, ScmClassStaticSlotSpec *specs, ...
false
true
false
false
false
1
menu_skip_part(p) char_u *p; { while (*p != NUL && *p != '.' && !vim_iswhite(*p)) { if ((*p == '\\' || *p == Ctrl_V) && p[1] != NUL) ++p; ++p; } return p; }
false
false
false
false
false
0
pmap_is_fragment(const struct pmap *pm, const void *p, size_t npages) { struct vm_fragment *vmf; bool fragment; g_assert(mutex_is_owned(&pm->lock)); vmf = pmap_lookup(pm, p, NULL); if (NULL == vmf) { pmap_log_missing(pm, p, npages * kernel_pagesize); return FALSE; } fragment = p == vmf->start && npages =...
false
false
false
false
false
0
string_fromCharCode(const fn_call& fn) { const int version = getSWFVersion(fn); if (version == 5) { std::string str; for (unsigned int i = 0; i < fn.nargs; i++) { // Maximum 65535, as with all DisplayObject codes. const boost::uint16_t c = s...
false
false
false
false
false
0
enc_read_blob_resp(uint8_t *value, int vlen, uint16_t offset, uint8_t *pdu, int len) { if (pdu == NULL) return 0; vlen -= offset; if (vlen > len - 1) vlen = len - 1; pdu[0] = ATT_OP_READ_BLOB_RESP; memcpy(pdu + 1, &value[offset], vlen); return vlen + 1; }
false
true
false
false
false
1
SetAlphaColor(int r, int g, int b, int alpha) { CLAMP(r, 0, 255); CLAMP(g, 0, 255); CLAMP(b, 0, 255); CLAMP(alpha, 0, 255); m_flags |= JN_USE_DISPLAY_COLOR; gr_init_alphacolor(&m_display_color, r, g, b, alpha); }
false
false
false
false
false
0
setupChildProcess() { Q_D(KPtyProcess); d->pty->setCTty(); if (d->addUtmp) d->pty->login(KUser(KUser::UseRealUserID).loginName().toLocal8Bit().data(), qgetenv("DISPLAY")); if (d->ptyChannels & StdinChannel) dup2(d->pty->slaveFd(), 0); if (d->ptyChannels & StdoutChannel) dup2...
false
false
false
false
false
0
getAllFieldValues( std::ostream &o ) const { o << mrpt::format("%.09f %.09f %02u %02u %02.03f %u", fields.longitude_degrees, fields.latitude_degrees, fields.UTCTime.hour, fields.UTCTime.minute, fields.UTCTime.sec, static_cast<unsigned int>(fields.validity_char=='A' ? 1:0) ); return true; }
false
false
false
false
false
0
is_jm(struct lib_context *lc, struct dev_info *di, void *meta) { struct jm *jm = meta; return !strncmp((const char *) jm->signature, JM_SIGNATURE, JM_SIGNATURE_LEN) && checksum(jm); }
false
false
false
false
false
0
findidx(int z) { int j; for (j = 0; j < dcc_total; j++) if ((dcc[j].sock == z) && (dcc[j].type->flags & DCT_VALIDIDX)) return j; return -1; }
false
false
false
false
false
0
rsync_checksum(unsigned char *buf, UINT4 len, UINT4 blockSize, UINT4 seed, unsigned char *digest, int md4DigestLen) { unsigned char seedBytes[4]; if ( md4DigestLen > 0 && seed ) { RsyncMD4Encode(seedBytes, &seed, 1); } while ( len > 0 ) { int thisLen = len < blockSize ? len : blockSize; UINT4 ad...
true
true
false
false
false
1
incrblobSeek( ClientData instanceData, long offset, int seekMode, int *errorCodePtr ){ IncrblobChannel *p = (IncrblobChannel *)instanceData; switch( seekMode ){ case SEEK_SET: p->iSeek = offset; break; case SEEK_CUR: p->iSeek += offset; break; case SEEK_END: p->iS...
false
false
false
false
false
0
fprint_response(struct http_response* res) { u32 i, c_len = 0, in_space = 0; res->sig.code = res->code; for (i=0;i<res->pay_len;i++) if (res->payload[i] <= 0x20 || strchr("<>\"'&:\\", (char)res->payload[i])) { if (!in_space) { in_space = 1; if (c_len && ++c_len <= FP_MAX_LEN) ...
false
false
false
false
false
0
limit_max_speed(float *v) { float h2, h, max = 80; h2 = v[0]*v[0] + v[1]*v[1]; if (h2 > max*max) { h = sqrt(h2); v[0] *= max/h; v[1] *= max/h; } }
false
false
false
false
false
0
sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq) { struct mmc_data *data = mrq->data; if (host->sg_count < 0) { data->error = host->sg_count; dev_dbg(sdmmc_dev(host), "%s: sg_count = %d is invalid\n", __func__, host->sg_count); return data->error; } if (data->flags & MMC_DATA_READ) ...
false
false
false
false
false
0
R_RegisterBasePlayerModels( void ) { char mod_filename[MAX_QPATH]; char scratch[MAX_QPATH]; int i, j; // int npms = 0; // unused int nskins = 0; char **skinnames; if (is_localhost) { //then the client is also the server so we have this cvar available cvar_t *maxclients = Cvar_Get ("maxclie...
false
false
false
false
false
0
plugin_init (GstPlugin * plugin) { /* initialize gst controller library */ gst_controller_init (NULL, NULL); return (gst_element_register (plugin, "audiopanorama", GST_RANK_NONE, GST_TYPE_AUDIO_PANORAMA) && gst_element_register (plugin, "audioinvert", GST_RANK_NONE, GST_TYPE_AUDIO_INVER...
false
false
false
false
false
0
RunModal() { if ( setupOK ) return Panel::RunModal(); return 0; }
false
false
false
false
false
0
stepUp() { assert(dict != NULL); while (hindex <= dict->highestBucket) { DcmDictEntryList* bucket = dict->hashTab[hindex]; if (bucket == NULL) { if (hindex == dict->highestBucket) return; /* We reached the end of the dictionary */ hindex++; // move on to ...
false
false
false
false
false
0
add_point(const lattice_point& new_point) { _vector2<double> line_start(start[0], start[1]); double nx = double(start[1]) - double(new_point[1]); double ny = double(new_point[0]) - double(start[0]); _vector2<double> line_normal(nx,ny); normalize(line_normal); for(std::list<lattice_point>::iterator i...
false
false
false
false
false
0