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
insert(char *txt, int len) { if (!entry || !len || !txt) return; lock(); gtk_editable_delete_selection(GTK_EDITABLE(entry)); unlock(); int pos = position(); gtk_editable_insert_text(GTK_EDITABLE(entry), txt, len, &pos); }
false
false
false
false
false
0
io_wget (uaecptr addr) { addr &= 0xffff; if (addr != 0) return 0; return io_reg; }
false
false
false
false
false
0
PSDrawSetcol(GPSWindow ps) { _GPSDraw_SetClip(ps); if ( ps->ggc->fg!=ps->cur_fg || ps->ggc->ts!=ps->cur_ts ) { _GPSDraw_FlushPath(ps); if ( ps->ggc->ts!=ps->cur_ts ) { if ( ps->ggc->ts ) { fprintf( ps->output_file, "currentcolor DotPattern setpattern\n" ); ps->cur_ts = ps->ggc->ts; } else { f...
false
false
false
false
false
0
scm_module_transformer (SCM module) { if (scm_is_false (module)) return SCM_BOOL_F; else return SCM_MODULE_TRANSFORMER (module); }
false
false
false
false
false
0
IDtoSTV(const UnicodeString& id, UnicodeString& source, UnicodeString& target, UnicodeString& variant, UBool& isSourcePresent) { source.setTo(ANY, 3); target.trunca...
false
false
false
false
false
0
stream_profile_used_count (GstEncodeBin * ebin, GstEncodingProfile * sprof) { guint nbprofused = 0; GList *tmp; for (tmp = ebin->streams; tmp; tmp = tmp->next) { StreamGroup *sgroup = (StreamGroup *) tmp->data; if (sgroup->profile == sprof) nbprofused++; } return nbprofused; }
false
false
false
false
false
0
add_opts(char *opts) { char *newopt; int l; int dos_off, ext2_off; dos_off = strlen(dos_options); ext2_off = strlen(ext2_options); while(opts && *opts) { newopt = strchr(opts, ','); if(newopt) { l = newopt - opts; newopt++; } else l = strlen(opts); if((add_opt(allowed_...
false
false
false
false
false
0
headerData( int section, Qt::Orientation orientation, int role ) const { if( orientation == Qt::Horizontal && role == Qt::DisplayRole ) return m_rootItem->data( section ); return QVariant(); }
false
false
false
false
false
0
xmlRelaxNGValidErrorPop(xmlRelaxNGValidCtxtPtr ctxt) { xmlRelaxNGValidErrorPtr cur; if (ctxt->errNr <= 0) { ctxt->err = NULL; return; } ctxt->errNr--; if (ctxt->errNr > 0) ctxt->err = &ctxt->errTab[ctxt->errNr - 1]; else ctxt->err = NULL; cur = &ctxt->errTab[...
false
false
false
false
false
0
S_Start(void) { int cnum; int mnum; // kill all playing sounds at start of level // (trust me - a good idea) for (cnum=0 ; cnum<snd_channels ; cnum++) { if (channels[cnum].sfxinfo) { S_StopChannel(cnum); } } // start new music for the level mus_...
false
false
false
false
false
0
getChannels(char *ipaddr) { char destname[512], url[512]; struct stat age; time_t now, d; pid_t kid; global.debug("ChannelSplitter","getChannels",ipaddr); channels.clear(); if (! global.RetrieveChannelNames) return; snprintf(destname,512,"/tmp/eboard-chlist-%s-%d.tmp", ipaddr, getuid() ); chlis...
false
false
false
false
false
0
extractQString( KJS::ExecState *exec, const KJS::List &args, int idx, const QString defaultValue ) { if( args.size() > idx ) { return extractQString( exec, args[idx] ); } return defaultValue; }
false
false
false
false
false
0
duser_free(int bytes, int which_end) { if ( which_end == HEAD ) { stack.top1 -= bytes; } else { stack.top2 += bytes; } stack.used -= bytes; }
false
false
false
false
false
0
free_qline (struct state *st, struct qline *qline, struct qline *prev, struct qix *qix) { int i; if (qline->dead || !prev) ; else if (st->solid_p) { XPoint points [4]; /*assert(qix->npoly == 2);*/ points [0].x = qline->p[0].x >> SCALE; points [0].y = qline->p[0].y >...
false
false
false
false
false
0
generate_rhs_id(ast_id* i) { if (i->getSymInfo()->getType()->is_node_iterator()) { /* if (i->getSymInfo()->find_info_bool(GPS_FLAG_COMM_SYMBOL)) { // transmitted information if (!this->is_receiver_generate()) { // master generate get_lib()->generate_node_iterator_rhs(i, B...
false
false
false
false
false
0
maybe_delete_uri (EBookBackendFile *bf, const gchar *uri) { GError *error = NULL; gchar *filename; /* A uri that does not give us a filename is certainly not * a uri that we created for a local file, just skip it */ if ((filename = g_filename_from_uri (uri, NULL, NULL)) == NULL) return; /*...
false
false
false
false
false
0
CopyEvent(uint64 eventId, time_t newTime, ObjectGuid const& guid) { Player* player = sObjectMgr.GetPlayer(guid); CalendarEvent* event = GetEventById(eventId); if (!event) { SendCalendarCommandResult(player, CALENDAR_ERROR_EVENT_INVALID); return; } CalendarEvent* newEvent = AddEv...
false
false
false
false
false
0
goc_circle_draw (GocItem const *item, cairo_t *cr) { GocCircle *circle = GOC_CIRCLE (item); double scale = (circle->radius > 0.)? circle->radius: 1.e-10; cairo_save (cr); _goc_item_transform (item, cr, TRUE); goc_group_cairo_transform (item->parent, cr, circle->x, circle->y); cairo_scale (cr, scale, scale); cai...
false
false
false
false
false
0
F_TextWrite (void) { byte* src; byte* dest; int x,y,w; signed int count; char* ch; int c; int cx; int cy; // erase the entire screen to a tiled background src = W_CacheLumpName ( finaleflat , PU_CACHE); dest = I_VideoBuffer; for (y=0 ; y<SCREENHEIGHT ; y++...
false
true
false
false
false
1
GDALDownsampleChunk32R_Near( int nSrcWidth, int nSrcHeight, GDALDataType eWrkDataType, void * pChunk, GByte * pabyChunkNodataMask_unused, int nChunkXOff, int nChunkXSize, int nChunkYOff, int nChunkYSi...
false
false
false
false
false
0
rtl8180_write_phy(struct ieee80211_hw *dev, u8 addr, u32 data) { struct rtl8180_priv *priv = dev->priv; int i = 10; u32 buf; buf = (data << 8) | addr; rtl818x_iowrite32(priv, (__le32 __iomem *)&priv->map->PHY[0], buf | 0x80); while (i--) { rtl818x_iowrite32(priv, (__le32 __iomem *)&priv->map->PHY[0], buf); ...
false
false
false
false
false
0
scm_c_substring2str (SCM obj, char *str, size_t start, size_t len) { scm_c_issue_deprecation_warning ("scm_c_substring2str is deprecated. Use scm_substring plus scm_to_locale_stringbuf instead."); if (start) obj = scm_substring (obj, scm_from_size_t (start), SCM_UNDEFINED); scm_to_locale_stringbuf (obj...
false
false
false
false
false
0
slapi_attr_get_bervals_copy( Slapi_Attr *a, struct berval ***vals ) { int retVal= 0; if ( NULL == vals ) { return -1; } if(NULL==a || valueset_isempty(&a->a_present_values)) { *vals = NULL; } else { Slapi_Value **va= valueset_get_valuearray(&a->a_present_values); valuearray_get_bervalarray(...
false
false
false
false
false
0
combinePathAndFile ( const char *const path, const char *const file) { vString *const filePath = vStringNew (); #ifdef VMS const char *const directoryId = strstr (file, ".DIR;1"); if (directoryId == NULL) { const char *const versionId = strchr (file, ';'); vStringCopyS (filePath, path); if (versionId == NU...
false
false
false
false
false
0
h_msb_write_block(struct memstick_dev *card, struct memstick_request **out_mrq) { struct msb_data *msb = memstick_get_drvdata(card); struct memstick_request *mrq = *out_mrq = &card->current_mrq; struct scatterlist sg[2]; u8 intreg, command; if (mrq->error) return msb_exit_state_machine(msb, mrq->error); a...
false
false
false
false
false
0
PackExtensionMapList(extension_map_list_t *extension_map_list) { extension_info_t *l; int i, free_slot; dbg_printf("Pack extensions maps\n"); // compact extension map list - close gaps // clear current list for ( i=0; i <= extension_map_list->max_used; i++ ) { extension_map_list->slot[i] = NULL; } // hangle ...
false
false
false
false
false
0
W3 (WorkerData *arg, int id) { WorkerData larg; FieldInfo *info; Error ret; larg = *arg; info = larg.dst + id; if (info->data == NULL) return (OK); ret = _dxfExtractFieldElement (larg.global, info, larg.element, 0, 1); return (ret); }
false
false
false
false
false
0
print_command_table(const struct cavan_command_map *p, size_t size) { const struct cavan_command_map *p_end; if (size == 0) { return; } println("Available command is:"); for (p_end = p + size - 1; p < p_end; p++) { print("%s, ", p->name); } print_string(p->name); }
false
false
false
false
false
0
cs_bfs (const cs *A, int n, int *wi, int *wj, int *queue, const int *imatch, const int *jmatch, int mark) { int *Ap, *Ai, head = 0, tail = 0, j, i, p, j2 ; cs *C ; for (j = 0 ; j < n ; j++) /* place all unmatched nodes in queue */ { if (imatch [j] >= 0) continue ; /* skip j if matc...
false
false
false
false
false
0
operator=( const CbcHeuristicLocal & rhs) { if (this != &rhs) { CbcHeuristic::operator=(rhs); matrix_ = rhs.matrix_; numberSolutions_ = rhs.numberSolutions_; swap_ = rhs.swap_; delete [] used_; if (model_ && rhs.used_) { int numberColumns = model_->solver(...
false
false
false
false
false
0
gnc_reconcile_view_toggle_children (Account *account, GNCReconcileView *view, Split *split) { GList *child_accounts, *node; Transaction *transaction; /* * Need to get all splits in this transaction and identify any that are * in the same hierarchy as the account being reconciled (not necess...
false
false
false
false
false
0
SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't ...
false
false
false
false
false
0
release_ep_resources(struct c4iw_ep *ep) { set_bit(RELEASE_RESOURCES, &ep->com.flags); c4iw_put_ep(&ep->com); }
false
false
false
false
false
0
print_name_offset(struct seq_file *m, unsigned long addr) { char symname[KSYM_NAME_LEN]; if (lookup_symbol_name(addr, symname) < 0) seq_printf(m, "<%p>", (void *)addr); else seq_printf(m, "%s", symname); }
false
false
false
false
false
0
findProtocol(const KUrl &url) { QString protocol = url.protocol(); if ( !KProtocolInfo::proxiedBy( protocol ).isEmpty() ) { QString dummy; protocol = KProtocolManager::slaveProtocol(url, dummy); } return KProtocolInfoFactory::self()->findProtocol(protocol); }
false
false
false
false
false
0
CommandShowOutput(char *UNUSED(sz)) { outputf(fOutputMatchPC ? _("Match winning chances will be shown as percentages.\n") : _("Match winning chances will be shown as probabilities.\n")); if (fOutputMWC) outputl(_("Match equities shown in MWC (match winning chance) " "(match pla...
false
false
false
false
false
0
EmitSwapFPIntRetval( const MCSubtargetInfo &STI, Mips16HardFloatInfo::FPReturnVariant RV, bool LE) { using namespace Mips16HardFloatInfo; unsigned MovOpc = Mips::MFC1; switch (RV) { case FRet: EmitInstrRegReg(STI, MovOpc, Mips::V0, Mips::F0); break; case DRet: EmitMovFPIntPair(STI, MovOpc,...
false
false
false
false
false
0
__ecereNameSpace__ecere__sys__StripExtension(char * string) { int c; for(c = strlen(string); c >= 0; c--) if(string[c] == '.') { string[c] = '\0'; return 0x1; } else if(string[c] == '\\' || string[c] == '/') break; return 0x0; }
false
false
false
false
false
0
__getItemType() { if (__itemName == "elements") { return FunctionExpressionMeshReferences::element; } if (__itemName == "vertices") { return FunctionExpressionMeshReferences::vertex; } return FunctionExpressionMeshReferences::undefined; }
false
false
false
false
false
0
add_cfgsym(char *libnam, struct tnode_t *tnp) { struct tnode_t *ntnp; char s1[RECLEN]; if (tnp == NULL) return; add_cfgsym(libnam, tnp->lp); // AIV FIXME ??? sprintf(s1, "%s.%s", libnam, tnp->ndp->synam); if (tnp->ndp->cfg_needed) { strcpy(s1, tnp->ndp->synam); ntnp = __vtfind(s1, __modsyms); ...
true
true
false
false
false
1
getUser() const { const Use *End = getImpliedUser(); const UserRef *ref = reinterpret_cast<const UserRef*>(End); return ref->getInt() ? ref->getPointer() : (User*)End; }
false
false
false
false
false
0
write_write_err(void) { if (errno == EINVAL) return NFS3ERR_INVAL; else if (errno == EFBIG) return NFS3ERR_FBIG; else if (errno == ENOSPC) return NFS3ERR_NOSPC; #ifdef EDQUOT else if (errno == EDQUOT) return NFS3ERR_DQUOT; #endif else return NFS3ERR_IO; }
false
false
false
false
false
0
st_sensors_i2c_read_multiple_byte( struct st_sensor_transfer_buffer *tb, struct device *dev, u8 reg_addr, int len, u8 *data, bool multiread_bit) { if (multiread_bit) reg_addr |= ST_SENSORS_I2C_MULTIREAD; return i2c_smbus_read_i2c_block_data_or_emulated(to_i2c_client(dev), reg_addr, len, data); }
false
false
false
false
false
0
ComputeMediaStorageFromModality(const char *modality, unsigned int dimension, PixelFormat const & pixeltype, PhotometricInterpretation const & pi, double intercept , double slope ) { // FIXME: Planar Configuration (0028,0006) shall not be present MediaStorage ms = MediaStorage::SecondaryCaptureImageStorage;...
false
false
false
false
false
0
GuessParameters( SizeValueType numberOfGradientEstimates, double initialStepSize) { /** Guess A */ this->SetA(static_cast< double >( this->GetMaximumNumberOfIterations() ) / 10.0); if ( !m_CostFunction ) { itkExceptionMacro(<< "No objective function defined! "); } /** The number of parameters:...
false
false
false
false
false
0
send_to_self_match(MPI_Request send, MPI_Request recv) { int len; /* # bytes to transfer */ recv->rq_seq = send->rq_seq; if (recv->rq_type == LAM_RQIPROBE) { /* * The receive is actually a probe so the send is not complete. */ lam_ssi_rpi_fill_mpi_status(recv, send->rq_rpi->cq_env.ce_rank, send->rq_r...
false
false
false
false
false
0
getNodes(vector<Node*>& values) { NodeMap::container::iterator it=nodeMap.begin(), itE=nodeMap.end(); while (it != itE) { values.push_back(it->second); ++it; } }
false
false
false
false
false
0
processYUV_YUV(imageStruct &image, imageStruct &right){ int y1,y2; int u,v,u1,v1; long width,h,w; long src =0; width = image.xsize/2; //format is U Y V Y for (h=0; h<image.ysize; h++){ for(w=0; w<width; w++){ /* u = (((image.data[src] - 128) * imageGain)>>8)+128; u1 = (((right.data[src] -...
false
false
false
false
false
0
setkey(struct crypto_tfm *parent, const u8 *key, unsigned int keylen) { struct priv *ctx = crypto_tfm_ctx(parent); struct crypto_cipher *child = ctx->tweak; int err; err = xts_check_key(parent, key, keylen); if (err) return err; /* we need two cipher instances: one to compute the initial 'tweak' * by en...
false
false
false
false
false
0
ar9003_hw_selfgen_tpc_txpower(struct ath_hw *ah, struct ath9k_channel *chan, u8 *pwr_array) { u32 val; /* target power values for self generated frames (ACK,RTS/CTS) */ if (IS_CHAN_2GHZ(chan)) { val = SM(pwr_array[ALL_TARGET_LEGACY_1L_5L], AR_TPC_ACK) | SM(pwr_array[ALL_TARGET_LEGACY_1L_5L],...
false
false
false
false
false
0
output_actions() { nvectors = 3*nstates + nvars; froms = NEW2(nvectors, Yshort *); tos = NEW2(nvectors, Yshort *); tally = NEW2(nvectors, Yshort); width = NEW2(nvectors, Yshort); if (SRtotal+RRtotal) conflicts = NEW2(4*(SRtotal+RRtotal), Yshort); else conflicts = 0; nconflicts = 0; ...
false
false
false
false
false
0
RemoveContents(InvalidComponentHandle handle) { switch(handle->type) { case IC_ALL_UNMARKED: case IC_ALL_MARKED: { break; } case IC_DEP_ARRAY: case IC_SORTED_LIST: { if (handle->array) { DXDelete((Object)handle->array); handle->array = NULL; handle->data = NULL; } else ...
false
false
false
false
false
0
mesg_set(int what) { #ifndef NO_POSIX_SYSTEM const char *tty; struct stat s; if (!(tty = ttyname(old_stderr)) || stat(tty, &s)) { debug_error("mesg_set() error: %s\n", strerror(errno)); return -1; } switch (what) { case MESG_OFF: chmod(tty, s.st_mode & ~S_IWGRP); break; case MESG_ON: chmod(tty, ...
false
false
false
false
true
1
ioc_event(void __user *arg) { gdth_ioctl_event evt; gdth_ha_str *ha; unsigned long flags; if (copy_from_user(&evt, arg, sizeof(gdth_ioctl_event))) return -EFAULT; ha = gdth_find_ha(evt.ionode); if (!ha) return -EFAULT; if (evt.erase == 0xff) { if (evt.event.event_so...
false
false
false
false
false
0
SzReadBoolVector2(CSzData *sd, size_t numItems, Byte **v, ISzAlloc *alloc) { Byte allAreDefined; size_t i; RINOK(SzReadByte(sd, &allAreDefined)); if (allAreDefined == 0) return SzReadBoolVector(sd, numItems, v, alloc); MY_ALLOC(Byte, *v, numItems, alloc); for (i = 0; i < numItems; i++) (*v)[i] = 1; ...
false
false
false
false
false
0
check_writable_directory(const char *path) { char *full_path = get_full_path(path); /* If get_full_path() fails, return NULL. */ if (full_path == NULL) return NULL; /* If we can't write to path or path isn't a directory, return * NULL. */ if (access(full_path, W_OK) != 0 || full_path[strlen...
false
false
false
false
false
0
ConcreteConfigure(const ProcessingConfig& c) throw(ErrProcessingObj) { bool ret = MIDIOut::ConcreteConfigure(c); if (ret==false) return false; MIDI::Message m = MIDI::Message(mConfig.GetMessage()); mMessageSize = MIDI::GetMessageInfo(m).length; /* the amount of controlled bytes is the lenght of the midi mess...
false
false
false
false
false
0
qib_user_sdma_pin_pkt(const struct qib_devdata *dd, struct qib_user_sdma_queue *pq, struct qib_user_sdma_pkt *pkt, const struct iovec *iov, unsigned long niov) { int ret = 0; unsigned long idx; for (idx = 0; idx < niov; idx++) { const int npages = qib_user_sdma_num_pages(iov + idx); const un...
false
false
false
false
false
0
_dhcp_up(interface_defn *ifd, execfn *exec) { { if (!execute("modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.", ifd, exec)) return 0; } { if (!execute("[[sysctl -q -e -w net.ipv6.conf.%iface/.//%.accept_ra=%accept_ra%]]", ifd, exec)) return 0; } { if (!execute("[[sysctl -q -e -w net.ipv6.conf.%if...
false
false
false
false
false
0
tolua_pushusertype (lua_State* L, void* value, const char* type) { if (value == NULL) lua_pushnil(L); else { luaL_getmetatable(L, type); lua_pushstring(L,"tolua_ubox"); lua_rawget(L,-2); /* stack: mt ubox */ if (lua_isnil(L, -1)) { lua_pop(L, 1); lua_pushstring(L, "tolua_ubox"); lua_rawget(...
false
false
false
false
false
0
storeDirConfigure(void) { SwapDir *SD; int i; Config.Swap.maxSize = 0; for (i = 0; i < Config.cacheSwap.n_configured; i++) { SD = &Config.cacheSwap.swapDirs[i]; Config.Swap.maxSize += SD->max_size; SD->low_size = (int) (((float) SD->max_size * (float) Config.Swap.lowWaterMark) / 100.0); if (SD->ch...
false
false
false
false
false
0
remove_session_for_cookie (CkManager *manager, const char *cookie, GError **error) { CkSession *orig_session; char *orig_ssid; CkSessionLeader *leader; char *sid; gboolean res; g...
false
false
false
false
false
0
ext_sensors_g_get_stependdata(struct step_record *step_rec) { int retval = SLURM_ERROR; if (ext_sensors_init() < 0) return retval; retval = (*(ops.get_stependdata))(step_rec); return retval; }
false
false
false
false
false
0
AcpiInstallInterfaceHandler ( ACPI_INTERFACE_HANDLER Handler) { ACPI_STATUS Status; Status = AcpiOsAcquireMutex (AcpiGbl_OsiMutex, ACPI_WAIT_FOREVER); if (ACPI_FAILURE (Status)) { return (Status); } if (Handler && AcpiGbl_InterfaceHandler) { Status = AE_AL...
false
false
false
false
false
0
escape_uri_string(const std::string &s) { return string_replace_all(s, " ", "%20"); }
false
false
false
false
false
0
dib0090_fw_write_reg(struct dib0090_fw_state *state, u8 reg, u16 val) { int ret; if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { dprintk("could not acquire lock"); return -EINVAL; } state->i2c_write_buffer[0] = val >> 8; state->i2c_write_buffer[1] = val & 0xff; memset(&state->msg, 0, sizeof(st...
false
false
false
false
false
0
smsc9420_eeprom_read_location(struct smsc9420_pdata *pd, u8 address, u8 *data) { u32 op = E2P_CMD_EPC_CMD_READ_ | address; int ret; netif_dbg(pd, hw, pd->dev, "address 0x%x\n", address); ret = smsc9420_eeprom_send_cmd(pd, op); if (!ret) data[address] = smsc9420_reg_read(pd, E2P_DATA); return ret; }
false
false
false
false
false
0
time_nsec(VALUE time) { struct time_object *tobj; GetTimeval(time, tobj); return rb_to_int(w2v(wmulquoll(wmod(tobj->timew, WINT2WV(TIME_SCALE)), 1000000000, TIME_SCALE))); }
false
false
false
false
false
0
substvar(argv, flags) char **argv; int flags; { char *tmp, *arg; int i; for (i = 0; argv[i]; i++) { if (trapok >= 0) trapok = 1; tmp = evalarg(argv[i], flags); if (trapok >= 0) trapok = 0; if (!tmp) { arg = argv[i]; if (i && *arg && (flags & EA_EVALIFS)) { while (argv[i]) i++; argv = duplvar(a...
false
false
false
false
false
0
glusterd_peer_hostname_new (char *hostname, glusterd_peer_hostname_t **name) { glusterd_peer_hostname_t *peer_hostname = NULL; int32_t ret = -1; GF_ASSERT (hostname); GF_ASSERT (name); peer_hostname = GF_CALLOC (1, sizeof (*peer_hostname), ...
false
false
false
true
false
1
spl_display_rules(GtkWidget *spl_window) { SPLWizard *spl_wizard; Playlist *spl; GtkWidget *align, *grid; GList *gl; spl_wizard = get_spl_wizard(); g_return_if_fail (spl_wizard); spl = g_object_get_data(G_OBJECT (spl_wizard->window), "spl_work"); g_return_if_fail (spl); align = gtk...
false
false
false
false
false
0
advanced_exif_dnd_get(GtkWidget *listview, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, gpointer data) { //ExifWin *ew = data; GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview)); GtkTreeIter iter; if (gtk_tree_selection_get_selected(sel, ...
false
false
false
false
false
0
setVisible(bool vl) { gMainWindow *active; if (vl) { emitOpen(); if (!opened) return; _not_spontaneous = !visible; visible = true; _hidden = false; if (isTopLevel()) { if (!_title || !*_title) gtk_window_set_title(GTK_WINDOW(border), gApplication::defaultTitle()); if (!_xembed)...
false
false
false
false
false
0
H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle) { H5FD_multi_t *file = (H5FD_multi_t *)_file; H5FD_mem_t type, mmt; static const char *func="H5FD_multi_get_handle"; /* Function Name for error reporting */ /* Get data type for multi driver */ if(H5Pget_multi_t...
false
false
false
false
false
0
get_guard_cond (tree guard) { tree guard_value; /* Check to see if the GUARD is zero. */ guard = get_guard_bits (guard); /* Mask off all but the low bit. */ if (targetm.cxx.guard_mask_bit ()) { guard_value = integer_one_node; if (!same_type_p (TREE_TYPE (guard_value), TREE_TYPE (guard))) ...
false
false
false
false
false
0
anurbs_get_float(anim_nurbs *nurbs, s32 span, Fixed *vals) { Fixed res, tmp; Fixed w, wi; u32 i; res = tmp = 0; w=0; for(i=0; i<=nurbs->p;i++) { tmp = vals[span - nurbs->p + i]; if (nurbs->nweights>0) { wi = nurbs->weights[span - nurbs->p + i]; tmp = gf_mulfix(tmp, wi); w += gf_mulfix(nurbs->n[i], wi...
false
false
false
false
false
0
IsBinaryCoercible(Oid srctype, Oid targettype) { HeapTuple tuple; Form_pg_cast castForm; bool result; /* Fast path if same type */ if (srctype == targettype) return true; /* If srctype is a domain, reduce to its base type */ if (OidIsValid(srctype)) srctype = getBaseType(srctype); /* Somewhat-fast path ...
false
false
false
false
false
0
test_verify_certificate_bad_ca (TestVerify *test, gconstpointer data) { GTlsCertificateFlags errors; GTlsCertificate *cert; GError *error = NULL; /* Use a client certificate as the CA, which is wrong */ cert = g_tls_certificate_new_from_file (tls_test_file_path ("clien...
false
false
false
false
false
0
perm_switch_all_above (int *perm, char *arrow, int pos, int n) { int i; for (i = 0; i < n; i++) { if (perm[i] > perm[pos]) { if (arrow[i] == 'L') arrow[i] = 'R'; else arrow[i] = 'L'; } } }
false
false
false
false
false
0
slapi_create_dn_string_case(const char *fmt, ...) { char *src = NULL; char *dest = NULL; size_t dest_len = 0; va_list ap; int rc = 0; if (NULL == fmt) { return NULL; } va_start(ap, fmt); src = PR_vsmprintf(fmt, ap); va_end(ap); rc = slapi_dn_normalize_ext(src, strl...
false
false
false
false
false
0
gamgi_gtk_cell_align_translation_get (gamgi_cell *cell, double *origin, gamgi_window *window) { gamgi_cell *base; double rotate[9]; double x, y, z; double offset[3], position[3]; double b[3], c[3]; /************************************************ * check if align information has been provided * *******************...
false
false
false
false
false
0
D_PageDrawer(void) { V_DrawRawScreen(W_CacheLumpName(pagename, PU_CACHE)); if (demosequence == 1) { V_DrawPatch(4, 160, W_CacheLumpName(DEH_String("ADVISOR"), PU_CACHE)); } UpdateState |= I_FULLSCRN; }
false
false
false
false
false
0
do_toupper(cxxtools::Char* begin, const cxxtools::Char* end) const { for(; begin < end; ++begin) { *begin = do_toupper(*begin); } return end; }
false
false
false
false
false
0
UtilityReturnsTuples(Node *parsetree) { switch (nodeTag(parsetree)) { case T_FetchStmt: { FetchStmt *stmt = (FetchStmt *) parsetree; Portal portal; if (stmt->ismove) return false; portal = GetPortalByName(stmt->portalname); if (!PortalIsValid(portal)) return false; /* not our bu...
false
false
false
false
false
0
read_revisions_from_stdin(struct rev_info *revs) { char line[1000]; while (fgets(line, sizeof(line), stdin) != NULL) { int len = strlen(line); if (line[len - 1] == '\n') line[--len] = 0; if (!len) break; if (line[0] == '-') die("options not supported in --stdin mode"); if (handle_revision_arg(line...
true
true
false
false
false
1
loopcxt_get_backing_file(struct loopdev_cxt *lc) { struct sysfs_cxt *sysfs = loopcxt_get_sysfs(lc); char *res = NULL; if (sysfs) /* * This is always preffered, the loop_info64 * has too small buffer for the filename. */ res = sysfs_strdup(sysfs, "loop/backing_file"); if (!res && loopcxt_ioctl_enabled...
false
false
false
false
false
0
updateFrameExtents(FluxboxWindow &win) { /* Frame extents are basically the amount the window manager frame protrudes from the client window, on left, right, top, bottom (it is independent of window position). */ FluxboxWindow::ClientList::iterator it = win.clientList().begin(); FluxboxW...
false
false
false
false
false
0
CopyWord(const float fValueIn, int &nValueOut) { if (fValueIn >= static_cast<float>(std::numeric_limits<int>::max())) { nValueOut = std::numeric_limits<int>::max(); } else if (fValueIn <= static_cast<float>(std::numeric_limits<int>::min())) { nValueOut = std::numeric_limits<int>::min...
false
false
false
false
false
0
import_basic_string(struct ctf_scanner *scanner, YYSTYPE *lvalp, size_t len, const char *src, char delim) { size_t pos = 0, dpos = 0; if (str_check(len, pos, 1)) return -1; if (src[pos++] != delim) return -1; while (src[pos] != delim) { char c; if (str_check(len, pos, 1)) return -1; c = src[pos++]...
true
true
false
false
false
1
bcm5974_irq_button(struct urb *urb) { struct bcm5974 *dev = urb->context; struct usb_interface *intf = dev->intf; int error; switch (urb->status) { case 0: break; case -EOVERFLOW: case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: dev_dbg(&intf->dev, "button urb shutting down: %d\n", urb->status); retu...
false
false
false
false
false
0
__lambda94_ (BoxesUnattendedInstaller* self, OsinfoDeviceDriver* driver) { gboolean result = FALSE; OsinfoDeviceDriver* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; #line 777 "/extra-data/checkout/gnome/gnome-boxes/src/unattended-installer.vala" g_return_val_if_fail (driver != NULL, FALSE); #line 777 "/extra-data/checko...
false
false
false
false
false
0
device_state_changed (NMDevice *device, GParamSpec *pspec, NMActRequest *self) { NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self); NMActiveConnectionState ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; /* Set NMActiveConnection state based on the device's state */ switch (nm_device_get_state (device))...
false
false
false
false
false
0
ges_timeline_text_overlay_set_text (GESTimelineTextOverlay * self, const gchar * text) { GList *tmp, *trackobjects; GESTimelineObject *object = (GESTimelineObject *) self; GST_DEBUG ("self:%p, text:%s", self, text); if (self->priv->text) g_free (self->priv->text); self->priv->text = g_strdup (text)...
false
false
false
false
false
0
of_spmi_register_devices(struct spmi_controller *ctrl) { struct device_node *node; int err; if (!ctrl->dev.of_node) return; for_each_available_child_of_node(ctrl->dev.of_node, node) { struct spmi_device *sdev; u32 reg[2]; dev_dbg(&ctrl->dev, "adding child %s\n", node->full_name); err = of_property_rea...
false
false
false
false
false
0
do_animation(void) { int i; for (i = 1; i < cave_monster_max(cave); i++) { byte attr; monster_type *m_ptr = cave_monster(cave, i); monster_race *r_ptr = &r_info[m_ptr->r_idx]; if (!m_ptr || !m_ptr->ml) continue; else if (rf_has(r_ptr->flags, RF_ATTR_MULTI)) attr = randint1(BASIC_COLORS - 1); else...
false
false
false
false
false
0
GetIconIndex(enum filetype type, const wxString& fileName /*=_T("")*/, bool physical /*=true*/, bool symlink /*=false*/) { if (!m_pImageList) return -1; #ifdef __WXMSW__ if (fileName == _T("")) physical = false; SHFILEINFO shFinfo; memset(&shFinfo, 0, sizeof(SHFILEINFO)); if (SHGetFileInfo(fileName != _T("")...
false
false
false
false
false
0
cisco_eeprom_set_byte(struct cisco_eeprom *eeprom, size_t offset,m_uint8_t val) { m_uint16_t tmp; if (offset >= (eeprom->len << 1)) return(-1); tmp = eeprom->data[offset >> 1]; if (offset & 1) tmp = (tmp & 0xFF00) | val; else tmp = (tmp & 0x00FF) | (val << 8...
false
false
false
false
false
0
soap_xsd__duration2s(struct soap *soap, LONG64 a) { LONG64 d; int k, h, m, s, f; if (a < 0) { strcpy(soap->tmpbuf, "-P"); k = 2; a = -a; } else { strcpy(soap->tmpbuf, "P"); k = 1; } f = a % 1000; a /= 1000; s = a % 60; a /= 60; m = a % 60; a /= 60; h = a % 24; d = a / 24; if ...
false
false
false
false
false
0
katoob_get_default_font() { Gtk::TextView tv; tv.show(); GtkStyle *s = gtk_rc_get_style(GTK_WIDGET(tv.gobj())); char *font = pango_font_description_to_string(s->font_desc); std::string _font(font); g_free(font); return _font; }
false
false
false
false
false
0
close_delayed_work(struct work_struct *work) { struct snd_soc_pcm_runtime *rtd = container_of(work, struct snd_soc_pcm_runtime, delayed_work.work); struct snd_soc_dai *codec_dai = rtd->codec_dai; mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); dev_dbg(rtd->dev, "ASoC: pop wq checking: %s status: %s wait...
false
false
false
false
false
0