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
size() const { // order: big Big bigg Bigg biggg Biggg // 0 1 2 3 4 5 char_type const c = name_[name_.size() - 1]; int const base_size = (c == 'l' || c == 'm' || c == 'r') ? 4 : 3; return name_[0] == 'B' ? 2 * (name_.size() - base_size) + 1: 2 * (name_.size() - base_size); }
false
false
false
false
false
0
gimple_build_debug_source_bind_stat (tree var, tree value, gimple stmt MEM_STAT_DECL) { gimple p = gimple_build_with_ops_stat (GIMPLE_DEBUG, (unsigned)GIMPLE_DEBUG_SOURCE_BIND, 2 PASS_MEM_STAT); gimple_debug_source_bind_set_var (p, var); gimple_debug_source_bind_set_value (p, value); if (s...
false
false
false
false
false
0
setupSignals() { pthread_t watchdog; /* man pthread_sigmask: * "...signal actions and signal handlers, as set with * sigaction(2), are shared between all threads" */ struct sigaction blockaction; blockaction.sa_handler = SIG_IGN; sigemptyset(&blockaction.sa_mask); blockaction.sa_flags = 0; ...
false
false
false
false
false
0
gather_aligned_item_requests (EggWrapBox *box, GtkOrientation orientation, gint line_length, gint item_spacing, gint n_children, ...
false
false
false
false
false
0
temperature_get_values_linux (int *temper) { FILE *temperature = NULL; gint havetemperature = FALSE; DIR *dir; struct dirent *ent; char fn[200]; gchar b[200]; /* search for temperature file */ temperature = NULL; g_snprintf (fn, sizeof (fn), dir_proc); g_strlcat (fn, "/acpi/thermal_zone/", sizeof (...
true
true
true
false
true
1
command_loadplugin(object *op, const char *params) { char buf[MAX_BUF]; if (*params == '\0') { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, "Load which plugin?"); return; } strcpy(buf, LIBDIR); strcat(buf, "/plugins/"); strcat...
true
true
false
false
false
1
arch_present_in_ob(const archetype *at, const object *op) { object *tmp; for (tmp = op->inv; tmp != NULL; tmp = tmp->below) if (tmp->arch == at) return tmp; return NULL; }
false
false
false
false
false
0
afGetVirtualFrameSize (AFfilehandle file, int trackid, int stretch3to4) { if (!_af_filehandle_ok(file)) return -1; Track *track = file->getTrack(trackid); if (!track) return -1; return _af_format_frame_size(&track->v, stretch3to4); }
false
false
false
false
false
0
netsnmp_udpbase_sendto(int fd, struct in_addr *srcip, int if_index, struct sockaddr *remote, void *data, int len) { struct iovec iov; struct msghdr m = { 0 }; char cmsg[CMSG_SPACE(cmsg_data_size)]; int rc; iov.iov_base = data; iov.iov_len = len; ...
false
false
false
false
false
0
olympus_prop(struct exifprop *prop, struct exiftags *t) { u_int32_t a, b; unsigned char *offset; struct exifprop *aprop; switch (prop->tag) { /* Various image data. */ case 0x0200: offset = t->mkrmd.btiff + prop->value; /* * XXX Would be helpful to test this with a panoramic. * According to Peter Es...
false
false
false
false
false
0
check_pow (gimple pow_call) { tree base, expn; enum tree_code bc, ec; if (gimple_call_num_args (pow_call) != 2) return false; base = gimple_call_arg (pow_call, 0); expn = gimple_call_arg (pow_call, 1); if (!check_target_format (expn)) return false; bc = TREE_CODE (base); ec = TREE_CODE (expn...
false
false
false
false
false
0
event_base_get_method(const struct event_base *base) { EVUTIL_ASSERT(base); return (base->evsel->name); }
false
false
false
false
false
0
DoRefreshSize() { int w, h; if (IMG_HANDLE_IS_VALID(GetCIEImageHandle(BCI_BUTTON))) { IMG_INFO(GetCIEImageHandle(BCI_BUTTON), &w, &h); if (!(Style & GS_NOAUTORESIZEX)) { Coords[2] = Coords[0] + w; } if (!(Style & GS_NOAUTORESIZEY)) { Coords[3] = Coords[1] + h; } } else { gr_get_string_size(&w, &h, ...
false
false
false
false
false
0
postscript_type_find (GstTypeFind * tf, gpointer unused) { const guint8 *data = gst_type_find_peek (tf, 0, 3); if (!data) return; if (data[0] == 0x04) data++; if (data[0] == '%' && data[1] == '!') gst_type_find_suggest (tf, GST_TYPE_FIND_POSSIBLE, POSTSCRIPT_CAPS); }
false
false
false
false
false
0
camel_network_service_get_service_name (CamelNetworkService *service, CamelNetworkSecurityMethod method) { CamelNetworkServiceInterface *interface; const gchar *service_name = NULL; g_return_val_if_fail (CAMEL_IS_NETWORK_SERVICE (service), NULL); interface = CAMEL_NETWORK_S...
false
false
false
false
false
0
flmProcessBeforeImage( FDB * pDb, FLMUINT uiLogEOF, // Address of the end of the rollback // log FLMUINT * puiCurrAddrRV, // This is the current offset we are // reading in the log file. // It will be updated after reading the // data FLMBYTE * pBlk,...
false
false
false
false
false
0
Update(void) { // Update all timers for all systems. If those systems' filter sets are expired, take the appropriate action. RakNet::Time curTime = RakNet::GetTime(); if (GreaterThan(curTime - 1000, whenLastTimeoutCheck)) { DataStructures::List< FilteredSystem > itemList; DataStructures::List< AddressOr...
false
false
false
false
false
0
GWEN_Time_fromDb(GWEN_DB_NODE *db) { GWEN_TIME *t; GWEN_DB_NODE *dbT; int day, month, year; int hour, min, sec; int inUtc; day=month=year=0; hour=min=sec=0; inUtc=GWEN_DB_GetIntValue(db, "inUtc", 0, 0); dbT=GWEN_DB_GetGroup(db, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "date"); if (dbT) { day=GWEN_DB_Get...
false
false
false
false
false
0
logModemEventMsg(const TriggerMsgHeader& h, const ModemExt& modem, const char* cp) { static const char* modemNames[16] = { "Assigned to job", "Released by job", "Marked down", "Marked ready", "Marked busy", "Considered wedged", "In-use by an outbound job", "Inbound data call begin", "Inbound data call comp...
false
false
false
false
false
0
gf_quat_to_rotation(GF_Vec4 *quat) { GF_Vec4 r; Fixed val = gf_acos(quat->q); if (val == 0) { r.x = r.y = 0; r.z = FIX_ONE; r.q = 0; } else { GF_Vec axis; Fixed sin_val = gf_sin(val); axis.x = gf_divfix(quat->x, sin_val); axis.y = gf_divfix(quat->y, sin_val); ...
false
false
false
false
false
0
biscDrive(int velocity, int radius) { if(velocity < -500 || velocity > 500) return BISC_ERR; //if(radius < -2000 || radius > 2000) return BISC_ERR; if(biscSendByte(BISC_CMD_DRIVE) == BISC_ERR) return BISC_ERR; if(biscSendInt(velocity) == BISC_ERR) return BISC_ERR; if(biscSendInt(radius) == BISC_...
false
false
false
false
false
0
setup_blame_list(struct scoreboard *sb, struct origin *target, int min_score, int *num_ents_p) { struct blame_entry *e; int num_ents, i; struct blame_list *blame_list = NULL; for (e = sb->ent, num_ents = 0; e; e = e->next) if (!e->scanned && !e->guilty && same_suspect(e->suspect, ta...
false
false
false
false
false
0
is_strict_saop(ScalarArrayOpExpr *expr, bool falseOK) { Node *rightop; /* The contained operator must be strict. */ set_sa_opfuncid(expr); if (!func_strict(expr->opfuncid)) return false; /* If ANY and falseOK, that's all we need to check. */ if (expr->useOr && falseOK) return true; /* Else, we have to se...
false
false
false
false
false
0
update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, uint16 flags) { int i; uint32* colorTable; stream_read_uint8(s, cache_color_table_order->cacheIndex); /* cacheIndex (1 byte) */ stream_read_uint8(s, cache_color_table_order->numberColors); /* numberColors (2 bytes) */ ...
false
false
false
false
false
0
__zswap_cpu_comp_notifier(struct zswap_pool *pool, unsigned long action, unsigned long cpu) { struct crypto_comp *tfm; switch (action) { case CPU_UP_PREPARE: if (WARN_ON(*per_cpu_ptr(pool->tfm, cpu))) break; tfm = crypto_alloc_comp(pool->tfm_name, 0, 0); if (IS_ERR_OR_NULL(tfm)) { pr_err("could...
false
false
false
false
false
0
__lambda11_ (Block2Data* _data2_, GtkAction* action) { AbracaMainWindow * self; GtkWidget* _tmp0_ = NULL; GtkWindow* _tmp1_; GtkWindow* parent; AbracaClient* _tmp2_; self = _data2_->self; g_return_if_fail (action != NULL); _tmp0_ = gtk_widget_get_ancestor ((GtkWidget*) self, GTK_TYPE_WINDOW); _tmp1_ = _g_objec...
false
false
false
false
false
0
Emit_log_entries(Chk_log_type *log, char *buf, int handle) { static char *pXmlBuf = NULL; static char *pmsg_buf = NULL; int status; /* Zero the count of messages sent this time around */ log->num_sent = 0; if(log->emit_in_progress == REG_TRUE){ if(Pack_send_log_entries(&pXmlBuf, &(log->num_se...
false
false
false
false
false
0
display_columns(menu_type *menu, int cursor, int *top, region *loc) { int c, r; int w, h; int n = menu->filter_count; int col = loc->col; int row = loc->row; int rows_per_page = loc->page_rows; int cols = (n + rows_per_page - 1) / rows_per_page; int colw = 23; Term_get_size(&w, &h); if ((colw * cols) > (w -...
false
false
false
false
false
0
men_z135_handle_modem_status(struct men_z135_port *uart) { u8 msr; msr = (uart->stat_reg >> 8) & 0xff; if (msr & MEN_Z135_MSR_DDCD) uart_handle_dcd_change(&uart->port, msr & MEN_Z135_MSR_DCD); if (msr & MEN_Z135_MSR_DCTS) uart_handle_cts_change(&uart->port, msr & MEN_Z135_MSR_CTS); }
false
false
false
false
false
0
pci_msi_get_domain(struct pci_dev *dev) { struct irq_domain *domain; domain = dev_get_msi_domain(&dev->dev); if (domain) return domain; return arch_get_pci_msi_domain(dev); }
false
false
false
false
false
0
CubeRoot(double X) { if( X>=0.0 ) { return pow( X, OneThird ); } else return -pow( -X, OneThird ); }
false
false
false
false
false
0
pump_task_completion (int ret, call_frame_t *sync_frame, void *data) { xlator_t *this = NULL; afr_private_t *priv = NULL; this = THIS; priv = this->private; inode_unref (priv->root_inode); STACK_DESTROY (sync_frame->root); gf_log (this->name, GF_LOG_DEBUG, ...
false
false
false
false
false
0
efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb) { struct efx_ptp_data *ptp = efx->ptp_data; skb_queue_tail(&ptp->txq, skb); if ((udp_hdr(skb)->dest == htons(PTP_EVENT_PORT)) && (skb->len <= MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM)) efx_xmit_hwtstamp_pending(skb); queue_work(ptp->workwq, &ptp->work); re...
false
false
false
false
false
0
hasRAWHazard(MachineInstr *DefMI, MachineInstr *MI, const TargetRegisterInfo &TRI) { // FIXME: Detect integer instructions properly. const MCInstrDesc &MCID = MI->getDesc(); unsigned Domain = MCID.TSFlags & ARMII::DomainMask; if (MI->mayStore()) return false; unsigned Opcode = MCI...
false
false
false
false
false
0
gt_pch_nx_tree_int_map (void *x_p) { struct tree_int_map * const x = (struct tree_int_map *)x_p; if (gt_pch_note_object (x, x, gt_pch_p_12tree_int_map)) { gt_pch_n_9tree_node ((*x).base.from); } }
false
false
false
false
false
0
facet_2form_sq_integral(f_info) struct qinfo *f_info; { int m,i,j,k; REAL value=0.0; for ( m = 0 ; m < gauss2D_num ; m++ ) { f_info->gauss_pt[m][2*SDIM] = m; /* kludge for attr interpolation. */ for ( i = 0, k = 0 ; i < SDIM ; i++ ) for ( j = i+1 ; j < SDIM ; j++,k++ ) { REAL form = gauss2D...
false
false
false
false
false
0
config_rootpw(ConfigArgs *c) { Backend *tbe; if (c->op == SLAP_CONFIG_EMIT) { if (!BER_BVISEMPTY(&c->be->be_rootpw)) { /* don't copy, because "rootpw" is marked * as CFG_BERVAL */ c->value_bv = c->be->be_rootpw; return 0; } return 1; } else if ( c->op == LDAP_MOD_DELETE ) { ch_free( c->be->be_r...
false
false
false
false
false
0
getFirstNonPHI() { BasicBlock::iterator i = begin(); // All valid basic blocks should have a terminator, // which is not a PHINode. If we have an invalid basic // block we'll get an assertion failure when dereferencing // a past-the-end iterator. while (isa<PHINode>(i)) ++i; return &*i; }
false
false
false
false
false
0
GetSimilarityMetric(const Image *image,const Image *reference, const ssize_t x_offset,const ssize_t y_offset, const double similarity_threshold,ExceptionInfo *exception) { CacheView *image_view, *reference_view; double channels, normalized_similarity, similarity; ssize_t y; /* ...
false
false
false
false
false
0
set_font (GtrSettings * gs, const gchar * font) { GList *views, *l; views = gtr_application_get_views (GTR_APP, TRUE, TRUE); for (l = views; l != NULL; l = g_list_next (l)) { /* Note: we use def=FALSE to avoid GtrView to query gconf */ gtr_view_set_font (GTR_VIEW (l->data), FALSE, font); } ...
false
false
false
false
false
0
psb_mmu_set_pd_context(struct psb_mmu_pd *pd, int hw_context) { struct drm_device *dev = pd->driver->dev; struct drm_psb_private *dev_priv = dev->dev_private; uint32_t offset = (hw_context == 0) ? PSB_CR_BIF_DIR_LIST_BASE0 : PSB_CR_BIF_DIR_LIST_BASE1 + hw_context * 4; down_write(&pd->driver->sem); PSB_WSGX32...
false
false
false
false
false
0
midgard_quota_update(MidgardObject *object, guint32 init_size) { g_assert(object != NULL); MidgardConnection *mgd = MGD_OBJECT_CNC (object); g_assert(mgd != NULL); if (!MGD_CNC_QUOTA (mgd)) return TRUE; guint32 size = 0; guint32 qsize = 0; const gchar *typename = G_OBJECT_TYPE_NAME(object); gchar *tmpstr; ...
false
false
false
false
false
0
nes_bind_mw(struct ib_qp *ibqp, struct ib_mw *ibmw, struct ib_mw_bind *ibmw_bind) { u64 u64temp; struct nes_vnic *nesvnic = to_nesvnic(ibqp->device); struct nes_device *nesdev = nesvnic->nesdev; /* struct nes_mr *nesmr = to_nesmw(ibmw); */ struct nes_qp *nesqp = to_nesqp(ibqp); struct nes_hw_qp_wqe *wqe; unsig...
false
false
false
false
false
0
Match(int pos, const char *s) { for (int i=0; *s; i++) { if (*s != SafeGetCharAt(pos+i)) return false; s++; } return true; }
false
false
false
false
false
0
rfc1035_aton_ipv4(const char *p, struct in_addr *in4) { int dummy; RFC1035_UINT32 n=doaton(p, &dummy); union { unsigned char addr[4]; struct in_addr n; } u; u.addr[3]=n; u.addr[2]=n >> 8; u.addr[1]=n >> 16; u.addr[0]=n >> 24; if (dummy) errno=EINVAL; *in4=u.n; return (dummy); }
true
true
false
false
false
1
fcoe_transport_detach(struct fcoe_transport *ft) { int rc = 0; struct fcoe_netdev_mapping *nm = NULL, *tmp; mutex_lock(&ft_mutex); if (!ft->attached) { LIBFCOE_TRANSPORT_DBG("transport %s already detached\n", ft->name); rc = -ENODEV; goto out_attach; } /* remove netdev mapping for this transport as it ...
false
false
false
false
false
0
fs_msn_session_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsMsnSession *self = FS_MSN_SESSION (object); FsMsnConference *conference = fs_msn_session_get_conference (self, NULL); if (!conf...
false
false
false
false
false
0
io_get(int fd) { if (options[OptGetInput]) { if (doioctl(fd, VIDIOC_G_INPUT, &input) == 0) { struct v4l2_input vin; printf("Video input : %d", input); vin.index = input; if (test_ioctl(fd, VIDIOC_ENUMINPUT, &vin) >= 0) printf(" (%s: %s)", vin.name, status2s(vin.status).c_str()); printf("\n"); }...
false
false
false
false
false
0
erl_ext_size(unsigned char *t) { int i; unsigned char *v; if (*t == ERL_VERSION_MAGIC) return erl_ext_size(t+1); v = t+1; switch(*t) { case ERL_SMALL_INTEGER_EXT: case ERL_INTEGER_EXT: case ERL_ATOM_EXT: case ERL_ATOM_UTF8_EXT: case ERL_SMALL_ATOM_EXT: case ERL_SMALL_ATO...
false
false
false
false
false
0
be_filter_flush(struct bufferevent *bufev, short iotype, enum bufferevent_flush_mode mode) { struct bufferevent_filtered *bevf = upcast(bufev); int processed_any = 0; EVUTIL_ASSERT(bevf); _bufferevent_incref_and_lock(bufev); if (iotype & EV_READ) { be_filter_process_input(bevf, mode, &processed_any); } i...
false
false
false
false
false
0
mca_pml_v_component_close(void) { /* Save original PML before making any changes */ mca_pml_v.host_pml_component = mca_pml_base_selected_component; mca_pml_v.host_pml = mca_pml; mca_pml_v.host_request_fns = ompi_request_functions; /* Do not load anything if no FT protocol is selected */ if...
false
false
false
false
false
0
SHA1Result( HL_SHA1_CTX *context, hl_uint8 Message_Digest[SHA1HashSize]) { int i; if (!context || !Message_Digest) { return shaNull; } if (context->Corrupted) { return context->Corrupted; } if (!context->Computed) { SHA1PadMessage(context); for(i=0; i<64; ++i) { /* message may be sen...
false
false
false
false
false
0
emit_int(n) int n; /* output integer */ { if (output_on) { sprintf(tmp+strlen(tmp), "%d", n); }; }
false
false
false
false
false
0
PrintMatrix(ostream &os, vtkIndent indent, GLfloat matrix[16]) { // Spec 2.1, page 43: row-major: // a1 a5 a9 a13 // a2 ... // a3 .. // a4 ... // starting at 0, not 1: // a0 a4 a8 a12 // a1 ... // a2 .. // a3 ... int row=0; whi...
false
false
false
false
false
0
afs_proc_rootcell_write(struct file *file, const char __user *buf, size_t size, loff_t *_pos) { char *kbuf, *s; int ret; /* start by dragging the command into memory */ if (size <= 1 || size >= PAGE_SIZE) return -EINVAL; ret = -ENOMEM; kbuf = kmalloc(size + 1, GFP_KERNEL); if (!kbuf) ...
false
false
false
false
false
0
gtk_source_completion_model_has_info (GtkSourceCompletionModel *model) { GList *l; for (l = model->priv->providers; l != NULL; l = l->next) { ProviderInfo *provider_info = l->data; if (provider_has_info (provider_info)) { return TRUE; } } return FALSE; }
false
false
false
false
false
0
i40e_unquiesce_vsi(struct i40e_vsi *vsi) { if (!test_bit(__I40E_NEEDS_RESTART, &vsi->state)) return; clear_bit(__I40E_NEEDS_RESTART, &vsi->state); if (vsi->netdev && netif_running(vsi->netdev)) vsi->netdev->netdev_ops->ndo_open(vsi->netdev); else i40e_vsi_open(vsi); /* this clears the DOWN bit */ }
false
false
false
false
false
0
message_parse_type(hdr, body) char *hdr; struct body *body; { char *type; int typelen; char *subtype; int subtypelen; char *p; /* Ignore if we already saw one of these headers */ if (body->type) return; /* Skip leading whitespace, ignore header if blank */ message_parse_rfc822...
false
false
false
false
false
0
isprime_ui (unsigned int p, unsigned int *primes) { int i; for (i = 0; primes[i] * primes[i] <= p; i++) if (p % primes[i] == 0) return 0; return 1; }
false
false
false
false
false
0
make_dtype_2(void) { hid_t dtype2_id = -1; hid_t enum_id= -1; hid_t int_id=-1; int x; hsize_t dims[] = {2, 1, 2, 4}; size_t size; /* Create an int with a strange precision */ if((int_id = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR if(H5Tset_precision(int_id, (size_t)24) < 0) TEST_ERRO...
false
false
false
false
false
0
w83795_write(struct i2c_client *client, u16 reg, u8 value) { int err; err = w83795_set_bank(client, reg >> 8); if (err < 0) return err; err = i2c_smbus_write_byte_data(client, reg & 0xff, value); if (err < 0) dev_err(&client->dev, "Failed to write to register 0x%03x, err %d\n", (int)reg, err); return ...
false
false
false
false
false
0
j_adin_init(Recog *recog) { boolean ret; if (recog->jconf->input.type == INPUT_VECTOR) { /* feature vector input */ if (recog->jconf->input.speech_input == SP_MFCMODULE) { if (mfc_module_init(recog->mfcclist, recog) == FALSE) { return FALSE; } ret = mfc_module_standby(recog->mfcclist); ...
false
false
false
false
false
0
unbackslash(const char *s, std::string& res) { res = ""; char lastc = '\0'; while (*s != '\0') { if (*s == '\\' && lastc != '\\') res += '\\'; res += *s; lastc = *s++; } }
false
false
false
false
false
0
addService(const ServiceRegistry& service) { std::vector<std::string> procs = service.getProcedureNames(); for (std::vector<std::string>::const_iterator it = procs.begin(); it != procs.end(); ++it) { registerProcedure(*it, service.getProcedure(*it)); } }
false
false
false
false
false
0
CreateDataSource( const char * pszName, char **papszOptions ) { OGRILI1DataSource *poDS = new OGRILI1DataSource(); if( !poDS->Create( pszName, papszOptions ) ) { delete poDS; return NULL; } else return poDS; }
false
false
false
false
false
0
queue_get(){ int out = -1; pthread_mutex_lock( &queue_mutex ); while( client_queue.size() == 0 ){ pthread_cond_wait( &queue_cond, &queue_mutex ); } out = client_queue.front(); client_queue.pop_front(); pthread_mutex_unlock( &queue_mutex ); return out; }
false
false
false
false
false
0
Cns_get_lnk_by_fileid(dbfd, fileid, lnk_entry, lock, rec_addr) struct Cns_dbfd *dbfd; u_signed64 fileid; struct Cns_symlinks *lnk_entry; int lock; Cns_dbrec_addr *rec_addr; { char fileid_str[21]; char func[22]; static char query[] = "SELECT \ FILEID, LINKNAME \ FROM Cns_symlinks \ WHERE fileid = %s"; stati...
false
false
false
false
false
0
init_reloc_cookie_for_section (struct elf_reloc_cookie *cookie, struct bfd_link_info *info, asection *sec) { if (!init_reloc_cookie (cookie, info, sec->owner)) goto error1; if (!init_reloc_cookie_rels (cookie, info, sec->owner, sec)) goto error2; return TRUE; error2: fini_reloc_coo...
false
false
false
false
false
0
Reconfig () { const char* a = GetAttribute("text"); if (a != nil) { delete text; text = new char[strlen(a)+1]; strcpy(text, a); } a = GetAttribute("padding"); if (a != nil) { pad = atoi(a); } const Font* f = output->GetFont(); shape->width = pad + f->Width(text) + pad; shape->hei...
false
false
false
false
false
0
tr_begin() { ELEMENT::tr_begin(); if (!subckt()) { _gatemode = moDIGITAL; _n[OUTNODE]->set_mode(_gatemode); _oldgatemode = _gatemode; }else{ _gatemode = (OPT::mode==moMIXED) ? moANALOG : OPT::mode; _n[OUTNODE]->set_mode(_gatemode); _oldgatemode = _gatemode; subckt()->tr_begin(); } }
false
false
false
false
false
0
fcoe_ctlr_flogi_retry(struct fcoe_ctlr *fip) { struct fcoe_fcf *fcf; int error; mutex_lock(&fip->ctlr_mutex); spin_lock_bh(&fip->ctlr_lock); LIBFCOE_FIP_DBG(fip, "re-sending FLOGI - reselect\n"); fcf = fcoe_ctlr_select(fip); if (!fcf || fcf->flogi_sent) { kfree_skb(fip->flogi_req); fip->flogi_req = NULL; ...
false
false
false
false
false
0
block_size (size_t slot_size) { static int pagesize = -1; int size; if (pagesize == -1) pagesize = mono_pagesize (); for (size = pagesize; size < LOCK_FREE_ALLOC_SB_MAX_SIZE; size <<= 1) { if (slot_size * 2 <= LOCK_FREE_ALLOC_SB_USABLE_SIZE (size)) return size; } return LOCK_FREE_ALLOC_SB_MAX_SIZE; }
false
false
false
false
false
0
icon_list_set_selected_icon_from_filename(icon_list_t *icons, const char *file) { char *dirname, *iconame; g_assert(icons != NULL); if (file == NULL) icons->selected_icon = NULL; else { dirname = g_path_get_dirname(file); iconame = g_path_get_basename...
false
false
false
false
false
0
event_pending(const struct event *ev, short event, struct timeval *tv) { int flags = 0; _event_debug_assert_is_setup(ev); if (ev->ev_flags & EVLIST_INSERTED) flags |= (ev->ev_events & (EV_READ|EV_WRITE|EV_SIGNAL)); if (ev->ev_flags & EVLIST_ACTIVE) flags |= ev->ev_res; if (ev->ev_flags & EVLIST_TIMEOUT) fl...
false
false
false
false
false
0
fcmplt_ins(BW *bw, unsigned char *line) { P *p = pdup(bw->cursor, USTR "fcmplt_ins"); int c; if (!piseol(bw->cursor)) { int c = brch(bw->cursor); if (joe_isalnum_(bw->b->o.charmap,c)) return; } /* Move p to beginning of word */ p = pdup(bw->cursor, USTR "fcmplt_ins"); do c = prgetc(p); while (joe_i...
false
false
false
false
false
0
collect_gct_blocks (void) { nat g; gen_workspace *ws; bdescr *bd, *prev; for (g = 0; g < RtsFlags.GcFlags.generations; g++) { ws = &gct->gens[g]; // there may still be a block attached to ws->todo_bd; // leave it there to use next time. if (ws->scavd_list !...
false
false
false
false
false
0
ConvertCluster(std::vector<aiBone*>& bones, const Model& model, const Cluster& cl, std::vector<size_t>& out_indices, std::vector<size_t>& index_out_indices, std::vector<size_t>& count_out_indices, const aiMatrix4x4& node_global_transform) { aiBone* const bone = new aiBone(); bones.push_back(bone); b...
false
false
false
false
false
0
collection_from_dnd_data(const gchar *data, GList **list, GList **info_list) { CollectionData *cd; gint collection_number; const gchar *ptr; if (list) *list = NULL; if (info_list) *info_list = NULL; if (strncmp(data, "COLLECTION:", 11) != 0) return NULL; ptr = data + 11; collection_number = atoi(ptr); c...
false
false
false
false
false
0
privilege_search (const gchar *group) { PrivilegeDescription p = { 0, }; if (!group) return NULL; p.group = group; return (const PrivilegeDescription *) bsearch (&p, descriptions, G_N_ELEMENTS (descriptions), sizeof (PrivilegeDescription), compare_groups); }
false
false
false
false
false
0
isInsideLine( const Vector3& ptarget, const Vector3& p0, const Vector3& p1 ) { // This function returns whether ptarget is between p0 and p1. // It is outside if: // -the dir vector is in the opposite direction // -the length is smaller. // -ptarget is not p0 or p1 // NOTE: We assume that the 3 ...
false
false
false
false
false
0
init(GMSource * src) { FXASSERT(source==NULL); FXASSERT(src); source=src; columns.clear(); source->configure(columns); loadSettings(source->settingKey()); clear(); if (source) { if (browsersplit->getExpanded()==SHOWBROWSER) { listGenres(); initSelection(genrelist,"genre-list-select...
false
false
false
false
false
0
set_headers (GstBuffer ** buffer, guint group, guint idx, HeaderData * data) { GstBaseRTPDepayload *depayload = data->depayload; *buffer = gst_buffer_make_metadata_writable (*buffer); gst_buffer_set_caps (*buffer, data->caps); /* set the timestamp if we must and can */ if (data->bclass->set_gst_timestamp &&...
false
false
false
false
false
0
fz_meta(fz_document *doc, int key, void *ptr, int size) { if (doc && doc->meta) return doc->meta(doc, key, ptr, size); return FZ_META_UNKNOWN_KEY; }
false
false
false
false
false
0
destroy_index_avp( unsigned short flags, int_str name, int index) { struct usr_avp *avp = NULL; avp = search_index_avp(flags, name, 0, index); if(avp== NULL) { LM_DBG("AVP with the specified index not found\n"); return; } destroy_avp( avp ); }
false
false
false
false
false
0
main(int argc, char* argv[]) { rdpRdp* rdp; int index = 1; rdpSettings* settings; rdp = rdp_new(); settings = rdp->settings; if (freerdp_process_params(argc, argv, settings, &index) != True) { printf("failed to process parameters.\n"); return 0; } printf("hostname:%s username:%s password:%s\n", setti...
false
false
false
false
false
0
doubles_to_string(gdouble *dd, gint len) { GString *str; gint i; str = g_string_new_len(NULL, 50); for (i = 0; i < len; i++) g_string_append_printf(str, "%f ", dd[i]); return g_string_free(str, FALSE); }
false
false
false
false
false
0
store_up_threshold(struct dbs_data *dbs_data, const char *buf, size_t count) { struct od_dbs_tuners *od_tuners = dbs_data->tuners; unsigned int input; int ret; ret = sscanf(buf, "%u", &input); if (ret != 1 || input > MAX_FREQUENCY_UP_THRESHOLD || input < MIN_FREQUENCY_UP_THRESHOLD) { return -EINVAL; } o...
false
false
false
false
false
0
stl_style_copy(Style *stl) { Style *ns = NULL; if(stl != NULL) { ns = stl_style_new(stl->name); ns->expand = stl->expand; g_hash_table_foreach(stl->properties, property_copy, ns); } return ns; }
false
false
false
false
false
0
camlidl_abstract0_ap_abstract0_is_leq( value _v_man, value _v_a1, value _v_a2) { ap_manager_ptr man; /*in*/ ap_abstract0_ptr a1; /*in*/ ap_abstract0_ptr a2; /*in*/ int _res; value _vres; struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL }; camlidl_ctx _ctx = &_ctxs; camlidl_ml2c_manager_ap...
false
false
false
false
false
0
GWEN_XMLNode_Path_dup(const GWEN_XMLNODE_PATH *np){ GWEN_XMLNODE_PATH *p; unsigned int i; GWEN_NEW_OBJECT(GWEN_XMLNODE_PATH, p); p->pos=np->pos; for (i=0; i<np->pos; i++) { p->nodes[i]=np->nodes[i]; } return p; }
false
false
false
false
false
0
ttyplay (FILE * fp, double speed, ReadFunc read_func, WriteFunc write_func, WaitFunc wait_func, off_t offset) { int first_time = 1; int r = READ_EOF; struct timeval prev; /* for dtype's attempt to get the last clrscr and playback from there */ if (offset != -1) { fseek (fp, offset, SEEK_SE...
false
false
false
false
false
0
fill(unsigned int amount) { syncConsume(); // Fill the buffer sufficiently to hold needed tokens while (queue.entries() < (amount + markerOffset)) { // Append the next token queue.append(input.nextToken()); } }
false
false
false
false
false
0
fixedSolidBoxIntersectsFixedSolidBox( const Box& box1, const Box& box2, const int lastSeparatingAxis) { // for explanations of the variable please refer to the // paper and fillSolidBoxSolidBoxInfo() Vector3 a; Vector3 b; Vector3 D; double c[9]; double ca[9]; double a...
false
false
false
false
false
0
ProcessOneIFD ( XMP_Uns32 ifdOffset, XMP_Uns8 ifd ) { TweakedIFDInfo& ifdInfo = this->containedIFDs[ifd]; if ( (ifdOffset < 8) || (ifdOffset > (this->tiffLength - kEmptyIFDLength)) ) { XMP_Throw ( "Bad IFD offset", kXMPErr_BadTIFF ); } XMP_Uns8* ifdPtr = this->tiffStream + ifdOffset; XMP_Uns16 ifdCount = this-...
false
false
false
false
false
0
CKYBuffer_AppendLongLE(CKYBuffer *buf, unsigned long val) { CKYStatus ret; ret = CKYBuffer_Reserve(buf, buf->len + 4); if (ret != CKYSUCCESS) { return ret; } buf->data[buf->len+3] = (CKYByte) ((val >> 24) & 0xff); buf->data[buf->len+2] = (CKYByte) ((val >> 16) & 0xff); buf->data[buf->len+1...
false
false
false
false
false
0
make_throw_ob(object *orig) { object *toss_item; if (!orig) return NULL; toss_item = object_new(); if (QUERY_FLAG(orig, FLAG_APPLIED)) { LOG(llevError, "BUG: make_throw_ob(): ob is applied\n"); /* insufficient workaround, but better than nothing */ CLEAR_FLAG(orig, FLAG...
false
false
false
false
false
0
ipmi_print_sensor_info(struct ipmi_intf *intf, uint16_t rec_id) { struct sdr_get_rs *header; struct ipmi_sdr_iterator *itr; int rc = 0; uint8_t *rec = NULL; itr = ipmi_sdr_start(intf, 0); if (itr == NULL) { lprintf(LOG_ERR, "Unable to open SDR for reading"); return (-1); } while ((header = ipmi_sdr_get_ne...
false
false
false
false
false
0
mpfr_set_str (mpfr_t x, const char *str, int base, mpfr_rnd_t rnd) { char *p; if (MPFR_UNLIKELY (*str == 0)) return -1; mpfr_strtofr (x, str, &p, base, rnd); return (*p == 0) ? 0 : -1; }
false
false
false
false
false
0
move_player_mover(object *op) { int dir = op->stats.sp; sint16 nx, ny; mapstruct *m; if (!op->map) { if (op->env && op->env->map) LOG(llevError, "move_player_mover: mover not in a map at %s %d %d!\n", op->env->map->path, op->env->x, op->env->y); else LOG(llevErro...
false
false
false
false
false
0
prop_iter_finalize(JSContext *cx, JSObject *obj) { void *pdata = obj->getPrivate(); if (!pdata) return; if (JSVAL_TO_INT(obj->fslots[JSSLOT_ITER_INDEX]) >= 0) { /* Non-native case: destroy the ida enumerated when obj was created. */ JSIdArray *ida = (JSIdArray *) pdata; JS_D...
false
false
false
false
false
0