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
register_pass_name (struct opt_pass *pass, const char *name) { struct pass_registry **slot; struct pass_registry pr; if (!name_to_pass_map) name_to_pass_map = htab_create (256, passr_hash, passr_eq, NULL); pr.unique_name = name; slot = (struct pass_registry **) htab_find_slot (name_to_pass_map, &pr, INS...
false
false
false
false
false
0
M_Write(void) { if(!MetaObject::M_Write()) { METAIO_STREAM::cout << "MetaLandmark: M_Read: Error parsing file" << METAIO_STREAM::endl; return false; } /** Then copy all points */ if(m_BinaryData) { PointListType::const_iterator it = m_PointList.begin(); PointListType::const_iterator itEnd ...
false
false
false
false
false
0
expand_database( database_DS comp_database) { static fxlstr data_file, header_file; int valid_file_p = TRUE, reread_p = FALSE, num_models = 0; int n_att, n_prop, i; att_DS att; database_DS database; model_DS *models = NULL; FILE *header_file_fp, *log_file_fp = NULL; int exit_if_error_p = FALSE, silent_...
false
false
false
false
true
1
b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb) { struct b43_pio_txqueue *q; struct ieee80211_hdr *hdr; unsigned int hdrlen, total_len; int err = 0; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); hdr = (struct ieee80211_hdr *)skb->data; if (info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) { /*...
false
false
false
false
false
0
gst_rtp_vorbis_pay_reset_packet (GstRtpVorbisPay * rtpvorbispay, guint8 VDT) { guint payload_len; GstRTPBuffer rtp = { NULL }; GST_LOG_OBJECT (rtpvorbispay, "reset packet"); rtpvorbispay->payload_pos = 4; gst_rtp_buffer_map (rtpvorbispay->packet, GST_MAP_READ, &rtp); payload_len = gst_rtp_buffer_get_paylo...
false
false
false
false
false
0
open_login1_session (GDBusConnection *connection, GVariant *params) { Login1Session *session; GError *error = NULL; GDBusNodeInfo *login1_session_info; const gchar *login1_session_interface = "<node>" " <interface name='org.freedesktop.login1.Session'>" " ...
false
false
false
false
false
0
SerializeToXML( const char *pszUnused ) { /* -------------------------------------------------------------------- */ /* Overriden from GDALPamDataset to add only band histogram */ /* and statistics. See bug #4244. */ /* -------------------------------------------------...
false
false
false
false
false
0
getAdditionalAction(Annot::AdditionalActionsType type, Object *additionalActions, PDFDoc *doc) { Object additionalActionsObject; LinkAction *linkAction = NULL; if (additionalActions->fetch(doc->getXRef(), &additionalActionsObject)->isDict()) { const char *key = (type == Annot::actionCursorEntering ? "E" : ...
false
false
false
false
false
0
test_bv_xor(tst_case *tc, void *data) { # define XOR_SIZE 1000 static const int xor_cnt = 500; BitVector *xor_bv; BitVector *bv1 = bv_new(); BitVector *bv2 = bv_new(); char set[XOR_SIZE]; char set1[XOR_SIZE]; char set2[XOR_SIZE]; int i; int count = 0; (void)data; memset(se...
false
false
false
false
false
0
create_item (const char *file_path, const char *title, GUPnPServiceProxy *cds_proxy, const char *container_id) { char *didl; didl = create_didl_for_file (file_path, title, container_id); if (didl == NULL) { item_created...
false
false
false
false
false
0
libnum_GT_3d(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj arg0_scm; ScmObj arg0; ScmObj arg1_scm; ScmObj arg1; ScmObj* oarg; int optcnt; ScmObj args_scm; ScmObj args; ScmObj SCM_SUBRARGS[7]; int SCM_i; SCM_ENTER_SUBR(">="); for (SCM_i=0; SCM_i<7; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM...
false
false
false
false
false
0
gst_meta_api_type_register (const gchar * api, const gchar ** tags) { GType type; g_return_val_if_fail (api != NULL, 0); g_return_val_if_fail (tags != NULL, 0); GST_CAT_DEBUG (GST_CAT_META, "register API \"%s\"", api); type = g_pointer_type_register_static (api); if (type != 0) { gint i; for (i ...
false
false
false
false
false
0
min_reset_ref() { int itmp,itmpall; itmpall = 0; for (int i = 0; i < n_min_energy; i++) { itmp = fix[list_min_energy[i]]->min_reset_ref(); if (itmp) itmpall = 1; } return itmpall; }
false
false
false
false
false
0
dbmap_release(dbmap_t *dm) { void *implementation; dbmap_check(dm); implementation = dbmap_implementation(dm); dm->type = DBMAP_MAXTYPE; dm->magic = 0; WFREE(dm); return implementation; }
false
false
false
false
false
0
bond_create_sysfs(struct bond_net *bn) { int ret; bn->class_attr_bonding_masters = class_attr_bonding_masters; sysfs_attr_init(&bn->class_attr_bonding_masters.attr); ret = netdev_class_create_file_ns(&bn->class_attr_bonding_masters, bn->net); /* Permit multiple loads of the module by ignoring failures to ...
false
false
false
false
false
0
promlk_treeout(node *p) { /* write out file with representation of final tree */ node *sib_ptr; long i, n, w, num_sibs; Char c; double x; if (p->tip) { n = 0; for (i = 1; i <= nmlngth; i++) { if (nayme[p->index - 1][i - 1] != ' ') n = i; } for (i = 0; i < n; i++) { c = n...
false
false
false
false
false
0
color(int slot, struct wt_status *s) { return s->use_color > 0 ? s->color_palette[slot] : ""; }
false
false
false
false
false
0
mcxErr ( const char *caller , const char *fmt , ... ) { FILE* fp = mcx_fperr ? mcx_fperr : stderr ; va_list args ; va_start(args, fmt) ; mcx_err_f(fp, caller, fmt, &args) ; va_end(args) ; }
false
false
false
false
false
0
intel_bios_is_lvds_present(struct drm_i915_private *dev_priv, u8 *i2c_pin) { int i; if (!dev_priv->vbt.child_dev_num) return true; for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { union child_device_config *uchild = dev_priv->vbt.child_dev + i; struct old_child_dev_config *child = &uchild->old; /* If t...
false
false
false
false
false
0
render(UT_sint32 uid ,UT_Rect & rec ) { if((m_vecSnapshots.getItemCount() == 0) || (uid >= m_vecSnapshots.getItemCount())) { UT_ASSERT(UT_SHOULD_NOT_HAPPEN); return; } GR_EmbedView * pEView = m_vecSnapshots.getNthItem(uid); if(pEView->m_iZoom != getGraphics()->getZoomPercentage()) { pEVi...
false
false
false
false
false
0
est_strstr_sparse(const char *haystack, const char *needle){ const char *hp, *np; assert(haystack && needle); while(*needle > '\0' && *needle <= ' '){ needle++; } if(needle[0] == '\0') return (char *)haystack; while((haystack = strchr(haystack, *needle)) != NULL){ hp = haystack; np = needle; ...
false
false
false
false
false
0
snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream, struct snd_rawmidi_ops *ops) { struct snd_rawmidi_substream *substream; list_for_each_entry(substream, &rmidi->streams[stream].substreams, list) substream->ops = ops; }
false
false
false
false
false
0
list_init(int mask, int &n, int *&list) { delete [] list; n = 0; for (int i = 0; i < nfix; i++) if (fmask[i] & mask) n++; list = new int[n]; n = 0; for (int i = 0; i < nfix; i++) if (fmask[i] & mask) list[n++] = i; }
false
false
false
false
false
0
bExecImport( void ) { bool bRtn; TextCtrl * poTxtCtl; // Display the console page m_poFrmMain->m_oNbkTxtCtls.bSetPage( NbkTxtCtls::ePAGE_CONSOLE ); // Convert the schematic file/s to a netlist file bRtn = m_oPrcGNetList.bExec( ); // Print the results poTxtCtl = m_poFrmMain->m_oNbkTxtCtls.poGetP...
false
false
false
false
false
0
caml_extunix_setrlimit(value vrsrc, value vslimit, value vhlimit) { CAMLparam3(vrsrc, vslimit, vhlimit); struct rlimit rlmt = { 0 }; rlmt.rlim_cur = decode_limit(vslimit); rlmt.rlim_max = decode_limit(vhlimit); if (setrlimit(decode_resource(vrsrc), &rlmt) != 0) { uerror("setrlimit", Nothing); } C...
false
false
false
false
false
0
count(const FieldList &select, const JoinList &joins, const FieldList &conditions) const { int count = -1; QSqlDatabase DB = database(); if (!connectedDatabase(DB, __LINE__)) return count; DB.transaction(); QString req = d_database->getSelectCommand(select, joins, conditions, DatabasePrivat...
false
false
false
false
false
0
CDB___db_addpage_log(dbenv, txnid, ret_lsnp, flags, fileid, pgno, lsn, nextpgno, nextlsn) DB_ENV *dbenv; DB_TXN *txnid; DB_LSN *ret_lsnp; u_int32_t flags; int32_t fileid; db_pgno_t pgno; DB_LSN * lsn; db_pgno_t nextpgno; DB_LSN * nextlsn; { DBT logrec; DB_LSN *lsnp, null_lsn; u_int32_t rectype, txn_num; i...
false
false
false
false
false
0
last_leaf_for_name_resolution() { TABLE_LIST *cur_table_ref= this; NESTED_JOIN *cur_nested_join; if (is_leaf_for_name_resolution()) return this; DBUG_ASSERT(nested_join); for (cur_nested_join= nested_join; cur_nested_join; cur_nested_join= cur_table_ref->nested_join) { cur_table_ref=...
false
false
false
false
false
0
getDefaultPBEM_Filename() { ASCString filename = newMap->preferredFileNames.mapname[0]; if( filename.empty() ) filename = "game"; if ( filename.find( '.') != ASCString::npos ) filename.erase( filename.find( '.')); filename += "-$p-$t"; return filename; }
false
false
false
false
false
0
getBuffer(int32_t minCapacity) { if(minCapacity>=-1 && cloneArrayIfNeeded(minCapacity)) { fFlags|=kOpenGetBuffer; fShortLength=0; return getArrayStart(); } else { return 0; } }
false
false
false
false
false
0
ql_update_mac_hdr_len(struct ql_adapter *qdev, struct ib_mac_iocb_rsp *ib_mac_rsp, void *page, size_t *len) { u16 *tags; if (qdev->ndev->features & NETIF_F_HW_VLAN_CTAG_RX) return; if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_V) { tags = (u16 *)page; /* Look for stacked vlan tags in ethertype field */...
false
false
false
false
false
0
ctree_set_basetree(void) { GtkTreeIter *top_node = NULL; // clear tree gtk_tree_store_clear(tree); gtk_tree_store_append(tree, &vars_node, top_node); gtk_tree_store_set(tree, &vars_node, COLUMN_NAME, NODE3, COLUMN_DATA, (gpointer) NULL, -1); if (tifiles_is_flash(GFMFile.model)) { gtk_tree_store_appen...
false
false
false
false
false
0
chipmem_lput_actionreplay1 (uaecptr addr, uae_u32 l) { uae_u32 *m; addr -= chipmem_start & chipmem_mask; addr &= chipmem_mask; if (addr == 0x60 && !is_ar_pc_in_rom()) action_replay_chipwrite (); m = (uae_u32 *)(chipmemory + addr); do_put_mem_long (m, l); }
false
false
false
false
false
0
main(int argc, char **argv) { HashTable<int, int> h; for(int i = 1; i <= 10; i++) { h.insert(i, 10 * i); } for(int i = 1; i <= 10; i++) { cout << "h[" << i << "] = " << h.lookup(i) << endl; } h[11] = 29; for(int i = 1; i <= 11; i++) { cout << "h'[" << i << "] = " ...
false
false
false
false
false
0
draw_level_map (int xloc, int yloc, char c) { int j; unsigned int i, k, m; int l, n; a_pixel *dest = hedit_buffer; int xx, yy = 7; for (k = yloc, l = 10; l > 0; l--, k = ((k + 1) & hplaninfo.ywrap)) { m = k * hplaninfo.xt; xx = 12; for (i = xloc, j = 6 + c; j > 0; j--, i = ((i + 1) & hplaninfo.x...
false
false
false
false
false
0
fam15h_power_init_data(struct pci_dev *f4, struct fam15h_power_data *data) { u32 val, eax, ebx, ecx, edx; u64 tmp; int ret; pci_read_config_dword(f4, REG_PROCESSOR_TDP, &val); data->base_tdp = val >> 16; tmp = val & 0xffff; pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5), REG_T...
false
false
false
false
false
0
nemo_icon_container_invert_selection (NemoIconContainer *container) { GList *p; g_return_if_fail (NEMO_IS_ICON_CONTAINER (container)); for (p = container->details->icons; p != NULL; p = p->next) { NemoIcon *icon; icon = p->data; icon_toggle_selected (container, icon); } g_signal_emit (container, signals[...
false
false
false
false
false
0
gst_rtp_base_payload_prepare_push (GstRTPBasePayload * payload, gpointer obj, gboolean is_list) { GstRTPBasePayloadPrivate *priv; HeaderData data; if (payload->clock_rate == 0) goto no_rate; priv = payload->priv; /* update first, so that the property is set to the last * seqnum pushed */ paylo...
false
false
false
false
false
0
aesni_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { int ret, mode; EVP_AES_KEY *dat = (EVP_AES_KEY *)ctx->cipher_data; mode = ctx->cipher->flags & EVP_CIPH_MODE; if ((mode == EVP_CIPH_ECB_MODE || mode == EVP_CIPH_CBC_MODE) && !enc) { ret = aesni_set_dec...
false
false
false
false
false
0
fgetversion (const char * name, unsigned long * version) { #if HAVE_EXT2_IOCTLS #if !APPLE_DARWIN int fd, r, ver, save_errno = 0; fd = open (name, OPEN_FLAGS); if (fd == -1) return -1; r = ioctl (fd, EXT2_IOC_GETVERSION, &ver); if (r == -1) save_errno = errno; *version = ver; close (fd); if (save_errno) ...
false
false
false
false
false
0
get_io_cap(int index, bdaddr_t *bdaddr, uint8_t *cap, uint8_t *auth) { struct dev_info *dev = &devs[index]; struct bt_conn *conn; int err; conn = find_connection(dev, bdaddr); if (conn == NULL) return -ENOENT; err = get_auth_info(index, bdaddr, &conn->loc_auth); if (err < 0) return err; DBG("initial auth...
false
false
false
false
false
0
Ns_DestroyTaskQueue(Ns_TaskQueue *queue) { TaskQueue *queuePtr = (TaskQueue *) queue; TaskQueue **nextPtrPtr; /* * Remove queue from list of all queues. */ Ns_MutexLock(&lock); nextPtrPtr = &firstQueuePtr; while (*nextPtrPtr != queuePtr) { nextPtrPtr = &(*nextPtrPtr)->nextPtr; }...
false
false
false
false
false
0
set_flipped_pass (GtkRotCtrl* ctrl){ if (ctrl->conf) if (ctrl->pass){ ctrl->flipped=is_flipped_pass(ctrl->pass,ctrl->conf->aztype); } }
false
false
false
false
false
0
polish_pos(const string& arg, int pos, GLEPcode& pcode, int* rtype) throw(ParserError) { try { m_polish->polish(arg.c_str(), pcode, rtype); } catch (ParserError err) { err.incColumn(pos-1); throw err; } }
false
false
false
false
false
0
load_file(string_t *filename, language_t *lang) { FILE *fp = NULL; char *path; raw_data_t *rd; string_t *name; int codepage = get_language_codepage(lang->id, lang->sub); /* FIXME: we may want to use utf-8 here */ if (codepage <= 0 && filename->type != str_char) yyerror("Cannot convert filename to ASCII string...
false
false
false
false
true
1
read_handler(Element *e, void *thunk) { RatedUnqueue *ru = (RatedUnqueue *)e; switch ((uintptr_t) thunk) { case h_rate: if (ru->is_bandwidth()) return BandwidthArg::unparse(ru->_tb.rate()); else return String(ru->_tb.rate()); case h_calls: { StringAccum sa; sa << ru->_runs << " cal...
false
false
false
false
false
0
globus_l_gfs_server_accept_cb( globus_xio_server_t server, globus_xio_handle_t xio_handle, globus_result_t result, void * user_arg) { globus_gfs_embed_handle_t handle; GlobusGFSName(globus_l_gfs_server_acc...
false
false
false
false
false
0
s_string_read_seek(register stream * s, gs_offset_t pos) { if (pos < 0 || pos > s->bsize) return ERRC; s->srptr = s->cbuf + pos - 1; /* We might be seeking after a reusable string reached EOF. */ s->srlimit = s->cbuf + s->bsize - 1; /* * When the file reaches EOF, * stream_compact ...
false
false
false
false
false
0
load_and_init_quota(ntfs_volume *vol) { MFT_REF mref; struct inode *tmp_ino; ntfs_name *name = NULL; static const ntfschar Quota[7] = { cpu_to_le16('$'), cpu_to_le16('Q'), cpu_to_le16('u'), cpu_to_le16('o'), cpu_to_le16('t'), cpu_to_le16('a'), 0 }; static ntfschar Q[3] = { cpu_to_le16('$'), cpu_to_le16...
false
false
false
false
false
0
cdio_cddap_speed_set(cdrom_drive_t *d, int speed) { return d->set_speed ? d->set_speed(d, speed) : 0; }
false
false
false
false
false
0
kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) { struct kgdb_state kgdb_var; struct kgdb_state *ks = &kgdb_var; int ret = 0; if (arch_kgdb_ops.enable_nmi) arch_kgdb_ops.enable_nmi(0); /* * Avoid entering the debugger if we were triggered due to an oops * but panic_timeout ind...
false
false
false
false
false
0
LowerVSELECT(SDValue Op, SelectionDAG &DAG) const { SDValue PredOp = Op.getOperand(0); SDValue Op1 = Op.getOperand(1), Op2 = Op.getOperand(2); EVT OpVT = Op1.getValueType(); SDLoc DL(Op); if (OpVT == MVT::v2i16) { SDValue X1 = DAG.getNode(ISD::ZERO_EXTEND, DL, MVT::v2i32, Op1); SDValue X2 = DAG...
false
false
false
false
false
0
editor_command_start(const EditorDescription *editor, const gchar *text, GList *list, const gchar *working_directory, EditorCallback cb, gpointer data) { EditorData *ed; EditorFlags flags = editor->flags; if (EDITOR_ERRORS(flags)) return EDITOR_ERRORS(flags); ed = g_new0(EditorData, 1); ed->list = filelist_copy(...
false
false
false
false
false
0
getSize() const { uint32_t Ret; if (llvm::StringRef(Size, sizeof(Size)).rtrim(" ").getAsInteger(10, Ret)) return object_error::parse_failed; // Size is not a decimal number. return Ret; }
false
false
false
false
false
0
extremerandom (int n) { if (n == 0) return 0; int ret; if (!multiplayer) { ret = rand () % n; } else { randptr ++; if (randptr >= 64) randptr = 0; ret = randommaster [randptr] [randptr] % n; } if ((ret % 5) <= 4) { if (ret > n/2 && ret < 3*n/4) return ret + n/4; ...
false
false
false
false
false
0
genrtl_asm_stmt (tree cv_qualifier, tree string, tree output_operands, tree input_operands, tree clobbers, int asm_input_p) { if (cv_qualifier != NULL_TREE && cv_qualifier != ridpointers[(int) RID_VOLATILE]) { warning ("%s qualifier ignored on asm", IDENTIFIER_POINTER (cv_qualifier)); ...
false
false
false
false
false
0
generateIota (Tree sig, Tree n) { int size; if (!isSigInt(n, &size)) { fprintf(stderr, "error in generateIota\n"); exit(1); } string vperm = getFreshID("iota"); fClass->addDeclCode(subst("int \t$0;", vperm)); fClass->addInitCode(subst("$0 = 0;", vperm)); if (isPowerOf2(size)) { fClass->addExecCode(subst("$0...
false
false
false
false
false
0
devfreq_event_remove_edev(struct devfreq_event_dev *edev) { if (!edev) return -EINVAL; WARN_ON(edev->enable_count); mutex_lock(&devfreq_event_list_lock); list_del(&edev->node); mutex_unlock(&devfreq_event_list_lock); device_unregister(&edev->dev); return 0; }
false
false
false
false
false
0
Compute_Kinetic_Energy( reax_system* system, simulation_data* data, MPI_Comm comm ) { int i; rvec p; real m; data->my_en.e_kin = 0.0; data->sys_en.e_kin = 0.0; data->therm.T = 0; for( i = 0; i < system->n; i++ ) { m = system->reax_param.sbp[system->my_atoms[i].type].mass...
false
false
false
false
false
0
hawki_flat_dark_bpm_detector_calib( cpl_imagelist * ilist, cpl_image * flat, cpl_image * dark, cpl_image * bpm) { cpl_mask * bpm_im_bin ; int i ; /* Test entries */ if (ilist == NULL) return -1 ; /...
false
false
false
false
false
0
getNextTokenInList(const char *restrict buf, int i, int *x_return, int *y_return, int *z_return, int *t_return, int *end_return) { int j, x, y, z = -1, t = -1, end; j = getNextToken(buf, i, &x, &y); if(j < 0) return -1; while(buf[j] == ' ...
false
false
false
false
false
0
UPNP_GetIGDFromUrl(const char * rootdescurl, struct UPNPUrls * urls, struct IGDdatas * data, char * lanaddr, int lanaddrlen) { char * descXML; int descXMLsize = 0; descXML = miniwget_getaddr(rootdescurl, &descXMLsize, lanaddr, lanad...
false
false
false
false
false
0
read_vector(FILE* file,gdouble V[]) { gint len = BSIZE; gchar buffer[BSIZE]; if(!fgets(buffer,len,file))return FALSE; if(!fgets(buffer,len,file))return FALSE; if(3 != sscanf(buffer,"%lf %lf %lf",&V[0],&V[1],&V[2])) return FALSE; return TRUE; }
false
false
false
false
false
0
Roster(WorldSession* session /*= NULL*/) { // we can only guess size WorldPacket data(SMSG_GUILD_ROSTER, (4 + MOTD.length() + 1 + GINFO.length() + 1 + 4 + m_Ranks.size() * (4 + 4 + GUILD_BANK_MAX_TABS * (4 + 4)) + members.size() * 50)); data << uint32(members.size()); data << MOTD; data << GINFO; ...
false
false
false
false
false
0
mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev) { unsigned long flags; struct mcs_cb *mcs; int wraplen; int ret = 0; netif_stop_queue(ndev); mcs = netdev_priv(ndev); spin_lock_irqsave(&mcs->lock, flags); mcs->new_speed = irda_get_next_speed(skb); if (likely(mcs->new_speed == mcs->spee...
false
false
false
false
false
0
mainDispatcher(conn) IMConnection *conn; { IMBuffer *ibp = IM_INBUF(conn); int major, minor, arglen; IMRequest *req; TRACE(("imlib:mainDispatcher(#%d)\n", conn->serial)); /* * When X transport is used, NUL bytes might appear between * requests. So discard them first. */ IMBufDi...
false
false
false
false
false
0
thread_clean() { int i; for (i=0;i < max_threads;i++) { if(thread_register[i].active == WILL_DIE) { pthread_join(*thread_register[i].pth,NULL); pthread_attr_destroy(thread_register[i].att); free(thread_register[i].pth); free(thread_register[i].att); thread_register[i].pth=NULL; thread_register[i].att=NU...
false
false
false
false
false
0
scaAllocCacheBlock( FLMUINT uiBlockSize, SCACHE ** ppSCache) { RCODE rc = FERR_OK; SCACHE * pSCache; f_assertMutexLocked( gv_FlmSysData.hShareMutex); if( (pSCache = (SCACHE *)gv_FlmSysData.SCacheMgr.pSCacheAllocator->allocCell( NULL, NULL)) == NULL) { rc = RC_SET( FERR_MEM); goto Exit; } f_me...
false
false
false
false
false
0
CreateAnswer( const SessionDescription* offer, const MediaSessionOptions& options, const SessionDescription* current_description) { // The answer contains the intersection of the codecs in the offer with the // codecs we support, ordered by our local preference. As indicated by // XEP-0167, we retain the ...
false
false
false
false
false
0
Py_sink_new (PyTypeObject * pytype, PyObject * args, PyObject * kwds) { Py_sink *self; char_t* uri = NULL; uint_t samplerate = 0; static char *kwlist[] = { "uri", "samplerate", NULL }; if (!PyArg_ParseTupleAndKeywords (args, kwds, "|sI", kwlist, &uri, &samplerate)) { return NULL; } self = ...
false
false
false
false
false
0
diplomacy_dialog_erase_clause_callback(Widget w, XtPointer client_data, XtPointer call_data) { struct Diplomacy_dialog *pdialog = (struct Diplomacy_dialog *) client_data; XawListReturnStruct *ret = XawListShowCurrent(pdialog->dip_clauselist); if (ret->list_index != XAW_LIST_NONE) { int i = 0; ...
false
false
false
false
false
0
ParseRootNodeNamesFile( IBFabric *p_fabric, string fileName) { ifstream namesFile; namesFile.open(fileName.c_str(), ifstream::in); if (!namesFile.is_open()) { cout << "-F- Given roots file could not be opened!" << endl; exit(1); } char name[256]; list <IBNode *> roots; cout << "-I- Parsing Root...
false
false
false
false
false
0
circuit_detach_stream(circuit_t *circ, edge_connection_t *conn) { edge_connection_t *prevconn; tor_assert(circ); tor_assert(conn); if (conn->_base.type == CONN_TYPE_AP) { entry_connection_t *entry_conn = EDGE_TO_ENTRY_CONN(conn); entry_conn->may_use_optimistic_data = 0; } conn->cpath_layer = NULL;...
false
false
false
false
false
0
make_valid_name (char *name) { /* * Replace invalid chars with _ in the type name */ static const gchar extra_chars[] = "-_+"; gchar *p = name; for (; *p; p++) { int valid = ((p[0] >= 'A' && p[0] <= 'Z') || (p[0] >= 'a' && p[0] <= 'z') || (p[0] >= '0' && p[0] <= '9') || strchr (extra_...
false
false
false
false
false
0
x509_oid_get_description( x509_buf *oid ) { if ( oid == NULL ) return ( NULL ); else if( OID_CMP( OID_SERVER_AUTH, oid ) ) return( STRING_SERVER_AUTH ); else if( OID_CMP( OID_CLIENT_AUTH, oid ) ) return( STRING_CLIENT_AUTH ); else if( OID_CMP( OID_CODE_SIGNING, oid...
false
false
false
false
false
0
MakeUniqueString(const wxString& text, const wxString& separator, bool caseSens) { return GetStringFromArray( MakeUniqueArray( GetArrayFromString(text, separator), caseSens ), separator, false ); }
false
false
false
false
false
0
gastman_redirect(void *data) { struct ast_chan *chan = data; char dest[256]; struct message *m; char channame[256]; char xchan[256] = ""; char tmp[80]; char *context; if (chan) { strncpy(channame, chan->name, sizeof(channame) - 1); snprintf(tmp, sizeof(tmp), "Enter new extension for %s", channame); if (g...
true
true
false
false
false
1
statusLine( const char * tag ) const { std::vector<std::string> result; for ( std::vector< std::pair<std::string,std::string> >::const_iterator it = m_status.begin(), end = m_status.end() ; it != end ; ++it ) { if ( it->first == tag ) { result.push_back( it->second ); } } ret...
false
false
false
false
false
0
ResourceOwnerRememberBuffer(ResourceOwner owner, Buffer buffer) { if (owner != NULL) { Assert(owner->nbuffers < owner->maxbuffers); owner->buffers[owner->nbuffers] = buffer; owner->nbuffers++; } }
false
false
false
false
false
0
st_compare_func_to_pipe(GLenum func) { /* Same values, just biased */ STATIC_ASSERT(PIPE_FUNC_NEVER == GL_NEVER - GL_NEVER); STATIC_ASSERT(PIPE_FUNC_LESS == GL_LESS - GL_NEVER); STATIC_ASSERT(PIPE_FUNC_EQUAL == GL_EQUAL - GL_NEVER); STATIC_ASSERT(PIPE_FUNC_LEQUAL == GL_LEQUAL - GL_NEVER); STATIC_ASSER...
false
false
false
false
false
0
operator<< (std::ostream& os, const ChannelNameSet& cns) { os << "Channel Name Set: name = " << cns._name << endl << "Map size " << cns._patch_map.size () << endl << "List size " << cns._patch_list.size() << endl << "Patch list name = [" << cns._patch_list_name << ']' << endl << "Available channels : "...
false
false
false
false
false
0
ValidateSelectedItem (edict_t * ent) { gclient_t *cl; cl = ent->client; if (cl->pers.inventory[cl->pers.selected_item]) return; // valid SelectNextItem (ent, -1); }
false
false
false
false
false
0
rc_random_vector (unsigned char *vector) { int randno; int i; int fd; /* well, I added this to increase the security for user passwords. we use /dev/urandom here, as /dev/random might block and we don't need that much randomness. BTW, great idea, Ted! -lf, 03/18/95 */ if ((fd = ...
false
true
false
false
true
1
dirfilemenu (char *basedir, scrollmenu_t * menu) /* NOTE: basedir must contain last '/', like "/home/" */ { struct dirent **namelist; int n; char mybasedir[250]; char helpstring[250]; char *firstslash; int i, j, k; int indent = 0; int isadir; /* 0 if no dir, 1 if dir. */ struct stat filestats; n ...
false
true
true
false
false
1
gst_matroska_read_common_encoding_order_unique (GArray * encodings, guint64 order) { gint i; if (encodings == NULL || encodings->len == 0) return TRUE; for (i = 0; i < encodings->len; i++) if (g_array_index (encodings, GstMatroskaTrackEncoding, i).order == order) return FALSE; return TRUE; ...
false
false
false
false
false
0
get_list20(struct list_head *list, const char **result[], unsigned long offset, unsigned long s1offset, unsigned long s2offset) { char **res; int cnt; struct list_head *pos; char *ptr, *str1, *str2; cnt = alloc_s...
false
false
false
false
false
0
copyMessagesTo(const vector<size_t> &messages, mail::folder *copyTo, mail::callback &callback) { callback.fail("Invalid message number."); }
false
false
false
false
false
0
Render(const Scene *scene) { // Declare shared variables for Poisson point generation BBox octBounds = scene->WorldBound(); octBounds.Expand(.001f * powf(octBounds.Volume(), 1.f/3.f)); Octree<SurfacePoint> pointOctree(octBounds); // Create scene bounding sphere to catch rays that leave the scene ...
false
false
false
false
false
0
handle_delete_object(struct ntb_store *store, struct ntb_store_task *task) { set_hash_filename(store, task->delete_object.hash); if (unlink((char *) store->filename_buf.data) == -1) { ntb_log("Error deleting %s: %s", (char *) store->filename_...
false
false
false
false
false
0
call_create_leaf( __isl_take isl_union_map *executed, __isl_take isl_ast_build *build) { isl_set *guard; isl_ast_node *node; isl_ast_graft *graft; isl_ast_build *user_build; guard = isl_ast_build_get_pending(build); user_build = isl_ast_build_copy(build); user_build = isl_ast_build_replace_pending_by_guard(use...
false
false
false
false
false
0
dismount() { err_when( !unit_res[unit_id]->solider_id ); UnitInfo* unitInfo = unit_res[unit_id]; SpriteInfo* soliderSpriteInfo = sprite_res[ unit_res[unitInfo->solider_id]->sprite_id ]; //--- calc the hit points of the solider and the vehicle after deforming ---// float soliderHitPoints = hit_points * solider_...
false
false
false
false
false
0
search(char buf[], FILE *file, register int n) { long startline = Ftell (file); register long line1 = startline; register long line2 = startline; register long line3 = startline; register int lncount; int saveln, rv; char *s; context.line = saveln = Currline; context.chrctr = startl...
false
false
false
false
false
0
neo_clear_break(struct jsm_channel *ch) { unsigned long lock_flags; spin_lock_irqsave(&ch->ch_lock, lock_flags); /* Turn break off, and unset some variables */ if (ch->ch_flags & CH_BREAK_SENDING) { u8 temp = readb(&ch->ch_neo_uart->lcr); writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr); ch->ch_flags ...
false
false
false
false
false
0
write_template_transactions( GncSqlBackend* be ) { Account* ra; write_objects_t data; g_return_val_if_fail( be != NULL, FALSE ); data.is_ok = TRUE; data.be = be; ra = gnc_book_get_template_root( be->book ); if ( gnc_account_n_descendants( ra ) > 0 ) { (void)xaccAccountTreeForEa...
false
false
false
false
false
0
term_win_copy(term_win *s, term_win *f, int w, int h) { int x, y; /* Copy contents */ for (y = 0; y < h; y++) { byte *f_aa = f->a[y]; char *f_cc = f->c[y]; byte *s_aa = s->a[y]; char *s_cc = s->c[y]; byte *f_taa = f->ta[y]; char *f_tcc = f->tc[y]; byte *s_taa = s->ta[y]; char *s_tcc = s->tc[y]; ...
false
false
false
false
false
0
mediaTypeMatch(const DOMString& mediaTypeToMatch) const { return mediaTypeToMatch.isEmpty() || !strcasecmp("all", mediaTypeToMatch) || !strcasecmp(m_mediaType, mediaTypeToMatch); }
false
false
false
false
false
0
city_style_callback(struct widget *pWidget) { if (Main.event.button.button == SDL_BUTTON_LEFT) { struct NAT *pSetup = (struct NAT *)(pNationDlg->pEndWidgetList->data.ptr); struct widget *pGUI = get_widget_pointer_form_main_list(MAX_ID - 1000 - pSetup->nation_city_...
false
false
false
false
false
0
operator()(const Exiv2::Exifdatum& md) const { return idx_ == md.idx() && 0 == strcmp(md.groupName().c_str(), groupName_); }
false
false
false
false
false
0
var_dlmod(struct variable * vp, oid * name, size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { /* * variables we may use later */ *write_method = 0; /* assume it isn't writable for the time being */ *var_len = sizeof(int); /* ass...
false
false
false
false
false
0
wil_val_in_range(int val, int min, int max) { return val >= min && val < max; }
false
false
false
false
false
0