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
host_table_final() { struct host_table_entry *hte, *next = NULL; MUTEX_LOCK(ht->lock); for (hte = ht->entries; hte; hte = next) { if (hte) next = hte->next; if (hte->hostname) free(hte->hostname); if (hte->comm.buf) free(hte->comm.buf); free(hte); } MUTEX_UNLOCK(ht->lock); free(ht); ht = NUL...
false
false
false
false
false
0
match_slot(struct pci_dev *l, struct pci_dev *r) { if (pci_domain_nr(l->bus) == pci_domain_nr(r->bus) && l->bus == r->bus && PCI_SLOT(l->devfn) == PCI_SLOT(r->devfn)) return 1; return 0; }
false
false
false
false
false
0
_e2_fileview_set_font (ViewInfo *view, gchar *fontstr) { GList* columns, *renderers, *base1, *base2; columns = base1 = gtk_tree_view_get_columns (GTK_TREE_VIEW (view->treeview)); for (; columns != NULL ; columns = columns->next) { GtkTreeViewColumn *column = columns->data; renderers = base2 = gtk_tree_view_colu...
false
false
false
false
false
0
ifcommon_do_list ( int ( * payload ) ( struct net_device * ), char **list, unsigned int count ) { const char *netdev_name; struct net_device *netdev; int rc = 0; while ( count-- ) { netdev_name = *(list++); netdev = find_netdev ( netdev_name ); if ( ! netdev ) { printf ( "%s: no such interface\n"...
false
false
false
false
false
0
complex_to_sample_array(COMPLEX_ARRAY complex_array, SAMPLE *sample_array, size_t length, SAMPLE max_magnitude, VREAL vocode_volume) { size_t i; for (i = 0; i < length; ++i) { VREAL sample = complex...
false
false
false
false
false
0
sp5100_tco_cleanup(void) { /* Stop the timer before we leave */ if (!nowayout) tco_timer_stop(); /* Deregister */ misc_deregister(&sp5100_tco_miscdev); iounmap(tcobase); release_mem_region(tcobase_phys, SP5100_WDT_MEM_MAP_SIZE); release_region(pm_iobase, SP5100_PM_IOPORTS_SIZE); }
false
false
false
false
false
0
hex_to_char(const std::string& str) { char c = 0; for(std::string::size_type p = 0; p<str.length(); ++p) { c <<= 4; c |= hex_to_char(str[p]); }; return c; }
false
false
false
false
false
0
sdup(const char* str) { if (str == NULL) return NULL; size_t len = ::strlen(str); if (len == 0) return NULL; // Include NULL terminator and limit string length. if (++len > 256) len = 256; char* m = static_cast<char*>(alloc(len)); if (m == NULL) return NULL; ::memcpy(m, str, len); ...
false
false
false
false
true
1
rocker_dma_rx_ring_skb_unmap(const struct rocker *rocker, const struct rocker_tlv **attrs) { struct pci_dev *pdev = rocker->pdev; dma_addr_t dma_handle; size_t len; if (!attrs[ROCKER_TLV_RX_FRAG_ADDR] || !attrs[ROCKER_TLV_RX_FRAG_MAX_LEN]) return; dma_handle = rocker_tlv_get_u64(attrs[ROCKER_TLV_RX_F...
false
false
false
false
false
0
netxen_napi_disable(struct netxen_adapter *adapter) { int ring; struct nx_host_sds_ring *sds_ring; struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; for (ring = 0; ring < adapter->max_sds_rings; ring++) { sds_ring = &recv_ctx->sds_rings[ring]; netxen_nic_disable_int(sds_ring); napi_synchronize(&sds_...
false
false
false
false
false
0
glade_gtk_combo_post_create (GladeWidgetAdaptor *adaptor, GObject *object, GladeCreateReason reason) { GladeWidget *gcombo, *gentry, *glist; g_return_if_fail (GTK_IS_COMBO (object)); if ((gcombo = glade_widget_get_from_gobject (object)) == NULL) return; gentry = glade_widget_adap...
false
false
false
false
false
0
re_check(include_ctx_t *ctx, const char *string, const char *rexp) { ap_regex_t *compiled; backref_t *re = ctx->intern->re; compiled = ap_pregcomp(ctx->dpool, rexp, AP_REG_EXTENDED); if (!compiled) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "unable to " ...
false
false
false
false
false
0
CompositeExclusion(const MagickPixelPacket *p, const MagickPixelPacket *q,const ChannelType channel, MagickPixelPacket *composite) { MagickRealType gamma, Sa, Da; Sa=1.0-QuantumScale*p->opacity; /* simplify and speed up equations */ Da=1.0-QuantumScale*q->opacity; if ( (channel & SyncChannels)...
false
false
false
false
false
0
kc_do_map_phylum #ifdef KC_USE_PROTOTYPES (kc_voidptr_t kc_p, kc_voidptr_t (*kc_fp)(kc_voidptr_t), kc_enum_phyla kc_phylum) #else (kc_p, kc_fp, kc_phylum) kc_voidptr_t kc_p; kc_voidptr_t (*kc_fp)KC__P((kc_voidptr_t)); kc_enum_phyla kc_phylum; #endif { kc_enum_operators kc_prodsel; /*SUPPRESS 622*/ assertPhylum(((case...
false
false
false
false
false
0
syn_stack_apply_changes_block(block, buf) synblock_T *block; buf_T *buf; { synstate_T *p, *prev, *np; linenr_T n; if (block->b_sst_array == NULL) /* nothing to do */ return; prev = NULL; for (p = block->b_sst_first; p != NULL; ) { if (p->sst_lnum + block->b_syn_sync_linebreaks > buf-...
false
false
false
false
false
0
encode_Event(unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE, const Event *data, size_t *size) { size_t ret HEIMDAL_UNUSED_ATTRIBUTE = 0; size_t l HEIMDAL_UNUSED_ATTRIBUTE; int i HEIMDAL_UNUSED_ATTRIBUTE, e HEIMDAL_UNUSED_ATTRIBUTE; /* principal */ if((data)->principal) { size_t Top_tag_...
false
false
false
false
false
0
ajStrPasteMaxC (AjPStr* Pstr, ajlong pos, const char* txt, size_t len) { AjPStr thys; size_t ibegin; size_t iend; char* ptr1 = 0; const char* ptr2 = 0; size_t slen; size_t ilen; slen = strlen(txt); if(!*Pstr) *Pstr = ajStrNewResLenC("", 1, 0); else if((*P...
false
false
false
false
false
0
add_space(con_list* ptlist, char orient, char *value) { con_list* ptcon; ptcon = (con_list*) malloc(sizeof(con_list)); ptcon->NAME = strdup("SPACE"); ptcon->ORIENT = orient; ptcon->VALUE = atoi(value); ptcon->NEXT = ptlist; return ptcon; }
false
false
false
false
false
0
_sig_agent(void *args) { agent_arg_t *agent_arg_ptr = args; while (1) { pid_t *pids = NULL; int i, npids = 0, hung_pids = 0; char *stat_fname = NULL; if (proctrack_g_get_pids(agent_arg_ptr->cont_id, &pids, &npids) == SLURM_SUCCESS) { hung_pids = 0; for (i = 0; i < npids; i++) { xstrfmtca...
false
false
false
false
false
0
VerbProcess(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[MAXCHANNELS]) { ALverbState *State = (ALverbState*)effect; ALuint index, c; ALfloat early[4], late[4], out[4]; const ALfloat *panGain = State->Gain; for(index = 0;index < SamplesToDo;index++) ...
false
false
false
false
false
0
handleAlias(poptContext con, const char * longName, char shortName, /*@keep@*/ const char * nextCharArg) { int i; if (con->os->currAlias && con->os->currAlias->longName && longName && !strcmp(con->os->currAlias->longName, longName)) return 0; if (con->os->currAlias && shortName && shortName...
false
false
false
false
false
0
fsnotify_init_mark(struct fsnotify_mark *mark, void (*free_mark)(struct fsnotify_mark *mark)) { memset(mark, 0, sizeof(*mark)); spin_lock_init(&mark->lock); atomic_set(&mark->refcnt, 1); mark->free_mark = free_mark; }
false
false
false
false
false
0
mono_marshal_free_inflated_wrappers (MonoMethod *method) { MonoMethodSignature *sig = method->signature; g_assert (method->is_inflated); /* Ignore calls occuring late during cleanup. */ if (!marshal_mutex_initialized) return; mono_marshal_lock (); /* ...
false
false
false
false
false
0
GetLocMaterial(int id) const { const std::vector<trpgLocalMaterial> *matList; matList = tileHead.GetLocalMaterialList(); if (id <0 || id >= (int)matList->size()) return NULL; return &(*matList)[id]; }
false
false
false
false
false
0
crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx, const u8 *src, unsigned int srclen) { if (!dctx->sset) { if (!dctx->rset && srclen >= POLY1305_BLOCK_SIZE) { poly1305_setrkey(dctx, src); src += POLY1305_BLOCK_SIZE; srclen -= POLY1305_BLOCK_SIZE; dctx->rset = true; } if (srclen >= POLY1...
false
false
false
false
false
0
drsuapi_dissect_union_DsGetNCChangesCtr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep, int hf_index, guint32 param _U_) { proto_item *item=NULL; proto_tree *tree=NULL; int old_offset; guint32 level = 0; ALIGN_TO_4_BYTES; old_offset=offset...
false
false
false
false
false
0
qca_setup(struct hci_uart *hu) { struct hci_dev *hdev = hu->hdev; struct qca_data *qca = hu->priv; unsigned int speed, qca_baudrate = QCA_BAUDRATE_115200; int ret; BT_INFO("%s: ROME setup", hdev->name); /* Patch downloading has to be done without IBS mode */ clear_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags);...
false
false
false
false
false
0
stp_dither_get_channel(stp_vars_t *v, unsigned channel, unsigned subchannel) { stpi_dither_t *d = (stpi_dither_t *) stp_get_component_data(v, "Dither"); int place = stpi_dither_translate_channel(v, channel, subchannel); if (place >= 0) return d->channel[place].ptr; else return NULL; }
false
false
false
false
false
0
sg_SoundPause( bool pause, bool fromActivity ) { static bool flags[2]={true, false}; flags[ fromActivity ] = pause; se_SoundPause( flags[0] || flags[1] ); }
false
false
false
false
false
0
saveXC(const Molecule& molecule, const BasisInfoStruct& bis, const ergo_real* dMat, FILE *f) { int n = bis.noOfBasisFuncs; ergo_real *hessian = new ergo_real[n*n*n*n]; int ret = 0; Dft::GridParams gss; Dft::FullMatrix density(dMat, n); const Dft::FullMatrix *densPtr = &density; memset(hessian,...
false
false
false
false
false
0
auth_aes_encrypt(char* message) { // AES Encryption std::string key_encrypt((char*) aes_key); std::string std_xml((char*) message); string str = END_DELIMITER; std_xml.append(str); std::string encrypted(aes_encrypt(encode(std_xml), key_encrypt)); return...
false
false
false
false
false
0
print_dynamic_flags (bfd_vma flags) { int first = 1; while (flags) { bfd_vma flag; flag = flags & - flags; flags &= ~ flag; if (first) first = 0; else putc (' ', stdout); switch (flag) { case DF_ORIGIN: fputs ("ORIGIN", stdout); break; case DF_SYMBOLIC: fputs ("SYMB...
false
false
false
false
false
0
findWordBoundary(QChar *chars, int len, int position, int *start, int *end) { if (chars[position].isSpace()) { int pos = position; while (pos >= 0 && chars[pos].isSpace()) pos--; *start = pos+1; pos = position; while (pos < (int)len && chars[pos].isSpace()) ...
false
false
false
false
false
0
_ml_P_FileSys_fchown (ml_state_t *msp, ml_val_t arg) { int fd = REC_SELINT (arg, 0); uid_t uid = REC_SELWORD(arg, 1); gid_t gid = REC_SELWORD(arg, 2); int sts; sts = fchown (fd, uid, gid); CHK_RETURN_UNIT(msp, sts) }
false
false
false
false
false
0
process_clish_module(clish_shell_t *shell, TiXmlElement *element, void *) { // create the global view if(NULL == shell->global) { shell->global = clish_shell_find_create_view(shell,"global",""); } process_children(shell,element,shell->globa...
false
false
false
false
false
0
config_vo(std::list<AuthVO>& vos,const std::string& cmd,std::string& rest) { if(cmd != "vo") return 1; std::string voname = config_next_arg(rest); std::string vofile = config_next_arg(rest); if((voname.length() == 0) || (vofile.length() == 0)) { return -1; }; vos.push_back(AuthVO(voname,vo...
false
false
false
false
false
0
hangup() throw(GsmException) { _at->chat("H"); }
false
false
false
false
false
0
read_config_with_type_when(const char *filename, const char *type, int when) { struct config_line *ctmp = read_config_get_handlers(type); if (ctmp) return read_config(filename, ctmp, when); else DEBUGMSGTL(("read_config", "read_config: I have no registrations for type:%s,...
false
false
false
false
false
0
xfmt_handle_pass1_leave(void *node, void *data) { xnode_t *xn = node; struct xfmt_pass1 *xp1 = data; g_assert(uint_is_positive(xp1->depth)); (void) xn; xp1->depth--; }
false
false
false
false
false
0
processInputBuffer(redisClient *c) { again: if (c->bulklen == -1) { /* Read the first line of the query */ char *p = strchr(c->querybuf,'\n'); size_t querylen; if (p) { sds query, *argv; int argc, j; query = c->querybuf; c...
false
false
false
false
false
0
OnRestoreState(wxConfigBase* pConfig) { wxString strBaseConfigLocation = wxEmptyString; wxASSERT(pConfig); // Retrieve the base location to store configuration information // Should be in the following form: "/Projects/" strBaseConfigLocation = pConfig->GetPath() + wxT("/"); pConfig->SetP...
false
false
false
false
false
0
constrain_value (Mustek_Scanner * s, SANE_Int option, void *value, SANE_Int * info) { SANE_Fixed w, dpi; SANE_Status status; if (value) w = *(SANE_Fixed *) value; else w = 0; if (option == OPT_RESOLUTION) { if (s->hw->flags & MUSTEK_FLAG_THREE_PASS) { /* The three pass scanners use ...
false
false
true
true
false
1
iterate_md5_digest(MD5& md5, MD5::Digest& digest, int iterations) { md5.digest(digest); for (int i = 0; i < iterations; ++i) { MD5 m; m.encodeDataIncrementally(reinterpret_cast<char*>(digest), sizeof(digest)); m.digest(digest); } }
false
false
false
false
false
0
dump_mem(FILE* fp){ int i; fprintf(fp,"\tptrs[%d] = {", nptrs); for (i=0; i < arrsz; i++) fprintf(fp," {%#lx,%ld},", (long)ptrs[i].p, (long)ptrs[i].sz); fprintf(fp,"}\n"); }
false
false
false
false
false
0
deleteContinent(Continent* continent) { kDebug() << continent->name(); kDebug() << "remove and delete the continent"; KConfig config(m_configFileName); config.deleteGroup(continent->name()); m_continents.removeAll(continent); delete continent; m_dirty = true; }
false
false
false
false
false
0
has_config_widget (const char *bdaddr, const char **uuids) { gboolean has_sp; BluetoothType type; guint i; if (uuids == NULL) return FALSE; for (i = 0; uuids[i] != NULL; i++) { if (g_str_equal (uuids[i], "SerialPort")) { has_sp = TRUE; break; } } if (has_sp == FALSE) return FALSE; type = get_typ...
false
false
false
false
false
0
prand_seed(prand *s) { int e, di = s->di; printf("\n"); /* Seed the non-fixed points */ for (; s->np < s->tinp;) { prnode *p = &s->n[s->np]; /* Next node */ for (e = 0; e < di; e++) { if (e == 1 || e == 2) p->v[e] = d_rand(-128.0, 128.0); else p->v[e] = d_rand(0.0, 100.0); } if (prand_from...
false
false
false
false
false
0
sh_eth_tsu_del_entry(struct net_device *ndev, const u8 *addr) { struct sh_eth_private *mdp = netdev_priv(ndev); int i, ret; if (!mdp->cd->tsu) return 0; i = sh_eth_tsu_find_entry(ndev, addr); if (i) { /* Entry found */ if (sh_eth_tsu_disable_cam_entry_post(ndev, i)) goto done; /* Disable the entry if...
false
false
false
false
false
0
expand_start_catch_block (tree decl) { tree exp = NULL_TREE; tree type; bool is_java; if (! doing_eh (1)) return NULL_TREE; /* Make sure this declaration is reasonable. */ if (decl && !complete_ptr_ref_or_void_ptr_p (TREE_TYPE (decl), NULL_TREE)) decl = NULL_TREE; if (decl) type = prepare_...
false
false
false
false
false
0
revert ( ) { if (!modified) return true; modified = false; int cnt = entries.size(); for (int i = 0; i < cnt; i++) { delete entries[i]; entries[i] = 0; lengths[i] = 0; } if (flex) { cnt = flex->number_of_objects(); entries.resize(cnt); lengths.resize(entries.size()); } else // Single p...
false
false
false
false
false
0
setNumBands( unsigned int bands ) { VIGRA_IMPEX_FINALIZED(pimpl->finalized); pimpl->samples_per_pixel = bands; }
false
false
false
false
false
0
cleanup_conditionals(cstack, searched_cond, inclusive) struct condstack *cstack; int searched_cond; int inclusive; { int idx; int stop = FALSE; for (idx = cstack->cs_idx; idx >= 0; --idx) { if (cstack->cs_flags[idx] & CSF_TRY) { /* * Discard anything pending in a finally ...
false
false
false
false
false
0
scrollconsole(unsigned int console){ unsigned int i; for (i=0; i <= (80*25*2)-160;i++) { consmem[console][i] = consmem[console][i+160]; } for(i=(80*25*2)-160; i <= (80*25*2);i+=2){ consmem[console][i] = ' '; } position[console] -= 160; }
false
false
false
false
false
0
serverActionTriggered(QAction *a) { if (a==d->aServerRefresh) { d->aServerRefresh->setEnabled(false); refreshServerContent(); } if (a==d->aServerAdd) { AddServerDialog dlg(this); Server server; dlg.setServer(server); if (dlg.exec()==QDialog::Accepted) { ...
false
false
false
false
false
0
same_mpfr_value (mpfr_ptr got, mpfr_ptr ref, int known_sign) { /* The sign of zeroes and infinities is checked only when known_sign is true. */ if (mpfr_nan_p (got)) return mpfr_nan_p (ref); if (mpfr_inf_p (got)) return mpfr_inf_p (ref) && (!know...
false
false
false
false
false
0
C_a_i_flonum_round_proper(C_word **ptr, int c, C_word n) { double fn, i, f, i2, r; fn = C_flonum_magnitude(n); if(fn < 0.0) { f = modf(-fn, &i); if(f < 0.5 || (f == 0.5 && modf(i * 0.5, &i2) == 0.0)) r = -i; else r = -(i + 1.0); } else if(fn == 0.0/* || fn == -0.0*/) r = fn; els...
false
false
false
false
false
0
getWord(char* dest, const char* pin) { char *pout, *pend; char ch, ec; while (*pin == ' ' || *pin == '\t') pin++; pout = dest; pend = dest + 256 - 1; if (*pin == '\'' || *pin == '"' || *pin == '`') { ec = *pin++; if (ec == '`') ec = '\''; for (;;...
false
false
false
false
false
0
fire() { if ( defaultMean < RandPoissonQ::tableBoundary() ) { return RandPoissonQ::shoot ( getLocalEngine(), defaultMean ); } else { return RandPoisson::shoot(getLocalEngine(), defaultMean); } }
false
false
false
false
false
0
gw_am_load_default_settings ( ) { #ifdef GW_DEBUG_MODE gw_am_log_msg ( 0, __FILE__, __LINE__, __PRETTY_FUNCTION__, NULL); #endif if ( gw_am_get_settings ( GW_VALUE_APP_GUI_RC_FILE) == NULL ) { gw_am_set_settings ( GW_VALUE_APP_GUI_RC_FILE, g_strconcat ( my_application_settings.user_gwhere_home, G_DIR_SEPARATOR_S, ...
false
false
false
false
false
0
init (xlator_t *this) { struct mdc_conf *conf = NULL; conf = GF_CALLOC (sizeof (*conf), 1, gf_mdc_mt_mdc_conf_t); if (!conf) { gf_log (this->name, GF_LOG_ERROR, "out of memory"); return -1; } GF_OPTION_INIT ("timeout", conf->timeout, int32, out); out: this->private = conf; return 0; }
false
false
false
false
false
0
malloc (size_t) { ACE_TRACE ("ACE_Shared_Memory_MM::malloc"); void *addr = 0; return this->shared_memory_ (addr) == -1 ? 0 : addr; }
false
false
false
false
false
0
cli_coll_create (cli_infos_t *infos, command_context_t *ctx) { xmmsv_t *val; xmmsc_coll_t *coll; xmmsc_result_t *res = NULL; gchar *ns, *name, *pattern = NULL; gboolean force, empty, coll_isset, retval = TRUE; const gchar *collection, *fullname; command_flag_boolean_get (ctx, "empty", &empty); coll_isset = co...
false
false
false
false
false
0
va_whois(va_list args) { struct Client *source_p = va_arg(args, struct Client *); int parc = va_arg(args, int); char **parv = va_arg(args, char **); do_whois(source_p, parc, parv); return NULL; }
false
false
false
false
false
0
schedule_detach_parent (struct schedule *s, struct schedule_entry *e) { if (e) { if (e->parent) { if (e->parent->lt == e) e->parent->lt = NULL; else if (e->parent->gt == e) e->parent->gt = NULL; else { /* parent <-> child linkage is corrupted */ ASSERT (0); } e...
false
false
false
false
false
0
beginPthreadJoin(pthread_t thread) { bool res = false; _do_lock_tbl(); dmtcp::map<pthread_t, pthread_t>::iterator i = _pthreadJoinId.find(thread); if (i == _pthreadJoinId.end()) { _pthreadJoinId[thread] = pthread_self(); res = true; } _do_unlock_tbl(); return res; }
false
false
false
false
false
0
FindRRSet(const mDNS *const m, const CacheRecord *const pktrr) { const AuthRecord *rr; for (rr = m->ResourceRecords; rr; rr=rr->next) { if (IdenticalResourceRecord(&rr->resrec, &pktrr->resrec)) { while (rr->RRSet && rr != rr->RRSet) rr = rr->RRSet; return(rr); } } return(mDNSNULL); }
false
false
false
false
false
0
NegativeTestQuoteMeta(string unquoted, string should_not_match, RE_Options options = RE_Options()) { string quoted = RE::QuoteMeta(unquoted); RE re(quoted, options); CHECK(!re.FullMatch(should_not_match)); }
false
false
false
false
false
0
get_cmd_values(char ** w, int nw, const char *key, int nobjects, double *objects) { int istart = -1, i, found = 0, iobject; if (nobjects > _num_dstackMAX) return 0; for (i = 0; i < nw; i++) if (!strcmp(w[i], key)) { istart = i + 1; break; } if (istart == -1) return 0; /* 'key' not present...
false
false
false
false
false
0
df_bb_reg_def_chain_create (struct df *df, basic_block bb) { rtx insn; /* Perhaps the defs should be sorted using a depth first search of the CFG (or possibly a breadth first search). We currently scan the basic blocks in reverse order so that the first defs appear at the start of the chain. */ ...
false
false
false
false
false
0
setIdentityOnlineStatus(const QString &status, const QString &message) { // handle method call org.kde.Kopete.setIdentityOnlineStatus parent()->setIdentityOnlineStatus(status, message); }
false
false
false
false
false
0
setup_rtp_connection(ooCallData *call, const char *remoteIp, int remotePort) { struct ooh323_pvt *p = NULL; struct ast_sockaddr tmp; if (gH323Debug) ast_verb(0, "--- setup_rtp_connection %s:%d\n", remoteIp, remotePort); /* Find the call or allocate a private structure if call not found */ p = find_call(call)...
false
false
false
false
false
0
_sgmlParserInitializeStateTableRules(SGML_PARSER *parser) { unsigned long lastTableIndex = -1; unsigned long x = 0, lastChange = 0; for (lastTableIndex = SGML_PARSER_STATEINDEX_INTEXT, x = 0; x <= parser->stateTableRuleElements; x++) { /* * If the index changed. */ if ((x == parser->stateTableRu...
false
false
false
false
false
0
compute_circumferance(void) { // Calculates the circumferance of the loop by counting the bases of the loop SEC_root *sroot = get_root(); double dbs = sroot->display_params().distance_between_strands; Circumferance = 0; for (SEC_segment_iterator seg(this); seg; ++seg) { SEC_region *reg = ...
false
false
false
false
false
0
mystrlcpy(char *dst,const char *src,unsigned size) { unsigned i; for (i=0;i+1<size && src[i];++i) dst[i] = src[i]; if (i<size) dst[i] = 0; }
false
false
false
false
false
0
XLogDumpStatsRow(const char *name, uint64 n, uint64 total_count, uint64 rec_len, uint64 total_rec_len, uint64 fpi_len, uint64 total_fpi_len, uint64 tot_len, uint64 total_len) { double n_pct, rec_len_pct, fpi_len_pct, tot_len_pct; n_pct = 0; if (total_count != 0) n_pct = 100 * (dou...
false
false
false
false
false
0
select ( int new_sel ) { if (new_sel < 0 || new_sel >= info_cnt) return; // Bad value. selected = new_sel; enable_controls(); int num = info[selected].num; Combo *combo = combos[num]; // Remove prev. selection msg. // gtk_statusbar_pop(GTK_STATUSBAR(sbar), sbar_sel); char buf[150]; // Show new sele...
false
false
false
false
false
0
gst_subtitle_overlay_video_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) { GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (parent); GstFlowReturn ret = gst_proxy_pad_chain_default (pad, parent, buffer); if (G_UNLIKELY (self->downstream_chain_error) || self->passthrough_identity) { re...
false
false
false
false
false
0
xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) { if ((obj == NULL) || (node == NULL) || (indx == NULL)) return(-1); switch (obj->type) { case XPATH_POINT: *node = obj->user; if (obj->index <= 0) *indx = 0; else ...
false
false
false
false
false
0
set_text (Ebook * ebook, gchar * text, gboolean lines_state, gboolean page_state, gboolean hyphens_state) { GtkTextView * textview; GtkTextBuffer * buffer; GtkTextIter start, end; gssize size, old; GError * err; err = NULL; if (lines_state) text = g_regex_replace (ebook->line, text, -1, 0, " \\1",0 , &err...
false
false
false
false
false
0
term_string(struct prog_info *pi, char *string) { int i; if(string[0] != '\"') { print_msg(pi, MSGTYPE_ERROR, "String must be enclosed in \"-signs"); } else { string++; } /* skip to the end of the string*/ for(i = 0; (string[i] != '\"') && !((string[i] == 10) || (string[i] == 13) || (string[i] == '...
false
false
false
false
false
0
jtransform_parse_crop_spec (jpeg_transform_info *info, const char *spec) { info->crop = FALSE; info->crop_width_set = JCROP_UNSET; info->crop_height_set = JCROP_UNSET; info->crop_xoffset_set = JCROP_UNSET; info->crop_yoffset_set = JCROP_UNSET; if (isdigit(*spec)) { /* fetch width */ if (! jt_read_i...
false
false
false
false
false
0
append(char *dest, size_t len, const char *sep, const char *src) { size_t dsz = 0, ssz = 0, sz; char *p; if (!dest || !len || !src) return -1; if (*dest) dsz = strlen(dest); if (dsz && sep) ssz = strlen(sep); sz = strlen(src); if (dsz + ssz + sz + 1 > len) return -1; p = dest + dsz; if (ssz) { m...
false
true
false
false
false
1
_load_accounts (FrogrConfig *self) { FrogrConfigPrivate *priv = NULL; gchar *xml_path = NULL; xmlNodePtr node = NULL; xmlDocPtr xml = NULL; g_return_if_fail (FROGR_IS_CONFIG (self)); priv = FROGR_CONFIG_GET_PRIVATE (self); xml_path = g_build_filename (priv->config_dir, ACCOUNTS_FILENAME, NULL); if (g_...
false
false
false
false
false
0
InitializeDataSet(const EQueryLevel& inQueryLevel) { switch (inQueryLevel) { case eStudy: { Attribute<0x8,0x52> at1 = { "STUDY " }; mDataSet.Insert( at1.GetAsDataElement() ); } break; case eSeries: { Attribute<0x8,0x52> at1 = { "SERIES" }; mDataSet.Insert( at1.Get...
false
false
false
false
false
0
__ecereNameSpace__ecere__sys__FileOpen(char * fileName, int mode) { struct __ecereNameSpace__ecere__com__Instance * result = (((void *)0)); if(fileName) { char archiveName[797], * archiveFile; if(__ecereNameSpace__ecere__sys__SplitArchivePath(fileName, archiveName, &archiveFile)) { result = ((struct __ecereNameSpace_...
false
false
false
false
false
0
xml_print_huge_stats(struct activity *a, int curr, int tab, unsigned long long itv) { struct stats_huge *smc = (struct stats_huge *) a->buf[curr]; xprintf(tab, "<hugepages unit=\"kB\">"); xprintf(++tab, "<hugfree>%lu</hugfree>", smc->frhkb); xprintf(tab, "<hugused>%lu</hugused>", smc->tlhkb - smc-...
false
false
false
false
false
0
add_to_list (head_ptr, name) struct head *head_ptr; const char *name; { struct id *newid = (struct id *) xcalloc (sizeof (struct id) + strlen (name), 1); struct id *p; strcpy (newid->name, name); if (head_ptr->first) head_ptr->last->next = newid; else head_ptr->first = newid; /* Chec...
false
false
false
false
false
0
getPads() { Cube::t_models pads; m_mask->unmask(); Cube::t_models resist = m_mask->getResist(Dir::DIR_DOWN); Cube::t_models::iterator end = resist.end(); for (Cube::t_models::iterator i = resist.begin(); i != end; ++i) { if ((*i)->isAlive() || (*i)->isWall()) { pads.push_back(*i...
false
false
false
false
false
0
MSG_ReadLong (sizebuf_t *msg_read) { #if 0 /* Original Version */ int c; if (msg_read->readcount+4 > msg_read->cursize) c = -1; else c = msg_read->data[msg_read->readcount] + (msg_read->data[msg_read->readcount+1]<<8) + (msg_read->data[msg_read->readcount+2]<<16) + (msg_read->data[msg_read->r...
false
false
false
false
false
0
jas_image_fmtfromname(char *name) { int i; char *ext; jas_image_fmtinfo_t *fmtinfo; /* Get the file name extension. */ if (!(ext = strrchr(name, '.'))) { return -1; } ++ext; /* Try to find a format that uses this extension. */ for (i = 0, fmtinfo = jas_image_fmtinfos; i < jas_image_numfmts; ++i, ++fmtinf...
false
false
false
false
false
0
createGLECode(string& code) { ostringstream str; str << "write \"" << getText() << "\""; code = str.str(); }
false
false
false
false
false
0
push_range_stack (tree range_end, struct obstack * braced_init_obstack) { struct constructor_range_stack *p; p = (struct constructor_range_stack *) obstack_alloc (braced_init_obstack, sizeof (struct constructor_range_stack)); p->prev = constructor_range_stack; p->next = 0; p->fields = constructor_fi...
false
false
false
false
false
0
loadzonekeys(isc_boolean_t preserve_keys, isc_boolean_t load_public) { dns_dbnode_t *node; dns_dbversion_t *currentversion = NULL; isc_result_t result; dns_rdataset_t rdataset, keysigs, soasigs; node = NULL; result = dns_db_findnode(gdb, gorigin, ISC_FALSE, &node); if (result != ISC_R_SUCCESS) fatal("failed t...
false
false
false
false
false
0
vidioc_try_fmt_vid_cap(struct file *file, void *priv, struct v4l2_format *f) { struct em28xx *dev = video_drvdata(file); struct em28xx_v4l2 *v4l2 = dev->v4l2; unsigned int width = f->fmt.pix.width; unsigned int height = f->fmt.pix.height; unsigned int maxw = norm_m...
false
false
false
false
false
0
SetRelease (float val) { r_time = val; if (r_time == 0.0f) r_time = 0.001f; }
false
false
false
false
false
0
clear() { side = WHITE; opponent = BLACK; moveno = 1; movecnt50 = 0; for (int i=0; i<6; i++) { position[WHITE][i] = NULLBITBOARD; position[BLACK][i] = NULLBITBOARD; } position_all[WHITE] = NULLBITBOARD; position_all[BLACK] = NULLBITBOARD; occupied = NULLBITBOARD; occupied_l90 = NULLBITBOARD; occupied_...
false
false
false
false
false
0
do_update_pos(Relay_log_info *rli) { /* We do not want to update master_log pos because we get a rotate event before stop, so by now group_master_log_name is set to the next log. If we updated it, we will have incorrect master coordinates and this could give false triggers in MASTER_POS_WAIT() that we...
false
false
false
false
false
0
__lambda42_ (UnityProtocolScopeProxyRemote* self) { gboolean result = FALSE; UnityProtocolScopeService* _tmp0_ = NULL; _tmp0_ = self->priv->_service; if (_tmp0_ == NULL) { unity_protocol_scope_proxy_remote_connect_to_scope (self, NULL, NULL); } else { UnityProtocolScopeService* _tmp1_ = NULL; gchar* _tmp2_ =...
false
false
false
false
false
0
test_concurrent_writes (ETestServerFixture *fixture, gconstpointer user_data) { EBookClient *main_client; ESource *source; EContact *contact; GError *error = NULL; const gchar *book_uid = NULL; gchar *contact_uid = NULL; ThreadData **tests; gint i; main_client = E_TEST_SERVER_UTILS_SERV...
false
false
false
false
false
0
DoTeleportAbility() { if (!m_pInstance) { return; } if (Creature* pVeklor = m_pInstance->GetSingleCreatureFromStorage(NPC_VEKLOR)) { float fTargetX, fTargetY, fTargetZ, fTargetOrient; pVeklor->GetPosition(fTargetX, fTargetY, fTargetZ); ...
false
false
false
false
false
0