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
case_report_streams( clsf_DS clsf, shortstr report_mode, char *xref_case_file_ptr, char *results_file_ptr, xref_data_DS xref_data, int clsf_num, clsf_DS test_clsf, int last_clsf_p, unsigned int comment_data_headers_p, ...
true
true
false
false
true
1
rsa_export(unsigned char *out, unsigned long *outlen, int type, rsa_key *key) { unsigned long zero=0; int err; LTC_ARGCHK(out != NULL); LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(key != NULL); /* type valid? */ if (!(key->type == PK_PRIVATE) && (type == PK_PRIVATE)) { return CRYPT_PK_INVAL...
false
false
false
true
false
1
GC_unix_sbrk_get_mem(word bytes) { ptr_t result; # ifdef IRIX5 /* Bare sbrk isn't thread safe. Play by malloc rules. */ /* The equivalent may be needed on other systems as well. */ __LOCK_MALLOC(); # endif { ptr_t cur_brk = (ptr_t)sbrk(0); SBRK_ARG_T lsbs = (word)cur_brk & (GC_page_size-...
false
false
false
false
false
0
proxy_settings_changed (EProxy *proxy, gpointer user_data) { SoupURI *proxy_uri = NULL; EEwsConnection *cnc = (EEwsConnection *) user_data; if (!cnc || !cnc->priv || !cnc->priv->uri || !cnc->priv->soup_session) return; /* use proxy if necessary */ if (e_proxy_require_proxy_for_uri (prox...
false
false
false
false
false
0
L34() {register object *base=vs_base; register object *sup=base+VM34; VC34 vs_check; vs_top=sup; goto TTL; TTL:; if(((((object)VV[29])->s.s_dbind))==(((object)VV[22]))){ goto T365;} base[0]= ((object)VV[99]); vs_top=(vs_base=base+0)+1; (void) (*Lnk163)(); vs_top=sup; goto T365; T365:; vs_base=vs_top; (void...
false
false
false
false
false
0
HdlrFunc24 ( Obj self, Obj a_K ) { Obj t_1 = 0; Bag oldFrame; OLD_BRK_CURR_STAT /* allocate new stack frame */ SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); REM_BRK_CURR_STAT(); SET_BRK_CURR_STAT(0); /* return K![2]; */ C_ELM_POSOBJ_NLE( t_1, a_K, 2 ); RES_BRK_CURR_STAT(); SWITCH_TO_OLD_FRAME(oldFrame); r...
false
false
false
false
false
0
skip_string (LINE_T ** top, char **ch) { LINE_T *u = *top; char *v = *ch; v++; while (u != NO_LINE) { while (v[0] != NULL_CHAR) { if (v[0] == QUOTE_CHAR && v[1] != QUOTE_CHAR) { *top = u; *ch = &v[1]; return (A68_TRUE); } else if (v[0] == QUOTE_CHAR && v[1] == QUOTE_CHAR)...
false
false
false
false
false
0
vortex_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct vortex_private *vp = netdev_priv(dev); void __iomem *ioaddr = vp->ioaddr; int skblen = skb->len; /* Put out the doubleword header... */ iowrite32(skb->len, ioaddr + TX_FIFO); if (vp->bus_master) { /* Set the bus-master controller to transf...
false
false
false
false
false
0
i801_transaction(struct i801_priv *priv, int xact) { int status; int result; const struct i2c_adapter *adap = &priv->adapter; result = i801_check_pre(priv); if (result < 0) return result; if (priv->features & FEATURE_IRQ) { outb_p(xact | SMBHSTCNT_INTREN | SMBHSTCNT_START, SMBHSTCNT(priv)); resul...
false
false
false
false
false
0
on_actor_mapped (ClutterActor *actor, GParamSpec *pspec, ClutterDropAction *self) { if (CLUTTER_ACTOR_IS_MAPPED (actor)) { if (self->priv->stage == NULL) self->priv->stage = clutter_actor_get_stage (actor); drop_action_register (self); } els...
false
false
false
false
false
0
gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y) { GalA11yETableItemPrivate *priv; g_return_val_if_fail (a11y, FALSE); priv = GET_PRIVATE (a11y); g_return_val_if_fail (priv->selection_change_id != 0, FALSE); g_return_val_if_fail (priv->cursor_change_id != 0, FALSE); g_signal_handler_disconnect ...
false
false
false
false
false
0
__ecereProp___ecereNameSpace__ecere__gui__dialogs__FileDialog_Set_sizeFilters(struct __ecereNameSpace__ecere__com__Instance * this, int value) { struct __ecereNameSpace__ecere__gui__dialogs__FileDialog * __ecerePointer___ecereNameSpace__ecere__gui__dialogs__FileDialog = (struct __ecereNameSpace__ecere__gui__dialogs__Fi...
false
false
false
true
false
1
tmff_scale_s8(int in, int minimum, int maximum) { int ret; ret = (((in + 0x80) * (maximum - minimum)) / 0xff) + minimum; if (ret < minimum) return minimum; if (ret > maximum) return maximum; return ret; }
false
false
false
false
false
0
path(Home home, int offset, const IntVarArgs& x, IntVar s, IntVar e, IntConLevel icl) { Int::Limits::nonnegative(offset,"Int::path"); int n=x.size(); if (n == 0) throw Int::TooFewArguments("Int::path"); if (x.same(home)) throw Int::ArgumentSame("Int::path"); if (home.failed()) ret...
false
false
false
false
false
0
mailimap_acl_setacl(mailimap * session, const char * mailbox, const char * identifier, const char * mod_rights) { struct mailimap_response * response; int r; int error_code; if (session->imap_state != MAILIMAP_STATE_AUTHENTICATED) return MAILIMAP_ERROR_BAD_STATE; r = mailimap_send_current_ta...
false
false
false
false
false
0
xfs_init_percpu_counters( struct xfs_mount *mp) { int error; error = percpu_counter_init(&mp->m_icount, 0, GFP_KERNEL); if (error) return -ENOMEM; error = percpu_counter_init(&mp->m_ifree, 0, GFP_KERNEL); if (error) goto free_icount; error = percpu_counter_init(&mp->m_fdblocks, 0, GFP_KERNEL); if (error...
false
false
false
false
false
0
saveToTextFile(const string &file) const { FILE *f=os::fopen(file.c_str(),"wt"); if (!f) return; os::fprintf(f,"%e %e %e %e %e %e %e\n", mean.x(), mean.y(), mean.z(), mean.quat()[0], mean.quat()[1], mean.quat()[2], mean.quat()[3]); for (unsigned int i=0;i<7;i++) os::fprintf(f,"%e %e %e %e %e %e %e\n", cov_inv(i...
false
false
false
false
false
0
igb_get_link_up_info_82575(struct e1000_hw *hw, u16 *speed, u16 *duplex) { s32 ret_val; if (hw->phy.media_type != e1000_media_type_copper) ret_val = igb_get_pcs_speed_and_duplex_82575(hw, speed, duplex); else ret_val = igb_get_speed_and_duplex_copper(hw, speed, duplex); return r...
false
false
false
false
false
0
ToClose(const R2 & v,R seuil,long hx,long hy) { I2 H(hx,hy); const I2 p(XtoI(v.x),YtoJ(v.y)); const R2 X(v); R seuil2 = seuil*seuil; // const Metric Mx(v.m); QuadTreeBox * pb[ MaxDeep ]; int pi[ MaxDeep ]; I2 pp[ MaxDeep ]; // long ii[ MaxDeep ], jj [ MaxDeep]; int l=0; // level QuadTreeBox...
false
false
false
false
false
0
local_setattro(localobject *self, PyObject *name, PyObject *v) { PyObject *ldict; int r; ldict = _ldict(self); if (ldict == NULL) return -1; r = PyObject_RichCompareBool(name, str_dict, Py_EQ); if (r == 1) { PyErr_Format(PyExc_AttributeError, "'%.50s' objec...
false
false
false
false
false
0
cx_data_cdb(struct ipmi_intf *intf, int access, int length, unsigned int cid, unsigned int fmt, unsigned char *value) { int rc = CXOEM_SUCCESS; struct ipmi_rs *rsp; struct ipmi_rq req; uint8_t msg_data[8 + MAX_RETURNABLE_CDB_LEN]; char out[5]; memset(&req, 0, sizeof(req)); memset(msg_data, 0, sizeof(msg_dat...
true
true
false
false
true
1
buspirate_program_enable(struct programmer_t *pgm, AVRPART * p) { unsigned char cmd[4]; unsigned char res[4]; if (pgm->flag & BP_FLAG_IN_BINMODE) { /* Clear configured reset pin(s): CS and/or AUX and/or AUX2 */ PDATA(pgm)->current_peripherals_config &= ~PDATA(pgm)->reset; buspirate_expect_bin_byte(pgm, PDATA(...
false
false
false
false
false
0
createMapper() { if (!m_Mapper) m_Mapper = new QDataWidgetMapper(q); m_Mapper->setModel(patient()); m_Mapper->addMapping(q->m_ui->patientName, Core::IPatient::UsualName); m_Mapper->addMapping(q->m_ui->patientFirstname, Core::IPatient::Firstname); // TODO: manage w...
false
false
false
false
false
0
_st_db_object_deserialise(st_driver_t drv, os_t os, const char *buf, int len) { os_object_t o; int cur; char *key, *sval; int ot; int ival; nad_t nad; log_debug(ZONE, "deserialising object"); o = os_object_new(os); cur = 0; while(cur < len) { if(ser_string_get(&key, &c...
false
false
false
false
false
0
common_timeout_cb(evutil_socket_t fd, short event, void *arg) { struct common_timeout_info *ti = arg; ++ti->count; evutil_gettimeofday(&ti->called_at, NULL); if (ti->count >= 4) event_del(&ti->ev); }
false
false
false
false
false
0
setCurrentActivityId(const QString &id) { if (d->activityId == id) { return; } d->activityId = id; emit changed(this); }
false
false
false
false
false
0
gt_shredder_set_sample_probability(GtShredder *shredder, double probability) { gt_assert(shredder); gt_assert(probability >= 0.0 && probability <= 1.0); shredder->sample_probability = probability; }
false
false
false
false
false
0
on_execute1_activate (GtkMenuItem * menuitem, gpointer user_data) { if (b_get_state () == B_STATE_IDLE) on_assemble1_activate (NULL, NULL); if (asm_error == FALSE) return; if (!b_execute ()) { gui_app_show_msg (GTK_MESSAGE_ERROR, _("Error executing program")); } /* update */ gui_view_update_al...
false
false
false
false
false
0
ubifs_write_master(struct ubifs_info *c) { int err, lnum, offs, len; ubifs_assert(!c->ro_media && !c->ro_mount); if (c->ro_error) return -EROFS; lnum = UBIFS_MST_LNUM; offs = c->mst_offs + c->mst_node_alsz; len = UBIFS_MST_NODE_SZ; if (offs + UBIFS_MST_NODE_SZ > c->leb_size) { err = ubifs_leb_unmap(c, lnu...
false
false
false
false
false
0
tuplestore_markpos(Tuplestorestate *state) { switch (state->status) { case TSS_INMEM: state->markpos_current = state->current; break; case TSS_WRITEFILE: if (state->eof_reached) { /* Need to record the implicit read position */ BufFileTell(state->myfile, &state->markpos_file, &st...
false
false
false
false
false
0
get_sw_value() { return curbuf->b_p_sw ? curbuf->b_p_sw : curbuf->b_p_ts; }
false
false
false
false
false
0
ProcessCommandON(ICECAdapter *parser, const string &command, string &arguments) { if (command == "on") { string strValue; uint8_t iValue = 0; if (GetWord(arguments, strValue) && HexStrToInt(strValue, iValue) && iValue <= 0xF) { parser->PowerOnDevices((cec_logical_address) iValue); return...
false
false
false
false
false
0
bport_fill(ScmPort *p, int cnt) { bport *data = (bport*)p->src.buf.data; ScmObj vec, r; SCM_ASSERT(data != NULL); if (SCM_FALSEP(data->fill_proc)) { return 0; /* indicates EOF */ } vec = Scm_MakeU8VectorFromArrayShared(cnt, (unsigne...
false
false
false
false
false
0
ExpandRuleVariables(std::string& s, const RuleVariables& replaceValues) { this->InsertRuleLauncher(s, replaceValues.CMTarget, replaceValues.RuleLauncher); std::string::size_type start = s.find('<'); // no variables to expand if(start == s.npos) ...
false
false
false
false
false
0
LARp_to_rp P1((LARp), register word * LARp) /* [0..7] IN/OUT */ /* * The input of this procedure is the interpolated LARp[0..7] array. * The reflection coefficients, rp[i], are used in the analysis * filter and in the synthesis filter. */ { register int i; register word temp; register longword ltmp; fo...
false
false
false
false
false
0
s5k6aa_set_user_gain(struct i2c_client *client, int gain) { int ret = s5k6aa_write(client, REG_SF_USR_TOT_GAIN, gain); if (ret) return ret; return s5k6aa_write(client, REG_SF_USR_TOT_GAIN_CHG, 1); }
false
false
false
false
false
0
outputIndent() { int stop = m_stack.size(); for(int i = 0; i < stop; ++i) { m_out << m_indent; } }
false
false
false
false
false
0
waitForNetData(vector<int> &data) { // GNASH_REPORT_FUNCTION; fd_set fdset; FD_ZERO(&fdset); if (data.size()) { int max = 0; for (size_t i = 0; i<data.size(); i++) { FD_SET(data[i], &fdset); if (data[i] > max) { max = data[i]; } } return waitForNetData(max+1, fdset); } ...
false
false
false
false
false
0
fl_set_pattern( const char * s ) { if ( ! fs ) allocate_fselector( 0 ); if ( s && strcmp( fs->pattern, s ) ) { fli_sstrcpy( fs->pattern, s, sizeof fs->pattern ); fl_set_object_label( fs->patbutt, fs->pattern ); fill_entries( fs->browser, fs->filename, 1 ); } }
false
false
false
false
false
0
CopySpecifier(struct Specifier * spec) { void * __ecereTemp1; if(spec) switch(spec->type) { case 0: return MkSpecifier(spec->specifier); case 2: { struct Identifier * id = CopyIdentifier(spec->id); struct __ecereNameSpace__ecere__sys__OldList * list = MkList(); struct Enumerator * enumerator; if(spec->list) { for(enu...
false
false
false
false
false
0
validate_cib_digest(xmlNode * local_cib, const char *sigfile) { char *digest = NULL; char *expected = NULL; gboolean passed = FALSE; FILE *expected_strm = NULL; int start = 0, length = 0, read_len = 0; CRM_ASSERT(sigfile != NULL); expected_strm = fopen(sigfile, "r"); if (expected_strm ...
false
false
false
false
true
1
panel_action_button_load (PanelWidget *panel, const char *id, GSettings *settings, const char *detail_for_type) { int type = PANEL_ACTION_NONE; int i; for (i = 0; panel_action_type_map[i].str != NULL; i++) { if (g_strcmp0 (detail_for_type, panel_action_type_map[i].str) == 0) { type =...
false
false
false
false
false
0
timesub(GTimeVal end, GTimeVal start) { GTimeVal diff; if(end.tv_usec < start.tv_usec) { /* borrow 1 sec */ if (end.tv_sec > 0) end.tv_sec -= 1; end.tv_usec += 1000000; } diff.tv_usec = end.tv_usec - start.tv_usec; if (end.tv_sec > start.tv_sec) diff.tv_sec = end.tv_sec - start.tv_sec; ...
false
false
false
false
false
0
forward_query_lookup (GdmXdmcpDisplayFactory *factory, GdmAddress *address) { GSList *li; GSList *qlist; ForwardQuery *ret; time_t curtime; curtime = time (NULL); ret = NULL; qlist = g_slist_copy (factory-...
false
false
false
false
false
0
setinfo_int (const char *key, const char * s, size_t len) { char buf[10]; int val; if (len > sizeof(buf)) len = sizeof(buf)-1; strncpy (buf, s, len); buf[len] = 0; val = atoi(buf); dstate_setinfo (key, "%d", val); return val; }
false
false
false
false
false
0
cards_hand_num_selected(CardsHand *hand) { GList *l; Card *card; gint num_selected = 0; for (l = hand->list; l; l = l->next) { card = (Card*)l->data; if (card->selected) num_selected++; } return num_selected; }
false
false
false
false
false
0
update_minimap_subwindow(game_event_type type, game_event_data *data, void *user) { struct minimap_flags *flags = user; if (type == EVENT_MAP) { /* Set flag if whole-map redraw. */ if (data->point.x == -1 && data->point.y == -1) flags->needs_redraw = TRUE; } else if (type == EVENT_END) { term *old = Ter...
false
false
false
false
false
0
initializeStatics(UErrorCode &status) { static const char *inclusionPat = "[\\u0027\\u002d-\\u002e\\u003A\\u00B7\\u0375\\u058A\\u05F3-\\u05F4" "\\u06FD-\\u06FE\\u0F0B\\u200C-\\u200D\\u2010\\u2019\\u2027\\u30A0\\u30FB]"; gInclusionSet = new UnicodeSet(UnicodeString(inclusionPat, -1, US_INV...
false
false
false
false
false
0
filter_write_list(GString *outstr, gint indent) { GList *work; WRITE_NL(); WRITE_STRING("<filter>"); indent++; work = filter_list; while (work) { FilterEntry *fe = work->data; work = work->next; WRITE_NL(); WRITE_STRING("<file_type "); WRITE_CHAR(*fe, key); WRITE_BOOL(*fe, enabled); WRITE_CHAR(*fe...
false
false
false
false
false
0
_getPrevNorm32(UCharIterator &src, uint32_t minC, UChar &c, UChar &c2) { /* need src.hasPrevious() */ c=(UChar)src.previous(&src); c2=0; /* check for a surrogate before getting norm32 to see if we need to predecrement further */ if(c<minC) { return 0; } else if(!UTF_IS_SURROGATE(c)) { ...
false
false
false
false
false
0
extendUnquotedAttributeValue() { InputSource *in = currentInput(); size_t length = in->currentTokenLength(); const Syntax &syn = syntax(); for (;;) { Xchar c = in->tokenChar(messenger()); if (syn.isS(c) || !syn.isSgmlChar(c) || c == InputSource::eE || c == syn.delimGeneral(Syntax::dTAGC)[0]) br...
false
false
false
false
false
0
put(unsigned char c) { if (buf_ && (offset_ < size_)) buf_[offset_++] = c; }
false
false
false
false
false
0
t2p_writeproc(thandle_t handle, tdata_t data, tsize_t size) { T2P *t2p = (T2P*) handle; if (t2p->outputdisable <= 0 && t2p->outputfile) { tsize_t written = fwrite(data, 1, size, t2p->outputfile); t2p->outputwritten += written; return written; } return size; }
false
false
false
false
false
0
SendChat(const std::string& to, const std::string msg) { buzz::XmlElement* stanza = new buzz::XmlElement(buzz::QN_MESSAGE); stanza->AddAttr(buzz::QN_TO, to); stanza->AddAttr(buzz::QN_ID, talk_base::CreateRandomString(16)); stanza->AddAttr(buzz::QN_TYPE, "chat"); buzz::XmlElement* body = new buzz::XmlElement(b...
false
false
false
false
false
0
canCreateAddress(Address *addr, bool error_msg) { Location *ctx = analy->getLocationContextByAddress(addr); if (ctx && ctx->addr->compareTo(addr) != 0) { if (error_msg) { global_analyser_address_string_format = ADDRESS_STRING_FORMAT_LEADING_ZEROS; errorbox("Can't create new symbol: Address %y belongs to %y (%...
false
false
false
false
false
0
close_macro_inf( char * out_p, /* Current output pointer */ int m_num, /* 'mac_num' of this macro */ int in_src_n /* Location of macro in arg */ ) /* * Mark up closing of a macro expansion. * Note that 'm_num' argument is necessary r...
false
false
false
false
false
0
de4x5_switch_mac_port(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 omr; STOP_DE4X5; /* Assert the OMR_PS bit in CSR6 */ omr = (inl(DE4X5_OMR) & ~(OMR_PS | OMR_HBD | OMR_TTM | OMR_PCS | OMR_SCR | ...
false
false
false
false
false
0
copy_limbs(mp_limb_t* src, mp_limb_t* dst, int n1, int n2){ while(n1 < n2){ dst[n1] = src[n1]; n1++; } }
false
false
false
false
false
0
protection_type_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct scsi_disk *sdkp = to_scsi_disk(dev); unsigned int val; int err; if (!capable(CAP_SYS_ADMIN)) return -EACCES; err = kstrtouint(buf, 10, &val); if (err) return err; if (val >= 0 && val <...
false
false
false
false
false
0
read_prefs_get_key_value(const gchar *buf, gchar **key, gchar **value) { size_t len; /* string length */ const gchar *buf_start; /* Pointer to where actual useful data starts in line */ g_return_val_if_fail (buf && key && value, FALSE); /* Strip out any comments (lines that begin with ; or #) */ i...
false
false
false
false
false
0
PlayInputSlot() { if (ui->mTabsWidget->currentIndex() == TABIX_INPUT && ui->mGameNoLe->text() != "") { uint gameno = ui->mGameNoLe->text().toUInt(); if (gameno > 0) { const int* props = ColorCode::INSTANCE->GetCCSolver()->GetGameByNo(gameno); CCGame* g = n...
false
false
false
false
false
0
divMod(unsigned char * bytes, unsigned char y) { unsigned int borrow = 0; int pos = Hash::maxHashSize - 1; while (pos >= 0 && !bytes[pos]) --pos; for ( ; pos >= 0; --pos) { unsigned int s = bytes[pos] + (borrow << 8); unsigned int d = s / y; borrow = s % y; bytes[pos] =...
false
false
false
false
false
0
write (class writer_t *pipe_, zmq_msg_t *msg_) { if (!pipe_->write (msg_)) { pipes.swap (pipes.index (pipe_), active - 1); active--; pipes.swap (active, eligible - 1); eligible--; return false; } if (!(msg_->flags & ZMQ_MSG_MORE)) pipe_->flush (); return t...
false
false
false
false
false
0
set_user_meta_message_string(const char *string) { if (string != NULL && string[0] != '\0') { sz_strlcpy(game.server.meta_info.user_message, string); game.server.meta_info.user_message_set = TRUE; set_meta_message_string(string); } else { /* Remove user meta message. We will use automatic messages i...
false
false
false
false
false
0
get_shape_idx(mouse) int mouse; { #ifdef FEAT_MOUSESHAPE if (mouse && (State == HITRETURN || State == ASKMORE)) { # ifdef FEAT_GUI int x, y; gui_mch_getmouse(&x, &y); if (Y_2_ROW(y) == Rows - 1) return SHAPE_IDX_MOREL; # endif return SHAPE_IDX_MORE; } if (mouse && drag_status_line) return ...
false
false
false
false
false
0
matchs(pANTLR3_LEXER lexer, ANTLR3_UCHAR * string) { while (*string != ANTLR3_STRING_TERMINATOR) { if (lexer->input->istream->_LA(lexer->input->istream, 1) != (*string)) { if (lexer->rec->state->backtracking > 0) { lexer->rec->state->failed = ANTLR3_TRUE; return ANTLR3_FALSE; } lexer->rec-...
false
false
false
false
false
0
HandleInspectOpcode(WorldPacket& recv_data) { ObjectGuid guid; recv_data >> guid; DEBUG_LOG("Inspected guid is %s", guid.GetString().c_str()); _player->SetSelectionGuid(guid); Player* plr = sObjectMgr.GetPlayer(guid); if (!plr) // wrong player ...
false
false
false
false
false
0
bsel_acc_uptoiconn(register struct expr_t *lhsx, register struct expr_t *rhsx, struct itree_t *up_itp) { word32 av, bv; struct net_t *lhsnp; struct expr_t *idndp, *ndx1; /* down rhs always wire/reg or not accerated routine */ __ld_wire_val(&av, &bv, rhsx->lu.sy->el.enp); /* assign in up */ __push_itstk(up_itp...
false
false
false
false
false
0
messageview_nav_get_next(MessageView *messageview) { GList *item; MsgInfo *info; cm_return_val_if_fail(messageview, NULL); cm_return_val_if_fail(messageview->trail, NULL); do { if (!messageview_nav_has_next(messageview)) return NULL; item = g_list_nth(messageview->trail, messageview->trail_pos + 1); cm...
false
false
false
false
false
0
Emit(AsmPrinter *AP) const { // Emit its Dwarf tag type. // FIXME: Doing work even in non-asm-verbose runs. AP->EmitULEB128(Tag, dwarf::TagString(Tag)); // Emit whether it has children DIEs. // FIXME: Doing work even in non-asm-verbose runs. AP->EmitULEB128(ChildrenFlag, dwarf::ChildrenString(ChildrenFlag)...
false
false
false
false
false
0
snd_hda_get_int_hint(struct hda_codec *codec, const char *key, int *valp) { const char *p; unsigned long val; int ret; mutex_lock(&codec->user_mutex); p = snd_hda_get_hint(codec, key); if (!p) ret = -ENOENT; else if (kstrtoul(p, 0, &val)) ret = -EINVAL; else { *valp = val; ret = 0; } mutex_unlock(&co...
false
false
false
false
false
0
reload_key_treeview ( KTKeyList *list, GtkWidget *this_widget ) { KTKey *key; GtkTreeView *tree_view; GtkListStore *list_store; tree_view = GTK_TREE_VIEW( lookup_widget(this_widget, "key_treeview") ); list_store = GTK_LIST_STORE( gtk_tree_view_get_model(tree_view) ); gtk_list_store_clear (list_store);/* C...
false
false
false
false
false
0
multi_char_to_unit(float val) { float ret; ret = (float)val / 127.0f; if(ret > 1.0f){ Int3(); ret = 1.0f; } if(ret < -1.0f){ Int3(); ret = -1.0f; } return ret; }
false
false
false
false
false
0
dump_metadata (void) { fprintf (outfile, "\nMetadata summary\n"); fprintf (outfile, "\tLoaded images: %d\n", num_images); if (verbose) { ImageDesc *image; int i; for (i = 0; i < SMALL_HASH_SIZE; ++i) { image = image_hash [i]; while (image) { fprintf (outfile, "\t\t%s\n", image->filename); image =...
false
false
false
false
false
0
clutter_text_get_paint_volume_for_cursor (ClutterText *text, ClutterPaintVolume *volume) { ClutterTextPrivate *priv = text->priv; ClutterVertex origin; clutter_text_ensure_cursor_position (text); if (priv->position == priv->selection_bound) { origin.x...
false
false
false
false
false
0
IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index, bool castOnSelf) const { // Check for Mana Spring & Healing Stream totems switch (spellInfo->SpellFamilyName) { case SPELLFAMILY_SHAMAN: if (spellInfo->IsFitToFamilyMask(UI64LIT(0x00000002000)) || ...
false
false
false
false
false
0
dht_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, struct iatt *preparent, struct iatt *postparent, dict_t *xdata) { dht_local_t *local = NULL; int this_call_cnt = 0; call_frame_t *prev = NULL; local = fra...
false
false
false
false
false
0
next_set (regno, expr) unsigned int regno; struct expr *expr; { do expr = expr->next_same_hash; while (expr && REGNO (SET_DEST (expr->expr)) != regno); return expr; }
false
false
false
false
false
0
fix_pmode_seg(struct kvm_vcpu *vcpu, int seg, struct kvm_segment *save) { if (!emulate_invalid_guest_state) { /* * CS and SS RPL should be equal during guest entry according * to VMX spec, but in reality it is not always so. Since vcpu * is in the middle of the transition from real mode to * protected ...
false
false
false
false
false
0
qla4_83xx_process_stop_seq(struct scsi_qla_host *ha) { ha->reset_tmplt.seq_index = 0; qla4_83xx_process_reset_template(ha, ha->reset_tmplt.stop_offset); if (ha->reset_tmplt.seq_end != 1) ql4_printk(KERN_ERR, ha, "%s: Abrupt STOP Sub-Sequence end.\n", __func__); }
false
false
false
false
false
0
generateDices() { bool any = false; for (int i = 0; i < 5; i++) { if (m_rollDice[i]) { m_dice[i] = 1 + (int)(6.0 * KRandom::random() / (RAND_MAX + 1.0)); m_rollDice[i] = false; any = true; } } return any; }
false
false
false
false
false
0
zValueChanged(int zValue) { if (graphicsItem) { graphicsItem->setZValue(zValue); updateItem(); if (tiledMapDataPrivate && tiledMapDataPrivate->oe) tiledMapDataPrivate->oe->rebuildScenes(); } }
false
false
false
false
false
0
process_line__common (char *line, gpointer data) { FrCommand *comm = FR_COMMAND (data); FrArchive *archive = FR_ARCHIVE (comm); if (line == NULL) return; if (fr_archive_progress_get_total_files (archive) > 1) fr_archive_progress (archive, fr_archive_progress_inc_completed_files (archive, 1)); el...
false
false
false
false
false
0
transfer_token_certs_to_collection(nssList *certList, NSSToken *token, nssPKIObjectCollection *collection) { NSSCertificate **certs; PRUint32 i, count; NSSToken **tokens, **tp; count = nssList_Count(certList); if (count == 0) { return; } certs = nss_ZNEWA...
false
false
false
false
false
0
get_size(struct ledm_session* ps) { struct bb_ledm_session *pbb = ps->bb_session; char buffer[7]; int i=0, tmo=50, len; if(ps->currentResolution >= 1200) tmo *= 5; while(1) { if(http_read_size(pbb->http_handle, buffer+i, 1, tmo, &len) == 2) return 0; if( i && *(buffer+i) == '\n' && *(buffer+i-1)...
false
false
false
false
false
0
gst_asf_put_subpayload (guint8 * buf, AsfPayload * payload, guint16 size) { guint16 payload_size; GstBuffer *newbuf; if (size <= ASF_MULTIPLE_PAYLOAD_HEADER_SIZE) { return 0; /* do nothing if there is not enough space */ } GST_WRITE_UINT8 (buf, payload->stream_number); GST_WRITE_UINT8 ...
false
true
false
false
false
1
str() const { SmallString<256> Vec; return toStringRef(Vec).str(); }
false
false
false
false
false
0
scroll_cursor_halfway(atend) int atend; { int above = 0; linenr_T topline; #ifdef FEAT_DIFF int topfill = 0; #endif int below = 0; int used; lineoff_T loff; lineoff_T boff; loff.lnum = boff.lnum = curwin->w_cursor.lnum; #ifdef FEAT_FOLDING (void)hasFolding(loff.lnum, &loff....
false
false
false
false
false
0
bbTailpop(Bytebuffer* bb, char* pelem) { if(bb == NULL) return bbFail(); if(bb->length == 0) return bbFail(); *pelem = bb->content[bb->length-1]; bb->length--; return TRUE; }
false
false
false
false
false
0
json_object_remove_member (JsonObject *object, const gchar *member_name) { GList *l; g_return_if_fail (object != NULL); g_return_if_fail (member_name != NULL); for (l = object->members_ordered; l != NULL; l = l->next) { const gchar *name = l->data; if (g_strcmp0 (n...
false
false
false
false
false
0
ifec_spi_write_bit ( struct bit_basher *basher, unsigned int bit_id, unsigned long data ) { struct ifec_private *priv = container_of ( basher, struct ifec_private, spi.basher ); unsigned long ee_addr = priv->ioaddr + CSREeprom; short val; uint16_t mask = ifec_ee_bits[bit_id]; DBGP ( "ifec_spi_write_bi...
false
false
false
false
false
0
safe_write(int fd, const void *buf, ssize_t n) { ssize_t nn = n; while (n) { int ret = xwrite(fd, buf, n); if (ret > 0) { buf = (char *) buf + ret; n -= ret; continue; } if (!ret) die("write error (disk full?)"); die_errno("write error"); } return nn; }
false
false
false
false
false
0
getMyPort(void) { if (Config.Sockaddr.http) return ntohs(Config.Sockaddr.http->s.sin_port); #if USE_SSL if (Config.Sockaddr.https) return ntohs(Config.Sockaddr.https->http.s.sin_port); #endif fatal("No port defined"); return 0; /* NOT REACHED */ }
false
false
false
false
false
0
udp_server_input_handler(evutil_socket_t fd, short what, void* arg) { if(!(what&EV_READ)) return; ioa_addr *addr = (ioa_addr*)arg; int len = 0; int slen = get_ioa_addr_len(addr); stun_buffer buffer; ioa_addr remote_addr; do { len = recvfrom(fd, buffer.buf, sizeof(buffer.buf)-1, 0, (struct sockaddr...
false
false
false
false
false
0
check_multiple_declarators (void) { /* [temp] In a template-declaration, explicit specialization, or explicit instantiation the init-declarator-list in the declaration shall contain at most one declarator. We don't just use PROCESSING_TEMPLATE_DECL for the first condition since that ...
false
false
false
false
false
0
rewriteLock(Thread *self) { /* Only disable/enable suspension (slow) if we have to block */ if(!tryLockVMLock(rewrite_lock, self)) { disableSuspend(self); lockVMLock(rewrite_lock, self); enableSuspend(self); } }
false
false
false
false
false
0
gdth_init(void) { if (disable) { printk("GDT-HA: Controller driver disabled from" " command line !\n"); return 0; } printk("GDT-HA: Storage RAID Controller Driver. Version: %s\n", GDTH_VERSION_STR); /* initializations */ gdth_polling = TRUE; gdth_clear_events(); init_timer(&g...
false
false
false
false
false
0
line_error (defs, format, arg1, arg2) DEF_FILE *defs; char *format, *arg1, *arg2; { if (defs->filename[0] != '/') fprintf (stderr, "%s", error_directory ? error_directory : "./"); fprintf (stderr, "%s:%d:", defs->filename, defs->line_number + 1); fprintf (stderr, format, arg1, arg2); fprintf (stde...
false
false
false
false
false
0
__commit_transaction(struct dm_pool_metadata *pmd) { int r; size_t metadata_len, data_len; struct thin_disk_superblock *disk_super; struct dm_block *sblock; /* * We need to know if the thin_disk_superblock exceeds a 512-byte sector. */ BUILD_BUG_ON(sizeof(struct thin_disk_superblock) > 512); r = __write_ch...
false
false
false
false
false
0
print_stats_latency(stats *stats) { long double percentiles[] = { 50.0, 75.0, 90.0, 99.0 }; printf(" Latency Distribution\n"); for (size_t i = 0; i < sizeof(percentiles) / sizeof(long double); i++) { long double p = percentiles[i]; uint64_t n = stats_percentile(stats, p); printf("%7...
false
false
false
false
false
0