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
CL_Reconnect_f (void) { //ZOID //if we are downloading, we don't change! This so we don't suddenly stop downloading a map if (cls.download) return; S_StopAllSounds (); if (cls.state == ca_connected) { Com_Printf ("reconnecting...\n"); cls.state = ca_connected; MSG_WriteChar (&cls.netchan.messa...
false
false
false
false
false
0
cuss(mtmp) register struct monst *mtmp; { if (mtmp->iswiz) { if (!rn2(5)) /* typical bad guy action */ pline("%s laughs fiendishly.", Monnam(mtmp)); else if (u.uhave.amulet && !rn2(SIZE(random_insult))) verbalize("Relinquish the amulet, %s!", random_insult[rn2(SIZE(random_insult))]); else i...
false
false
false
false
false
0
prompt(void *context __attribute__((unused)), int id, const char *challenge, const char *prompt, const char *defresult, const char **result, unsigned *len) { if ((id != SASL_CB_ECHOPROMPT && id != SASL_CB_NOECHOPROMPT) || !prompt || !result || !len) return SASL_BADP...
true
true
false
false
false
1
fcntl_ioctl(PyObject *self, PyObject *args) { #define IOCTL_BUFSZ 1024 int fd; /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I' format for the 'code' parameter because Python turns 0x8000000 into either a large positive number (PyLong or PyInt on 64-bit platforms) or a nega...
false
false
false
false
false
0
e1000_vlan_rx_kill_vid(struct net_device *netdev, __always_unused __be16 proto, u16 vid) { struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; u32 vfta, index; if ((adapter->hw.mng_cookie.status & E1000_MNG_DHCP_COOKIE_STATUS_VLAN) && (vid == adapter->mng_vlan_...
false
false
false
false
false
0
stripWhitespace(char *s) { char *p; if (s == NULL) return; p = s; while (*s != '\0') { if (isspace(TO_UCHAR(*s)) == OFFalse) { *p++ = *s; } s++; } *p = '\0'; }
false
false
false
false
false
0
show_usage(void) { printf("Usage: gpasm [options] file\n"); printf("Options: [defaults in brackets after descriptions]\n"); printf(" -a FMT, --hex-format FMT Select hex file format. [inhx32]\n"); printf(" -c, --object Output relocatable object.\n"); printf(" -C, --new-coff ...
false
false
false
false
false
0
Tspi_TPM_LoadMaintenancePubKey(TSS_HTPM hTPM, /* in */ TSS_HKEY hMaintenanceKey, /* in */ TSS_VALIDATION * pValidationData) /* in, out */ { TSS_RESULT result; TSS_HCONTEXT tspContext; TCPA_DIGEST checkSum, digest; TCPA_NONCE nonce; UINT64 offset; UINT32 pubBlobSize; BYTE hashBlob[512], *p...
false
false
false
false
false
0
Fax3Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { static const char module[] = "Fax3Encode"; Fax3CodecState* sp = EncoderState(tif); (void) s; if (cc % sp->b.rowbytes) { TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be written"); return (0); } while (cc > 0) { ...
false
false
false
false
false
0
mlxsw_sp_port_fdb_static_add(struct mlxsw_sp_port *mlxsw_sp_port, const struct switchdev_obj_port_fdb *fdb, struct switchdev_trans *trans) { if (switchdev_trans_ph_prepare(trans)) return 0; return mlxsw_sp_port_fdb_op(mlxsw_sp_port, fdb->addr, fdb->vid, true, false); }
false
false
false
false
false
0
readStateCommon( const char *string, const Game *game, State *state ) { uint32_t handId; int c, r; /* HEADER */ c = 0; /* HEADER:handId */ if( sscanf( string, ":%"SCNu32"%n", &handId, &r ) < 1 ) { return -1; } c += r; initState( game, handId, state ); /* HEADER:handId: */ if( string...
false
false
false
false
false
0
sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const { QSize size = QItemDelegate::sizeHint(option, index); QFont font = option.font; font.setBold(true); QFontMetrics fm(font); int height = static_cast<float>(option.fontMetrics.height()) * (1.2f) + fm.height() + 15; size....
false
false
false
false
false
0
_warn_helper(int severity, const char *errstr, const char *fmt, va_list ap) { char buf[1024]; size_t len; if (fmt != NULL) evutil_vsnprintf(buf, sizeof(buf), fmt, ap); else buf[0] = '\0'; if (errstr) { len = strlen(buf); if (len < sizeof(buf) - 3) { evutil_snprintf(buf + len, sizeof(buf) - len, ": %s"...
false
false
false
false
false
0
init_inquire (struct scanner *s) { int i; SANE_Status ret; unsigned char cmd[INQUIRY_len]; size_t cmdLen = INQUIRY_len; unsigned char in[INQUIRY_std_len]; size_t inLen = INQUIRY_std_len; DBG (10, "init_inquire: start\n"); memset(cmd,0,cmdLen); set_SCSI_opcode(cmd, INQUIRY_code); set_IN_return_si...
true
true
false
false
false
1
get_start_count_args(value_t *args, uint32_t nargs, size_t sz, size_t *offs, size_t *nb, char *fname) { if (nargs > 1) { *offs = tosize(args[1], fname); if (nargs > 2) *nb = tosize(args[2], fname); else *nb = sz - *offs; if (*o...
false
false
false
false
false
0
dc_compare_sprite_script(int script, int* yield, int* preturnint, int sprite, char* dcscript) { *preturnint = 0; STOP_IF_BAD_SPRITE(sprite); if (spr[sprite].active) { if (spr[sprite].script == 0) { log_error("[DinkC] compare_sprite_script: Sprite %d has no script.", sprite); return; } if...
false
false
false
false
false
0
generate_create_conf (char *tpasswd_conf) { FILE *fd; char line[5 * 1024]; int index = 1; gnutls_datum_t g, n; gnutls_datum_t str_g, str_n; fd = fopen (tpasswd_conf, "w"); if (fd == NULL) { fprintf (stderr, "Cannot open file '%s'\n", tpasswd_conf); return -1; } for (index = 1; inde...
true
true
false
false
true
1
ena_com_get_offload_settings(struct ena_com_dev *ena_dev, struct ena_admin_feature_offload_desc *offload) { int ret; struct ena_admin_get_feat_resp resp; ret = ena_com_get_feature(ena_dev, &resp, ENA_ADMIN_STATELESS_OFFLOAD_CONFIG); if (unlikely(ret)) { pr_err("Failed to get offload capabilities %d\n"...
false
true
false
false
false
1
mouseMoveEvent(QMouseEvent* e) { QPointF sPos = mapToScene(e->pos()); if (_movingZoomRect) { emit zoomRectMoved(sPos.x() - _lastPos.x(), sPos.y() - _lastPos.y()); _lastPos = sPos; } }
false
false
false
false
false
0
expandCopy(MachineBasicBlock &MBB, Iter I) { unsigned Src = I->getOperand(1).getReg(); std::pair<unsigned, unsigned> Opcodes = getMFHiLoOpc(Src); if (!Opcodes.first) return false; return expandCopyACC(MBB, I, Opcodes.first, Opcodes.second); }
false
false
false
false
false
0
dodump(struct rfc2045 *p, int level) { if (!p->isdummy) { printf("%*sMessage start %ld, end %ld, startbody %ld, endbody %ld.\n", level*4, "", (long)p->startpos, (long)p->endpos, (long)p->startbody, (long)p->endbody); DUMP(p->mime_version, "Mime-Version") DUMP(p->content_type, "Content-Type") DUMP(rfc204...
false
false
false
false
false
0
ajMeltEnergy2(const char *strand, ajint pos, ajint len, AjBool isDNA, float *enthalpy, float *entropy, float **saveentr, float **saveenth, float **saveener) { ajint i; ajint j; ajint limit = 0; AjPStr line = NULL; float ident = 0.0; float energy; limit = len-1; ajMeltInit(...
false
false
false
false
false
0
png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text) { if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0) { png_debug1(1, "in %s retrieval function\n", (png_ptr->chunk_name[0] == '\0' ? "text" : (png_const_charp)png_ptr->ch...
false
false
false
false
false
0
_bmc_device_config_file_parse (struct bmc_device_arguments *cmd_args) { if (config_file_parse (cmd_args->common.config_file, 0, &(cmd_args->common), &(cmd_args->sdr), &(cmd_args->hostrange), CO...
false
false
false
false
false
0
gupnp_dlna_profile_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { GUPnPDLNAProfile *profile = GUPNP_DLNA_PROFILE (object); GUPnPDLNAProfilePrivat...
false
false
false
false
false
0
PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os,indent); if ( this->Input ) { os << indent << "Input:\n"; this->Input->PrintSelf(os,indent.GetNextIndent()); } else { os << indent << "Input: (none)\n"; } os << indent << "ReadFrontBuffer: " << this->ReadFront...
false
false
false
false
false
0
example_contact_details_destroy (gpointer p) { ExampleContactDetails *d = p; tp_clear_pointer (&d->tags, g_hash_table_unref); g_free (d->alias); g_slice_free (ExampleContactDetails, d); }
false
false
false
false
false
0
dump_rng_stats(void) { int j; char buf[256]; struct timeval now; fprintf(stderr, "%s\n", dump_stat_counter(buf, sizeof(buf), "bits received from input", rng_stats.bytes_received * 8)); if (arguments->pipemode) fprintf(stderr, "%s\n", dump_stat_counter(buf, sizeof(buf), "bits sent to output", rng_sta...
true
true
false
false
false
1
getidname(int idnumber) const { if (idnumber<nvars) return vararray[idnumber]; else return 0; }
false
false
false
false
false
0
coverart_block_change(gboolean val) { if (gtk_widget_get_realized(GTK_WIDGET(gtkpod_app))) { if (val) { GdkCursor *cursor = gdk_cursor_new(GDK_WATCH); gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(gtkpod_app)), cursor); g_object_unref(cursor); } e...
false
false
false
false
false
0
setArguments(QVariant arg) { qDebug() << Q_FUNC_INFO << arg; QVariantMap param = arg.toMap(); QUrl url = param["url"].toUrl(); int type = param["type"].toInt(); QString par = param["params"].toString(); d->user = param["user"].toString(); d->pass = param["pass"].toString(); if (type ==...
false
false
false
false
false
0
flush_char() { if (a_count > 0) { g_outfile->PutC((BYTE)a_count); g_outfile->Write(accum,1,a_count); a_count=0; } }
false
false
false
false
false
0
CreateMenuLinks( cmOStringStream& str, cmOStringStream& deleteStr) { const char* cpackMenuLinks = this->GetOption("CPACK_NSIS_MENU_LINKS"); if(!cpackMenuLinks) { return; } cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackMenuLinks: " << cpa...
false
false
false
false
false
0
ChkWindows(line1, line2) LinePtr line1, line2; { register Window *w = fwind; register LinePtr lp, lend = line2->l_next; do { if (w->w_bufp == curbuf) { for (lp = line1->l_next; lp != lend; lp = lp->l_next) { if (lp == w->w_top) w->w_flags |= W_TOPGONE; if (lp == w->w_line) w->w_flags |= W...
false
false
false
false
false
0
Dataset_Header_read(FILE *fp){ register Dataset_Header *header = g_new(Dataset_Header, 1); /**/ header->magic = BitArray_read_int(fp); if(header->magic != DATASET_HEADER_MAGIC) g_error("Bad magic number in dataset file"); header->version = BitArray_read_int(fp); if(header->version != DAT...
false
false
false
false
false
0
hvc_alloc(uint32_t vtermno, int data, const struct hv_ops *ops, int outbuf_size) { struct hvc_struct *hp; int i; /* We wait until a driver actually comes along */ if (atomic_inc_not_zero(&hvc_needs_init)) { int err = hvc_init(); if (err) return ERR_PTR(err); } hp = kzalloc(ALIGN(sizeof(*h...
false
false
false
false
false
0
match( const StateFormula &formula, VarSubstMap &subst ) const { const Equality *eq = dynamic_cast<const Equality*>( &formula ); if( eq != NULL ) { if( is_variable( term1() ) ) { VarSubstMap::const_iterator it = subst.find( term1() ); if( ((it == subst.end()) && (term1() != eq->term1())) || ...
false
false
false
false
false
0
is_caller() { Mutex::Lock lock(mutex); return thread_a.get() ? thread_a->is_caller() : false; }
false
false
false
false
false
0
_e_fm_main_hal_volume_add(const char *udi, Eina_Bool first_time) { E_Volume *v; if (!udi) return NULL; if (e_volume_find(udi)) return NULL; v = calloc(1, sizeof(E_Volume)); if (!v) return NULL; // printf("VOL+ %s\n", udi); v->udi = eina_stringshare_add(udi); v->efm_mo...
false
false
false
false
false
0
calculate_saved_nregs (int hard_regno, enum machine_mode mode) { int i; int nregs = 0; ira_assert (hard_regno >= 0); for (i = hard_regno_nregs[hard_regno][mode] - 1; i >= 0; i--) if (!allocated_hardreg_p[hard_regno + i] && !TEST_HARD_REG_BIT (call_used_reg_set, hard_regno + i) && !LOCAL_REGNO (hard_regno...
false
false
false
false
false
0
val_int() { DBUG_ASSERT(fixed == 1); longlong value=0; if (compare_as_dates) { ulonglong result= 0; (void)cmp_datetimes(&result); return (longlong)result; } for (uint i=0; i < arg_count ; i++) { if (i == 0) value=args[i]->val_int(); else { longlong tmp=args[i]->val_int(...
false
false
false
false
false
0
SUBR_input(ushort code) { static STREAM *stream = NULL; char *addr; SUBR_ENTER(); if (NPARAM == 1) stream = get_stream(PARAM, TRUE); if (stream) addr = STREAM_input(stream); else addr = NULL; if (NPARAM == 1) { SP--; if (!TYPE_is_integer(SP->type)) RELEASE_OBJECT(SP); } if (addr) { //V...
false
false
false
true
false
1
zfont_get_to_unicode_map(gs_font_dir *dir) { const gs_unicode_decoder *pud = (gs_unicode_decoder *)dir->glyph_to_unicode_table; return (pud == NULL ? NULL : &pud->data); }
false
false
false
false
false
0
eight_byte_size_ready () { // 8-byte size is read. Allocate the buffer for message body and // read the message data into it. size_t size = (size_t) get_uint64 (tmpbuf); // TODO: Handle over-sized message decently. int rc = zmq_msg_init_size (&in_progress, size); errno_assert (rc == 0); ...
false
false
false
false
false
0
GetDocApplicationName(wxInt32 item, wxString& strBuffer) const { CMainDocument* pDoc = wxGetApp().GetDocument(); RESULT* result = wxGetApp().GetDocument()->result(item); RESULT* state_result = NULL; wxString strAppBuffer = wxEmptyString; wxString strClassBuffer = wxEmptyStr...
false
false
false
false
false
0
emit_check(int insn, int argument, int mask) { int test = argument; if (test < 0) test = -test; /* If there are bits that shouldn't be set then issue a warning */ if (test & (~mask)) { gpwarning(GPW_RANGE, NULL); } emit(insn | (argument & mask)); return; }
false
false
false
false
false
0
e_xinerama_screens_get(void) { if (fake_screens) return fake_screens; return chosen_screens; }
false
false
false
false
false
0
e_illume_border_is_home(E_Border *bd) { /* make sure we have a border */ if (!bd) return EINA_FALSE; /* skip windows which are not either 'normal' windows, or 'unknown' windows * NB: Let 'unknown' windows pass through as a safety */ if ((bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL) && ...
false
false
false
false
false
0
logStackContent(void **sp) { int i; for (i = 15; i >= 0; i--) { if (sizeof(long) == 4) redisLog(REDIS_WARNING, "(%08lx) -> %08lx", sp+i, sp[i]); else redisLog(REDIS_WARNING, "(%016lx) -> %016lx", sp+i, sp[i]); } }
false
false
false
false
false
0
error(Display *disp, XErrorEvent *err) { /* Under twm I get a bad match, under kde a bad window? */ if ( err->error_code == BadMatch || err->error_code == BadWindow ) { if ( edisp!=NULL ) edisp->wm_breaks_raiseabove = true; } else { myerrorhandler(disp,err); } return( 1 ); }
false
false
false
false
false
0
nufa_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, dev_t rdev, dict_t *params) { dht_local_t *local = NULL; dht_conf_t *conf = NULL; xlator_t *subvol = NULL; xlator_t *avail_subvol = NULL; int op_errno = -1; VALIDATE_OR...
false
false
false
false
false
0
AddOptionField(METAIO_STL::string optionName, METAIO_STL::string name, TypeEnumType type, bool required, METAIO_STL::string defVal, METAIO_STL::string description, DataEnumType externalData) { OptionVector::iterator it = m_Optio...
false
false
false
false
false
0
vxge_hw_vpath_mcast_disable(struct __vxge_hw_vpath_handle *vp) { u64 val64; struct __vxge_hw_virtualpath *vpath; enum vxge_hw_status status = VXGE_HW_OK; if ((vp == NULL) || (vp->vpath->ringh == NULL)) { status = VXGE_HW_ERR_INVALID_HANDLE; goto exit; } vpath = vp->vpath; val64 = readq(&vpath->vp_reg->rxm...
false
false
false
false
false
0
extend_tile_hint(int x, int y, int tw, int th, hint_t *hint) { int w = dpy_x - x; int h = dpy_y - y; if (w > tw) { w = tw; } if (h > th) { h = th; } if (hint->x > x) { /* extend to the left */ hint->w += hint->x - x; hint->x = x; } if (hint->y > y) { /* extend upward */ hint->h += hint->y - y; ...
false
false
false
false
false
0
ak8963SelfTest() { bool testStatus = true; int16_t mx, my, mz; // positive magnetometer measurements uint8_t confSave; uint8_t timeout = 20; // Save register values if (i2cdevReadByte(I2Cx, devAddr, AK8963_RA_CNTL, &confSave) == false) { // TODO: error handling return false; } // Power down...
false
false
false
false
false
0
operator<<(ostream & os, AuthorList const & a) { // Copy the authorlist, because we don't want to sort the original AuthorList sorted = a; sorted.sort(); AuthorList::Authors::const_iterator a_it = sorted.begin(); AuthorList::Authors::const_iterator a_end = sorted.end(); for (a_it = sorted.begin(); a_it != a_en...
false
false
false
false
false
0
gen_tlg_info_car_dt(Stasche_localize_table *localize_table, const Stasche_localize_tlg_info *tlg_info) { Block *bpt; if (tlg_info == NULL || tlg_info->nolocal) return; for (bpt = localize_table->block_head; bpt != NULL; bpt = bpt->next) { if (bpt->tlg_tag ...
false
false
false
false
false
0
ctrl_c_handler(int nr) { int was_already_signaled = ctrl_c_signaled; ctrl_c_signaled = 1; if (!was_already_signaled) siglongjmp(jmp_hostbyname, 1); }
false
false
false
false
false
0
SilfVersionForClassMap(int fxdSilfSpecVersion) { int cbSpaceNeeded; // # of bytes needed = max offset // number of classes cbSpaceNeeded = 4; // the offsets to classes themselves, assuming short ints cbSpaceNeeded += (m_vpglfcReplcmtClasses.size() + 1) * 2; // Space needed for the class glyph lists for (in...
false
false
false
false
false
0
item_event (GooCanvasItem *item, GooCanvasItem *target, GdkEventButton *event, MachItem *machItem) { double item_x, item_y; GooCanvasBounds bounds; double width; item_x = event->x; item_y = event->y; goo_canvas_convert_from_item_space(goo_canvas_item_get_canvas(item), item, &item_...
false
false
false
false
false
0
amoeba(vnl_vector<double>& x) { // Set up a simplex near the initial guess. int n = x.size(); std::vector<vnl_amoeba_SimplexCorner> simplex(n+1, vnl_amoeba_SimplexCorner(n)); set_up_simplex_relative(simplex,x); amoeba(x,simplex); }
false
false
false
false
false
0
UpdatePlayerScore(Player* source, uint32 type, uint32 value) { BattleGroundScoreMap::iterator itr = m_PlayerScores.find(source->GetObjectGuid()); if (itr == m_PlayerScores.end()) // player not found... return; BattleGround::UpdatePlayerScore(source, type, value); }
false
false
false
false
false
0
force_clear() { if (external_force_clear) return; int i; if (external_force_clear) return; // clear global force array // nall includes ghosts only if either newton flag is set int nall; if (force->newton) nall = atom->nlocal + atom->nghost; else nall = atom->nlocal; size_t nbytes = sizeof(double...
false
false
false
false
false
0
output_enumeration_type_die (arg) void *arg; { tree type = arg; ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_enumeration_type); sibling_attribute (); equate_type_number_to_die_number (type); name_attribute (type_tag (type)); member_attribute (TYPE_CONTEXT (type)); /* Handle a GNU C/C++ extension, i.e. i...
false
false
false
false
false
0
undrag (void) { if (drag_source == 1) gtk_drag_source_unset (leveldraw); else if (drag_source == 2) gtk_drag_source_unset (tooldraw); drag_source = 0; }
false
false
false
false
false
0
parseopt (int *pargc, char ***pargv, gretlopt *popt, double *scriptval, char *fname) { char **argv; int argc, gotfile = 0; gretlopt opt = OPT_NONE; int err = 0; *fname = '\0'; if (pargv == NULL) { return 0; } argc = *pargc; argv = *pargv; while (*++argv) { const cha...
false
false
false
false
false
0
GetRegion(unsigned int Key) { if (!pRegions || pRegions->empty() || Key > 127) return NULL; return RegionKeyTable[Key]; /*for (int i = 0; i < Regions; i++) { if (Key <= pRegions[i]->KeyRange.high && Key >= pRegions[i]->KeyRange.low) return pRegions[i]; } ...
false
false
false
false
false
0
clear_ibus (GsdKeyboardManager *manager) { GsdKeyboardManagerPrivate *priv = manager->priv; g_cancellable_cancel (priv->ibus_cancellable); g_clear_object (&priv->ibus_cancellable); g_clear_pointer (&priv->ibus_engines, g_hash_table_destroy); g_clear_object (&priv->ibus); }
false
false
false
false
false
0
timeval_min_sec(struct timeval *d, int secs) { if(d->tv_sec == 0 || d->tv_sec > secs) { d->tv_sec = secs; d->tv_usec = random() % 1000000; } }
false
false
false
false
false
0
method_59(const int *account, int *weight) { // ids less than 9 digits can not be checked if (0 == account[0] && 0 == account[1]) return AccountNumberCheck::OK; number2Array("2121212120", weight); return algo01(10, weight, true, 10, account); }
false
false
false
false
false
0
blkcipher_walk_first(struct blkcipher_desc *desc, struct blkcipher_walk *walk) { if (WARN_ON_ONCE(in_irq())) return -EDEADLK; walk->iv = desc->info; walk->nbytes = walk->total; if (unlikely(!walk->total)) return 0; walk->buffer = NULL; if (unlikely(((unsigned long)walk->iv & walk->alignmask))) { int e...
false
false
false
false
false
0
dma_data_view_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { DmaDataView *view = DMA_DATA_VIEW (container); g_return_if_fail (callback != NULL); if (include_internals) { callback (view->addr...
false
false
false
false
false
0
sendCountries() { QByteArray buffer; QDataStream stream(&buffer, QIODevice::WriteOnly); m_game->theWorld()->sendCountries(stream); sendMessage(buffer,SetupCountries); }
false
false
false
false
false
0
nfs_startup_subvolume (xlator_t *nfsx, xlator_t *xl) { int ret = -1; loc_t rootloc = {0, }; nfs_user_t nfu = {0, }; if ((!nfsx) || (!xl)) return -1; if (nfs_subvolume_started (nfsx->private, xl)) { gf_log (GF_NFS,GF_LOG...
false
false
false
false
false
0
print_igmpv3_query(register const u_char *bp, register u_int len) { u_int mrc; int mrt; u_int nsrcs; register u_int i; (void)printf(" v3"); /* Minimum len is 12, and should be a multiple of 4 */ if (len < 12 || len & 0x03) { (void)printf(" [invalid len %d]", len); return; } TCHECK...
false
false
false
false
false
0
S_adjust_stack_on_leave(pTHX_ SV **newsp, SV **sp, SV **mark, I32 gimme, U32 flags) { bool padtmp = 0; PERL_ARGS_ASSERT_ADJUST_STACK_ON_LEAVE; if (flags & SVs_PADTMP) { flags &= ~SVs_PADTMP; padtmp = 1; } if (gimme == G_SCALAR) { if (MARK < SP) *++newsp = ((SvFLAGS(*SP) & flags) || (padtmp ...
false
false
false
false
false
0
vmw_overlay_stop_all(struct vmw_private *dev_priv) { struct vmw_overlay *overlay = dev_priv->overlay_priv; int i, ret; if (!overlay) return 0; mutex_lock(&overlay->mutex); for (i = 0; i < VMW_MAX_NUM_STREAMS; i++) { struct vmw_stream *stream = &overlay->stream[i]; if (!stream->buf) continue; ret = v...
false
false
false
false
false
0
atk_component_real_contains (AtkComponent *component, gint x, gint y, AtkCoordType coord_type) { gint real_x, real_y, width, height; real_x = real_y = width = height = 0; atk_component_get_extents (component, ...
false
false
false
false
false
0
tid_in_window(long rcv_tid, long last_tid) { #if 0 debug("wap.wtp.tid", 0, "tids were rcv_tid, %ld and last_tid, %ld" " and test window %ld", rcv_tid, last_tid, WTP_TID_WINDOW_SIZE); #endif if (last_tid == rcv_tid) { return 0; } if (rcv_tid > last_tid) { if (abs(rcv_tid - last_tid) <= WTP...
false
false
false
false
false
0
get_parent(const ft_string & child_logger_name) { ft_size slash = child_logger_name.rfind('/'); if (slash == ft_string::npos) return get_root_logger(); ft_string parent_name(child_logger_name, 0, slash); return get_logger(parent_name); }
false
false
false
false
false
0
free_all(void) { if(head) { struct block_list * current = head; struct block_list * temp = head->next; while(current) { // we need to rewind the node's block address as we may have allotted some // blocks already char * block_ptr = current->node.block - (multiple - current->node.blocks_l...
false
false
false
false
false
0
source_cancel_cb (struct OperationState *op_state) { GrlSource *source = op_state->source; if (!operation_is_ongoing (op_state->operation_id)) { GRL_DEBUG ("Tried to cancel invalid or already cancelled operation. " "Skipping..."); return; } /* Mark the operation as finished, if the sour...
false
false
false
false
false
0
HeapDown(int father, Heap *h) { /* trickle an element down the Heap until the Heap condition is verified used when deleting an element from the Heap */ if(0<=father && father<h->last-1) { int left,right,child; while((left=LeftSon(father))<h->last) { child = father; if(h->key[le...
false
false
false
false
false
0
ipcp_add_param_type (struct ipa_node_params *callee_info, int i, tree binfo) { int j, count; if (ipa_param_cannot_devirtualize_p (callee_info, i)) return false; if (callee_info->params[i].types) { count = VEC_length (tree, callee_info->params[i].types); for (j = 0; j < count; j++) if (VEC_i...
false
false
false
false
false
0
spte_is_bit_cleared(u64 old_spte, u64 new_spte, u64 bit_mask) { return (old_spte & bit_mask) && !(new_spte & bit_mask); }
false
false
false
false
false
0
nurat_s_canonicalize_internal(VALUE klass, VALUE num, VALUE den) { VALUE gcd; switch (FIX2INT(f_cmp(den, ZERO))) { case -1: num = f_negate(num); den = f_negate(den); break; case 0: rb_raise_zerodiv(); break; } gcd = f_gcd(num, den); num = f_idiv(num, gcd); den = f_idiv(den, gc...
false
false
false
false
false
0
pk_backend_get_requires (PkBackend *backend, PkBackendJob *job, PkBitfield filters, gchar **package_ids, gboolean recursive) { g_return_if_fail (PK_IS_BACKEND (backend)); g_return_if_fail (backend->priv->desc->get_requires != NULL); /* final pre-flight checks */ g_assert (pk_backend_job_get_vfunc_e...
false
false
false
false
false
0
file_cmd_normalize(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { #ifdef HAVE_REALPATH const char *path = Jim_String(argv[0]); char *newname = Jim_Alloc(MAXPATHLEN + 1); if (realpath(path, newname)) { Jim_SetResult(interp, Jim_NewStringObjNoAlloc(interp, newname, -1)); return JIM_OK;...
false
true
false
false
false
1
ntfs_stamp_usnjrnl(ntfs_volume *vol) { ntfs_debug("Entering."); if (likely(!NVolUsnJrnlStamped(vol))) { sle64 stamp; struct page *page; USN_HEADER *uh; page = ntfs_map_page(vol->usnjrnl_max_ino->i_mapping, 0); if (IS_ERR(page)) { ntfs_error(vol->sb, "Failed to read from " "$UsnJrnl/$DATA/$Max attri...
false
false
false
false
false
0
A_BeastPuff(mobj_t * actor) { if (P_Random() > 64) { P_SpawnMobj(actor->x + ((P_Random() - P_Random()) << 10), actor->y + ((P_Random() - P_Random()) << 10), actor->z + ((P_Random() - P_Random()) << 10), MT_PUFFY); } }
false
false
false
false
false
0
jar_parse_sf(JAR *jar, char *raw_manifest, long length, const char *path, const char *url) { JAR_Signer *signer = NULL; int status = JAR_ERR_MEMORY; if (jar->globalmeta == NULL) { /* It is a requirement that the MF file be passed before the SF file */ return JAR_ERR_ORDER; } signer = JAR_n...
false
false
false
false
false
0
opcode_zp_equiv(unsigned char op) { switch (op) { case 0x6D: return 0x65; /* ADC oper */ case 0x7D: return 0x75; /* ADC oper,X */ case 0x2D: return 0x25; /* AND oper */ case 0x3D: return 0x35; /* AND oper,X */ case 0x0E: return 0x06; /* ASL oper */ ...
false
false
false
false
false
0
lookup(unsigned int &value, unsigned int &index, unsigned int mask, unsigned int &sameDiff) { for (unsigned int i = 0; i < length_; i++) if (value == buffer_[i]) { index = i; if (i) { unsigned int target = (i >> 1); ...
false
false
false
false
false
0
updateTextRegions(MSBoolean bounds) { for (int n = _num_regions-1; n>=0; n--) updateTextRegion(&_regions[n], bounds); }
false
false
false
false
false
0
gst_buffer_is_span_fast (GstBuffer * buf1, GstBuffer * buf2) { g_return_val_if_fail (buf1 != NULL && buf2 != NULL, FALSE); g_return_val_if_fail (buf1->mini_object.refcount > 0, FALSE); g_return_val_if_fail (buf2->mini_object.refcount > 0, FALSE); /* it's only fast if we have subbuffers of the same parent */ ...
false
false
false
false
false
0
cr_om_parser_parse_paths_to_cascade (CROMParser * a_this, const guchar * a_author_path, const guchar * a_user_path, const guchar * a_ua_path, enum CREncoding a_encoding, ...
false
false
false
false
false
0
netsnmp_watcher_helper_handler(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_watcher_info *winfo = (netsnmp_watcher_info...
false
false
false
false
false
0
gmux_remove(struct pnp_dev *pnp) { struct apple_gmux_data *gmux_data = pnp_get_drvdata(pnp); vga_switcheroo_unregister_handler(); gmux_disable_interrupts(gmux_data); if (gmux_data->gpe >= 0) { acpi_disable_gpe(NULL, gmux_data->gpe); acpi_remove_notify_handler(gmux_data->dhandle, ACPI_DEVICE_NOTIFY, ...
false
false
false
false
false
0
accessible_gtk_hex_factory_class_init (AccessibleGtkHexFactoryClass *klass) { AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass); g_return_if_fail (class != NULL); class->create_accessible = accessible_gtk_hex_factory_create_accessible; class->get_accessible_type = accessible_gtk_hex_factory_g...
false
false
false
false
false
0
DoCastSpell(Unit* pTarget, SpellEntry const* pSpellInfo, bool bTriggered) { if (m_creature->IsNonMeleeSpellCasted(false) && !bTriggered) { return; } m_creature->CastSpell(pTarget, pSpellInfo, bTriggered); }
false
false
false
false
false
0