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
have_insn_for (enum rtx_code code, enum machine_mode mode) { return (code_to_optab (code) && (optab_handler (code_to_optab (code), mode) != CODE_FOR_nothing)); }
false
false
false
false
false
0
spawn_worker(void) { pid_t f; if ( opt.parallel == 0 ) return 1; fflush(NULL); /* Wait for a work slot */ while ( work_threads >= opt.parallel ) wait_for_one_worker(); /* Spawn worker process */ work_threads++; /* Avoids race conditions */ f = fork(); if ( f == -1 ) { work_threads...
false
false
false
false
false
0
newMap( int h, int w, GenericMap * m ) { _width = w; _height = h; _start = 0; int i; _table = new PathCell *[h]; for( i = 0; i < h; i++ ) { _table[i] = new PathCell[w]; } for( i = 0; i < h; i++ ) { for( int j = 0; j < w; j++ ) { _table[i][j].cell = m->at( i, j ); _table[i][j].prev = 0; _tab...
false
false
false
false
false
0
cell_data_cb (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, GeditFileBrowserView *obj) { GtkTreePath *path; PangoUnderline underline = PANGO_UNDERLINE_NONE; gboolean editable = FALSE; path = gtk_tree_model_ge...
false
false
false
false
false
0
run(Workqueue* workqueue) { Read_relocs_data* rd = new Read_relocs_data; this->object_->read_relocs(rd); this->object_->set_relocs_data(rd); this->object_->release(); // If garbage collection or identical comdat folding is desired, we // process the relocs first before scanning them. Scanning of relocs ...
false
false
false
false
false
0
edit_person_email_modify( gpointer data ) { gboolean errFlg = FALSE; GtkCMCList *clist = GTK_CMCLIST(personeditdlg.clist_email); gint row = personeditdlg.rowIndEMail; ItemEMail *email = gtk_cmclist_get_row_data( clist, row ); if( email ) { edit_person_email_edit( &errFlg, email ); if( ! errFlg ) { gtk_cmcli...
false
false
false
false
false
0
readData(char *data, qint64 maxSize) { qint64 ret = ByteStream::readData(data, maxSize); if (d->sock.state() != BSocket::Connected && !bytesAvailable()) { setOpenMode(QIODevice::NotOpen); } return ret; }
false
false
false
false
false
0
taito_handle_sprite_buffering(void) { if (prepare_sprites) /* no buffering */ { memcpy(spriteram_buffered,spriteram16,spriteram_size); prepare_sprites = 0; } }
false
true
false
false
false
1
_radial( gamut *s, double *ir, /* return input radius (may be NULL) */ double *or, /* return output radius (may be NULL) */ double *out, /* result point (absolute) (may be NULL) */ double *in /* input point (absolute)*/ ) { int j; double ss, rv; double nin[3]; /* Normalised input vector */ if IS_LIST_EMPTY(s->t...
false
false
false
false
false
0
descriptorSURFDistanceTo( const CFeature &oFeature, bool normalize_distances ) const { ASSERT_( this->descriptors.SURF.size() == oFeature.descriptors.SURF.size() ); ASSERT_( this->descriptors.hasDescriptorSURF() && oFeature.descriptors.hasDescriptorSURF() ) float dist = 0.0f; std::vector<float>::const_iterator it...
false
false
false
false
false
0
getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx) { isc_buffer_t *scratch; isc_result_t result; unsigned int tries; scratch = currentbuffer(msg); /* * First try: use current buffer. * Second try: allocate a new buffer and use that. */ tries = 0; while (tries <...
false
false
false
false
false
0
DoesFileExistWithExtensions( const char* name, const std::vector<std::string>& headerExts) { std::string hname; for( std::vector<std::string>::const_iterator ext = headerExts.begin(); ext != headerExts.end(); ++ext ) { hname = name; hname += "."; hname += *ext; if(cmSystemTools::File...
false
false
false
false
false
0
RemoveInvalidXmlCharacters(const string& str) { string output; output.reserve(str.size()); for (string::const_iterator it = str.begin(); it != str.end(); ++it) if (IsValidXmlCharacter(*it)) output.push_back(*it); return output; }
false
false
false
false
false
0
sailormn_unpack_tiles( const int region ) { unsigned char *src = memory_region(region) + (memory_region_length(region)/4)*3 - 1; unsigned char *dst = memory_region(region) + (memory_region_length(region)/4)*4 - 2; while(src <= dst) { unsigned char data = src[0]; dst[0] = ((data & 0x03) << 4) + ((da...
false
false
false
false
false
0
vdp_register_w(int data) { static const UINT8 is_important[32] = { 0,0,1,1,1,1,0,1,0,0,0,1,0,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0 }; UINT8 regnum = (data & 0x1f00) >> 8; /* ---R RRRR ---- ---- */ UINT8 regdat = (data & 0x00ff); /* ---- ---- DDDD DDDD */ segac2_vdp_regs[regnum] = regdat; /* these ...
false
false
false
false
false
0
inv_y_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct i2c_client *client = to_i2c_client(dev); struct rohm_ts_data *ts = i2c_get_clientdata(client); unsigned int val; int error; error = kstrtouint(buf, 0, &val); if (error) return error; error = mutex_loc...
false
false
false
false
false
0
connect_overlap_range(Array_subscript_info *target_array_sub, Array_subscript_info *search_array_sub) { Sub_list *target_sub,*search_sub; Array_subscript_info *ol_range; Overlap_type ol_type; ol_range = and_array_sub(target_array_sub,search_array_sub); ol_type = chk_overlap_type(target_ar...
false
false
false
false
false
0
IsAcceptable(const Integer &candidate) const {return RelativelyPrime(m_e, candidate-Integer::One());}
false
false
false
false
false
0
read_atom(AVFormatContext *s, Atom *atom) { atom->offset = url_ftell(s->pb); atom->size = get_be32(s->pb); if (atom->size < 8) return -1; atom->tag = get_le32(s->pb); dprintf(s, "atom %d %.4s offset %#llx\n", atom->size, (char*)&atom->tag, atom->offset); return atom->size; }
false
false
false
false
false
0
xmlSecNssKWDes3Finalize(xmlSecTransformPtr transform) { xmlSecAssert(xmlSecTransformCheckId(transform, xmlSecNssTransformKWDes3Id)); xmlSecAssert(xmlSecTransformCheckSize(transform, xmlSecNssKWDes3Size)); if(xmlSecNssKWDes3GetKey(transform) != NULL) { xmlSecBufferFinalize(xmlSecNssKWDes3GetKey(transfo...
false
false
false
false
false
0
x509_write_sig( unsigned char **p, unsigned char *start, const char *oid, size_t oid_len, unsigned char *sig, size_t size ) { int ret; size_t len = 0; if( *p - start < (int) size + 1 ) return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); len = size; (*p) -= le...
false
false
false
false
false
0
DoDoMinimize(wxArrayBlockInt &blocks) { // wxBlockInt top, bottom, left, right; bool done = false; for (int i=0; i<int(blocks.GetCount())-1; i++) { for (int j=i+1; j<int(blocks.GetCount()); j++) { if (blocks[i].Combine(blocks[j])) { blocks.RemoveAt(...
false
false
false
false
false
0
addConstructionCosts() { Resources costs = vt.productionCost; ASCString buildingCosts; int energyCost = costs.resource(0); int materialCost = costs.resource(1); int fuelCost = costs.resource(2); buildingCosts = constructEMF(energyCost, materialCost, fuelCost); addTREntry("Production Costs", buildingCosts)...
false
false
false
false
false
0
has_writable_extra_pane (NemoView *view) { NemoView *other_view; other_view = get_directory_view_of_extra_pane (view); if (other_view != NULL) { return !nemo_view_is_read_only (other_view); } return FALSE; }
false
false
false
false
false
0
intel_sdvo_guess_ddc_bus(struct intel_sdvo *sdvo) { uint16_t mask = 0; unsigned int num_bits; /* Make a mask of outputs less than or equal to our own priority in the * list. */ switch (sdvo->controlled_output) { case SDVO_OUTPUT_LVDS1: mask |= SDVO_OUTPUT_LVDS1; case SDVO_OUTPUT_LVDS0: mask |= SDVO_OUTPU...
false
false
false
false
false
0
brcmf_flowring_qlen(struct brcmf_flowring *flow, u8 flowid) { struct brcmf_flowring_ring *ring; ring = flow->rings[flowid]; if (!ring) return 0; if (ring->status != RING_OPEN) return 0; return skb_queue_len(&ring->skblist); }
false
false
false
false
false
0
elm_smart_scroller_single_dir_get(Evas_Object *obj) { API_ENTRY return EINA_FALSE; return sd->one_dir_at_a_time; }
false
false
false
false
false
0
img_table_button_get_property( GObject *object, guint prop_id, GValue *value, GParamSpec *pspec ) { ImgTableButton *button = IMG_TABLE_BUTTON( object ); switch( prop_id ) { case P_ROWS: g_value_set_int( value, img_table_button_get_rows( button ) ); break; case P...
false
false
false
false
false
0
qmonHostHelp(Widget w, XtPointer cld, XtPointer cad) { Widget widget = 0; DENTER(GUI_LAYER, "qmonHostHelp"); switch(dialog_mode) { case SGE_AH_LIST: widget = adminhost_list; break; case SGE_SH_LIST: widget = submithost_list; break; case SGE_HGRP_LIST...
false
false
false
false
false
0
mod_match(dico_handle_t hp, const dico_strategy_t strat, const char *word) { struct dictdb *db = (struct dictdb *) hp; entry_match_t match; if (RESERVED_WORD(db, word)) return NULL; match = find_matcher(strat->name); if (match) return _match_simple(db, match, word); else if (strat->sel) re...
false
false
false
false
false
0
markers_remove_current_instruction(char* file, int line) { GeanyDocument *doc = document_find_by_filename(file); if (doc) { sci_delete_marker_at_line(doc->editor->sci, line - 1, M_CI_ARROW); sci_delete_marker_at_line(doc->editor->sci, line - 1, M_CI_BACKGROUND); scintilla_send_message(doc->editor->sci, SCI_SET...
false
false
false
false
false
0
free_base_data(struct base_data *c) { if (c->data) { free(c->data); c->data = NULL; base_cache_used -= c->size; } }
false
false
false
false
false
0
tst_traverse(tst_t *p, tst_traverse_cb cb, void *data) { if (!p) return; int q_start = 0; int q_size = 0; int q_max = MAX_TRAVERSE_SIZE; tst_t **queue = calloc(sizeof(tst_t *), MAX_TRAVERSE_SIZE); check(queue, "Failed to malloc queue for traverse"); queue[q_start] = p; q_size++; ...
false
false
false
false
false
0
mx_dialog_mapped_cb (ClutterActor *parent, GParamSpec *pspec, ClutterActor *self) { if (CLUTTER_ACTOR_IS_MAPPED (parent)) clutter_actor_map (self); else clutter_actor_unmap (self); }
false
false
false
false
false
0
nv10_gr_save_pipe(struct nv10_gr_chan *chan) { struct nv10_gr *gr = chan->gr; struct pipe_state *pipe = &chan->pipe_state; struct nvkm_device *device = gr->base.engine.subdev.device; PIPE_SAVE(gr, pipe->pipe_0x4400, 0x4400); PIPE_SAVE(gr, pipe->pipe_0x0200, 0x0200); PIPE_SAVE(gr, pipe->pipe_0x6400, 0x6400); PIP...
false
false
false
false
false
0
parse_def(struct line_parser *lp, struct fttag *fttag) { char *c; struct fttag_def *ftd; NEXT_WORD(&lp->buf, c); if (!c) { fterr_warnx("%s line %d: Expecting name.", lp->fname, lp->lineno); return -1; } /* check if it exists */ FT_SLIST_FOREACH(ftd, &fttag->defs, chain) { if (!strcasecmp(c...
false
true
false
false
false
1
pnm_gotonextline (SDL_RWops * file) { char buff; do { SDL_RWread (file, &buff, 1, 1); } while (buff != '\n'); }
false
false
false
false
false
0
rtl8169_open ( struct net_device *netdev ) { struct rtl8169_private *tp = netdev_priv ( netdev ); void *ioaddr = tp->mmio_addr; int rc; DBGP ( "rtl8169_open\n" ); /* allocate transmit descriptors */ rc = rtl8169_setup_tx_resources ( tp ); if ( rc ) { DBG ( "Error setting up TX resources!\n" ); goto err_set...
false
false
false
false
false
0
signal_progress_on(int sig EXT2FS_ATTR((unused))) { e2fsck_t ctx = e2fsck_global_ctx; if (!ctx) return; ctx->progress = e2fsck_update_progress; }
false
false
false
false
false
0
PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os,indent); int numIds=this->PointIds->GetNumberOfIds(); os << indent << "Number Of Points: " << numIds << "\n"; if ( numIds > 0 ) { double *bounds=this->GetBounds(); os << indent << "Bounds: \n"; os << indent << " Xmin,...
false
false
false
false
false
0
bnx2x_phy_read(struct link_params *params, u8 phy_addr, u8 devad, u16 reg, u16 *ret_val) { u8 phy_index; /* Probe for the phy according to the given phy_addr, and execute * the read request on it */ for (phy_index = 0; phy_index < params->num_phys; phy_index++) { if (params->phy[phy_index].addr == phy_add...
false
false
false
false
false
0
ReadBBFile(const char * file,long & nbsol,long & lsol,int *& typesols, const int dim,const int typesol) { MeshIstream frbb(file); int dimlu,typesollu; typesols = 0; long i,n=0; double *sol =0; int sizeoftype[] = { 1, dim ,dim * (dim+1) / 2, dim * dim } ; // char * charoftype[] = { "Scalar" , "dim Vect...
false
false
false
false
false
0
bSetPage( NbkTxtCtls::ePageType ePage ) { // Check if the object has already been created if( ! bIsCreated( ) ) return( FALSE ); // Check that the page identifier is valid if( GetPageCount( ) < ((size_t) ePage + 1) ) return( FALSE ); SetSelection( (size_t) ePage ); return( TRUE ); ...
false
false
false
false
false
0
mklink_fs(filesystem *fs, uint32 parent_nod, const char *name, size_t size, uint8 *b, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime) { uint32 nod = mknod_fs(fs, parent_nod, name, FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO, uid, gid, 0, 0, ctime, mtime); extend_blk(fs, nod, 0, - (int)get_nod(fs, nod)->i_blocks / INO...
false
false
false
false
false
0
rdwrSuper(FILE *fp, struct superblock * sb, int32_t rwflag) { int rc; uint64_t super_offset; union { struct superblock super; char block[PSIZE]; } super; if (use_2ndary_agg_superblock) { super_offset = SUPER2_OFF; } else { super_offset = SUPER1_OFF; } /* * seek to the postion of the primary superbloc...
false
false
false
false
false
0
wrap_add_entry (WrapperEntry *e, int temp) { int x; if (wrap_count + wrap_tempcount >= wrap_size) { wrap_size += WRAPPER_GROW; wrap_list = xnrealloc (wrap_list, wrap_size, sizeof (WrapperEntry *)); } if (!temp && wrap_tempcount) { for (x = wrap_count + wrap_tempcount - 1; x >= wrap_count; --...
false
false
false
false
false
0
resetmem (bool decommit) { int i; if (!shm_start) return; for (i = 0; i < MAX_SHMID; i++) { struct shmid_ds *s = &shmids[i]; int size = s->size; uae_u8 *shmaddr; uae_u8 *result; if (!s->attached) continue; if (!s->natmembase) ...
false
false
false
false
false
0
applicable(const S *ego, const problem *p_, const planner *plnr) { const problem_mpi_rdft2 *p = (const problem_mpi_rdft2 *) p_; return (1 && p->sz->rnk > 1 && (!ego->preserve_input || (!NO_DESTROY_INPUTP(plnr) && p->I != p->O)) && ((p->flags == TRANSPOSED_OUT && p->kind == R2H...
false
false
false
false
false
0
parse_definition_match(struct line_parser *lp, struct ftfil *ftfil) { struct ftfil_match_item *ftmi; struct ftfil_match *ftm; char *c; if (!lp->cur_def) { fterr_warnx("%s line %d: Not in filter-definition mode.", lp->fname, lp->lineno); return -1; } NEXT_WORD(&lp->buf, c); if (!c) { f...
false
false
false
false
false
0
g711_encode(g711_state_t *s, uint8_t g711_data[], const int16_t amp[], int len) { int i; if (s->mode == G711_ALAW) { for (i = 0; i < len; i++) g711_data[i] = linear_to_alaw(amp[i]); /*endfor*/ } else { for (i ...
false
false
false
false
false
0
cifs_local_to_utf16_bytes(const char *from, int len, const struct nls_table *codepage) { int charlen; int i; wchar_t wchar_to; for (i = 0; len && *from; i++, from += charlen, len -= charlen) { charlen = codepage->char2uni(from, len, &wchar_to); /* Failed conversion defaults to a question mark */ if (cha...
false
false
false
false
false
0
OGR_G_GetGeometryRef( OGRGeometryH hGeom, int iSubGeom ) { VALIDATE_POINTER1( hGeom, "OGR_G_GetGeometryRef", NULL ); switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) ) { case wkbPolygon: if( iSubGeom == 0 ) return (OGRGeometryH) ((OGRPolygon *)hGeom...
false
false
false
false
false
0
allChildPlaylists() const { SqlPlaylistList playlists; playlists << childSqlPlaylists(); foreach( SqlPlaylistGroupPtr childGroup, childSqlGroups() ) { playlists << childGroup->allChildPlaylists(); } return playlists; }
false
false
false
false
false
0
displayMessage(const QString & msg, KTitleWidget::MessageType type, int timeOutMs) { // stop the pending timer if present messageTimer->stop(); // set text to messageLabel m_titleWidget->setComment(msg, type); // single shot the resetColors timer (and create it if null) if (timeOutMs > 0) { ...
false
false
false
false
false
0
constArithLocal(VimosImage *ima_in, double constant, VimosOperator optype) { VimosUlong32 i; VimosUlong32 nbpix; /* total number of pixels in images */ double invconst; char modName[] = "constArithLocal"; /* Error handling */ if (ima_in == NULL) { cpl_msg_error(modName, ...
false
false
false
false
false
0
try_rewrite_rhs_to_dst(ir_assignment *ir, fs_reg dst, fs_reg src, fs_inst *pre_rhs_inst, fs_inst *last_rhs_inst) { /* Only attempt if we're doing a direct assignment. */ if (...
false
false
false
false
false
0
get_baseboard_tag(char *tag, int size) { struct cim_baseboard data; if(!tag) { return -1; } if(get_baseboard_data(&data)) { return -1; } if( (strlen(data.tag)+1) > size ) { return -1; } strcpy(tag,data.tag); return 0; }
false
true
false
false
true
1
Read(std::istream &is) { string line, token, arg; // start fresh Clear(); while( getline(is, line) ) { istringstream iss(line); iss >> token >> ws; if( token == "Pin" ) iss >> m_pin; else if( token == "Password" ) getline(iss, m_password); else if( token == "LogFilename" ) getline(iss, m_log_f...
false
false
false
false
false
0
study_remove_child(AmitkObject *object, AmitkObject *child) { gboolean data_set = FALSE; if (AMITK_IS_DATA_SET(child)) { data_set = TRUE; /* need to know now, child might get unrefed before recalc */ g_signal_handlers_disconnect_by_func(G_OBJECT(child), G_CALLBACK(study_recalc_voxel_dim), object); } ...
false
false
false
false
false
0
dominated_by_forbidden (basic_block bb) { unsigned dom_bb; bitmap_iterator bi; EXECUTE_IF_SET_IN_BITMAP (forbidden_dominators, 1, dom_bb, bi) { if (dominated_by_p (CDI_DOMINATORS, bb, BASIC_BLOCK (dom_bb))) return true; } return false; }
false
false
false
false
false
0
action_start_volume_callback (GtkAction *action, gpointer data) { NemoFile *file; GList *selection, *l; NemoView *view; GMountOperation *mount_op; view = NEMO_VIEW (data); selection = nemo_view_get_selection (view); for (l = selection; l != NULL; l = l->next) { file = NEMO_FILE (l->data); ...
false
false
false
false
false
0
cm_detach_state(CM_t *cm, int insert1, int insert2) { /*printf("\t**in cm_detach_state: insert1: %d | insert2: %d\n", insert1, insert2);*/ int ret_val; int x, y; int to_detach; int x_offset; ret_val = FALSE; if(insert1 == insert2) cm_Fail("ERROR in cm_detach_state: insert1==insert2:%d\n", insert1);...
false
false
false
false
false
0
kex_agree_instr(unsigned char *haystack, unsigned long haystack_len, const unsigned char *needle, unsigned long needle_len) { unsigned char *s; /* Haystack too short to bother trying */ if (haystack_len < needle_len) { return NULL; } /* Needle at start of haystack */ if...
false
false
false
false
false
0
Realise(Surface &surface, int zoomLevel, int technology) { PLATFORM_ASSERT(fontName); sizeZoomed = size + zoomLevel * SC_FONT_SIZE_MULTIPLIER; if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1 sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER; float deviceHeight = surface.DeviceHeightFont(sizeZoo...
false
false
false
false
false
0
LI35__CLOSE_INLINE_BLOCKS__cmpinline() { VMB35 VMS35 VMV35 goto TTL; TTL:; {register object V325; V325= (((object)VV[26])->s.s_dbind); if(!(type_of((V325))==t_cons)){ goto T785;} if(!(eql(CMPcdr((V325)),((object)VV[75])))){ goto T788;} princ_str("restore_avma;",((object)VV[29])); goto T788; T788:; V325= CMP...
false
false
false
false
false
0
ipa_reference_get_not_written_global (struct cgraph_node *fn) { ipa_reference_optimization_summary_t info = get_reference_optimization_summary (fn); if (info) return info->statics_not_written; else if (flags_from_decl_or_type (fn->symbol.decl) & ECF_LEAF) return all_module_statics; else return N...
false
false
false
false
false
0
Activate() { CheckClient("Activate"); int res = fClient->Activate(); fIsActivated++; if (fIsDeactivated) *fStream << "Client '" << fClientName << "' call activate a new time (it already call 'activate' previously)." << endl; *fStream << "Client '" << fClientName << "' Activated" << endl; ...
false
false
false
false
false
0
do_convert_effects(struct dlm_rsb *r, struct dlm_lkb *lkb, int error) { switch (error) { case 0: grant_pending_locks(r, NULL); /* grant_pending_locks also sends basts */ break; case -EAGAIN: if (force_blocking_asts(lkb)) send_blocking_asts_all(r, lkb); break; case -EINPROGRESS: send_blockin...
false
false
false
false
false
0
snd_pod_control_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol); struct usb_line6_pod *pod = (struct usb_line6_pod *)line6pcm->line6; if (ucontrol->value.integer.value[0] == pod->monitor_level) return 0; po...
false
false
false
false
false
0
lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats) { BlockNumber old_rel_pages = vacrelstats->rel_pages; BlockNumber new_rel_pages; PGRUsage ru0; int lock_retry; pg_rusage_init(&ru0); /* * Loop until no more truncating can be done. */ do { /* * We need full exclusive lock on the relation ...
false
false
false
false
false
0
_base_sas_log_info(struct MPT3SAS_ADAPTER *ioc , u32 log_info) { union loginfo_type { u32 loginfo; struct { u32 subcode:16; u32 code:8; u32 originator:4; u32 bus_type:4; } dw; }; union loginfo_type sas_loginfo; char *originator_str = NULL; sas_loginfo.loginfo = log_info; if (sas_loginfo.dw.bus_...
false
false
false
false
false
0
track(const QString &menuId, const QString &menuName, const QHash<QString,KService::Ptr>& includeList, const QHash<QString,KService::Ptr>& excludeList, const QHash<QString,KService::Ptr>& itemList, const QString &comment) { if (itemList.contains(menuId)) printf("%s: %s INCL %d EXCL %d\n", qPrintable(menuName),...
false
false
false
false
false
0
gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, mp_bitcnt_t nbits) { mp_bitcnt_t bi; mp_limb_t ranm; /* buffer for random bits */ unsigned cap_chunksize, chunksize; mp_size_t i; /* Set entire result to 111..1 */ i = BITS_TO_LIMBS (nbits) - 1; rp[i] = GMP_NUMB_MAX >> (GMP_NUMB_BITS - (nbits % GMP_NUMB_...
false
false
false
false
false
0
getPortCountByType(const LADSPA_Descriptor * psDescriptor, const LADSPA_PortDescriptor iType) { unsigned long lCount; unsigned long lIndex; lCount = 0; for (lIndex = 0; lIndex < psDescriptor->PortCount; lIndex++) if ((psDescriptor->PortDescriptors[lIndex] & iType) == iType) lCount++; r...
false
false
false
false
false
0
handleBaseTurn( GenericPlayer * player, GenericBase * base ) { //player->addPopulation( base->getPopulation() ); GenericBaseModel * baseModel = DataTheme.bases.at( base->getRace() ); QList<Action *> list = base->getActionList( Action::DATE ); handleActionListDate( list, player, base->getResourceList() ); _se...
false
false
false
false
false
0
DoWrap3args ( Obj self, Obj arg1, Obj arg2, Obj arg3 ) { Obj result; /* value of function call, result */ Obj args; /* arguments list */ /* make the arguments ...
false
false
false
false
false
0
GetMySafePlanets() { vector<Planet*> safe_planets; for(map<int, PlanetState*>::iterator it = planets_state.begin(); it != planets_state.end(); ++it) { if(!it->second->IsUnsafePlanet() && it->second->GetPlanet()->Owner() == 1) safe_planets.push_back(it->second->GetPlanet()); } return safe_planets; }
false
false
false
false
false
0
intel_dp_max_link_bw(struct intel_dp *intel_dp) { int max_link_bw = intel_dp->dpcd[DP_MAX_LINK_RATE]; switch (max_link_bw) { case DP_LINK_BW_1_62: case DP_LINK_BW_2_7: case DP_LINK_BW_5_4: break; default: WARN(1, "invalid max DP link bw val %x, using 1.62Gbps\n", max_link_bw); max_link_bw = DP_LINK...
false
false
false
false
false
0
php_output_handler_alias_register(const char *name, size_t name_len, php_output_handler_alias_ctor_t func TSRMLS_DC) { if (!EG(current_module)) { zend_error(E_ERROR, "Cannot register an output handler alias outside of MINIT"); return FAILURE; } return zend_hash_update(&php_output_handler_aliases, name, name_len+...
false
false
false
false
false
0
bnad_cq_cleanup(struct bnad *bnad, struct bna_ccb *ccb) { struct bna_cq_entry *cmpl; int i; for (i = 0; i < ccb->q_depth; i++) { cmpl = &((struct bna_cq_entry *)ccb->sw_q)[i]; cmpl->valid = 0; } }
false
false
false
false
false
0
gline(i, ap) register int i; register int *ap; { if (is_null_line) { /* * If there is no current line, we pretend the line is * either "~" or "", depending on the "twiddle" flag. */ if (twiddle) { if (i == 0) { *ap = AT_BOLD; return '~'; } --i; } /* Make sure we're back to AT_...
false
false
false
false
false
0
_mesa_base_format_to_integer_format(GLenum format) { switch(format) { case GL_RED: return GL_RED_INTEGER; case GL_GREEN: return GL_GREEN_INTEGER; case GL_BLUE: return GL_BLUE_INTEGER; case GL_RG: return GL_RG_INTEGER; case GL_RGB: return GL_RGB_INTEGER; case GL_RGBA: ...
false
false
false
false
false
0
amdgpu_ring_alloc(struct amdgpu_ring *ring, unsigned ndw) { int r; /* make sure we aren't trying to allocate more space than there is on the ring */ if (ndw > (ring->ring_size / 4)) return -ENOMEM; /* Align requested size with padding so unlock_commit can * pad safely */ amdgpu_ring_free_size(ring); ndw = (n...
false
false
false
false
false
0
sv_sheet_visibility_changed (Sheet *sheet, G_GNUC_UNUSED GParamSpec *pspec, SheetView *sv) { g_return_if_fail (IS_SHEET_VIEW (sv)); /* See bug 366477. */ if (sheet_is_visible (sheet) && !wb_view_cur_sheet (sv->sv_wbv)) wb_view_sheet_focus (sv->sv_wbv, sheet); }
false
false
false
false
false
0
rb_struct_members(s) VALUE s; { VALUE members = rb_struct_s_members(rb_obj_class(s)); if (RSTRUCT(s)->len != RARRAY(members)->len) { rb_raise(rb_eTypeError, "struct size differs (%d required %d given)", RARRAY(members)->len, RSTRUCT(s)->len); } return members; }
false
false
false
false
false
0
test_object_tree_write__from_memory(void) { // write a tree from a memory git_treebuilder *builder; git_tree *tree; git_oid id, bid, rid, id2; git_oid_fromstr(&id, first_tree); git_oid_fromstr(&id2, second_tree); git_oid_fromstr(&bid, blob_oid); //create a second tree from first tree using `git_treebuilder_...
false
false
false
false
false
0
addClient(SVGStyledElement* item) { if (m_clients.contains(item)) return; m_clients.add(item); ResourceSet* target = clientMap().get(item); if (!target) target = new ResourceSet; SVGResourceType type = resourceType(); if (SVGResource* oldResource = target->resources[type]) ...
false
false
false
false
false
0
EmitCommonSymbol(MCSymbol *S, uint64_t Size, unsigned ByteAlignment) { auto *Symbol = cast<MCSymbolELF>(S); getAssembler().registerSymbol(*Symbol); if (!Symbol->isBindingSet()) { Symbol->setBinding(ELF::STB_GLOBAL); Symbol->setExternal(true); } Symbol->setType(EL...
false
false
false
false
false
0
zReadBNTreeModel (FILE *stream, zBNTreeModel *model) { int i; char type[64]; char name[64]; int length, focus, order; /* parse the model header */ if (fscanf(stream, "%s %s %d", name, type, &order) != 3) { zWarn("zReadBNTreeModel header failed"); return 0; } /* set model attributes */ model->order = ord...
false
false
false
false
false
0
gtk_term_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkTerm *term; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_TERM (widget)); g_return_if_fail (requisition != NULL); term = GTK_TERM (widget); requisition->width = (term->twidth * term->cwidth) + (widget->style->xthickness *...
false
false
false
false
false
0
Create_Malloc_Atom(char *str) { int atom; int nb = nb_atom; atom = Create_Atom(str); if (nb == nb_atom) Free(str); return atom; }
false
false
false
false
false
0
state_save(int n) { FILE *f; char *name; if (n < 0) n = saveslot; if (n < 0) n = 0; name = malloc(strlen(saveprefix) + 5); sprintf(name, "%s.%03d", saveprefix, n); if ((f = fopen(name, "wb"))) { savestate(f); fclose(f); } free(name); }
false
true
false
false
true
1
doAdd() { QStringList blacklist; blacklist << QString( "cn=manager,cn=internal,%1" ).arg( Connection::self()->baseDn() ); blacklist << QString( "cn=calendar,cn=internal,%1" ).arg( Connection::self()->baseDn() ); blacklist << QString( "cn=nobody,cn=internal,%1" ).arg( Connection::self()->base...
false
false
false
false
false
0
recover_conversion(struct dlm_rsb *r) { struct dlm_ls *ls = r->res_ls; struct dlm_lkb *lkb; int grmode = -1; list_for_each_entry(lkb, &r->res_grantqueue, lkb_statequeue) { if (lkb->lkb_grmode == DLM_LOCK_PR || lkb->lkb_grmode == DLM_LOCK_CW) { grmode = lkb->lkb_grmode; break; } } list_for_each_e...
false
false
false
false
false
0
ConfigureRelativePaths() { // Relative path conversion inside the source tree is not used to // construct relative paths passed to build tools so it is safe to // even when the source is a network path. std::string source = this->FindRelativePathTopSource(); this->RelativePathTopSource = source; // The cur...
false
false
false
false
false
0
ct_pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) { struct ct_atc *atc = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct ct_atc_pcm *apcm = runtime->private_data; switch (cmd) { case SNDRV_PCM_TRIGGER_START: atc->pcm_capture_start(atc, apcm); ...
false
false
false
false
false
0
isSphereInFrustum( float x, float y, float z, float radius ) { int i; for (i = 0; i < 6; i ++) if (frustum[i][0] * x + frustum[i][1] * y + frustum[i][2] * z + frustum[i][3] <= -radius) return false; return true; }
false
false
false
false
false
0
replace(int iSys, int iPosOld, int iPosNew) { if (systems[iSys].iInA == iPosOld) { systems[iSys].iInA = iPosNew; return; } if (systems[iSys].iInB == iPosOld) { systems[iSys].iInB = iPosNew; return; } for (int i = 0; i < sizeOut(iSys); ++i) if (systems[iSys].iOut[i] == iPosOld) { system...
false
false
false
false
false
0
gfx_v7_0_cp_compute_fini(struct amdgpu_device *adev) { int i, r; for (i = 0; i < adev->gfx.num_compute_rings; i++) { struct amdgpu_ring *ring = &adev->gfx.compute_ring[i]; if (ring->mqd_obj) { r = amdgpu_bo_reserve(ring->mqd_obj, false); if (unlikely(r != 0)) dev_warn(adev->dev, "(%d) reserve MQD bo f...
false
false
false
false
false
0
from_kqid(struct user_namespace *targ, struct kqid kqid) { switch (kqid.type) { case USRQUOTA: return from_kuid(targ, kqid.uid); case GRPQUOTA: return from_kgid(targ, kqid.gid); case PRJQUOTA: return from_kprojid(targ, kqid.projid); default: BUG(); } }
false
false
false
false
false
0