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
cob_decimal_get_display (cob_decimal *d, cob_field *f, const int opt) { unsigned char *data; size_t size; int diff; int sign; /* build string */ sign = mpz_sgn (d->value); mpz_abs (d->value, d->value); mpz_get_str ((char *)num_buff_ptr, 10, d->value); size = strlen ((char *)num_buff_ptr); /* store number...
false
true
false
false
false
1
unity_webapps_indicator_model_ref_indicator_for_interest (UnityWebappsIndicatorModel *model, UnityWebappsIndicatorModelIndicator *indicator, gint interest_id) { GList *indicators_for_interest, *indicator_link; indicators_for_interest = (GList *)g_hash_table_lookup (model->priv->indicators_for_i...
false
false
false
false
false
0
priorityDefense(const Location loc){ queue<Location> locQ; queue<int> depthQ; int depth = 1; int currentpriority = 1; int defensepriority = defenseDistance +1; updateIndex++; locQ.push(loc); depthQ.push(depth); grid[loc.row][loc.col].defensepriority = -100000; grid[loc.ro...
false
false
false
false
false
0
getUnit(Glib::ustring const &unit_abbr) const { UnitMap::const_iterator iter = _unit_map.find(unit_abbr); if (iter != _unit_map.end()) { return *((*iter).second); } else { return Unit(); } }
false
false
false
false
false
0
damp(StkFloat amplitude) { StkFloat temp; for (unsigned int i=0; i<nModes_; i++) { if (ratios_[i] < 0) temp = -ratios_[i]; else temp = ratios_[i] * baseFrequency_; filters_[i]->setResonance(temp, radii_[i]*amplitude); } }
false
false
false
false
false
0
remove_item(int stack, int index) { if (stack < 0 || stack >= items.size()) { debugmsg("Tried to remove_item(%d, %d) from an inventory (size %d)", stack, index, items.size()); return nullitem; } else if (index < 0 || index >= items[stack].size()) { debugmsg("Tried to remove_item(%d, %d) from an inven...
false
false
false
false
false
0
_ldapfull_base64_decode( const char *src, char **ret, int *rlen ) { unsigned int rc, i, tlen = 0; char *text; EVP_ENCODE_CTX EVP_ctx; text = (char *)malloc(((strlen(src)+3)/4 * 3) + 1); if (text == NULL) { return 0; } EVP_DecodeInit(&EVP_ctx); rc = EVP_DecodeUpdate(&EVP_ctx, te...
false
false
false
false
false
0
bSetParms( float fDefValue, float fMinValue, float fMaxValue, float fMinIncSz, float fMaxIncSz ) { wxString os1; double df1; // First decide what needs to be done with the increment sizes if( fMinIncSz < 0.0 ) { fMinIncSz = m_fMinIncSz; fMaxIncSz = m_fMaxIncSz; } else if( ...
false
false
false
false
false
0
device_reconnect_mdl_cb(struct mcap_mdl *mdl, GError *err, gpointer data) { struct hdp_tmp_dc_data *dc_data = data; GError *gerr = NULL; DBusMessage *reply; if (err != NULL) { reply = g_dbus_create_error(dc_data->msg, ERROR_INTERFACE ".HealthError", "Cannot reconnect: %s", err->message); g_db...
false
false
false
false
false
0
wm_coeff_parse_int(int bytes, const u8 **pos) { int val = 0; switch (bytes) { case 2: val = le16_to_cpu(*((__le16 *)*pos)); break; case 4: val = le32_to_cpu(*((__le32 *)*pos)); break; default: break; } *pos += bytes; return val; }
false
false
false
false
false
0
__Pyx_AddTraceback(const char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(__pyx_filename); #else py_srcfile = PyUnicode_F...
false
false
false
false
false
0
SEC_PKCS7AddSignedAttribute (SEC_PKCS7ContentInfo *cinfo, SECOidTag oidtag, SECItem *value) { SEC_PKCS7SignerInfo **signerinfos; SEC_PKCS7Attribute *attr; PORT_Assert (SEC_PKCS7ContentType (cinfo) == SEC_OID_PKCS7_SIGNED_DATA); if (SEC_PKCS7ContentType (cinfo) != SEC_OID_PKCS7_SIGNED_DA...
false
false
false
false
false
0
fallback(FbTk::ThemeItem_base &item) { // if background theme item was not found in the // style then mark background as not loaded so // we can deal with it in reconfigureTheme() if (item.name() == "background") { // mark no background loaded m_background->unsetLoaded(); return ...
false
false
false
false
false
0
Check_For_Update(char *server_name, char *remote_file, char *host_name, char *current_version) { struct update_data *my_update; pthread_t update_thread; my_update = (struct update_data *) calloc(1, sizeof(struct update_data)); if (!my_update) return NULL; my_update->server_name = ser...
false
false
false
false
false
0
DebugPrint(StatelessChangelist* a) { if (a == NULL) { cout << "This is a null pointer" << endl; return; } if (a->get_size() > 0) { StatelessChangelistIterator it; a->get_first_change(&it); do { cout << setw(4) << it->first.first << "(" << it->second.first << ") (" << it->first.second << ...
false
false
false
false
false
0
_regulator_call_set_voltage_sel(struct regulator_dev *rdev, int uV, unsigned selector) { struct pre_voltage_change_data data; int ret; data.old_uV = _regulator_get_voltage(rdev); data.min_uV = uV; data.max_uV = uV; ret = _notifier_call_chain(rdev, REGULATOR_EVENT_PRE_VOLTAGE_CHANGE, &data); if (r...
false
false
false
false
false
0
normalizeWeights() { // note: unsure if weights ids are going to be used. // Normalise the weights on bones.... u32 i,j; core::array< core::array<f32> > Vertices_TotalWeight; for (i=0; i<LocalBuffers.size(); ++i) { Vertices_TotalWeight.push_back(core::array<f32>()); Vertices_TotalWeight[i].set_...
false
false
false
false
false
0
main() { int input; FILE *output = NULL; char *mode = "a"; char outputFilename[] = "memory/mem_tests"; char string[256]; int pagenum; int number; int id; output = fopen(outputFilename, mode); if(output == NULL){ printf("Cannot get output file.\n"); exit(1); ...
true
true
false
false
true
1
read_cfg(int signum) { PMList *lp; opendoor_t *door; vprint("Re-reading config file: %s\n", o_cfg); logprint("Re-reading config file: %s\n", o_cfg); for(lp = doors; lp; lp = lp->next) { door = (opendoor_t*)lp->data; close_door(door); } list_free(doors); parseconfig(o_cfg); return; }
false
false
false
false
false
0
luaI_addchar (int c) { static char *buff = NULL; static int max = 0; static int n = 0; if (n >= max) { if (max == 0) { max = 100; buff = (char *)malloc(max); } else { max *= 2; buff = (char *)realloc(buff, max); } if (buff == NULL) lua_error("memory ov...
false
false
false
true
false
1
find_acct(const char *prpl, const char *acct_id) { PurpleAccount *acct = NULL; /* If we have a specific acct, use it */ if (acct_id) { acct = purple_accounts_find(acct_id, prpl); if (acct && !purple_account_is_connected(acct)) acct = NULL; } else { /* Otherwise find an active account for the protocol */ ...
false
false
false
false
false
0
hashcash_count( const char* token ) { SHA1_ctx ctx; byte target_digest[ SHA1_DIGEST_BYTES ] = {0}; byte token_digest[ SHA1_DIGEST_BYTES ] = {0}; char ver[MAX_VER+1] = {0}; int vers = 0 ; char* first_colon = NULL; char* second_colon = NULL; int ver_len = 0 ; int i = 0 ; int last...
true
true
false
false
true
1
gc_strings_set_marks(chunk_t * cp, bool mark) { if (cp->smark != 0) { if_debug3('6', "[6]clearing string marks 0x%lx[%u] to %d\n", (ulong) cp->smark, cp->smark_size, (int)mark); memset(cp->smark, 0, cp->smark_size); if (mark) gc_mark_string(cp->sbase + HDR_ID_OF...
false
false
false
false
false
0
Java_ncsa_hdf_hdf5lib_H5_H5Pset_1preserve (JNIEnv *env, jclass clss, jint plist, jboolean status) { hbool_t st; herr_t retVal = -1; if (status == JNI_TRUE) { st = TRUE; } else if (status == JNI_FALSE) { st = FALSE; } else { /* exception -- bad argument */ ...
false
false
false
false
false
0
print_version_handler(CMD_DATA *p_cmd, int current_nr, void *p_context) { DYN_DNS_CLIENT *p_self = (DYN_DNS_CLIENT *)p_context; (void)p_cmd; (void)current_nr; if (p_self == NULL) return RC_INVALID_POINTER; printf("%s\n", DYNDNS_VERSION_STRING); p_self->abort = TRUE; return RC_OK; }
false
false
false
false
false
0
debug_lock_alloc(unsigned locktype) { struct debug_lock *result = mm_malloc(sizeof(struct debug_lock)); if (!result) return NULL; if (original_lock_fns_.alloc) { if (!(result->lock = original_lock_fns_.alloc( locktype|EVTHREAD_LOCKTYPE_RECURSIVE))) { mm_free(result); return NULL; } } else { result...
false
false
false
false
false
0
doupdate() { ThreeMesonCurrentBase::doupdate(); // update running width if needed if ( !touched() ) return; if(_maxmass!=_maxcalc) inita1Width(-1); }
false
false
false
false
false
0
TDL_UseSecDiff_Prim (sInt4 *Data, sInt4 numData, sInt4 *SecDiff, sInt4 li_primMiss, int minGroup) { int i, locCnt; int range0, range2; int tot0, tot2; char f_min; sInt4 min = 0, max = 0; locCnt = 0; range0 = 0; tot0 = 0; f_min =...
false
false
false
false
false
0
__gnat_file_length_attr (int fd, char* name, struct file_attributes* attr) { if (attr->file_length == -1) { __gnat_stat_to_attr (fd, name, attr); } return attr->file_length; }
false
false
false
false
false
0
RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) { vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation *outInfo = outputVector->GetInformationObject(0); vtkPolyData *input = vtkPolyData::SafeDownCast( ...
false
false
false
false
false
0
getAttributeCount(void) const { const PP_AttrProp * pAP = NULL; if (!m_pPT->getAttrProp(m_indexAP, &pAP)) return 0; else return pAP->getAttributeCount(); }
false
false
false
false
false
0
dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf) { ssize_t avail; /* smp_load_acquire() to load write pointer on reader side * this pairs with smp_store_release() in dvb_ringbuffer_write(), * dvb_ringbuffer_write_user(), or dvb_ringbuffer_reset() */ avail = smp_load_acquire(&rbuf->pwrite) - rbuf->pread; if ...
false
false
false
false
false
0
arrays_zero (array_s * arrp) { int i, j; for (i = 0; i < arrp->nrows; i++) { for (j = 0; j < arrp->ncols; j++) { arrp->vals[i][j] = 0; } } }
false
false
false
false
false
0
mpxCRC(uint16_t crc, uint8_t value) { uint8_t i; crc = crc ^ (int16_t)value<<8; for (i = 0; i < 8; i++) { if (crc & 0x8000) { crc = crc << 1^0x1021; } else { crc = crc << 1; } } return crc; }
false
false
false
false
false
0
string_columns (const char *string, int length, int start) { int tab_width = 8; int col = start; const char *end = string + length; while (string < end) { if (*string == '\n') col = 0; else if (*string == '\t') col = (((col / tab_width) + 1) * tab_width); else col++...
false
false
false
false
false
0
string_to_double(std::string value, double& target) { CYG_REPORT_FUNCNAMETYPE("Cdl::string_to_double", "success %d"); bool result = true; const char* start_ptr = value.c_str(); char* end_ptr; int old_errno = errno; errno = 0; double conv ...
false
false
false
false
false
0
fips_new_state (enum module_states new_state) { int ok = 0; enum module_states last_state; lock_fsm (); last_state = current_state; switch (current_state) { case STATE_POWERON: if (new_state == STATE_INIT || new_state == STATE_ERROR || new_state == STATE_FATALERROR) ...
false
false
false
false
false
0
createSplat(SelectionDAG &DAG, SDLoc dl, EVT VT, SDValue Val) { if (VT.getSimpleVT() == MVT::v4i8) return DAG.getNode(HexagonISD::VSPLATB, dl, VT, Val); if (VT.getSimpleVT() == MVT::v4i16) return DAG.getNode(HexagonISD::VSPLATH, dl, VT, Val); return SDValue(); }
false
false
false
false
false
0
check_spambot_warning(struct Client *source_p, const char *name) { int t_delta; int decrement_count; if((GlobalSetOptions.spam_num && (source_p->localClient->join_leave_count >= GlobalSetOptions.spam_num))) { if(source_p->localClient->oper_warn_count_down > 0) source_p->localClient->oper_warn_count_down--...
false
false
false
false
false
0
omapi_protocol_lookup_auth (omapi_object_t **a, omapi_object_t *po, omapi_handle_t handle) { omapi_protocol_object_t *p; omapi_remote_auth_t *r; if (po -> type != omapi_type_protocol) return DHCP_R_INVALIDARG; p = (omapi_protocol_object_t *)po; for (r = p -> remote_auth_list; r; r = r -> next) if...
false
false
false
false
false
0
draw_branch(double i, double j, double x0, double y0, double a, double b, double f, double g, double c, double s) { double x, y, t; int n; if (f > i) i = f; if (g < j) j = g; check_path_settings(); fprintf(output_file, "\\pspolygon"); put_local(); for (t = i, n = 0; t <= j; t += local_...
false
false
false
false
false
0
on_configure_response(GtkDialog *dialog, gint response, gpointer user_data) { if (! (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY)) return; CONFIG_OPEN_EXTERNAL_CMD = gtk_editable_get_chars(GTK_EDITABLE(configure_widgets.OPEN_EXTERNAL_CMD), 0, -1); CONFIG_REVERSE_FILTER = gtk_toggle_button_ge...
false
false
false
false
false
0
xmldoc_create_from_curve(const stp_curve_t *curve) { stp_mxml_node_t *xmldoc; stp_mxml_node_t *rootnode; stp_mxml_node_t *curvenode; /* Get curve details */ curvenode = stp_xmltree_create_from_curve(curve); if (curvenode == NULL) { stp_deprintf(STP_DBG_CURVE_ERRORS, "xmldoc_create_from_curve...
false
false
false
false
false
0
plugin_init_diskstats(void) { int i; char *header[] = { "major", "minor", "name", "reads", "read_merges", "read_sectors", "read_ticks", "writes", "write_merges", "write_sectors", "write_ticks", "in_flight", "io_ticks", "time_in_queue", "" }; hash_create(&DISKSTATS); hash_set_delimiter(&DISKSTATS...
false
false
false
false
false
0
emitFunctionStub(const Function* F, void *Fn, JITCodeEmitter &JCE) { JCE.emitAlignment(4); void *Addr = (void*) (JCE.getCurrentPCValue()); if (!sys::Memory::setRangeWritable(Addr, 16)) llvm_unreachable("ERROR: Unable to mark stub writable."); intptr_t EmittedAddr; if (Fn != (void*)(intptr_t)MipsCompi...
false
false
false
false
false
0
uninitTrnsprob(double ****PP) { double ***P; short j; P=*PP; for(j=0;j<128;j++) freeMatrix(&P[j]); freeBlock(PP); }
false
false
false
false
false
0
set_success( const char *prefix, const char *experiment, const char *test_run, const char *filename, struct exp_result_t *dest ) { if (strcmp(filename, "test.success") == 0) { dest->success = true; } }
false
false
false
false
false
0
ConcatProperties(uint64 inprops1, uint64 inprops2, bool delayed) { uint64 outprops = (kAcceptor | kUnweighted | kAcyclic) & inprops1 & inprops2; outprops |= kError & (inprops1 | inprops2); bool empty1 = delayed; // Can fst1 be the empty machine? bool empty2 = delayed; // Can fst2 be the empty machine? ...
false
false
false
false
false
0
server_readv_resume (call_frame_t *frame, xlator_t *bound_xl) { server_state_t *state = NULL; state = CALL_STATE (frame); if (state->resolve.op_ret != 0) goto err; STACK_WIND (frame, server_readv_cbk, bound_xl, bound_xl->fops->readv, ...
false
false
false
false
false
0
findTypeReceiveFunction(List *procname, Oid typeOid) { Oid argList[3]; Oid procOid; /* * Receive functions can take a single argument of type INTERNAL, or three * arguments (internal, typioparam OID, typmod). */ argList[0] = INTERNALOID; procOid = LookupFuncName(procname, 1, argList, true); if (OidIsV...
false
false
false
false
false
0
v_ulcase(m, cnt) MARK m; /* where to make the change */ long cnt; /* number of chars to flip */ { REG char *pos; REG int i, j; static char flip[] = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ[](){}<>"; DEFAULT(1); /* fetch the current version of the line */ pfetch(markline(m)); /* for each pos...
false
false
false
false
false
0
extractText(FXString& text,FXint startrow,FXint endrow,FXint startcol,FXint endcol,const FXchar* cs,const FXchar* rs) const { register FXint ncs,nrs,sz,r,c,p; FXString string; // Verify arguments if(cs==NULL || rs==NULL){ fxerror("%s::extractText: bad argument.\n",getClassName()); } // Verify range if(sta...
false
false
false
false
false
0
FinalizeObject(JSContext *cx, JSObject *obj) { /* Cope with stillborn objects that have no map. */ if (!obj->map) return; if (JS_UNLIKELY(cx->debugHooks->objectHook != NULL)) { cx->debugHooks->objectHook(cx, obj, JS_FALSE, cx->debugHooks->objectHookData); ...
false
false
false
false
false
0
readcmd_handle_line(char *s, char **ap) { struct arglist arglist; struct strlist *sl; char *backup; char *line; /* ifsbreakup will fiddle with stack region... */ line = stackblock(); s = grabstackstr(s); /* need a copy, so that delimiters aren't lost * in case there are more fields than variables */ backup...
false
false
false
false
false
0
gm107_grctx_generate_attrib(struct gf100_grctx *info) { struct gf100_gr *gr = info->gr; const struct gf100_grctx_func *grctx = gr->func->grctx; const u32 alpha = grctx->alpha_nr; const u32 attrib = grctx->attrib_nr; const u32 size = 0x20 * (grctx->attrib_nr_max + grctx->alpha_nr_max); const u32 access = NV_MEM...
false
false
false
false
true
1
add_entry(conf_t * conf, const char *name, void *value, int type) { confentry_t *entry = rb_malloc(sizeof(confentry_t)); if(name == NULL) { return; } entry->entryname = rb_strdup(name); entry->line = lineno; entry->filename = rb_strdup(current_file); switch (CF_TYPE(type)) { case CF_YESNO: if((long)value...
false
false
false
false
false
0
sizeOfPlaylist() { int filesize; PlayList::iterator it; QFileInfo finfo; filesize = 0; for(it = list.begin(); it != list.end(); ++it) { finfo.setFile((*it).filename()); if (finfo.isFile()) { filesize += finfo.size(); } } return(filesize); }
false
false
false
false
false
0
init_bm_table(unsigned char *needle, size_t table[UCHAR_MAX + 1], size_t len, int casesensitive, int searchtype) { size_t i = 0, j = 0, currentindex = 0; for (i = 0; i <= UCHAR_MAX; i++) table[i] = len; for (i = 0; i < len; i++) { if (searchtype == SEARCHTYPE_REVERSE) { currentindex = i; //If ...
true
true
false
false
false
1
error_cb (GdictContext *context, const GError *error, gpointer user_data) { GdictDefbox *defbox = GDICT_DEFBOX (user_data); GdictDefboxPrivate *priv = defbox->priv; GtkTextIter iter; if (!error) return; gdict_defbox_clear (defbox); gtk_text_buffer_get_start_iter (priv->buffer, &iter); ...
false
false
false
false
false
0
HPDF_AToF (const char *s) { HPDF_BOOL flg = HPDF_FALSE; HPDF_INT i = 0; HPDF_DOUBLE v; HPDF_INT tmp = 1; /* increment pointer until the charactor of 's' is not * white-space-charactor. */ while (*s) { if (HPDF_IS_WHITE_SPACE(*s)) s++; else { i...
false
false
false
false
false
0
enumerator_data_free (EnumeratorData *ed) { ed->crawler->priv->cancellables = g_list_remove (ed->crawler->priv->cancellables, ed->cancellable); g_object_unref (ed->dir_file); g_object_unref (ed->crawler); g_object_unref (ed->cancellable); g_slice_free (EnumeratorData, ed); }
false
false
false
false
false
0
initGlobals (void) { globalLdap = (CPU_ldap *) malloc (sizeof (CPU_ldap)); if (globalLdap == NULL) return -1; bzero (globalLdap, sizeof (CPU_ldap)); globalLdap->make_home_directory = false; globalLdap->remove_home_directory = false; globalLdap->assume_yes = false; globalLdap->lock = false; globalLda...
false
false
false
false
false
0
javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result) { Q_UNUSED(frame) qDebug()<<"JS PROMPT: "<< msg <<", default text: "<<defaultValue; *result = defaultValue; return true; }
false
false
false
false
false
0
s_sref(cbuf) char *cbuf; { double magn = 1,rotn = 0; int cx = 0,cy = 0; int reflection = 0; int index = 0; int type; while ((type = get_record(cbuf)) != ENDEL) { switch(type) { case XY: cx = LONGSCALE( strm_longval(cbuf) ); cy = LONGSCALE( strm_long...
false
false
false
false
false
0
buffer_stream_next(GtNodeStream *ns, GtGenomeNode **gn, GtError *err) { GtBufferStream *bs; gt_error_check(err); bs = buffer_stream_cast(ns); if (bs->buffering) { int had_err = gt_node_stream_next(bs->in_stream, gn, err); if (!had_err && *gn) gt_queue_add(bs->node_buffer, gt_genome_node_ref(*gn));...
false
false
false
false
false
0
LoadLootTemplates_Spell() { LootIdSet ids_set; LootTemplates_Spell.LoadAndCollectLootIds(ids_set); // remove real entries and check existence loot for (uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id) { SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id); ...
false
false
false
false
false
0
clusterDelNodeSlots(clusterNode *node) { int deleted = 0, j; for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) { if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j); deleted++; } return deleted; }
false
false
false
false
false
0
FIOreadlinezap(FileIO *fio, char *ptr, int maxlen) { int len; len = FIOreadtoken(fio, ptr, maxlen, '\n'); ptr += len; ptr --; if (len && *ptr == '\r') { ptr[len] = '\0'; len--; } return(len); }
false
false
false
false
false
0
nn_Exp_backward(lua_State *L) { THTensor *gradOutput = luaT_checkudata(L, 3, torch_Tensor_id); THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor_id); THTensor *gradInput = luaT_getfieldcheckudata(L, 1, "gradInput", torch_Tensor_id); THTensor_resizeAs(gradInput, output); TH_TENSOR_APPLY3...
false
false
false
false
false
0
msgpack_unpacker_release_zone(msgpack_unpacker* mpac) { if(!msgpack_unpacker_flush_zone(mpac)) { return NULL; } msgpack_zone* r = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE); if(r == NULL) { return NULL; } msgpack_zone* old = mpac->z; mpac->z = r; CTX_CAST(mpac->ctx)->user.z = mpac->z; return old; }
false
false
false
false
false
0
PrOpenIncludeWithPrefix ( char *PrefixDir, char *Filename) { FILE *IncludeFile; char *Pathname; /* Build the full pathname to the file */ Pathname = FlMergePathnames (PrefixDir, Filename); DbgPrint (ASL_PARSE_OUT...
false
false
false
false
false
0
Expand (DBObjectLIST<DBObject> *variables) { if (LeftPTR->Expand (variables) == DBFault) return (DBFault); if ((OperVAR != DBMathOperatorFunc) && (OperVAR != DBMathOperatorCond)) return (RightPTR->Expand (variables)); return (DBSuccess); }
false
false
false
false
false
0
bignum_divide_unsigned_small_denominator(bignum_type numerator, bignum_digit_type denominator, bignum_type * quotient, bignum_type * remainder, int q_negati...
false
false
false
false
false
0
match_unsigned(const char *p, int *result) { if (!p) return 0; if (!isdigit(*p)) return 0; *result = *p - '0'; ++p; while (isdigit(*p)) { *result = 10 * *result + *p - '0'; ++p; } return p; }
false
false
false
false
false
0
validate_group(struct perf_event *event) { struct perf_event *leader = event->group_leader; struct cpu_hw_events *fake_cpuc; int ret = -EINVAL, n; fake_cpuc = allocate_fake_cpuc(); if (IS_ERR(fake_cpuc)) return PTR_ERR(fake_cpuc); /* * the event is not yet connected with its * siblings therefore we must fi...
false
false
false
false
false
0
il3945_setup_deferred_work(struct il_priv *il) { il->workqueue = create_singlethread_workqueue(DRV_NAME); init_waitqueue_head(&il->wait_command_queue); INIT_WORK(&il->restart, il3945_bg_restart); INIT_WORK(&il->rx_replenish, il3945_bg_rx_replenish); INIT_DELAYED_WORK(&il->init_alive_start, il3945_bg_init_alive_s...
false
false
false
false
false
0
errHead(l) /* print start of error message */ Int l; { failed(); /* failed to reach target ... */ stopAnyPrinting(); FPrintf(errorStream,"ERROR"); /* * Encapsulating the filename portion inside of d-quotes makes it * a tad easier for a...
false
false
false
false
false
0
IDirectFBEventBuffer_WaitForEventWithTimeout( IDirectFBEventBuffer *thiz, unsigned int seconds, unsigned int milli_seconds ) { struct timeval now; struct timespec timeout; DFBResult ret ...
false
false
false
false
false
0
metadata_add_frame(metadata_t * meta, meta_frame_t * frame) { frame->next = NULL; if (meta->root == NULL) { meta->root = frame; } else { meta_frame_t * prev = meta->root; while (prev->next != NULL) { prev = prev->next; } prev->next = frame; } }
false
false
false
false
false
0
PyvtkContourRepresentation_ComputeInteractionState(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ComputeInteractionState"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkContourRepresentation *op = static_cast<vtkContourRepresentation *>(vp); int temp0; int temp1; int temp2 = 0; ...
false
false
false
false
false
0
print_volume_status(struct afp_volume * v, char * text,int * pos_p, int * len) { struct afp_server * s = v->server; int pos = *pos_p; unsigned int fl = v->extra_flags; pos+=snprintf(text+pos,*len-pos, " Volume %s, id %d, attribs 0x%x mounted: %s%s\n", v->volume_name_printable,v->volid, v->attributes, ...
false
false
false
false
false
0
AddECValues(CECTag *tag) const { tag->AddTag(CECTag(EC_TAG_STAT_NODE_VALUE, (uint64)m_value)); }
false
false
false
false
false
0
output_vect (vla_hwint_t vect) { int els_on_line; size_t vect_length = VEC_length (vect_el_t, vect); size_t i; els_on_line = 1; if (vect_length == 0) fputs ("0 /* This is dummy el because the vect is empty */", output_file); else for (i = 0; i < vect_length; i++) { fprintf (output_file, "%5l...
false
false
false
false
false
0
distmat_checkambigProt(ajint t1, ajint t2) { float n; n = (float)0.; if( !strchr("X",t1) && t1 == t2 ) n = (float)1.0; else if(((strchr("B",t1) && strchr("DN",t2)) || (strchr("B",t2) && strchr("DN",t1))) ) n = (float)0.5; else if(((strchr("Z",t1) && strchr("EQ",t2)) || ...
false
false
false
false
false
0
brcmf_flowring_dequeue(struct brcmf_flowring *flow, u8 flowid) { struct brcmf_flowring_ring *ring; struct sk_buff *skb; ring = flow->rings[flowid]; if (ring->status != RING_OPEN) return NULL; skb = skb_dequeue(&ring->skblist); if (ring->blocked && (skb_queue_len(&ring->skblist) < BRCMF_FLOWRING_LOW)) { ...
false
false
false
false
false
0
print_cstring(register const char *cp, register const u_char *ep) { register u_int length; if (cp >= (const char *)ep) { fputs(tstr, stdout); return (0); } length = *cp++; /* Spec says string can be at most 32 bytes long */ if (length > 32) { (void)printf("[len=%u]", length); return (0); } while ((int...
false
false
false
false
false
0
gaussian(const int k, png_bytep const xn, png_bytep *&prot, double ***cov) const{ //note: the common (2\pi)^{k/2} factor is omitted int g, h, sign; double D, diag, q = 0; gsl_permutation *p = gsl_permutation_alloc(pixel_size); gsl_matrix *M = gsl_matrix_alloc(pixel_size, pixel_size), *M_Inv = gsl_matrix_alloc(pix...
false
false
false
false
false
0
presentation_extract(GwyContainer *data, GwyRunType run) { GwyDataField *dfield; GQuark quark; gint oldid, newid; g_return_if_fail(run & PRESENTATIONOPS_RUN_MODES); gwy_app_data_browser_get_current(GWY_APP_DATA_FIELD_ID, &oldid, GWY_APP_SHOW_FIELD_KEY, &quark, ...
false
false
false
false
false
0
attrd_cib_connection_destroy(gpointer user_data) { cib_t *conn = user_data; conn->cmds->signoff(conn); /* Ensure IPC is cleaned up */ if (need_shutdown) { crm_info("Connection to the CIB terminated..."); } else { /* eventually this will trigger a reconnect, not a shutdown */ ...
false
false
false
false
false
0
nautilus_global_preferences_get_default_folder_viewer_preference_as_iid (void) { int preference_value; const char *viewer_iid; preference_value = g_settings_get_enum (nautilus_preferences, NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER); if (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW) { viewer_i...
false
false
false
false
false
0
is_square(void) { _point *A, *B, *C, *D; double a, b, c, d; D = POP(_point); C = POP(_point); B = POP(_point); A = POP(_point); a = distance(A, C); b = distance(B, D); c = distance(A, B); d = distance(A, D); PSHn(EQL(A->x+C->x, B->x+D->x) && EQL(A->y+C->y, B->y+D->y) && EQ...
false
false
false
false
false
0
visitWord (TextWord *word, int begin, int end, PDFRectangle *selection) { GooString *string; int i; state->setFillColor(glyph_color); out->updateFillColor(state); word->font->gfxFont->incRefCnt(); state->setFont(word->font->gfxFont, word->fontSize); out->updateFont(state); /* The only purpos...
false
false
false
false
false
0
redo() { if (m_enabled) { m_sketchWidget->changeConnection(m_fromID, m_fromConnectorID, m_toID, m_toConnectorID, m_viewLayerPlacement, m_connect, m_crossViewType == CrossView, m_updateConnections); BaseCommand::redo(); } }
false
false
false
false
false
0
mca_btl_sctp_endpoint_accept(mca_btl_base_endpoint_t* btl_endpoint, struct sockaddr_in* addr, int sd) { if(mca_btl_sctp_component.sctp_if_11) { /* 1 to 1 */ mca_btl_sctp_addr_t* btl_addr; mca_btl_sctp_proc_t* this_proc = mca_btl_sctp_proc_local(); int cmpval; OPAL_THREAD_LOC...
false
false
false
false
false
0
XML_ParseBuffer(XML_Parser parser, int len, int isFinal) { const char *start = bufferPtr; positionPtr = start; bufferEnd += len; parseEndByteIndex += len; errorCode = processor(parser, start, parseEndPtr = bufferEnd, isFinal ? (const char **)0 : &bufferPtr); if (errorCode == XML_ERRO...
false
false
false
false
false
0
settings_clean_invalid_module(const char *module) { CONFIG_NODE *node; SETTINGS_REC *set; GSList *tmp, *next; node = iconfig_node_traverse("settings", FALSE); if (node == NULL) return; node = config_node_section(node, module, -1); if (node == NULL) return; for (tmp = config_node_first(node->val...
false
false
false
false
false
0
digest_pem_block (GQuark type, GBytes *data, GBytes *outer, GHashTable *headers, gpointer user_data) { gchar **result = (gchar**)user_data; g_assert (result); if (!is_private_key_type (type)) return; /* Only digest the first key in the fil...
false
false
false
false
false
0
kvu_check_for_sched_sub(int policy) { bool result = false; #ifdef HAVE_SCHED_GETPARAM int curpid = getpid(); /* store old scheduling params */ struct sched_param prev_sparam; int ret = sched_getparam(curpid, &prev_sparam); if (ret == 0) { int prev_prio = prev_sparam.sched_priority; int prev_policy ...
false
false
false
false
false
0
ax88179_set_multicast(struct net_device *net) { struct usbnet *dev = netdev_priv(net); struct ax88179_data *data = (struct ax88179_data *)dev->data; u8 *m_filter = ((u8 *)dev->data) + 12; data->rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB | AX_RX_CTL_IPE); if (net->flags & IFF_PROMISC) { data->rxctl |= AX_RX_CTL_PR...
false
false
false
false
false
0
test_attr_ignore__expand_tilde_to_homedir(void) { git_config *cfg; assert_is_ignored(false, "example.global_with_tilde"); cl_fake_home(); /* construct fake home with fake global excludes */ cl_git_mkfile("home/globalexclude", "# found me\n*.global_with_tilde\n"); cl_git_pass(git_repository_config(&cfg, g_repo...
false
false
false
false
false
0