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
embedlist_filter_intersections(neighbors_grid *ng){ int i; vertex *A = ng->center; for(i=0;i<8;i++){ if(ng->vnum[i] != -1){ vertex *B = ng->m->v[ng->vnum[i]]; if(embedlist_intersects(ng->m,A,B)) ng->vnum[i]=-1; } } }
false
false
false
false
false
0
writeRecHook_Enter( HooksC::VaArgsT & args ) { bool error = false; // return, if snapshot generation is disabled if( !Params.createsnaps ) return /* true */; // get hook arguments // OTF_WStream ** wstream = (OTF_WStream**)args[0]; uint64_t * time = (uint64_t*)args[1]; ...
false
false
false
true
false
1
he_undo(struct he_s *hedit) /* Undo the last command. */ { struct he_command_s *command; if (hedit->swapping) { long position; position = he_rewind_command(hedit); if (position < 0) goto fail; else { command = he_read_command(hedit); fseek(hedit->undo.swapfile, position, SEEK...
false
false
false
false
false
0
get_gcin_xim_name() { char *xim_name; if ((xim_name=getenv("XMODIFIERS"))) { static char find[] = "@im="; static char sstr[32]; char *p = strstr(xim_name, find); p += strlen(find); strncpy(sstr, p, sizeof(sstr)); sstr[sizeof(sstr) - 1]=0; if ((p=strchr(sstr, '.'))) *p=0; // ...
false
false
false
false
false
0
InitRNG(unsigned long *pnSeed, int *pfInitFrom, const int fSet, const rng rngx) { int f = FALSE; rngcontext *rngctx = g_new0(rngcontext, 1); /* misc. initialisation */ /* Mersenne-Twister */ rngctx->mti = N + 1; #if HAVE_LIBGMP /* BBS */ rngctx->fZInit = FALSE; mpz_init(rngctx->nz); #...
false
false
false
false
false
0
unicode_wb_init(int (*cb_func)(int, void *), void *cb_arg) { unicode_wb_info_t i=calloc(1, sizeof(struct unicode_wb_info)); if (!i) return NULL; i->next_handler=sot; i->cb_func=cb_func; i->cb_arg=cb_arg; return i; }
false
false
false
false
false
0
F_divby5_1 (mpz_t RS, unsigned int n) { /* 2^2^m == 1 (mod 5) for m>1, thus F_m == 2 (mod 5) */ int mod, sgn; sgn = mpz_sgn (RS); mod = __gmpn_mod_34lsub1 (RS->_mp_d, mpz_size (RS)) % 5; if (mod == 1) { /* Add 2 * F_m == 4 (mod 5) */ mpz_absadd_2exp (RS, n + 1); if (sgn == 1) m...
false
false
false
false
false
0
imap_is_old(int sock, struct query *ctl, int number) /* is the given message old? */ { flag seen = TRUE; int i; (void)sock; (void)ctl; /* * Expunges change the fetch numbers, but unseen_messages contains * indices from before any expungees were done. So neither the * argument nor t...
false
false
false
false
false
0
process_gc_options (options_p opt, enum gc_used_enum level, int *maybe_undef, int *pass_param, int *length, int *skip, type_p *nested_ptr) { options_p o; for (o = opt; o; o = o->next) if (strcmp (o->name, "ptr_alias") == 0 && level == GC_POINTED_TO) set_gc_used_type (CONST_CAST2 (type_p, const char ...
false
false
false
false
false
0
InitLocal( DFBX11 *x11, DFBX11Shared *shared, CoreDFB *core ) { int i, n; XInitThreads(); x11->shared = shared; x11->core = core; x11->display = XOpenDisplay(getenv("DISPLAY")); if (!x11->display) { D_ERROR("X11: Error in XOpenDisplay for '%s'\n", getenv("DISPLAY")); ...
false
false
false
false
true
1
init_page_buffers(struct page *page, struct block_device *bdev, sector_t block, int size) { struct buffer_head *head = page_buffers(page); struct buffer_head *bh = head; int uptodate = PageUptodate(page); sector_t end_block = blkdev_max_block(I_BDEV(bdev->bd_inode), size); do { if (!buffer_mapped(bh)) { i...
false
false
false
false
false
0
q_redistribute(struct queue *q) { unsigned target, level; struct ilist *l, *l_above; struct entry *e; q_set_targets(q); for (level = 0u; level < q->nr_levels - 1u; level++) { l = q->qs + level; target = q->target_count[level]; /* * Pull down some entries from the level above. */ while (l->nr_elts ...
false
false
false
false
false
0
cut_test_result_set_backtrace (CutTestResult *result, const GList *backtrace) { CutTestResultPrivate *priv = CUT_TEST_RESULT_GET_PRIVATE(result); if (priv->backtrace) { g_list_foreach(priv->backtrace, (GFunc)g_object_unref, NULL); g_list_free(priv->backtrace); priv->backtrace = NULL; ...
false
false
false
false
false
0
setKeyMode(const FbTk::RefCount<t_key> &keyMode) { ungrabKeys(); ungrabButtons(); // notify handlers that their buttons have been ungrabbed HandlerMap::iterator h_it = m_handler_map.begin(), h_it_end = m_handler_map.end(); for (; h_it != h_it_end; ++h_it) h_it->sec...
false
false
false
false
false
0
GetDataBlock(IDirectFBDataBuffer *buffer, u8 *buf) { unsigned char count; if (! ReadOK( buffer, &count, 1 )) { GIFERRORMSG("error in getting DataBlock size" ); return -1; } ZeroDataBlock = count == 0; if ((count != 0) && (! ReadOK( buffer, buf, count ))) { GIFERR...
false
false
false
false
false
0
update_text(boolean update) { ALIterator i; #ifndef STL_VECTOR char buf[1024]; memset(buf, 0, 1024); #else vector <char> vbuf; #endif for (_list->First(i); !_list->Done(i); _list->Next(i)) { Attribute* attr = _list->GetAttr(i); const char* name = attr->Name(); int namelen = name ? strlen(name) : ...
false
false
false
false
false
0
wifi_utils_set_mesh_ssid (WifiData *data, const GByteArray *ssid) { g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data->set_mesh_ssid != NULL, FALSE); return data->set_mesh_ssid (data, ssid); }
false
false
false
false
false
0
variax_startup4(unsigned long data) { struct usb_line6_variax *variax = (struct usb_line6_variax *)data; CHECK_STARTUP_PROGRESS(variax->startup_progress, VARIAX_STARTUP_ACTIVATE); /* activate device: */ variax_activate_async(variax, 1); line6_start_timer(&variax->startup_timer2, VARIAX_STARTUP_DELAY4, ...
false
false
false
false
false
0
gcm_prefs_make_profile_default_cb (GObject *object, GAsyncResult *res, gpointer user_data) { CdDevice *device = CD_DEVICE (object); gboolean ret = FALSE; GError *error = NULL; ret = cd_device_make_profile_default_finish (device, ...
false
false
false
false
false
0
print_mcs_index(const __u8 *mcs) { int mcs_bit, prev_bit = -2, prev_cont = 0; for (mcs_bit = 0; mcs_bit <= 76; mcs_bit++) { unsigned int mcs_octet = mcs_bit/8; unsigned int MCS_RATE_BIT = 1 << mcs_bit % 8; bool mcs_rate_idx_set; mcs_rate_idx_set = !!(mcs[mcs_octet] & MCS_RATE_BIT); if (!mcs_rate_idx_set)...
false
false
false
false
false
0
osinfo_install_script_generate_output_async(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config, GFile *output_dir, ...
false
false
false
false
false
0
p_among_seq_int(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) { IntVarArgs x = s.arg2intvarargs(ce[0]); IntSet S = s.arg2intset(ce[1]); int q = ce[2]->getInt(); int l = ce[3]->getInt(); int u = ce[4]->getInt(); sequence(s, x, S, q, l, u, s.ann2icl(ann)...
false
false
false
false
false
0
ptr_from_index(Py_buffer *base, Py_ssize_t index) { char *ptr; Py_ssize_t nitems; /* items in the first dimension */ if (base->shape) nitems = base->shape[0]; else { assert(base->ndim == 1 && SIMPLE_FORMAT(base->format)); nitems = base->len; } if (index < 0) { i...
false
false
false
false
false
0
gdata_mock_server_run (GDataMockServer *self) { GDataMockServerPrivate *priv = self->priv; struct sockaddr_in sock; SoupAddress *addr; GMainContext *thread_context; g_return_if_fail (GDATA_IS_MOCK_SERVER (self)); g_return_if_fail (priv->resolver == NULL); g_return_if_fail (priv->server == NULL); /* Grab a loo...
false
false
false
false
false
0
GroupsClear(void) { int i,j,k; if(random_draw) { for(i=0;i<8;i++) for(j=0;j<4;j++) groups[i][j]=-1; for(j=0;j<4;j++) for(i=0;i<8;i++) { do { k=rand()%8; } ...
false
false
false
false
false
0
Accept( XMLVisitor* visitor ) const { if ( visitor->VisitEnter( *this, _rootAttribute ) ) { for ( const XMLNode* node=FirstChild(); node; node=node->NextSibling() ) { if ( !node->Accept( visitor ) ) { break; } } } return visitor->VisitExit( *t...
false
false
false
false
false
0
globus_rls_client_error_info(globus_result_t r, int *rc, char *buf, int buflen, globus_bool_t preserve) { globus_object_t *o; char *s; o = globus_error_get(r); if (rc) *rc = globus_error_get_type(o); if (buf) { s = globus_error_print_friendly(o); strncpy(buf, s, buflen); globus_lib...
false
false
false
false
false
0
krb5_gss_accept_sec_context_ext( OM_uint32 *minor_status, gss_ctx_id_t *context_handle, gss_cred_id_t verifier_cred_handle, gss_buffer_t input_token, gss_channel_bindings_t input_chan_bindings, gss_name_t *src_name, gss_OID *mech_type, gss_buffer_t output_token, OM_uint32 *ret_flags,...
false
false
false
false
false
0
SamplesAvailable(LinkedNode *pLink,int bForce) { NetAudio *pAudio = NULL; int Ret = 0; pAudio = pLink->pInHead; if(pAudio == NULL && pInHead != NULL && pLink->BufNum < BufNum) { pAudio = pInHead; while(pAudio->BufNum <= pLink->BufNum) { // We've already consumed this buffer, try the next ...
false
false
false
false
false
0
decimfmtAffixValueComparator(UHashTok val1, UHashTok val2) { const AffixesForCurrency* affix_1 = (AffixesForCurrency*)val1.pointer; const AffixesForCurrency* affix_2 = (AffixesForCurrency*)val2.pointer; return affix_1->negPrefixForCurrency == affix_2->negPrefixForCurrency && affix...
false
false
false
false
false
0
opa_to_vc_link_widths(u16 opa_widths) { int i; u16 result = 0; static const struct link_bits { u16 from; u16 to; } opa_link_xlate[] = { { OPA_LINK_WIDTH_1X, 1 << (1-1) }, { OPA_LINK_WIDTH_2X, 1 << (2-1) }, { OPA_LINK_WIDTH_3X, 1 << (3-1) }, { OPA_LINK_WIDTH_4X, 1 << (4-1) }, }; for (i = 0; i < A...
false
false
false
false
false
0
unload_mysql(const char *database, const char *tablename) { struct tables *cur; AST_LIST_LOCK(&mysql_tables); AST_LIST_TRAVERSE_SAFE_BEGIN(&mysql_tables, cur, list) { if (strcmp(cur->name, tablename) == 0) { AST_LIST_REMOVE_CURRENT(list); destroy_table(cur); break; } } AST_LIST_TRAVERSE_SAFE_END AST_...
false
false
false
false
false
0
unescape_config_stringlist(const QString &in, QStringList *_out) { QStringList out; QStringList list = in.split(','); for(int n = 0; n < list.count(); ++n) { QString str; if(!unescape_string(list[n], &str)) return false; out += str.trimmed(); } *_out = out; return true; }
false
false
false
false
false
0
acpi_processor_get_platform_limit(struct acpi_processor *pr) { acpi_status status = 0; unsigned long long tpc = 0; if (!pr) return -EINVAL; if (ignore_tpc) goto end; status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); if (ACPI_FAILURE(status)) { if (status != AE_NOT_FOUND) { ACPI_EXCEPTION...
false
false
false
false
false
0
as3722_i2c_of_probe(struct i2c_client *i2c, struct as3722 *as3722) { struct device_node *np = i2c->dev.of_node; struct irq_data *irq_data; if (!np) { dev_err(&i2c->dev, "Device Tree not found\n"); return -EINVAL; } irq_data = irq_get_irq_data(i2c->irq); if (!irq_data) { dev_err(&i2c->dev, "Invalid IRQ:...
false
false
false
false
false
0
info_set_input_from_file (char *filename) { FILE *stream; /* Input may include binary characters. */ stream = fopen (filename, FOPEN_RBIN); if (!stream) return; if ((info_input_stream != NULL) && (info_input_stream != stdin)) fclose (info_input_stream); info_input_stream = stream; if (...
false
false
false
false
true
1
cas_read_pcs_link_mode(struct cas *cp, int *fd, int *spd, int *pause) { u32 val = readl(cp->regs + REG_PCS_MII_LPA); *fd = (val & PCS_MII_LPA_FD) ? 1 : 0; *pause = (val & PCS_MII_LPA_SYM_PAUSE) ? 0x01 : 0x00; if (val & PCS_MII_LPA_ASYM_PAUSE) *pause |= 0x10; *spd = 1000; }
false
false
false
false
false
0
FDKfwrite_EL(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { if (IS_LITTLE_ENDIAN()) { FDKfwrite(ptrf, size, nmemb, fp); } else { UINT n; INT s; UCHAR *ptr = (UCHAR*) ptrf; for (n=0; n<nmemb; n++) { for (s=size-1; s>=0; s--) { //FDKprintf("char = %c\n", (char)...
false
false
false
false
false
0
gp_coffgen_delsectionsyms(gp_object_type *object, gp_section_type *section) { gp_symbol_type *list; gp_symbol_type *symbol; /* remove all symbols for the section */ list = object->symbols; while (list != NULL) { /* advance the pointer so the symbol can be freed */ symbol = list; list = list->next...
false
false
false
false
false
0
of_pci_get_host_bridge_resources(struct device_node *dev, unsigned char busno, unsigned char bus_max, struct list_head *resources, resource_size_t *io_base) { struct resource_entry *window; struct resource *res; struct resource *bus_range; struct of_pci_range range; struct of_pci_range_parser parser; char r...
false
false
false
false
false
0
testStPinchThreadSet(CuTest *testCase) { setup(); CuAssertIntEquals(testCase, 2, stPinchThreadSet_getSize(threadSet)); CuAssertPtrEquals(testCase, thread1, stPinchThreadSet_getThread(threadSet, name1)); CuAssertPtrEquals(testCase, thread2, stPinchThreadSet_getThread(threadSet, name2)); CuAssertPtrEq...
false
false
false
false
false
0
driBindContext(__DRIcontext *pcp, __DRIdrawable *pdp, __DRIdrawable *prp) { /* ** Assume error checking is done properly in glXMakeCurrent before ** calling driUnbindContext. */ if (!pcp) return GL_FALSE; /* Bind the drawable to the context */ pcp->driDrawablePriv = pdp; pcp...
false
false
false
false
false
0
equalsTreePartial(const AST* sub) const { // the empty tree is always a subset of any tree. if (!sub) return true; // check roots first if (!equals(sub)) return false; // if roots match, do full list partial match test on children. if (getFirstChild()) if (!getFirstChild()->equalsListPartial(sub->getFirstC...
false
false
false
false
false
0
activation_source_clear (NMDevice *self, gboolean remove_source, int family) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); guint *act_source_id; gpointer *act_source_func; if (family == AF_INET6) { act_source_id = &priv->act_source6_id; act_source_func = &priv->act_source6_func; } else { act_sourc...
false
false
false
false
false
0
adjustPositionForBreaks(unsigned dataRow_) const { int n=breakIndex().length(); unsigned i; for (i=0;i<n&&breakIndex()(i)<=dataRow_;i++); return dataRow_+i; }
false
false
false
false
false
0
doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func, LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg) { int i; LHASH_NODE *a,*n; if (lh == NULL) return; /* reverse the order so we search from 'top to bottom' * We were having memory leaks otherwise */ for (i=lh->num_nodes-1; i>=0; i--) { a=l...
false
false
false
false
false
0
ima_match_policy(struct inode *inode, enum ima_hooks func, int mask, int flags) { struct ima_rule_entry *entry; int action = 0, actmask = flags | (flags << 1); list_for_each_entry(entry, ima_rules, list) { if (!(entry->action & actmask)) continue; if (!ima_match_rules(entry, inode, func, mask)) c...
false
false
false
false
false
0
toFilePath(const MapParams& mp) const { if (!valid(mp)) return string(); if (mp.baseZoom == 0) return "base.png"; int64_t offset = (1 << (mp.baseZoom-1)); int64_t gx = x + offset, gy = y + offset; string s; for (int zoom = mp.baseZoom-1; zoom >= 0; zoom--) { int64_t xbit = (gx >> zoom) & 0x1; ...
false
false
false
false
false
0
x509_get_ext_key_usage( unsigned char **p, const unsigned char *end, x509_sequence *ext_key_usage) { int ret; if( ( ret = asn1_get_sequence_of( p, end, ext_key_usage, ASN1_OID ) ) != 0 ) return( POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS + re...
false
false
false
false
false
0
set_destination_ip(struct sockaddr_in *dest, in_addr_t local, in_addr_t current) { if (local == 0) { printf("Setting as source\n"); dest->sin_addr.s_addr = current; } else { printf("Setting as it wished\n"); dest->sin_addr.s_addr = local; } }
false
false
false
false
false
0
loader_HS_check(const char *filename, unsigned char *data, long size) { int load, end; /* * HeaderSave: * * 00h - 01h: load address * 02h - 03h: end address * 04h - 05h: start address * 06h - 0bh: free for additional info * 0ch: file type * 0dh - 0fh: signature ...
false
false
false
false
false
0
lm8323_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct lm8323_chip *lm = i2c_get_clientdata(client); int i; mutex_lock(&lm->lock); lm->pm_suspend = false; mutex_unlock(&lm->lock); for (i = 0; i < 3; i++) if (lm->pwm[i].enabled) led_classdev_resume(&lm->pwm[i].cdev); e...
false
false
false
false
false
0
shared_connect_start (ACE_SOCK_Stream &new_stream, const ACE_Time_Value *timeout, const ACE_Addr &local_sap) { ACE_TRACE ("ACE_SOCK_Connector::shared_connect_start"); if (local_sap != ACE_Addr::sap_any) { sockaddr *laddr ...
false
false
false
false
false
0
insertAndReplace(DcmDictEntry* e) { if (empty()) { push_front(e); } else { DcmDictEntryListIterator iter(begin()); DcmDictEntryListIterator last(end()); Uint32 eHash = e->hash(); Uint32 iterHash = 0; // insert smallest first for (iter = begin(); iter != la...
false
false
false
false
false
0
free_cmd_vgs(struct dm_list *cmd_vgs) { struct cmd_vg *cvl; /* Backward iterate cmd_vg list */ dm_list_iterate_back_items(cvl, cmd_vgs) { if (vg_read_error(cvl->vg)) release_vg(cvl->vg); else unlock_and_release_vg(cvl->vg->cmd, cvl->vg, cvl->vg_name); cvl->vg = NULL; } }
false
false
false
false
false
0
password_raw_writer (GKeyFile *file, const char *keyfile_dir, const char *uuid, NMSetting *setting, const char *key, const GValue *value) { const char *setting_name = nm_setting_get_name (setting); GByteArray *arr...
false
false
false
false
false
0
gt_ltrclustering_runner(int argc, const char **argv, int parsed_args, void *tool_arguments, GtError *err) { GtLTRClusteringArguments *arguments = tool_arguments; GtNodeStream *gff3_in_stream = NULL, *last_stream ...
false
false
false
false
false
0
tm_get_zone_name(struct tm *xtm) { const char *abbrev_timezone_name; struct tm *tm; if (xtm == NULL) { time_t now; time(&now); tm = localtime(&now); } else tm = xtm; #if defined(DACS_OS_SOLARIS) || defined(DACS_OS_CYGWIN) if (daylight) abbrev_timezone_name = tzname[1]; else abbrev_timezone_name =...
false
false
false
false
false
0
ReadList(const QString &str) { mEditIndex = QModelIndex(); if (rowCount() > 0) { removeRows(0, rowCount()); } QStringList games = str.split(QString(";")); CCGame* g; QModelIndex mix; for (int i = 0; i < games.size(); ++i) { g = new CCGame(games.at(i)); if (g-...
false
false
false
false
false
0
process_ping_packet(ubyte *data, header *hinfo) { net_addr addr; int offset; offset = HEADER_LENGTH; PACKET_SET_SIZE(); // get the address to return the pong to fill_net_addr(&addr, hinfo->addr, hinfo->net_id, hinfo->port); // send the pong send_pong(&addr); }
false
false
false
false
false
0
setRatio(graph_t * g) { char *p, c; double ratio; if ((p = agget(g, "ratio")) && ((c = p[0]))) { switch (c) { case 'a': if (streq(p, "auto")) GD_drawing(g)->ratio_kind = R_AUTO; break; case 'c': if (streq(p, "compress")) GD_drawing(g)->ratio_kind = R_COMPRESS; break; case 'e': ...
false
false
false
false
false
0
clutter_gst_player_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { ClutterGstPlayer *player = CLUTTER_GST_PLAYER (object); ClutterGstPlayerPrivate *priv = PLAYER_GET_...
false
false
false
false
false
0
classInfo() const { switch (m_impl->type()) { case DOM::CSSRule::STYLE_RULE: return &style_info; case DOM::CSSRule::MEDIA_RULE: return &media_info; case DOM::CSSRule::FONT_FACE_RULE: return &fontface_info; case DOM::CSSRule::PAGE_RULE: return &page_info; case DOM::CSSRule::IMPORT_RULE: r...
false
false
false
false
false
0
curl_formfree(struct curl_httppost *form) { struct curl_httppost *next; if(!form) /* no form to free, just get out of this */ return; do { next=form->next; /* the following form line */ /* recurse to sub-contents */ if(form->more) curl_formfree(form->more); if(!(form->flags & HT...
false
false
false
false
false
0
rt5670_set_jack_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack) { struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec); int ret; rt5670->jack = jack; rt5670->hp_gpio.gpiod_dev = codec->dev; rt5670->hp_gpio.name = "headphone detect"; rt5670->hp_gpio.report = SND_JACK_HEADSET | SND_JACK_...
false
false
false
false
false
0
pipes_pre(int test_to_run) { int retval; if (test_to_run == TEST_NONBLOCKING) { CRUT_DEBUG("Setting nonblocking flag"); fcntl(pipe_array[0].pipe_fd, F_SETFL, O_NONBLOCK); } #if TEST_PIPE_FCNTL if (test_to_run == TEST_SETSIZE) { long pipe_size = 0; pipe_size = fcntl(pip...
false
false
false
false
false
0
slurm_strcasestr(char *haystack, char *needle) { int hay_inx, hay_size = strlen(haystack); int need_inx, need_size = strlen(needle); char *hay_ptr = haystack; for (hay_inx=0; hay_inx<hay_size; hay_inx++) { for (need_inx=0; need_inx<need_size; need_inx++) { if (tolower((int) hay_ptr[need_inx]) != tolo...
false
false
false
false
false
0
getVertScrollbar() const { return static_cast<Scrollbar*>(WindowManager::getSingleton() .getWindow(d_name+VertScrollbarNameSuffix)); }
false
false
false
false
false
0
fs_fixup_k(FuncState *fs, GCproto *pt, void *kptr) { GCtab *kt; TValue *array; Node *node; MSize i, hmask; checklimitgt(fs, fs->nkn, BCMAX_D+1, "constants"); checklimitgt(fs, fs->nkgc, BCMAX_D+1, "constants"); setmref(pt->k, kptr); pt->sizekn = fs->nkn; pt->sizekgc = fs->nkgc; kt = fs->kt; array =...
false
false
false
false
false
0
tps65910_ck32k_init(struct tps65910 *tps65910, struct tps65910_board *pmic_pdata) { int ret; if (!pmic_pdata->en_ck32k_xtal) return 0; ret = tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL, DEVCTRL_CK32K_CTRL_MASK); if (ret < 0) { dev_err(tps65910->dev, "clear ck32k_ctrl failed: %d\n", ret); r...
false
false
false
false
false
0
buffer_gets(BIO *b, char *buf, int size) { BIO_F_BUFFER_CTX *ctx; int num=0,i,flag; char *p; ctx=(BIO_F_BUFFER_CTX *)b->ptr; size--; /* reserve space for a '\0' */ BIO_clear_retry_flags(b); for (;;) { if (ctx->ibuf_len > 0) { p= &(ctx->ibuf[ctx->ibuf_off]); flag=0; for (i=0; (i<ctx->ibuf_len) ...
false
false
false
false
false
0
elaborate_delay_expr(PExpr*expr, Design*des, NetScope*scope) { probe_expr_width(des, scope, expr); NetExpr*dex = elab_and_eval(des, scope, expr, -1); /* Print a warning if we find default and `timescale based * delays in the design, since this is likely an error. */ if (scope->time_from_timescale(...
false
false
false
false
false
0
inf_text_session_handle_user_color_change(InfTextSession* session, InfXmlConnection* connection, xmlNodePtr xml, GError** error) { InfUserTable* user_table; guint user_id; InfUser* user; ...
false
false
false
false
false
0
s_toplevel_read_page(TOPLEVEL *toplevel, char *filename) { int file_return_code; GError *err = NULL; /* Set the new filename */ toplevel->page_current->page_filename = g_strdup(filename); /* read in and fill out toplevel using f_open and its callees */ file_return_code = f_open (toplevel, toplevel->...
false
false
false
false
false
0
camel_ews_store_summary_get_folder_id_from_folder_type (CamelEwsStoreSummary *ews_summary, guint64 folder_type) { gchar *folder_id = NULL; GSList *folders, *l; g_return_val_if_fail (ews_summary != NULL, NULL); g_return_val_if_fail ((folder_type & CAMEL_FOLDER...
false
false
false
false
false
0
candidate_update_list(Candidate *candidate) { int i; GtkTreeIter iter; gtk_list_store_clear(candidate->store); for (i = 0; i < candidate->n_per_page && candidate->first + i < candidate->n; i++) { const char* value; const char* comment; const Hanja* hanja; hanja ...
false
false
false
false
false
0
enc_write_req(uint16_t handle, const uint8_t *value, int vlen, uint8_t *pdu, int len) { const uint16_t min_len = sizeof(pdu[0]) + sizeof(handle); if (pdu == NULL) return 0; if (len < min_len) return 0; if (vlen > len - min_len) vlen = len - min_len; pdu[0] = ATT_OP_WRITE_REQ; att_put_u16(handle, ...
false
true
false
false
false
1
gcut_flags_inspect (GType flags_type, guint flags_value) { GFlagsClass *flags_class; guint i; GString *inspected; flags_class = g_type_class_ref(flags_type); if (!flags_class) return g_strdup_printf("unknown flags type: %s(%" G_GSIZE_FORMAT ")", g_type_name(fl...
false
false
false
false
false
0
__pyx_memoryview_transpose_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) { struct __pyx_memoryviewslice_obj *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename ...
false
false
false
false
false
0
ttm_mem_global_alloc_zone(struct ttm_mem_global *glob, struct ttm_mem_zone *single_zone, uint64_t memory, bool no_wait, bool interruptible) { int count = TTM_MEMORY_ALLOC_RETRIES; while (unlikely(ttm_mem_global_reserve(glob, single_zone, memory, true) != 0)) { ...
false
false
false
false
false
0
gst_structure_get_valist (const GstStructure * structure, const char *first_fieldname, va_list args) { const char *field_name; GType expected_type = G_TYPE_INVALID; g_return_val_if_fail (GST_IS_STRUCTURE (structure), FALSE); g_return_val_if_fail (first_fieldname != NULL, FALSE); field_name = first_field...
false
false
false
false
false
0
get_addr_inode(void *p) { char name[256]; int ret; struct stat sb; ret = read_maps((unsigned long)p, name); if (ret < 0) return ret; if (ret == 0) { ERROR("Couldn't find address %p in /proc/self/maps\n", p); return -1; } /* Don't care about non-filenames */ if (name[0] != '/') return 0; /* Truncate...
false
false
false
false
false
0
Blowfish_Decrypt(BLOWFISH_CTX *ctx, uint32_t *xl, uint32_t *xr){ uint32_t Xl; uint32_t Xr; uint32_t temp; int i; Xl = *xl; Xr = *xr; #ifdef TRACE printf("Dec 1: Xl = %08lX\tXr = %08lX\n", Xl, Xr); #endif for (i = N + 1; i > 1; --i) { Xl = Xl ^ ctx->P[i]; Xr = F(ctx, Xl) ^ Xr; ...
false
false
false
false
false
0
hsc_msg_eof(HSCPRC * hp, STRPTR descr) { STRPTR eoftxt = "unexpected end of context"; if (descr) hsc_message(hp, MSG_UNEX_EOF, "%s (%s)", eoftxt, descr); else hsc_message(hp, MSG_UNEX_EOF, "%s", eoftxt); }
false
false
false
false
false
0
front( const PD_URIList& l ) const { if(l.empty()) { return PD_URI(); } return l.front(); }
false
false
false
false
false
0
grant() { if (table_ref->view) return &(table_ref->grant); else if (table_ref->is_natural_join) return natural_join_it.column_ref()->grant(); return &(table_ref->table->grant); }
false
false
false
false
false
0
AlphaSplit(CxImage *dest) { if (!pAlpha || !dest) return false; CxImage tmp(head.biWidth,head.biHeight,8); if (!tmp.IsValid()){ strcpy(info.szLastError,tmp.GetLastError()); return false; } for(long y=0; y<head.biHeight; y++){ for(long x=0; x<head.biWidth; x++){ tmp.BlindSetPixelIndex(x,y,pAlpha[x+y*head...
false
false
false
false
false
0
coverart_process_line(char *line, struct art_query *query) { int index = 0, outdex = 0; char procbuffer[128]; if(strchr(line, ':') == NULL) return; while(line[index++] != ':'); line[index - 1] = '\0'; index++; while(line[index] != '\0') procbuffer[outdex++] = line[index++]; procbuffe...
false
false
false
false
false
0
aggregate_discrete_check (const int *list, const DATASET *dset) { int i, vi; for (i=1; i<=list[0]; i++) { vi = list[i]; if (!series_is_discrete(dset, vi) && !gretl_isdiscrete(dset->t1, dset->t2, dset->Z[vi])) { gretl_errmsg_sprintf(_("The variable '%s' is not discrete"), dset->varname[vi]); ...
false
false
false
false
false
0
import_all_from(PyObject *locals, PyObject *v) { PyObject *all = PyObject_GetAttrString(v, "__all__"); PyObject *dict, *name, *value; int skip_leading_underscores = 0; int pos, err; if (all == NULL) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) return -1; /* Unexpected er...
false
false
false
false
false
0
__createMesh() { ReferenceCounting<VerticesCorrespondance> correspondance = new VerticesCorrespondance((*__vertices).numberOfVertices()); if (__hexahedra != 0) { SurfaceMeshOfQuadrangles* quadrilaterals = 0; if (__quadrilaterals != 0) { quadrilaterals = new SurfaceMeshOfQuadrangles(__vertices, ...
false
false
false
false
false
0
do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, pgoff_t pgoff, unsigned int flags, pte_t orig_pte) { struct page *fault_page; spinlock_t *ptl; pte_t *pte; int ret = 0; /* * Let's call ->map_pages() first and use ->fault() as fallback * if page by the offs...
false
false
false
false
false
0
route_towards_guid(const struct guid *guid) { struct gnutella_node *node; struct message *m; if (is_banned_push(guid)) return NULL; node = node_by_guid(guid); if (node) return g_slist_prepend(NULL, node); if (find_message(guid, QUERY_HIT_ROUTE_SAVE, &m) && m->routes) { GSList *iter, *nodes = NULL; ...
false
false
false
false
false
0
eval_cb (const GMatchInfo *match_info, GString *result, gpointer user_data) { char *match, *new, *s; const char *filename = (const char *) user_data; /* We don't want to lose the formatting */ s = g_match_info_fetch (match_info, 1); g_string_append (result, s); //FIXME try to line up with the other lines if...
false
false
false
false
false
0
_F_mpz_demote_val(F_mpz_t f) { __mpz_struct * mpz_ptr = F_mpz_arr + COEFF_TO_OFF(*f); long size = mpz_ptr->_mp_size; if (size == 0L) // value is zero { _F_mpz_clear_mpz(*f); *f = 0; } else if (size == 1L) // value is positive and 1 limb { ulong uval = mpz_get_ui(mpz_ptr); if (uval <= (ulong) COEFF_...
false
false
false
false
false
0
GetParallel(planet1, planet2, planetalt1, planetalt2, ret1, ret2, altret1, altret2, i, j) real *planet1, *planet2, *planetalt1, *planetalt2, *ret1, *ret2, *altret1, *altret2; int i, j; { int k; real l, alt1, alt2, latdiri, latdirj; l = RFromD(planet1[j]); alt1 = RFromD(planetalt1[j]); EclToEqu(&l, &a...
false
false
false
false
false
0
putb_ncr(buf, len, t) /* put NCR coded bytes */ u_char *buf; u_int len; FILE *t; /* file to receive data */ { u_char *pakptr=pakbuf; u_int i; for (i=0; i<len; i++) { if (state == INREP) { if (buf[i]) while (--buf[i]) *pakptr++ = lastc; else *pakptr++ = DLE; state = NOHIST; } else { ...
false
false
false
false
false
0
handle_options(int argc, char *argv[]) { int c; int option_index = 0; while (1) { c = getopt_long(argc, argv, short_options, long_options, &option_index); if (c == -1) break; switch (c) { case '?': case 'h': ...
true
true
false
false
true
1
test_regdom(const struct ieee80211_regdomain *rd) { printf("=================================================================================\n"); if (!reglib_is_valid_rd(rd)) { printf("Invalid regulatory domain\n"); return; } reglib_print_regdomain(rd); printf("-----------------------------------------------...
false
false
false
false
false
0
PyFF_Font_get_mark_classes(PyFF_Font *self,void *closure) { PyObject *tuple, *nametuple; SplineFont *sf = self->fv->sf; int i; if ( sf->mark_class_cnt==0 ) Py_RETURN_NONE; tuple = PyTuple_New(sf->mark_class_cnt-1); for ( i=1; i<sf->mark_class_cnt; ++i ) { nametuple = TupleOfGlyphNames(sf->mar...
false
false
false
false
false
0