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
player_can_study(void) { if (!player_can_cast()) return FALSE; if (!p_ptr->new_spells) { cptr p = ((cp_ptr->spell_book == TV_MAGIC_BOOK) ? "spell" : "prayer"); msg_format("You cannot learn any new %ss!", p); return FALSE; } return TRUE; }
false
false
false
false
false
0
SyncSend() { // tx header if (fParams.fSlaveSyncMode) { fTxHeader.fCycle = fRxHeader.fCycle; } else { fTxHeader.fCycle++; } fTxHeader.fSubCycle = 0; fTxHeader.fDataType = 's'; fTxHeader.fIsLastPckt = (fParams.fReturnMidiChannels == 0 &&...
false
false
false
false
false
0
vnl_bignum_from_string(vnl_bignum& b, const vcl_string& s) { // decimal: "^ *[-+]?[1-9][0-9]*$" // Infinity: "^ *[-+]?Inf(inity)?$" if (is_plus_inf(s.c_str())) b=vnl_bignum("+Inf"); else if (is_minus_inf(s.c_str())) b=vnl_bignum("-Inf"); else b.dtoBigNum(s.c_str()); // convert ...
false
false
false
false
false
0
floppy_gen_floppydrive_process(struct cpssp *cpssp) { unsigned int blk; unsigned int out; uint8_t track; uint8_t sector; if (DEBUG_CONTROL_FLOW) { fprintf(stderr, "%s: track=%u, hds=%u, sectors=%u, angle=%u, bufsize=%u\n", __FUNCTION__, cpssp->track, cpssp->hds, cpssp->sectors, cpssp->angle, cpssp->...
false
false
false
false
false
0
semiLogSpectrum( float *p ) { float e; power2( p ); for( int i = 0; i < ( m_num / 2 ); i++, p++ ) { e = 10.0 * log10( sqrt( *p * .5 ) ); *p = e < 0 ? 0 : e; } }
false
false
false
false
false
0
getPipelinedCap( kj::ArrayPtr<const PipelineOp> ops) const { _::PointerReader pointer = reader; for (auto& op: ops) { switch (op.type) { case PipelineOp::Type::NOOP: break; case PipelineOp::Type::GET_POINTER_FIELD: pointer = pointer.getStruct(nullptr).getPointerField(op.pointer...
false
false
false
false
false
0
VBE_Nuke(struct backend *b) { ASSERT_CLI(); VTAILQ_REMOVE(&backends, b, list); free(b->ipv4); free(b->ipv4_addr); free(b->ipv6); free(b->ipv6_addr); free(b->port); VSM_Free(b->vsc); FREE_OBJ(b); VSC_C_main->n_backend--; }
false
false
false
false
false
0
cxnWait (Connection cxn) { ASSERT (cxn->state == cxnStartingS || cxn->state == cxnSleepingS || cxn->state == cxnConnectingS || cxn->state == cxnFeedingS || cxn->state == cxnFlushingS) ; VALIDATE_CONNECTION (cxn) ; abortConnection (cxn) ; cxn->state = cxnWaitingS ; ho...
false
false
false
false
false
0
move_possible (GtkCTree *ctree, GtkCTreeNode *child, GtkCTreeNode *parent, GtkCTreeNode *sibling) { return (parent != NULL && sibling != NULL); }
false
false
false
false
false
0
CopyStringUntilChar( char *text, unsigned out_len, int c, char *out) { char *endptr; if (!ExtractUntilChar(text, c, &endptr)) return NULL; strncpy(out, text, out_len); out[out_len-1] = '\0'; *endptr = c; SkipWhileWhitespace(&endptr, c); return endptr; }
false
false
false
false
false
0
SetRenderWindow(vtkRenderWindow *renwin) { vtkProp *aProp; if (renwin != this->RenderWindow) { // This renderer is be dis-associated with its previous render window. // this information needs to be passed to the renderer's actors and // volumes so they can release and render window specific (or gra...
false
false
false
false
false
0
img_get_field (img_handle img, const char *tag) { int x; if (!img || !tag) return NULL; /* Find the entry with the given tag */ for (x = img->tags - 1; x >= 0; x--) if (img->tag [x].tag) if (strcmp (img->tag [x].tag, tag) == 0) return img->tag [x].data; return NULL; }
false
false
false
false
false
0
musb_suspend(struct device *dev) { struct musb *musb = dev_to_musb(dev); unsigned long flags; musb_platform_disable(musb); musb_generic_disable(musb); spin_lock_irqsave(&musb->lock, flags); if (is_peripheral_active(musb)) { /* FIXME force disconnect unless we know USB will wake * the system up quickly eno...
false
false
false
false
false
0
gfork_l_opts_port( globus_options_handle_t opts_handle, char * cmd, char ** opt, void * arg, int * out_parms_used) { int sc; int ...
false
false
false
false
false
0
is_merged_page(struct f2fs_sb_info *sbi, struct page *page, enum page_type type) { enum page_type btype = PAGE_TYPE_OF_BIO(type); struct f2fs_bio_info *io = &sbi->write_io[btype]; struct bio_vec *bvec; struct page *target; int i; down_read(&io->io_rwsem); if (!io->bio) { up_read(&io->io_rwsem); return ...
false
false
false
false
false
0
initLegInfoAux(QDomElement & element, const LoadInfo & loadInfo, bool & gotOne) { QString id = element.attribute("id"); if (!id.isEmpty()) { int ix = loadInfo.legIDs.indexOf(id); if (ix >= 0) { //DebugDialog::debug("init leg info " + id); //foreach (QString lid, legIDs) { // DebugDialog::debug("\tleg id:...
false
false
false
false
false
0
finished(struct common *common) { DXlock(&common->DXlock, 0); if (--(common->count)==0) DXunlock(&common->done, 0); DXunlock(&common->DXlock, 0); }
false
false
false
false
false
0
ecore_con_event_server_add(Ecore_Con_Server *svr) { /* we got our server! */ Ecore_Con_Event_Server_Add *e; int ev = ECORE_CON_EVENT_SERVER_ADD; e = ecore_con_event_server_add_alloc(); EINA_SAFETY_ON_NULL_RETURN(e); svr->connecting = EINA_FALSE; svr->start_time = ecore_time_get(); svr-...
false
false
false
false
false
0
parseDWOTypeUnits() { if (!DWOTUs.empty()) return; for (const auto &I : getTypesDWOSections()) { DWOTUs.emplace_back(); DWOTUs.back().parseDWO(*this, I.second); } }
false
false
false
false
false
0
mma8452_read_hp_filter(struct mma8452_data *data, int *hz, int *uHz) { int i, ret; ret = i2c_smbus_read_byte_data(data->client, MMA8452_HP_FILTER_CUTOFF); if (ret < 0) return ret; i = mma8452_get_odr_index(data); ret &= MMA8452_HP_FILTER_CUTOFF_SEL_MASK; *hz = mma8452_hp_filter_cutoff[i][ret][0]; *uHz = mma8...
false
false
false
false
false
0
slotDialogAccepted() { AmarokConfig::setOrganizeDirectory( ui->folderCombo->currentText() ); AmarokConfig::setIgnoreThe( m_optionsWidget->postfixThe() ); AmarokConfig::setReplaceSpace( m_optionsWidget->replaceSpaces() ); AmarokConfig::setVfatCompatible( m_optionsWidget->vfatCompatible() ); AmarokCo...
false
false
false
false
false
0
dwc2_get_actual_xfer_length(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan, int chnum, struct dwc2_qtd *qtd, enum dwc2_halt_status halt_status, int *short_read) { u32 hctsiz, count, length; hctsiz = dwc2_readl(hsotg->regs + HCTSIZ(chnum)); if (halt_status == DWC2_...
false
false
false
false
false
0
OGR_G_Equals( OGRGeometryH hGeom, OGRGeometryH hOther ) { VALIDATE_POINTER1( hGeom, "OGR_G_Equals", FALSE ); if (hGeom == NULL) { CPLError ( CE_Failure, CPLE_ObjectNull, "hGeom was NULL in OGR_G_Equals"); return 0; } if (hOther == NULL) { CPLError ( CE_Failure, CPLE_ObjectNull...
false
false
false
false
false
0
_list_item_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) { Evas_Object *ctxpopup, *ic; Elm_Object_Item *it; Evas_Coord x,y; ctxpopup = elm_ctxpopup_add(obj); evas_object_smart_callback_add(ctxpopup, "dismissed", ...
false
false
false
false
false
0
ath5k_txq_release(struct ath5k_softc *sc) { if (sc->txq.setup) { ath5k_hw_release_tx_queue(sc->ah); sc->txq.setup = 0; } }
false
false
false
false
false
0
dpcm_fe_dai_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *fe = substream->private_data; int ret, stream = substream->stream; mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDAT...
false
true
false
false
false
1
GrantRole(GrantRoleStmt *stmt) { Relation pg_authid_rel; Oid grantor; List *grantee_ids; ListCell *item; if (stmt->grantor) grantor = get_roleid_checked(stmt->grantor); else grantor = GetUserId(); grantee_ids = roleNamesToIds(stmt->grantee_roles); /* AccessShareLock is enough since we aren't modif...
false
false
false
false
false
0
check_learn_consistency(const Ngram& ngram) const { // no need to begin a new transaction, as we'll be called from // within an existing transaction from learn() // BEWARE: if the previous sentence is not true, then performance // WILL suffer! size_t size = ngram.size(); for (size_t i = 0; i <...
false
false
false
false
false
0
pdf_open_inline_stream(pdf_document *xref, pdf_obj *stmobj, int length, fz_stream *chain, fz_compression_params *imparams) { pdf_obj *filters; pdf_obj *params; filters = pdf_dict_getsa(stmobj, "Filter", "F"); params = pdf_dict_getsa(stmobj, "DecodeParms", "DP"); /* don't close chain when we close this filter */ ...
false
false
false
false
false
0
fillencseqmapspecstartptr(GtEncseq *encseq, const char *indexname, GtLogger *logger, GtError *err) { bool haserr = false; GtStr *tmpfilename; char *nextstart; unsigned long idx; gt_error_check(err);...
false
false
false
false
false
0
base_name(const char *pathname) { const char *base, *pch; char ch; for (pch = base = pathname; (ch = *pch++) != '\0'; ) if (ch == '/') base = pch; return base; }
false
false
false
false
false
0
free_odb_object(void *o) { git_odb_object *object = (git_odb_object *)o; if (object != NULL) { free(object->raw.data); free(object); } }
false
false
false
false
false
0
agrcount(Aword whr) #else Aint agrcount(whr) Aword whr; #endif { Aword i; Aword count = 0; for (i = OBJMIN; i <= OBJMAX; i++) { if (isLoc(whr)) { if (where(i) == whr) count++; } else if (objs[i-OBJMIN].loc == whr) count++; } return(count); }
false
false
false
false
false
0
set_program_name (const char *argv0) { /* libtool creates a temporary executable whose name is sometimes prefixed with "lt-" (depends on the platform). It also makes argv[0] absolute. But the name of the temporary executable is a detail that should not be visible to the end user and to the test suite....
false
false
false
false
false
0
EffectStr(char const *effect) { AString temp, temp2; int comma = 0; int i; EffectType *ep = FindEffect(effect); temp += ep->name; if(ep->attackVal) { temp2 += AString(ep->attackVal) + " to attack"; comma = 1; } for(i = 0; i < 4; i++) { if(ep->defMods[i].type == -1) continue; if(comma) temp2 += ", ";...
false
false
false
false
false
0
Jim_StackPush(Jim_Stack *stack, void *element) { int neededLen = stack->len + 1; if (neededLen > stack->maxlen) { stack->maxlen = neededLen < 20 ? 20 : neededLen * 2; stack->vector = Jim_Realloc(stack->vector, sizeof(void *) * stack->maxlen); } stack->vector[stack->len] = element; s...
false
false
false
false
false
0
phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) { u32 speed = ethtool_cmd_speed(cmd); if (cmd->phy_address != phydev->addr) return -EINVAL; /* We make sure that we don't pass unsupported values in to the PHY */ cmd->advertising &= phydev->supported; /* Verify the settings we care about. *...
false
false
false
false
false
0
vxml_parser_handle_attrval(vxml_parser_t *vp, struct vxml_output *vo) { uint32 quote; uint32 uc; unsigned generation; vxml_output_check(vo); g_assert(0 == vxml_output_size(vo)); /* * AttValue ::= '"' ([^<&"] | Reference)* '"' * | "'" ([^<&'] | Reference)* "'" */ quote = vxml_next_char(vp); generati...
false
false
false
false
false
0
flickcurl_free_tag_cluster(flickcurl_tag_cluster *tc) { FLICKCURL_ASSERT_OBJECT_POINTER_RETURN(tc, flickcurl_tag_cluster); if(tc->tags) { int i; for(i = 0; tc->tags[i]; i++) free(tc->tags[i]); free(tc->tags); } free(tc); }
false
false
false
false
false
0
MyAddEventHandler(dpy, window, type, mask, func, data) Display *dpy; Window window; int type; unsigned long mask; void (*func)(); XtPointer data; { WindowRec *wp; HandlerRec *hp; caddr_t cdata; TRACE(("MyAddEventHandler(window=%08lx,type=%d)\n", window, type)); if (!Initialized) initialize(); ...
false
false
false
false
false
0
uv__handle_init(uv_loop_t* loop, uv_handle_t* handle, uv_handle_type type) { loop->counters.handle_init++; handle->loop = loop; handle->type = type; handle->flags = 0; ev_init(&handle->next_watcher, uv__next); handle->next_watcher.data = handle; /* Ref the loop until this handle is closed. See uv__...
false
false
false
false
false
0
udisks_linux_drive_object_should_include_device (GUdevClient *client, UDisksLinuxDevice *device, gchar **out_vpd) { gboolean ret; gchar *vpd; ret = FALSE; vpd = NULL; /* The 'block' subsystem encompasse...
false
false
false
false
false
0
SetMetadata( char ** papszMetadata, const char * pszDomain ) { if( !SupportsInstr(INSTR_Band_SetMetadata) ) return GDALPamRasterBand::SetMetadata(papszMetadata, pszDomain); CLIENT_ENTER(); if( !WriteInstr(INSTR_Band_SetMetadata) || !GDALPipeWrite(p, papszM...
false
false
false
false
false
0
glare(game *g) { if (g->is_in_sunlight(g->u.posx, g->u.posy)) g->u.infect(DI_GLARE, bp_eyes, 1, 2, g); }
false
false
false
false
false
0
dialog_destroyed (GtkWidget *dialog, gpointer data) { dialogs --; if (dialogs <= 0) gtk_main_quit (); }
false
false
false
false
false
0
error(std::error_code ec) { if (!ec) return false; outs() << ToolName << ": error reading file: " << ec.message() << ".\n"; outs().flush(); return true; }
false
false
false
false
false
0
get_program_memory_at_address(unsigned int address) { unsigned int uIndex = map_pm_address2index(address); return (uIndex < program_memory_size() && program_memory[uIndex]) ? program_memory[uIndex]->get_opcode() : 0xffffffff; }
false
false
false
false
false
0
sanei_genesys_read_register (Genesys_Device * dev, uint16_t reg, uint8_t * val) { SANE_Status status; SANE_Byte reg8; #ifdef UNIT_TESTING if(dev->usb_mode<0) { *val=0; return SANE_STATUS_GOOD; } #endif /* 16 bit register address space */ if(reg>255) { return sanei_genesys_read_...
false
false
false
false
false
0
parse_block(char *buffer, unsigned len) { size_t i = next_dark(buffer, len, 0); if(i == len) { return NULL; } gcblock *block = malloc(sizeof(gcblock)); block->next = NULL; block->line = 0; block->optdelete = 0; block->words = NULL; block->wordcnt = 0; /* We can't fill these in here */ block->...
false
false
false
false
false
0
endswith(const char *suffix) { lenpos_t lenSuffix = strlen(suffix); if (lenSuffix > sLen) { return false; } return strncmp(s + sLen - lenSuffix, suffix, lenSuffix) == 0; }
false
false
false
false
false
0
report_error(MPI_Comm comm, int errcode, char *errmsg, char *type) { char mpierrmsg[MPI_MAX_ERROR_STRING]; char name[MPI_MAX_OBJECT_NAME+1]; int rank; int cid; int len; MPI_Error_string(errcode, mpierrmsg, &len); if (comm != MPI_COMM_NULL) { MPI_Comm_rank(comm, &rank); if (comm->c_name[0]) { la...
true
true
false
false
false
1
fp_value_constructor5(fp_value_ty *this, time_t a1, time_t a2, time_t a3, string_ty *a4, string_ty *a5) { trace(("fp_value_constructor5(this = %p, oldest = %ld, youngest = %ld, " "stat_mod_time = %ld, cfp = \"%s\", ifp = \"%s\")\n{\n", this, a1, a2, a3, (a4 ? a4->str_text : ""), (a5 ? a5->str_te...
false
false
false
false
false
0
aiReleaseImport( const aiScene* pScene) { if (!pScene) { return; } ASSIMP_BEGIN_EXCEPTION_REGION(); // find the importer associated with this data const ScenePrivateData* priv = ScenePriv(pScene); if( !priv || !priv->mOrigImporter) { delete pScene; } else { // deleting the Importer also deletes the sce...
false
false
false
false
false
0
gvattributeadaptorCacheInsert(EnsPGvattributeadaptor gvaa, EnsPGvattribute *Pgva) { ajuint *Pidentifier = NULL; EnsPGvattribute gva = NULL; if (!gvaa) return ajFalse; if (!gvaa->CacheByIdentifier) return ajFalse; if (!Pgva) retu...
false
false
false
false
false
0
_gcry_ecc_get_param_sexp (const char *name) { unsigned int nbits; elliptic_curve_t E; mpi_ec_t ctx; gcry_mpi_t g_x, g_y; gcry_mpi_t pkey[6]; gcry_sexp_t result; int i; memset (&E, 0, sizeof E); if (_gcry_ecc_fill_in_curve (0, name, &E, &nbits)) return NULL; g_x = mpi_new (0); g_y = mpi_new (...
false
false
false
false
false
0
uvd_v4_2_enable_mgcg(struct amdgpu_device *adev, bool enable) { u32 orig, data; if (enable && (adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG)) { data = RREG32_UVD_CTX(ixUVD_CGC_MEM_CTRL); data = 0xfff; WREG32_UVD_CTX(ixUVD_CGC_MEM_CTRL, data); orig = data = RREG32(mmUVD_CGC_CTRL); data |= UVD_CGC_CTRL__DY...
false
false
false
false
false
0
IMAP_Literal_Read( ITD_Struct *ITD ) { char *fn = "IMAP_Literal_Read()"; int Status; unsigned int i, j; struct pollfd fds[2]; nfds_t nfds; int pollstatus; /* * If there aren't any LiteralBytesRemaining, just return 0. */ if ( ! ITD->LiteralBytesRemaining ) return( 0 ); ...
false
false
false
false
false
0
evemu_device(FILE *fp) { struct evemu_device *dev; int ret = -ENOMEM; int fd; dev = evemu_new(NULL); if (!dev) goto out; ret = evemu_read(dev, fp); if (ret <= 0) goto out; if (strlen(evemu_get_name(dev)) == 0) { char name[64]; sprintf(name, "evemu-%d", getpid()); evemu_set_name(dev, name); } ret ...
false
false
false
false
false
0
fixup_eh_region_note (rtx insn, rtx prev, rtx next) { rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX); if (note == NULL) return; if (!insn_could_throw_p (insn)) remove_note (insn, note); copy_reg_eh_region_note_forward (note, NEXT_INSN (prev), next); }
false
false
false
false
false
0
saa7164_dump_hwdesc(struct saa7164_dev *dev) { dprintk(1, "@0x%p hwdesc sizeof(struct tmComResHWDescr) = %d bytes\n", &dev->hwdesc, (u32)sizeof(struct tmComResHWDescr)); dprintk(1, " .bLength = 0x%x\n", dev->hwdesc.bLength); dprintk(1, " .bDescriptorType = 0x%x\n", dev->hwdesc.bDescriptorType); dprintk(1, " .bDe...
false
false
false
false
false
0
output_arxiv( FILE *fp, fields *info ) { newstr arxiv_url; int i; newstr_init( &arxiv_url ); for ( i=0; i<info->nfields; ++i ) { if ( strcmp( info->tag[i].data, "ARXIV" ) ) continue; arxiv_to_url( info, i, "URL", &arxiv_url ); if ( arxiv_url.len ) fprintf( fp, "%%U %s\n", arxiv_url.data ); } newstr_free(...
false
false
false
false
false
0
SetOutputScalarType(int type) { double scalarMax; vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting OutputScalarType to " << type); scalarMax = this->GetScalarTypeMax(type); if (scalarMax) // legal type { int modified = 0; if (this->CapValue != scalarMax) { thi...
false
false
false
false
false
0
queue_destroy(struct queue *q) { int n; if(q) { ferrcheck(pthread_mutex_lock(&q->m)); q->join = 1; ferrcheck(pthread_cond_broadcast(&q->c)); /* all threads */ ferrcheck(pthread_mutex_unlock(&q->m)); for(n = 0; n < q->nthreads; ++n) ferrcheck(pthread_join(q->threads[n], 0)); free(q->...
false
false
false
false
false
0
get_pos_bfd (bfd **contents, enum pos default_pos, const char *default_posname) { bfd **after_bfd = contents; enum pos realpos; const char *realposname; if (postype == pos_default) { realpos = default_pos; realposname = default_posname; } else { realpos = postype; realposn...
false
false
false
false
false
0
SetHintBits(HeapTupleHeader tuple, Buffer buffer, uint16 infomask, TransactionId xid) { if (TransactionIdIsValid(xid)) { /* NB: xid must be known committed here! */ XLogRecPtr commitLSN = TransactionIdGetCommitLSN(xid); if (XLogNeedsFlush(commitLSN)) return; /* not flushed yet, so don't set hint */ }...
false
false
false
false
false
0
runOnFunction(Function &F) { DEBUG(dbgs() << "[SafeStack] Function: " << F.getName() << "\n"); if (!F.hasFnAttribute(Attribute::SafeStack)) { DEBUG(dbgs() << "[SafeStack] safestack is not requested" " for this function\n"); return false; } if (F.isDeclaration()) { DEBUG(dbg...
false
false
false
false
false
0
start() { //FIXME: QHASH QMap<QString, QVariant> params = parameters(); QString valueGroup = params["group"].toString(); if (valueGroup.isEmpty()) { valueGroup = "default"; } QWeakPointer<StorageJob> me(this); if (operationName() == "save") { QMetaObject::invokeMethod(Plasm...
false
false
false
false
false
0
autohelperowl_defendpat282(int trans, int move, int color, int action) { int c, d, A, B; UNUSED(color); UNUSED(action); c = AFFINE_TRANSFORM(720, trans, move); d = AFFINE_TRANSFORM(722, trans, move); A = AFFINE_TRANSFORM(683, trans, move); B = AFFINE_TRANSFORM(685, trans, move); return (countlib(A)<=3...
false
false
false
false
false
0
soc_probe(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); /* * no card, so machine driver should be registering card * we should not be here in that case so ret error */ if (!card) return -EINVAL; dev_warn(&pdev->dev, "ASoC: machine %s should use snd_soc_register...
false
false
false
false
false
0
yy_setstream(FILE *stream) { int i; #define MAX_STREAMS 16 static struct { FILE *stream; YY_BUFFER_STATE buffer; } streams[MAX_STREAMS] = { {NULL, NULL}, }; static int num_streams = 0; static FILE *last_stream = NULL; /* same stream? */ if (stream == last_stream) return; /* else, switch to...
false
false
false
false
false
0
iwl_mvm_tof_range_abort_cmd(struct iwl_mvm *mvm, u8 id) { struct iwl_tof_range_abort_cmd cmd = { .sub_grp_cmd_id = cpu_to_le32(TOF_RANGE_ABORT_CMD), .request_id = id, }; lockdep_assert_held(&mvm->mutex); if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TOF_SUPPORT)) return -EINVAL; if (id != mvm-...
false
false
false
false
false
0
linkGlobalProto(GlobalVariable *SGV) { GlobalValue *DGV = getLinkedToGlobal(SGV); if (DGV) { // Concatenation of appending linkage variables is magic and handled later. if (DGV->hasAppendingLinkage() || SGV->hasAppendingLinkage()) return linkAppendingVarProto(cast<GlobalVariable>(DGV), SGV); ...
false
false
false
false
false
0
set_hmdf_info( Hmdf_information *hmdf_info, int pc_num, int pe_num ) { if( pc_num > 1 ){ hmdf_info->kind = TYPE_MDF; hmdf_info->pe_num = pe_num; hmdf_info->pc_num = pc_num; }else if( pe_num > 1 ){ hmdf_info->kind = TYPE_INNER; hmdf_info->pe_num = pe_num; hmdf_inf...
false
false
false
false
false
0
isocs7planes (void) { return !(currprefs.chipset_mask & CSMASK_AGA) && bplcon0_res == 0 && bplcon0_planes == 7; }
false
false
false
false
false
0
draw_cal(void) { gchar *utf8, *cal_string; gint w, h; if (!cal_enable) return; cal_string = strftime_format(cal_format, cal_alt_color_string); if (!g_utf8_validate(cal_string, -1, NULL)) { if ((utf8 = g_locale_to_utf8(cal_string, -1, NULL, NULL, NULL)) != NULL) { g_free(cal_string); ca...
false
false
false
false
false
0
NewFunctionFromSharedFunctionInfo( Handle<SharedFunctionInfo> function_info, Handle<Context> context, PretenureFlag pretenure) { Handle<JSFunction> result = BaseNewFunctionFromSharedFunctionInfo( function_info, Top::function_map(), pretenure); result->set_context(*context); int number_of_literal...
false
false
false
false
false
0
output_13 (rtx *operands ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED) { { switch (which_alternative) { case 0: return "sub.l %S0,%S0"; case 7: return "clrmac"; case 8: return "clrmac\n\tldmac %1,macl"; case 9: return "stmac macl,%0"; default: if (GET_CODE (operan...
false
false
false
false
false
0
add_vars_to_targetlist(PlannerInfo *root, List *vars, Relids where_needed, bool create_new_ph) { ListCell *temp; Assert(!bms_is_empty(where_needed)); foreach(temp, vars) { Node *node = (Node *) lfirst(temp); if (IsA(node, Var)) { Var *var = (Var *) node; RelOptInfo *rel = find_base_r...
false
false
false
false
false
0
NonNullIdentSeqs(register e_type E1, register e_type E2) /** If E1 has the same sequence as E2 return TRUE; else return FALSE **/ { register long s,r1,r2; if(E1->n != E2->n) return FALSE; for(s=1; s<= (long) E1->n; s++){ r1 = E1->X[s]; r2 = E2->X[s]; if(r1 != 0 && r2 != 0 && r1 != r2) return FALSE; } return ...
false
false
false
false
false
0
ZB_fillTriangleFlat(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2) { int color; #define INTERP_Z #define DRAW_INIT() \ { \ color = RGB_TO_PIXEL(p2->r, p2->g, p2->b); \ } #define PUT_PIXEL(_a) \ { \ zz = z >> ZB_POINT_Z_FRAC_BITS; \ if (ZCMP(zz, pz[_a])) { \ ...
false
false
false
false
false
0
safe_setter(val) VALUE val; { int level = NUM2INT(val); if (level < ruby_safe_level) { rb_raise(rb_eSecurityError, "tried to downgrade safe level from %d to %d", ruby_safe_level, level); } if (level > SAFE_LEVEL_MAX) level = SAFE_LEVEL_MAX; ruby_safe_level = level; curr_thread->safe = l...
false
false
false
false
false
0
antlr3BitsetLoad(pANTLR3_BITSET_LIST inBits) { pANTLR3_BITSET bitset; ANTLR3_UINT32 count; // Allocate memory for the bitset structure itself // the input parameter is the bit number (0 based) // to include in the bitset, so we need at at least // bit + 1 bits. If any arguments indicate a // a bit higher tha...
false
false
false
false
false
0
denotation_mode (MOID_T * m) { if (primitive_mode (m)) { return (A68_TRUE); } else if (LONG_MODE (m) && long_mode_allowed) { return (A68_TRUE); } else { return (A68_FALSE); } }
false
false
false
false
false
0
append (const OFString& str, size_t pos, size_t n) { OFString b(str, pos, n); this->reserve(this->size() + b.size()); // We can't use strcat() because some string could contain NULL bytes // We need size() + 1 so that the EOS mark is copied over, too OFBitmanipTemplate<char>::copyMem(b.theCString, t...
false
false
false
false
false
0
setControllerRect(const QString &controllerName, const QRectF &rect) { if (d->mControllerMap[controllerName]) { d->mControllerMap[controllerName]->setViewRect(rect); } QDomElement widget = d->mSessionTree->createElement("widget"); widget.setAttribute("controller", controllerName); QDomEleme...
false
false
false
false
false
0
mainwin_destroy_cb(GtkObject *object UNUSED, gpointer data UNUSED) { /* Don't write messages to the GUI anymore */ full_screen = FALSE; gui.mainwin = NULL; gui.drawarea = NULL; if (!exiting) /* only do anything if the destroy was unexpected */ { vim_strncpy(IObuff, (char_u *)_("Vim: Main w...
false
false
false
false
false
0
blkid_probe_is_wholedisk(blkid_probe pr) { dev_t devno, disk_devno; devno = blkid_probe_get_devno(pr); if (!devno) return 0; disk_devno = blkid_probe_get_wholedisk_devno(pr); if (!disk_devno) return 0; return devno == disk_devno; }
false
false
false
false
false
0
setMasterClock(unsigned int frequency) { unsigned int ulReg, divisor; /* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. */ if (getChipType() == SM750LE) return; if (frequency) { /* Set the frequency to the maximum frequency that the SM750 engine can run, which is about 190 MHz. */ if ...
false
false
false
false
false
0
_glewInit_GL_EXT_fragment_lighting (GLEW_CONTEXT_ARG_DEF_INIT) { GLboolean r = GL_FALSE; r = ((glFragmentColorMaterialEXT = (PFNGLFRAGMENTCOLORMATERIALEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentColorMaterialEXT")) == NULL) || r; r = ((glFragmentLightModelfEXT = (PFNGLFRAGMENTLIGHTMODELFEXTPROC)glewGet...
false
false
false
false
false
0
GWEN_Directory_FindPathForFile(const GWEN_STRINGLIST *paths, const char *filePath, GWEN_BUFFER *fbuf) { GWEN_STRINGLISTENTRY *se; se=GWEN_StringList_FirstEntry(paths); while(se) { GWEN_BUFFER *tbuf; FILE *f; tbuf=GWEN_Buffer_new(0...
false
false
false
false
true
1
test_round_near_x (void) { mpfr_t x, y, z, eps; mpfr_exp_t e; int failures = 0, mx, neg, err, dir, r, inex, inex2; char buffer[7], *p; mpfr_inits (x, y, z, eps, (mpfr_ptr) 0); mpfr_set_prec (x, 5); mpfr_set_prec (y, 3); mpfr_set_prec (z, 3); mpfr_set_prec (eps, 2); mpfr_set_ui_2exp (eps, 1, -32, MP...
true
true
false
false
false
1
requestFinished(int id, bool error) { if (id == requestID) { requestID = -1; buffer->seek(0); QString result_txt = buffer->readAll(); delete buffer; QRegExp redir("%%\\s+GLE-Redirect:\\s+(\\S+)\\s+(\\S+)"); if (!error && redir.indexIn(result_txt) != -1) { QString url = redir.capturedTexts()[1]; QS...
false
false
false
false
false
0
report_flush(FILE *errfp) { if (partial_message_size_used != 0) { partial_message_size_used = 0; report(errfp, "%s", partial_message); partial_suppress_tag = 1; } }
false
false
false
false
true
1
OnEditorActivatedTimer(cb_unused wxTimerEvent& event) { // the m_LastEditor variable was updated in CodeCompletion::OnEditorActivated, after that, // the editor-activated-timer was started. So, here in the timer handler, we need to check // whether the saved editor and the current editor are the same, other...
false
false
false
false
false
0
v9fs_cache_inode_get_cookie(struct inode *inode) { struct v9fs_inode *v9inode; struct v9fs_session_info *v9ses; if (!S_ISREG(inode->i_mode)) return; v9inode = V9FS_I(inode); if (v9inode->fscache) return; v9ses = v9fs_inode2v9ses(inode); v9inode->fscache = fscache_acquire_cookie(v9ses->fscache, &v9...
false
false
false
false
false
0
VisitCodeTarget(RelocInfo* rinfo) { CHECK(RelocInfo::IsCodeTarget(rinfo->rmode())); Address target_start = rinfo->target_address_address(); OutputRawData(target_start); Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); serializer_->SerializeObject(target, kFromCode, kFirstInstruction); ...
false
false
false
false
false
0
nm_vpn_manager_activate_connection (NMVPNManager *manager, NMConnection *connection, NMDevice *device, const char *specific_object, gboolean user_requested, ...
false
false
false
false
false
0
named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err) { named_dt_t *dt = *named_dt_head_p; while(dt) { /* Pop the datatype off the stack and free it */ if(H5Tclose(dt->id_out) < 0 && !ignore_err) goto error; dt = dt->next; HDfree(*named_dt_head_p); ...
false
false
false
false
false
0
FindIndex(pkgCache::PkgFileIterator File, pkgIndexFile *&Found) const { for (const_iterator I = SrcList.begin(); I != SrcList.end(); ++I) { vector<pkgIndexFile *> *Indexes = (*I)->GetIndexFiles(); for (vector<pkgIndexFile *>::const_iterator J = Indexes->begin(); J != Indexes->end(); ++J) ...
false
false
false
false
false
0
AddUnfiltered(const CUInt128& id, uint32_t ip, uint16_t port, uint16_t tport, uint8_t version, const CKadUDPKey& key, bool& ipVerified, bool update, bool fromHello, bool fromNodesDat /* = false */) #endif // ADUNANZA END { if (id != me) { CContact *contact = new CContact(id, ip, port, tport, version, key, ipVerified...
false
false
false
false
false
0