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
gtextfield_setvisible(GGadget *g, int visible ) { GTextField *gt = (GTextField *) g; if ( gt->vsb!=NULL ) _ggadget_setvisible(&gt->vsb->g,visible); if ( gt->hsb!=NULL ) _ggadget_setvisible(&gt->hsb->g,visible); _ggadget_setvisible(g,visible); }
false
false
false
false
false
0
g15_plugin_load (g15daemon_t *masterlist, char *filename) { void * plugin_handle = NULL; config_section_t *plugin_cfg = g15daemon_cfg_load_section(masterlist,"PLUGINS"); pthread_t client_connection; pthread_attr_t attr; lcdnode_t *clientnode; char *error_str; if((plugin_handle = g...
false
false
false
false
false
0
setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v) { uint16* va; uint32 i; *v = va_arg(ap, uint32); if ((uint16) *v > td->td_samplesperpixel) return (0); va = va_arg(ap, uint16*); if (*v > 0 && va == NULL) /* typically missing param *...
false
false
false
false
false
0
oss_set_state( int ismuted, int unmute_volume ) { /** * 1. we come back unmuted: Don't touch anything * 2. we don't have a saved volume: Don't touch anything * 3. we come back muted and we have a saved volume: * - if gnomeradio muted it, unmute to old volume * - if user did it, remember that we're mute...
false
false
false
false
false
0
normalizeString(OFString &string, const OFBool multiPart, const OFBool leading, const OFBool trailing) { /* check for non-empty string */ if (!string.empty()) { size_t partindex = 0; size_t offset = 0; size_t len = string...
false
false
false
false
false
0
app_readcert (app_t app, const char *certid, unsigned char **cert, size_t *certlen) { gpg_error_t err; if (!app) return gpg_error (GPG_ERR_INV_VALUE); if (!app->ref_count) return gpg_error (GPG_ERR_CARD_NOT_INITIALIZED); if (!app->fnc.readcert) return gpg_error (GPG_ERR_UNSUPPORTED_OP...
false
false
false
false
false
0
run_ordered_work(struct __btrfs_workqueue *wq) { struct list_head *list = &wq->ordered_list; struct btrfs_work *work; spinlock_t *lock = &wq->list_lock; unsigned long flags; while (1) { spin_lock_irqsave(lock, flags); if (list_empty(list)) break; work = list_entry(list->next, struct btrfs_work, ord...
false
false
false
false
false
0
CollectHistogram(const uint8_t* ref, const uint8_t* pred, int start_block, int end_block, VP8Histogram* const histo) { int j; int distribution[MAX_COEFF_THRESH + 1] = { 0 }; for (j = start_block; j < end_block; ++j) { int k; int16_t out[16]; V...
false
false
false
false
false
0
Run() { if (!this->Initialized) this->Initialize(); this->Interactor->Start(); }
false
false
false
false
false
0
storeUnique(const char* cmd, fxStr& docname, fxStr& emsg) { if (command(cmd) == PRELIM) { if (code == 150) { /* * According to RFC 1123, the response must be of the form: * * 150 FILE: pppp[ anything] * * where pppp is the unique document name chosen by the server. */ ...
false
false
false
false
false
0
drv_genvalue(FILE *ptfile, logen_list *ptgen) { logen_list *l; int i; switch (ptgen->TYPE) { case GENTYPE_BIT: fprintf(ptfile, "'%c'", ptgen->VALUE.CHAR); break; case GENTYPE_HEX: fprintf(ptfile, "16#%08lx#", ptgen->VALUE.VAL); break; case GENTYPE_VAL: ...
false
false
false
false
false
0
readMps() { int numberSets=0; CoinSet ** sets=NULL; int returnCode = readMps(numberSets,sets); for (int i=0;i<numberSets;i++) delete sets[i]; delete [] sets; return returnCode; }
false
false
false
false
false
0
xfxp(double x, double Q, double P2, int ip) { vector<double> r(13); fevolvepdfp(&x, &Q, &P2, &ip, &r[0]); return r; }
false
false
false
false
false
0
ugly(void) { static char junk[] = "!#$%&()*+,-./:;<=>?@[]^_`{|}~"; size_t jlen, j; char buffer[1024]; jlen = strlen(junk); for (j = 0; j < sizeof(buffer); ++j) { if ((j % 64) == 63) buffer[j] = '\n'; else buffer[j] = junk[r250() % jlen]; } buffer[sizeof(buffer) - 1] = '\n'; ...
false
false
false
false
false
0
call_expander(void) { char **s = NULL; VARS_TO_SAVE *saved_state; int expret; if(!Pmaster->expander) return; /* * Since expander may make a call back to pico() we need to * save and restore pico state. */ if((saved_state = save_pico_state()) != NULL){ ex...
false
true
false
false
false
1
SelectT2AddrModeSoReg(SDValue N, SDValue &Base, SDValue &OffReg, SDValue &ShImm) { // (R - imm8) should be handled by t2LDRi8. The rest are handled by t2LDRi12. if (N.getOpcode() != ISD::ADD && !CurDAG->isBaseWithConstantOffset(...
false
false
false
false
false
0
computeIntervals() { DEBUG(dbgs() << "********** COMPUTING LIVE INTERVALS **********\n" << "********** Function: " << ((Value*)mf_->getFunction())->getName() << '\n'); SmallVector<unsigned, 8> UndefUses; for (MachineFunction::iterator MBBI = mf_->begin(), E = mf_->end(); MBBI...
false
false
false
false
false
0
trusted_get(const struct xattr_handler *handler, struct dentry *dentry, const char *name, void *buffer, size_t size) { if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(d_inode(dentry))) return -EPERM; return reiserfs_xattr_get(d_inode(dentry), xattr_full_name(handler, name), buffer, size); }
false
false
false
false
false
0
i40e_vsi_reset_stats(struct i40e_vsi *vsi) { struct rtnl_link_stats64 *ns; int i; if (!vsi) return; ns = i40e_get_vsi_stats_struct(vsi); memset(ns, 0, sizeof(*ns)); memset(&vsi->net_stats_offsets, 0, sizeof(vsi->net_stats_offsets)); memset(&vsi->eth_stats, 0, sizeof(vsi->eth_stats)); memset(&vsi->eth_stats_...
false
false
false
false
false
0
gst_rtp_h263p_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) { gboolean res; GstCaps *peercaps; gchar *encoding_name = NULL; g_return_val_if_fail (gst_caps_is_fixed (caps), FALSE); peercaps = gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), NULL); if (peercaps) { GstCap...
false
false
false
false
false
0
sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) { int work_done = 0; unsigned int total_bytes[2] = { 0 }; unsigned int total_packets[2] = { 0 }; if (to_do <= 0) return work_done; rmb(); do { struct sky2_port *sky2; struct sky2_status_le *le = hw->st_le + hw->st_idx; unsigned port; struct net...
false
false
false
false
false
0
parseCEchoRQ(T_DIMSE_C_EchoRQ * e, DcmDataset * obj) { Uint16 cmd; Uint16 msgid; Uint16 dtype; OFCondition cond = parseCommonRQ(obj, &cmd, &msgid, &dtype); RET(cond); e->MessageID = msgid; if (dtype == DIMSE_DATASET_NULL) { e->DataSetType = DIMSE_DATASET_NULL; } else { e->Da...
false
false
false
false
false
0
draw_binorm_segment_edge_n (int ncp, /* number of contour points */ double front_contour[][3], double back_contour[][3], double front_norm[][3], double back_norm[][3], int inext, d...
false
false
false
false
false
0
bacon_on_message_received(const char *message, gpointer data) { if(g_str_equal(message, "show") == TRUE && main_window != NULL) gtk_widget_show(main_window); }
false
false
false
false
false
0
mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn, bool *force_pt_level) { int host_level, level, max_level; struct kvm_memory_slot *slot; if (unlikely(*force_pt_level)) return PT_PAGE_TABLE_LEVEL; slot = kvm_vcpu_gfn_to_memslot(vcpu, large_gfn); *force_pt_level = !memslot_valid_for_gpte(slot, true); i...
false
false
false
false
false
0
trailing_spaces_state( struct parser *parser, const WCHAR *pos ) { const WCHAR *p; for (p = pos; !is_eol( parser, p ); p++) { if (*p == '\\') { set_state( parser, EOL_BACKSLASH ); return p; } if (!isspaceW(*p)) break; } pop_state( parser ); return...
false
false
false
false
false
0
register_factory(const char* id, CORBA::ULong hashval, CORBA::ValueFactory f, CORBA::Boolean internal) { init_table(); if (!id) OMNIORB_THROW(BAD_PARAM, BAD_PARAM_NullStringUnexpected, CORBA::COMPLETED_NO); if (!f) OMNIORB_THROW(BAD_PARAM, BAD_PARAM_ValueFactoryFailure, CORBA::COMPLET...
false
false
false
true
false
1
cutExtraRTC() { /* * We expect RTC near the end of data and thus * do not check all image to save processing time. * It's safe because we will resync on the first * encountered EOL. * * NB: We expect G3Decoder::data==0 and * G3Decoder::bit==0 (no data in the accumulator). * ...
false
false
false
false
false
0
_device_rescan_validate(struct pci_dev *dev) { bde_ctrl_t *ctrl; int i; if (PCI_FUNC(dev->devfn) > 0) { return -1; } ctrl = NULL; for (i = 0; i < _ndevices; i ++) { ctrl = _devices + i; /* check the device id */ if (dev->device == ctrl->bde_dev.device) { ...
false
false
false
false
false
0
dir_s_rmdir(obj, dir) VALUE obj, dir; { check_dirname(&dir); if (rmdir(RSTRING(dir)->ptr) < 0) rb_sys_fail(RSTRING(dir)->ptr); return INT2FIX(0); }
false
false
false
false
false
0
annotatemore_commit(struct txn *tid) { return tid ? DB->commit(anndb, tid) : 0; }
false
false
false
false
false
0
error(struct PCP *pcp, int n, const char *s) { const char *p; p=pcp_strerror(n); if (p) fprintf(stderr, "%s: %s\n", s, p); else fprintf(stderr, "%s: %s\n", s, pcp_errmsg(pcp)); }
false
false
false
false
false
0
inmap_daemon(ESL_SQFILE *sqfp, const ESL_DSQ *abc_inmap) { int x; if (abc_inmap != NULL) { for (x = 0; x < 128; x++) sqfp->inmap[x] = abc_inmap[x]; } else { for (x = 0; x < 128; x++) sqfp->inmap[x] = eslDSQ_ILLEGAL; for (x = 'A'; x <= 'Z'; x++) sqfp->inmap[x] = x; for (x = 'a'; x <= 'z'; x++) ...
false
false
false
false
false
0
print_skmeminfo(struct rtattr *tb[], int attrtype) { const __u32 *skmeminfo; if (!tb[attrtype]) return; skmeminfo = RTA_DATA(tb[attrtype]); printf(" skmem:(r%u,rb%u,t%u,tb%u,f%u,w%u,o%u", skmeminfo[SK_MEMINFO_RMEM_ALLOC], skmeminfo[SK_MEMINFO_RCVBUF], skmeminfo[SK_MEMINFO_WMEM_ALLOC], ...
false
false
false
false
false
0
reg_to_stack (void) { basic_block bb; int i; int max_uid; /* Clean up previous run. */ stack_regs_mentioned_data.release (); /* See if there is something to do. Flow analysis is quite expensive so we might save some compilation time. */ for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) if ...
false
false
false
false
false
0
get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (object); _nm_remote_settings_ensure_inited (NM_REMOTE_SETTINGS (object)); switch (prop_id) { case PROP_BUS: g_value_set_boxed (value, priv->bus); brea...
false
false
false
false
false
0
kvm_assigned_dev_msix(int irq, void *dev_id) { struct kvm_assigned_dev_kernel *assigned_dev = dev_id; int index = find_index_from_host_irq(assigned_dev, irq); u32 vector; int ret = 0; if (index >= 0) { vector = assigned_dev->guest_msix_entries[index].vector; ret = kvm_set_irq_inatomic(assigned_dev->kvm, ...
false
false
false
false
false
0
_k_slotOk() { if (!m_accept) { q->reject(); return; } if (!m_widget->save()) { // some error box here is needed } else { // Do not emit the "newToolBarConfig" signal again here if the "Apply" // button was already pressed and no further changes were made. if (q->isButtonEnable...
false
false
false
false
false
0
contact_list_dup_states (TpBaseContactList *base, TpHandle contact, TpSubscriptionState *subscribe, TpSubscriptionState *publish, gchar **publish_request) { TpTestsContactListManager *self = TP_TESTS_CONTACT_LIST_MANAGER (base); ContactDetails *d = lookup_contact (self, contact); if (d == NULL) ...
false
false
false
false
false
0
EnumerateAttributes(AttributeSet PAL) { if (PAL.isEmpty()) return; // null is always 0. // Do a lookup. unsigned &Entry = AttributeMap[PAL]; if (Entry == 0) { // Never saw this before, add it. Attribute.push_back(PAL); Entry = Attribute.size(); } // Do lookups for all attribute groups. for ...
false
false
false
false
false
0
store_actiononpurge(LEX *lc, RES_ITEM *item, int index, int pass) { uint32_t *destination = (uint32_t*)item->value; lex_get_token(lc, T_NAME); if (strcasecmp(lc->str, "truncate") == 0) { *destination = (*destination) | ON_PURGE_TRUNCATE; } else { scan_err2(lc, _("Expected one of: %s, got: %s"), ...
false
false
false
false
false
0
setMnemonic(MSMenu *m_, A a_) { int childcount = m_->children().length(); if (isNull(a_)==MSTrue) { for (int i=0; i<childcount; ++i) { MSMenuItem *item = (MSMenuItem *)m_->children()(i); item->mnemonic('\0'); if (item->cascade()) { setMnemonic((MSMenu *)item->children()(0), aplus_...
false
false
false
false
true
1
iwlagn_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant) { struct iwl_tx_ant_config_cmd tx_ant_cmd = { .valid = cpu_to_le32(valid_tx_ant), }; if (IWL_UCODE_API(priv->fw->ucode_ver) > 1) { IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant); return iwl_dvm_send_cmd_pdu(priv, TX_ANT_CONFIGUR...
false
false
false
false
false
0
bSaveFile( const wxString & rosFName ) { wxString os1; // Save the netlist to file if( ! SimnBase::bSaveFile( rosFName ) ) return( FALSE ); // Open the file wxTextFile oFileCct( m_ofnSaveFile.GetFullPath( ) ); if( ! oFileCct.Open( ) ) return( FALSE ); // Temporarily remove the circuit d...
false
false
false
false
false
0
rb_num2fix(VALUE val) { SIGNED_VALUE v; if (FIXNUM_P(val)) return val; v = rb_num2long(val); if (!FIXABLE(v)) rb_raise(rb_eRangeError, "integer %"PRIdVALUE " out of range of fixnum", v); return LONG2FIX(v); }
false
false
false
false
false
0
skip_to(VMG_ vm_obj_id_t target) { /* keep going until the current object matches the target */ while (cur != target) { /* move to the next element */ if (!to_next(vmg0_)) { /* there's nothing left - return failure */ ...
false
false
false
false
false
0
paircopyvp(const VALUE_PAIR *vp) { size_t name_len; VALUE_PAIR *n; if (!vp->flags.unknown_attr) { name_len = 0; } else { name_len = FR_VP_NAME_PAD; } if ((n = malloc(sizeof(*n) + name_len)) == NULL) { fr_strerror_printf("out of memory"); return NULL; } memcpy(n, vp, sizeof(*n) + name_len); n->next ...
false
false
false
false
true
1
gog_theme_new (char const *name, GoResourceType type) { GogTheme *theme = g_object_new (GOG_TYPE_THEME, NULL); theme->name = g_strdup (_(name)); if (type == GO_RESOURCE_NATIVE) theme->id = g_strdup (name); theme->type = type; return theme; }
false
false
false
false
false
0
display_table_v1(struct rc_device *rc_dev, int fd) { unsigned int i, j; for (j = 0; j < 256; j++) { for (i = 0; i < 256; i++) { int codes[2]; codes[0] = (j << 8) | i; if (ioctl(fd, EVIOCGKEYCODE, codes) == -1) perror("EVIOCGKEYCODE"); else if (codes[1] != KEY_RESERVED) prtcode(codes); } } ...
false
false
false
false
false
0
JPEGSetupDecode(TIFF* tif) { JPEGState* sp = JState(tif); TIFFDirectory *td = &tif->tif_dir; #if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFInitJPEG) if( tif->tif_dir.td_bitspersample == 12 ) return TIFFReInitJPEG_12( tif, COMPRESSION_JPEG, 0 ); #endif JPEGInitializeLibJPEG( tif, TRUE ); ...
false
false
false
false
false
0
k_prng_init (enum prng_e prng) { enum k_error_e err = K_ESUCCESS; struct k_prng_t* c = 0; c = k_calloc(1, sizeof(struct k_prng_t)); if (!c) { err = K_ENOMEM; goto k_prng_init_err; } c->fd_urandom = -1; c->fd_random = -1; if (prng == PRNG_NOOP) return c; c->prng = prng_get_by_id(prng); if (!c->prng) {...
false
false
false
false
false
0
BufferChanged(GtkWidget *W,gpointer Unused) { gchar *BufTxt; GtkTextIter Start,End,EndSel; GtkTextMark *Mark; gint CurOfs; UnsavedChanges=TRUE; if (MaskBufChg) return; //Replace, Replace All or Undo is doing its work Mark=gtk_text_buffer_get_mark(Buf,"selection_bound");...
false
false
false
false
false
0
UpdateWarpType(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused)) { warptype_t new_warptype; iwad_t *iwad; // Get the selected IWAD iwad = GetCurrentIWAD(); // Find the new warp type if (D_IsEpisodeMap(iwad->mission)) { new_warptype = WARP_ExMy; } else { new_warp...
false
false
false
false
false
0
list_known_printers(const char *adapter) { DBusMessageIter reply_iter, iter_array; DBusError error; DBusMessage *message, *reply; message = dbus_message_new_method_call("org.bluez", adapter, "org.bluez.Adapter", "ListDevices"); if (message == NULL) return FALSE; dbus_error_init(&error); reply = d...
false
false
false
false
false
0
parser_warning(const char *s, ...) { loc_info_t cur_loc = CURRENT_LOCATION; va_list ap; va_start(ap, s); generic_msg(&cur_loc, s, "warning", ap); va_end(ap); return 0; }
false
false
false
false
false
0
broker_host_livecheck(int event_type __attribute__ ((__unused__)), void *data) { nebstruct_host_check_data *hstdata = (nebstruct_host_check_data *)data; if (event_type != NEBCALLBACK_HOST_CHECK_DATA || hstdata->type != NEBTYPE_HOSTCHECK_ASYNC_PRECHECK) return NEB_OK; // ignore other events h...
false
false
false
false
false
0
unpack(void) { struct pack_header hdr; const char *hdr_err; char hdr_arg[38]; hdr_err = parse_pack_header(&hdr); if (hdr_err) return hdr_err; snprintf(hdr_arg, sizeof(hdr_arg), "--pack_header=%"PRIu32",%"PRIu32, ntohl(hdr.hdr_version), ntohl(hdr.hdr_entries)); if (ntohl(hdr.hdr_entries) < unpack_limit)...
false
false
false
false
false
0
saveVObs2File(const char *fname){ CFileOutputStream file; // Open data file file.open(fname); if(!file.fileOpenCorrectly()){ printf("[TEST] Open file failed!\n"); return false; } for(unsigned int i=0;i<vObs.size();i++){ file << vObs.at(i); } return true; }
false
false
false
false
false
0
fut_size_gfile(MainInfo *min, const GFile *file, guint64 *bytes, FUCount *fc, GError **error) { GFileInfo *fi; gboolean ret = TRUE; if(min == NULL || file == NULL) return FALSE; if((fi = g_file_query_info((GFile *) file, "standard::*", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, error)) == NULL) return FALSE; ...
false
false
false
false
false
0
list_preference_attributes(const char *username) { agent_pref_t PTX; agent_attrib_t pref; int i; if (username[0] == 0 || !strncmp(username, "default", strlen(username))) PTX = _ds_pref_load(agent_config, NULL, _ds_read_attribute(agent_config, "Home"), NULL); else PTX = _ds_pref_load(agent_config, use...
false
false
false
false
false
0
oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv) { struct _adapter *Adapter = (struct _adapter *) (poid_par_priv->adapter_context); struct rf_reg_param *pbbreg; u8 path; u8 offset; u32 value; if (poid_par_priv->type_of_oid != SET_OID) return RNDIS_STATUS_NOT_ACCEPTED; if (poid_par_priv->...
false
false
false
false
false
0
efreet_desktop_type_info_free(Efreet_Desktop_Type_Info *info) { if (!info) return; IF_RELEASE(info->type); free(info); }
false
false
false
false
false
0
nodeVertex(const uint64 id, SpatialVector & v0, SpatialVector & v1, SpatialVector & v2) const { if(buildlevel_ == maxlevel_) { uint32 idx = (uint32)id - leaves_ + IOFFSET; // -jbb: Fix segfault. See "idx =" below. v0 = vertices_[nodes_[idx].v_[0]]; v1 = vertices_[nodes_[idx].v_[1]]; v...
false
false
false
false
false
0
uid2name(uid_t uid) { static int pos = 0, replace = 0; static struct { uid_t uid; char name[FE_NAME_STR]; } cache[CACHE_SIZE]; if (pos < ucache_cnt && uid == cache[pos].uid) return cache[pos].name; for (pos = 0; pos < ucache_cnt; pos++) if (uid == cache[pos].uid) return cache[pos].name; if (ucache_c...
false
false
false
false
false
0
gog_series_get_xy_data (GogSeries const *series, double const **x, double const **y) { GogSeriesClass *klass = GOG_SERIES_GET_CLASS (series); double *data[2]; unsigned int n_points; int first, last; g_return_val_if_fail (klass != NULL, 0); if (klass->get_xy_data != NULL) { if (!gog_series_is_valid (G...
false
false
false
false
true
1
ComparePriorUserhash(uint32 dwIP, uint16 nPort, void* pNewHash) { std::map<uint32, CDeletedClient*>::iterator it = m_trackedClientsList.find( dwIP ); if ( it != m_trackedClientsList.end() ) { CDeletedClient* pResult = it->second; CDeletedClient::PaHList::iterator it2 = pResult->m_ItemsList.begin(); for ( ; ...
false
false
false
false
false
0
ajTablestrTracekeys(const AjPTable table) { ajulong i = 0UL; ajulong j = 0UL; ajulong k = 0UL; AjPTableNode node = NULL; if(!table) return; ajDebug("(string) table trace: "); ajDebug(" length: %Lu", table->Length); ajDebug(" size: %Lu", table->Size); ajDebug(" timestamp: %...
false
false
false
false
false
0
check_end(const char* src_begin, const char* dest_begin) { bz_stream* s = static_cast<bz_stream*>(stream_); if( src_begin == s->next_in && s->avail_in == 0 && dest_begin == s->next_out) { return bzip2::unexpected_eof; } else { return bzip2::ok; } }
false
false
false
false
false
0
read(const char *filename, int frame) { int rv = 0; int format = imageFormat(filename); if (format >=0 ) { imageHasNoFile = false; // we assume a file is attached to the image switch (format) { case IMAGEIO_JPEG: dbgprintf("Input image is jpeg\n"); r...
false
false
false
false
false
0
oxygen_spdif_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct oxygen *chip = snd_pcm_substream_chip(substream); int err; err = oxygen_hw_params(substream, hw_params); if (err < 0) return err; mutex_lock(&chip->mutex); spin_lock_irq(&chip->reg_lock); oxygen_cl...
false
false
false
false
false
0
addtime(struct timeval *base, double offset, struct timeval *result) { double osec = floor(offset); result->tv_sec = base->tv_sec + osec; result->tv_usec = base->tv_usec + (int)((offset - osec)*1000000); while(result->tv_usec >= 1000000) { result->tv_sec++; result->tv_usec -= 1000000; } }
false
false
false
false
false
0
servlist_favchan_find (ircnet *net, char *channel, int *pos) { GSList *list; favchannel *favchan; int i = 0; if (net == NULL) return NULL; list = net->favchanlist; while (list) { favchan = list->data; if (strcmp (favchan->name, channel) == 0) { if (pos) { *pos = i; } return favchan; ...
false
false
false
false
false
0
u_closec(const userinput * const u) { int num = -1; dccchat_t *chat; updatecontext(); if (u->arg1) num = atoi(u->arg1); if ((num < 1) || (num > irlist_size(&gdata.dccchats))) { u_respond(u,"Invalid ID number, Try \"CHATL\" for a list"); } else { chat = irlist_get_nth(&gdata....
false
false
false
false
false
0
restack(const std::vector<Layer*>& layers) { std::vector<Window> stack; std::vector<Layer*>::const_iterator l; for (l = layers.begin(); l != layers.end(); ++l) { extract_windows_to_stack((*l)->itemList(), 0, stack); } if (!stack.empty()) XRestackWindows(FbTk::App::instance()->displ...
false
false
false
false
false
0
srp_get_pr_transport_id( struct se_node_acl *nacl, int *format_code, unsigned char *buf) { const char *p; unsigned len, count, leading_zero_bytes; int rc; p = nacl->initiatorname; if (strncasecmp(p, "0x", 2) == 0) p += 2; len = strlen(p); if (len % 2) return -EINVAL; count = min(len / 2, 16U); leading...
false
false
false
false
false
0
pop() { global.debug("NotebookInsider","pop"); if (!mynotebook) return; mynotebook->goToPageId(pgid); }
false
false
false
false
false
0
main(int argc, char **argv) { Fl_Double_Window win(300, 200); Fl_Input_Choice in(40,40,100,28,"Test"); in.callback(input_choice_cb, (void*)&in); in.add("one"); in.add("two"); in.add("three"); in.value(1); Fl_Button onoff(40,150,200,28,"Activate/Deactivate"); onoff.callback(buttcb, ...
false
false
false
false
false
0
aez_encipher(Byte *out, const Byte *in, unsigned bytes, Byte *tags [], unsigned num_tags, unsigned tag_bytes [], Context *context, unsigned auth_bytes, unsigned inv) { if (bytes < 32) encipher_tiny(out, in, bytes, tags, num_tags, tag_bytes, context, inv); else encipher_core(out, in, bytes, t...
false
false
false
false
false
0
common_pre_ob_move_on(object *trap, object *victim, object *originator) { /* If player is DM, only 2 cases to consider: * - exits * - opened containers on the ground, which should be closed. */ if (QUERY_FLAG(victim, FLAG_WIZPASS) && trap->type != EXIT && trap->type != SIGN && trap->t...
false
false
false
false
false
0
genwqe_reset_interrupt_capability(struct genwqe_dev *cd) { struct pci_dev *pci_dev = cd->pci_dev; if (cd->flags & GENWQE_FLAG_MSI_ENABLED) { pci_disable_msi(pci_dev); cd->flags &= ~GENWQE_FLAG_MSI_ENABLED; } }
false
false
false
false
false
0
rule_move (ERuleEditor *editor, gint from, gint to) { GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; EFilterRule *rule; e_rule_context_rank_rule ( editor->context, editor->current, editor->source, to); path = gtk_tree_path_new (); gtk_tree_path_append_index (path, fro...
false
false
false
false
false
0
bnx2x_vf_flr_clnup_hw(struct bnx2x *bp, struct bnx2x_virtf *vf) { u32 poll_cnt = bnx2x_flr_clnup_poll_count(bp); /* DQ usage counter */ bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf->abs_vfid)); bnx2x_flr_clnup_poll_hw_counter(bp, DORQ_REG_VF_USAGE_CNT, "DQ VF usage counter timed out", poll_cnt); bnx2x_pre...
false
false
false
false
false
0
bintree_insert(bintree_t *root, bintree_t *node) { if (root == NULL) { return; } if (root->data == node->data) { return; } if (root->data > node->data) { if (root->left == NULL) { root->left = node; } else { bintree_insert(root->left...
false
false
false
false
false
0
snd_ac97_free(struct snd_ac97 *ac97) { if (ac97) { #ifdef CONFIG_SND_AC97_POWER_SAVE cancel_delayed_work_sync(&ac97->power_work); #endif snd_ac97_proc_done(ac97); if (ac97->bus) ac97->bus->codec[ac97->num] = NULL; if (ac97->private_free) ac97->private_free(ac97); kfree(ac97); } return 0; }
false
false
false
false
false
0
get_reload_before_node(struct compilation_unit *cu, struct live_interval *interval, unsigned long *bc_offset) { unsigned long start; struct insn *insn; start = interval_start(interval); if (start & 1) { /* * If interval starts at odd position and has a use * position there then it means ...
false
false
false
false
false
0
about() { box = new AboutBox(this, getGLEInterface()); box->setModal(true); box->show(); }
false
false
false
false
false
0
turnTowardDestination() { if (x() <= destinationPoint.x()) setLook(right); else setLook(left); }
false
false
false
false
false
0
gst_mxf_mux_handle_sink_event (GstPad * pad, GstEvent * event) { GstMXFMux *mux = GST_MXF_MUX (gst_pad_get_parent (pad)); gboolean ret = TRUE; switch (GST_EVENT_TYPE (event)) { case GST_EVENT_TAG: /* TODO: do something with the tags */ break; case GST_EVENT_NEWSEGMENT: /* We don't suppo...
false
false
false
false
false
0
get_global_typenames(gint lang) { GString *s = NULL; if (app->tm_workspace) { GPtrArray *tags_array = app->tm_workspace->global_tags; if (tags_array) { s = symbols_find_tags_as_string(tags_array, TM_GLOBAL_TYPE_MASK, lang); } } return s; }
false
false
false
false
false
0
plugin_manager_init (PluginManager *object) { PluginManagerDetails *plugmgdet; plugmgdet = PLUGIN_MANAGER_GET_PRIVATE(object); /* init plugins table*/ plugmgdet->plugins_table = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref); /* check for plugins directory, if doesn't exist create it *...
false
false
false
false
false
0
OBJ_add_sigid(int signid, int dig_id, int pkey_id) { nid_triple *ntr; if (!sig_app) sig_app = sk_nid_triple_new(sig_sk_cmp); if (!sig_app) return 0; if (!sigx_app) sigx_app = sk_nid_triple_new(sigx_cmp); if (!sigx_app) return 0; ntr = OPENSSL_malloc(sizeof(int) * 3); if (!ntr) return 0; ntr->sign_id ...
false
false
false
false
false
0
add_element(mempool_t *pool, void *element) { BUG_ON(pool->curr_nr >= pool->min_nr); poison_element(pool, element); kasan_poison_element(pool, element); pool->elements[pool->curr_nr++] = element; }
false
false
false
false
false
0
lookup_mime(const char *ext) { int i; if (ext != NULL) { for (i=0; i<sizeof(mime_types)/sizeof(struct mime_mapping); i++) { if (strcasecmp(mime_types[i].ext, ext) == 0) return mime_types[i].ctype; } } return "application/octet-stream"; }
false
false
false
false
false
0
ifile_int4str_new_from_text_file (const char *filename) { ifile_int4str *map; FILE *fp; int text_document_count; char word[IFILE_MAX_WORD_LENGTH]; int wi; ifile_lex *lex; map = ifile_int4str_new (0); text_document_count = 0; fp = ifile_fopen (filename, "r"); if (ifile_fp_is_text (fp)) { ...
false
false
false
false
false
0
gst_rtcp_packet_remove (GstRTCPPacket * packet) { gboolean ret = FALSE; guint offset = 0; g_return_val_if_fail (packet != NULL, FALSE); g_return_val_if_fail (packet->type != GST_RTCP_TYPE_INVALID, FALSE); /* The next packet starts at offset + length + 4 (the header) */ offset = packet->offset + (packet->l...
false
false
false
false
false
0
next_word() { int pos = insert_position(); while (pos < buffer()->length() && !fl_isseparator(buffer()->character(pos))) { pos++; } while (pos < buffer()->length() && fl_isseparator(buffer()->character(pos))) { pos++; } insert_position( pos ); }
false
false
false
false
false
0
dfb_gfxcard_surface_enter( CoreSurfaceBuffer *buffer, DFBSurfaceLockFlags flags ) { D_ASSUME( card != NULL ); if (card && card->funcs.SurfaceEnter) card->funcs.SurfaceEnter( card->driver_data, card->device_data, buffer, flags ); }
false
false
false
false
false
0
PrintMask(unsigned i, std::ostream &OS) { OS << "<" << (char)(getMaskElt(i, 0) == 8 ? 'u' : ('0'+getMaskElt(i, 0))) << "," << (char)(getMaskElt(i, 1) == 8 ? 'u' : ('0'+getMaskElt(i, 1))) << "," << (char)(getMaskElt(i, 2) == 8 ? 'u' : ('0'+getMaskElt(i, 2))) << "," << (char)(getMaskElt(i, 3) == 8 ? 'u' ...
false
false
false
false
false
0
t_hash_start(struct seq_file *m, loff_t *pos) { struct ftrace_iterator *iter = m->private; void *p = NULL; loff_t l; if (!(iter->flags & FTRACE_ITER_DO_HASH)) return NULL; if (iter->func_pos > *pos) return NULL; iter->hidx = 0; for (l = 0; l <= (*pos - iter->func_pos); ) { p = t_hash_next(m, &l); if (...
false
false
false
false
false
0
get_fallback_icon (void) { GtkIconTheme *icon_theme; GtkIconInfo *icon_info; GdkPixbuf *pix; GIcon *icon = NULL; icon_theme = gtk_icon_theme_get_default (); icon = g_content_type_get_icon ("application/x-font-ttf"); icon_info = gtk_icon_theme_lookup_by_gicon (icon_theme, icon, ...
false
false
false
false
false
0