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
set_key_codes_label(char *s, int better) { // dbg("set_key_codes_label %s %x\n", s, label_key_codes); if (!label_key_codes) return; #if WIN32 if (test_mode) return; #endif if (s && strlen(s)) { if (hbox_row2 && (!gtab_hide_row2 || ggg.wild_mode #if WIN32 || 1 || (str_key_codes[0]) #endif ...
false
false
false
false
false
0
getscanfield(FILE *fp, BOOL skip, unsigned int width, int scannum, char *scanptr, char **strptr) { char *str; /* current string */ unsigned long len; /* current length of string */ unsigned long totlen; /* total length of string */ char buf[READSIZE]; /* temporary buffer */ int c; char *b; BOOL comp; /* Use co...
true
true
false
true
true
1
usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb) { int ret; /* check if device is removed */ if (cardp->surprise_removed) { lbs_deb_usbd(&cardp->udev->dev, "Device removed\n"); ret = -ENODEV; goto tx_ret; } usb_fill_bulk_urb(cardp->tx_urb, cardp->udev, usb_sndbulkpipe(cardp->udev...
false
false
false
false
false
0
jack_access_registry (jack_shm_info_t *ri) { /* registry must be locked */ /* try without IPC_CREAT to get existing segment */ if ((registry_id = shmget (JACK_SHM_REGISTRY_KEY, JACK_SHM_REGISTRY_SIZE, 0666)) < 0) { switch (errno) { case ENOENT: /* segment does not exist */ return ENOENT; case EI...
false
true
false
false
false
1
free_all_descbuffers(struct b43legacy_dmaring *ring) { struct b43legacy_dmadesc_meta *meta; int i; if (!ring->used_slots) return; for (i = 0; i < ring->nr_slots; i++) { op32_idx2desc(ring, i, &meta); if (!meta->skb) { B43legacy_WARN_ON(!ring->tx); continue; } if (ring->tx) unmap_descbuffer(ring...
false
false
false
false
false
0
pixbuf_max_width (ECellView *ecell_view, gint model_col, gint view_col) { gint pw; gint num_rows, i; gint max_width = -1; if (model_col == 0) { num_rows = e_table_model_row_count (ecell_view->e_table_model); for (i = 0; i <= num_rows; i++) { GdkPixbuf *pixbuf...
false
false
false
false
false
0
sge_sl_lock(sge_sl_list_t *list) { bool ret = true; DENTER(SL_LAYER, "sge_sl_lock"); if (list != NULL) { sge_mutex_lock(SL_MUTEX_NAME, SGE_FUNC, __LINE__, &list->mutex); } DRETURN(ret); }
false
false
false
false
false
0
store_storefile(png_store *ps, png_uint_32 id) { png_store_file *pf = voidcast(png_store_file*, malloc(sizeof *pf)); if (pf == NULL) png_error(ps->pwrite, "storefile: OOM"); safecat(pf->name, sizeof pf->name, 0, ps->wname); pf->id = id; pf->data = ps->new; pf->datacount = ps->writepos; ps->ne...
false
false
false
false
false
0
invext ( int64_t& u, const int64_t a, const int64_t b ) const { int64_t u3; int64_t v1,v3; u = 1; u3 = a; v1 = 0; v3 = b; while (v3 != 0) { int64_t q , t1, t3; q = u3 / v3; t1 = u - q * v1; t3 = u3 - q * v3; u = v1; u3 = v3; v1 = t1; v3 = t3; } return (u3...
false
false
false
false
false
0
finish_struct (tree t, tree attributes) { location_t saved_loc = input_location; /* Now that we've got all the field declarations, reverse everything as necessary. */ unreverse_member_declarations (t); cplus_decl_attributes (&t, attributes, (int) ATTR_FLAG_TYPE_IN_PLACE); /* Nadger the current locati...
false
false
false
false
false
0
setTableFields(ModRMDecision &decision, const ModRMFilter &filter, InstrUID uid, uint8_t opcode) { for (unsigned index = 0; index < 256; ++index) { if (filter.accepts(inde...
false
false
false
false
false
0
usb_serial_generic_close(struct usb_serial_port *port) { unsigned long flags; int i; if (port->bulk_out_size) { for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i) usb_kill_urb(port->write_urbs[i]); spin_lock_irqsave(&port->lock, flags); kfifo_reset_out(&port->write_fifo); spin_unlock_irqrestore(&port->l...
false
false
false
false
false
0
_call_external_program(void) { int status, rc, opt; pid_t cpid; int max_wait = 300; /* seconds */ int time_remaining; debug("step_terminate_monitor: unkillable after %d sec, calling: %s", timeout, program_name); if (program_name == NULL || program_name[0] == '\0') return 0; if (access(program_name, R_...
true
true
false
false
true
1
io_readline( const char * prompt ) { #ifdef __USE_READLINE__ // call the real readline return readline( prompt ); #else // insert our hack char * buf=(char *)malloc( CONSOLE_INPUT_BUFFER_SIZE * sizeof(char) ); char * result; fputs( prompt, stdout ); result = fgets( buf, CONSOLE_INP...
false
false
false
false
false
0
rpi_pin_set(uint8_t pin, uint8_t value) { // this will check pin validity as well int fd = rpi_pin_fd(pin); if (fd < 0) return -1; if (pin_flags[pin] & FPIN_DIR_INPUT) return -1; lseek(fd, 0, SEEK_SET); return (write(fd, value ? "1" : "0", 1) == 1) ? 0 : -1; }
false
false
false
false
false
0
logSonarOptions ( SonarData *sonarData, bool header, bool metaOpts) const { char buf[512]; if (sonarData == NULL) { ArLog::log (ArLog::Normal, "Tried to log sonar options with NULL sonar data"); return; } if (sonarData->mySonar == NULL) { ArLog::log (ArLog::Normal, "ArSonarConnec...
false
false
false
false
false
0
currentComboFormatIndex(QComboBox *comboBox) { int idx = comboBox->currentIndex(); if (idx<0 || idx >= comboBox->count()) { // QMessageBox::critical(0, appName, "*** Internal Error -- current combo index is invalid!"); return 0; } return comboBox->itemData(idx).toInt(); }
false
false
false
false
false
0
ginCompareItemPointers(ItemPointer a, ItemPointer b) { BlockNumber ba = GinItemPointerGetBlockNumber(a); BlockNumber bb = GinItemPointerGetBlockNumber(b); if (ba == bb) { OffsetNumber oa = GinItemPointerGetOffsetNumber(a); OffsetNumber ob = GinItemPointerGetOffsetNumber(b); if (oa == ob) return 0; retu...
false
false
false
false
false
0
chat_scroll(chat_window *cw, GdkEventKey *event) { GtkWidget *scwin = cw->chat->parent; if (event->keyval == GDK_Page_Up) { GtkAdjustment *ga = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW (scwin)); if (ga && ga->value > ga->page_size) { gtk_adjustment_set_value(ga, ga->value - ga->page_size);...
false
false
false
false
false
0
ef_cb_ini_long_line(void) { Efreet_Ini *ini; int ret = 1; struct { char *key; int len; } tests[] = { {"key", 5099}, {"key2", 5099}, {NULL, 0} }; ini = efreet_ini_new(PKG_DATA_DIR"/test/long.ini"); if (!ini) { printf("Ini failed to parse.\n"); ret = 0; } if (ret) ret ...
false
false
false
false
false
0
rd_build_device_space(struct rd_dev *rd_dev) { struct rd_dev_sg_table *sg_table; u32 sg_tables, total_sg_needed; u32 max_sg_per_table = (RD_MAX_ALLOCATION_SIZE / sizeof(struct scatterlist)); int rc; if (rd_dev->rd_page_count <= 0) { pr_err("Illegal page count: %u for Ramdisk device\n", rd_dev->rd_p...
false
false
false
false
false
0
exitVM(int status) { main_exited = TRUE; /* Execute System.exit() to run any registered shutdown hooks. In the unlikely event that System.exit() can't be found, or it returns, fall through and exit. */ if(!VMInitialising()) { Class *system = findSystemClass(SYMBOL(java_lang_System));...
false
false
false
false
true
1
find_pmem_label_set(struct nd_region *nd_region, struct nd_namespace_pmem *nspm) { u64 altcookie = nd_region_interleave_set_altcookie(nd_region); u64 cookie = nd_region_interleave_set_cookie(nd_region); struct nd_namespace_label *nd_label; u8 select_id[NSLABEL_UUID_LEN]; resource_size_t size = 0; u8 *pmem_id = ...
false
false
false
false
false
0
pr_string(struct info *info, struct value *s) { printf("%s", s->string->str); return make_unit(ref(info)); }
false
false
false
false
false
0
get_or_create_channel(struct Client *client_p, const char *chname, int *isnew) { struct Channel *chptr; rb_dlink_node *ptr; unsigned int hashv; int len; const char *s = chname; if(EmptyString(s)) return NULL; len = strlen(s); if(len > CHANNELLEN) { char *t; if(IsServer(client_p)) { sendto_realops_...
false
false
false
false
false
0
resetPresentationState() { DVPresentationState *newState = new DVPresentationState(displayFunction, minimumPrintBitmapWidth, minimumPrintBitmapHeight, maximumPrintBitmapWidth, maximumPrintBitmapHeight, maximumPreviewImageWidth, maximumPreviewImageHeight); if (newState==NULL) return EC_MemoryExhauste...
false
false
false
false
false
0
propfind_addmember(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr resp __attribute__((unused)), struct propstat propstat[], void *rock __attribute__((unused))) { xmlNodePtr node; int len; if (!fctx->req_tgt->collection) return HTTP_NOT_FOUND; ...
false
false
false
false
false
0
comma (unsigned col, struct pentry_state *pest) { if (pest->first) { const struct hol_entry *pe = pest->hhstate->prev_entry; const struct hol_cluster *cl = pest->entry->cluster; if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group) __argp_fmtstream_putc (pest->stream, '\n'); ...
false
false
false
false
false
0
ich_force_hpet_resume(void) { u32 val; if (!force_hpet_address) return; BUG_ON(rcba_base == NULL); /* read the Function Disable register, dword mode only */ val = readl(rcba_base + 0x3404); if (!(val & 0x80)) { /* HPET disabled in HPTC. Trying to enable */ writel(val | 0x80, rcba_base + 0x3404); } val...
false
false
false
false
false
0
main (int argc, char *argv []) { const char *connect_to; int roundtrip_count; int message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; double latency; if (argc != 4) { printf ("usage: remote_lat <connect-to> <message...
false
false
false
false
true
1
subn_set_sl_to_vl(struct ib_smp *smp, struct ib_device *ibdev, u8 port) { struct qib_ibport *ibp = to_iport(ibdev, port); u8 *p = (u8 *) smp->data; unsigned i; if (!(ibp->port_cap_flags & IB_PORT_SL_MAP_SUP)) { smp->status |= IB_SMP_UNSUP_METHOD; return reply(smp); } for (i = 0; i < ARRAY_SIZE(ibp->...
false
false
false
false
false
0
plot_write_tests( unsigned int num_results, const struct exp_result_t *results, FILE *output, bool success ) { unsigned int ret = 0; unsigned int i; for (i = 0; i < num_results; i++) { if (results[i].success != success) { continue; } /* skip tests with less than 5 seconds of runtime. */ if (result...
false
false
false
false
false
0
parse_iso_time(const char *cp, time_t *t) { struct tm st_tm; unsigned int year=0, month=0, day=0, hour=100, minute=100, second=100; if (tor_sscanf(cp, "%u-%2u-%2u %2u:%2u:%2u", &year, &month, &day, &hour, &minute, &second) < 6) { char *esc = esc_for_log(cp); log_warn(LD_GENERAL, "ISO time ...
false
false
false
false
false
0
unix_getcwd(value unit) { char buff[PATH_MAX]; if (getcwd(buff, sizeof(buff)) == 0) uerror("getcwd", Nothing); return copy_string(buff); }
false
false
false
false
false
0
SyroComp_MakeMapBuffer(uint8_t *map_buffer, ReadSample *prp, int *pBitBase, int nBitBase, int type) { int i; uint32_t mcnt; int32_t dat[4]; int32_t datn; int bnum; memset(map_buffer, 0, VOLCASAMPLE_COMP_BLOCK_LEN); bnum = 0; mcnt = 0; map_buffer[mcnt++] = (uint8_t)prp->bitlen_eff; /* fix to full-bit 1st~3...
false
false
false
false
false
0
remove_from_boot_order(uint16_t num) { efi_status_t status; efi_variable_t boot_order; uint64_t new_data_size; uint16_t *new_data, *old_data; int old_i,new_i; char boot_order_name[PATH_MAX]; status = read_boot_order(&boot_order); if (status != EFI_SUCCESS) return status; /* If it's empty, yea! */ if (!boot_o...
true
true
false
false
false
1
rsn_wrapped_buffer_default_release (GstElement * owner, RsnWrappedBuffer * buf) { g_return_val_if_fail (buf != NULL, FALSE); g_return_val_if_fail (buf->wrapped_buffer != NULL, FALSE); gst_buffer_unref (buf->wrapped_buffer); if (buf->owner) gst_object_unref (buf->owner); return FALSE; }
false
false
false
false
false
0
maybe_wail() { static short powers[] = { TELEPORT, SEE_INVIS, POISON_RES, COLD_RES, SHOCK_RES, FIRE_RES, SLEEP_RES, DISINT_RES, TELEPORT_CONTROL, STEALTH, FAST, INVIS }; if (moves <= wailmsg + 50) return; wailmsg = moves; if (Role_if(PM_WIZARD) || Race_if(PM_ELF) || Role_if(PM_VALKYR...
false
false
false
false
false
0
CopyStuff( GRA_threeDPlot const &rhs ) { threeDForm_ = rhs.threeDForm_; x_.assign( rhs.x_.begin(), rhs.x_.end() ); y_.assign( rhs.y_.begin(), rhs.y_.end() ); z_.assign( rhs.z_.begin(), rhs.z_.end() ); xmin_ = rhs.xmin_; xmax_ = rhs.xmax_; ymin_ = rhs.ymin_; ymax_ = rhs.ymax_; zmin_ = rhs.zmin_; zmax...
false
false
false
false
false
0
smic_get_result(struct si_sm_data *smic, unsigned char *data, unsigned int length) { int i; if (smic_debug & SMIC_DEBUG_MSG) { printk(KERN_DEBUG "smic_get result -"); for (i = 0; i < smic->read_pos; i++) printk(" %02x", smic->read_data[i]); printk("\n"); } if (length < smic->read_pos) { smic->read...
false
true
false
false
false
1
rocker_flow_tbl_ig_port(struct rocker_port *rocker_port, struct switchdev_trans *trans, int flags, u32 in_pport, u32 in_pport_mask, enum rocker_of_dpa_table_id goto_tbl) { struct rocker_flow_tbl_entry *entry; entry = rocker_port_kzalloc(rocker_port, trans, flags, sizeof(*entry)); if (!entry) ...
false
false
false
false
false
0
rename() { // Request new filename if (m_filename.isEmpty()) { return false; } QString filename = getSaveFileName(tr("Rename File")); if (filename.isEmpty()) { return false; } // Rename file if (QFile::exists(filename) && (DocumentWatcher::instance()->isWatching(filename) || !QFile::remove(filename))) { ...
false
false
false
false
false
0
rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_param_data *param TSRMLS_DC) /* {{{ */ { if (stmt->bound_param_map) { /* rewriting :name to ? style. * We need to fixup the parameter numbers on the parameters. * If we find that a given named parameter has been used twice, * we will raise an error...
false
false
false
false
false
0
goa_provider_build_object (GoaProvider *provider, GoaObjectSkeleton *object, GKeyFile *key_file, const gchar *group, GDBusConnection *connection, gboole...
false
false
false
true
false
1
setDetailMessages(int newLevel, int numberMessages, int * messageNumbers) { int i; if (numberMessages<3&&messageNumbers) { // do one by one int j; for (j=0;j<numberMessages;j++) { int messageNumber = messageNumbers[j]; for (i=0;i<numberMessages_;i++) { if (message_[i]->externalNum...
false
false
false
false
false
0
progress_event (GfsEvent * event, GfsSimulation * sim) { if ((* GFS_EVENT_CLASS (gfs_output_class())->event) (event, sim)) { gdouble idone = sim->time.i/(gdouble) sim->time.iend; gdouble tdone = sim->time.t/sim->time.end; if (idone > tdone) tdone = idone; fprintf (GFS_OUTPUT (event)->file->fp, ...
false
false
false
false
false
0
strbuf_puts(STRBUF *sb, const char *s) { if (!sb->alloc_failed) { while (*s) { if (sb->curp >= sb->endp) __strbuf_expandbuf(sb, 0); *sb->curp++ = *s++; } } }
false
false
false
false
false
0
remote_client_open(const gchar *path) { RemoteConnection *rc; struct stat st; struct sockaddr_un addr; gint sun_path_len; gint fd; if (stat(path, &st) != 0 || !S_ISSOCK(st.st_mode)) return NULL; fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd == -1) return NULL; addr.sun_family = AF_UNIX; sun_path_len = MIN(s...
false
false
false
false
false
0
createDate() const { GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->createDate() : NULL; return goo ? convertDate(goo->getCString()) : QDateTime(); }
false
false
false
false
false
0
computeFallElevation(float t_passed, bool isSafeFall, float start_velocity) { float termVel; float result; if (isSafeFall) termVel = terminalSavefallVelocity; else termVel = terminalVelocity; if (start_velocity > termVel) start_velocity =...
false
false
false
false
false
0
S_IS_EXTERNAL (symbolS *s) { flagword flags; if (LOCAL_SYMBOL_CHECK (s)) return 0; flags = s->bsym->flags; /* Sanity check. */ if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL)) abort (); return (flags & BSF_GLOBAL) != 0; }
false
false
false
false
false
0
gst_rtcp_packet_get_rb_count (GstRTCPPacket * packet) { g_return_val_if_fail (packet != NULL, 0); g_return_val_if_fail (packet->type == GST_RTCP_TYPE_RR || packet->type == GST_RTCP_TYPE_SR, 0); g_return_val_if_fail (packet->rtcp != NULL, 0); g_return_val_if_fail (packet->rtcp->map.flags & GST_MAP_READ, 0)...
false
false
false
false
false
0
setHoverIndicatorShowStyle( HoverIndicatorShowStyle hover ) { d->hoverIndicatorShowStyle = hover; if( !d->hoveredOver ) { if( d->hoverIndicatorShowStyle == PopupDropperItem::AlwaysShow ) d->hoverIndicatorRectItem->show(); else d->hoverIndicatorRectItem->hide(); } ...
false
false
false
false
false
0
do_model_refresh(EntangleCameraPicker *picker) { g_return_if_fail(ENTANGLE_IS_CAMERA_PICKER(picker)); EntangleCameraPickerPrivate *priv = picker->priv; ENTANGLE_DEBUG("Refresh model"); gtk_list_store_clear(priv->model); if (!priv->cameras) { do_model_sensitivity_update(picker); ret...
false
false
false
false
false
0
g_mtp_volume_mount (GVolume *volume, GMountMountFlags flags, GMountOperation *mount_operation, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer ...
false
false
false
false
false
0
gmpc_metaimage_set_is_visible (GmpcMetaImage * self, gboolean is_visible) { #line 1407 "gmpc-metaimage.c" #define __GOB_FUNCTION__ "Gmpc:MetaImage::set_is_visible" #line 675 "gmpc-metaimage.gob" g_return_if_fail (self != NULL); #line 675 "gmpc-metaimage.gob" g_return_if_fail (GMPC_IS_METAIMAGE (self)); #line 1413 "gm...
false
false
false
false
false
0
calcWidth(bool) { // Check that above threshold. if (ps == 0.) return; // Contributions from W + quark. if (id1Abs == 24 && id2Abs < 6) { widNow = preFac * ps * ( pow2(1. - mr2) + (1. + mr2) * mr1 - 2. * mr1 * mr1 ); // Combine with colour factor and CKM couplings. widNow *= colQ...
false
false
false
false
false
0
get_range(int start, int length) const // Finds a range covering offset=start and returns the length // of intersection of this range with [start, start+length[ // 0 is returned if nothing can be found { DEBUG_MSG("DataPool::BlockList::get_range: start=" << start << " length=" << length << "\n"); ...
false
false
false
false
false
0
PythonMET(PyObject * UNUSED(self), PyObject * args) { int n = ms.nMatchTo ? ms.nMatchTo : MAXSCORE; int i; PyObject *pyMET; PyObject *pyList; if (!PyArg_ParseTuple(args, "|i:matchequiytable", &n)) return NULL; if (n < 0 || n > MAXSCORE) { PyErr_SetString(PyExc_ValueError, _("i...
false
false
false
false
false
0
isl_space_has_tuple_id(__isl_keep isl_space *dim, enum isl_dim_type type) { if (!space_can_have_id(dim, type)) return -1; return dim->tuple_id[type - isl_dim_in] != NULL; }
false
false
false
false
false
0
test_xaccAccountGetPresentBalance (Fixture *fixture, gconstpointer pData) { gnc_numeric val, bal = gnc_numeric_zero (); gfloat dval; gfloat dbal = 0.0; SetupData *sdata = (SetupData*)pData; TxnParms* t_arr; int ind; gint min_ind = 3; g_assert (sdata != NULL); t_arr = (TxnParms*)sdata...
false
false
false
false
false
0
show_temp_mode(struct device *dev, struct device_attribute *attr, char *buf) { struct w83795_data *data = dev_get_drvdata(dev); struct sensor_device_attribute_2 *sensor_attr = to_sensor_dev_attr_2(attr); int index = sensor_attr->index; int tmp; if (data->temp_mode & (1 << index)) tmp = 3; /* Thermal diode ...
false
false
false
false
false
0
sanitizeForStream(const QString &in) { QString out; bool intag = false; bool inquote = false; QChar quotechar; int inlength = in.length(); for(int n = 0; n < inlength; ++n) { QChar c = in[n]; bool escape = false; if(c == '<') { intag = true; } else if(c == '>') { if(inquote) { escape = tr...
false
false
false
false
false
0
spmfind_kmp(const char *a, unsigned long alen, const char *b, unsigned long blen, const gt_kmp_t *pi, unsigned long min_length, bool find_submaximal, bool self_comparison, void(*proc)(unsigned long, bool, void*), bool direction, void* procdata) { gt_kmp_t q; unsigned long max_matchlen; max_matchle...
false
false
false
false
false
0
market_load_goods_now(MarketGoods* marketGoods, float loadQty) { Nation *nationPtr = nation_array[nation_recno]; int marketNationRecno = firm_array[stop_array[dest_stop_id-1].firm_recno]->nation_recno; short qty; int goodsId; if(marketGoods->product_raw_id) { //---------------- is product ------------------...
false
false
false
false
false
0
multi_create_select_to_filename(int select_index,char *filename) { uint idx; // look through the mission list if (Multi_create_list_mode == MULTI_CREATE_SHOW_MISSIONS) { for (idx = 0; idx < Multi_create_mission_list.size(); idx++) { if (Multi_create_mission_list[idx].flags & Multi_create_filter) { select_i...
false
false
false
false
false
0
se_SaveToLadderLog( tOutput const & out ) { if (se_consoleLadderLog) { std::cout << "[L"; if(sn_decorateTS) { std::cout << st_GetCurrentTime(" TS=%Y/%m/%d-%H:%M:%S"); } std::cout << "] " << out << std::endl; } if (sn_GetNetState()!=nCLIENT && !tRecorder::IsPla...
false
false
false
false
false
0
bnx2i_set_ccell_info(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { u32 val; struct bnx2i_hba *hba = bnx2i_dev_to_hba(dev); if (hba->ofld_conns_active) goto skip_config; if (sscanf(buf, " 0x%x ", &val) > 0) { if ((val >= BNX2I_CCELLS_MIN) && (val <= B...
false
false
false
false
false
0
adjustRanks(graph_t * g, int margin_total) { int lht; /* label height */ int rht; /* height between top and bottom ranks */ int delta, maxr, minr, margin; int c, ht1, ht2; rank_t *rank = GD_rank(agroot(g)); if (g == agroot(g)) margin = 0; else margin = late_int (g, G_margin, CL_OFFSET...
false
false
false
false
false
0
copy_complete(int read_err, unsigned long write_err, void *context) { struct dm_thin_new_mapping *m = context; m->err = read_err || write_err ? -EIO : 0; complete_mapping_preparation(m); }
false
false
false
false
false
0
SuffSuffIsSuffix(const Suff *s, char *str) { const char *p1; /* Pointer into suffix name */ char *p2; /* Pointer into string being examined */ size_t len; len = strlen(str); p1 = s->name + s->nameLen; p2 = str + len; while (p1 >= s->name && len > 0 && *p1 == *p2) { p1--; p2--; len--; } return (p1 ==...
false
false
false
false
false
0
ReorderChildrenForView( int* order ) { vtkIdType nc = this->Cursor->num_children(); if ( nc <= 0 ) { return; } struct vtkDistNodeStruct* nodeDistances = new struct vtkDistNodeStruct[nc]; const double* eye = this->Camera->GetPosition(); const double* x; for ( vtkIdType i = 0; i < nc; ++ i ) ...
false
false
false
false
false
0
bfa_ioc_ct_pll_init(void __iomem *rb, enum bfi_asic_mode mode) { u32 pll_sclk, pll_fclk, r32; bfa_boolean_t fcmode = (mode == BFI_ASIC_MODE_FC); pll_sclk = __APP_PLL_SCLK_LRESETN | __APP_PLL_SCLK_ENARST | __APP_PLL_SCLK_RSEL200500 | __APP_PLL_SCLK_P0_1(3U) | __APP_PLL_SCLK_JITLMT0_1(3U) | __APP_PLL_SCLK_CNTLM...
false
false
false
false
false
0
ServiceGenre( const QString &name ) : Meta::Genre() , ServiceDisplayInfoProvider() , ActionsProvider() , SourceInfoProvider() , BookmarkThisProvider() , m_id( 0 ) , m_albumId( 0 ) , m_name( name ) , m_tracks() { //nothing to do }
false
false
false
false
false
0
luckAdjust(const char *sz, const float ar[2], const int nMatchTo) { char **aasz; int i; aasz = g_malloc(3 * sizeof(*aasz)); aasz[0] = g_strdup(sz); for (i = 0; i < 2; ++i) if (nMatchTo) aasz[i + 1] = g_strdup_printf("%+7.2f%%", 100.0f * ar[i]); else aasz[i...
false
false
false
false
false
0
pilFitsHdrWriteString(PilFitsFile *fitsFile, const char *keyName, const char *value, const char *comment) { int status = 0; int type; if (!fitsFile) return EXIT_FAILURE; type = pilFitsKeyType(fitsFile, (char *)keyName); if (type && type != 1) return E...
false
false
false
false
false
0
gssapi_restore(dst_key_t *key, const char *keystr) { OM_uint32 major, minor; unsigned int len; isc_buffer_t *b = NULL; isc_region_t r; gss_buffer_desc gssbuffer; isc_result_t result; len = strlen(keystr); if ((len % 4) != 0U) return (ISC_R_BADBASE64); len = (len / 4) * 3; result = isc_buffer_allocate(key...
false
false
false
false
false
0
ins_compl_addleader(c) int c; { #ifdef FEAT_MBYTE int cc; if (has_mbyte && (cc = (*mb_char2len)(c)) > 1) { char_u buf[MB_MAXBYTES + 1]; (*mb_char2bytes)(c, buf); buf[cc] = NUL; ins_char_bytes(buf, cc); if (compl_opt_refresh_always) AppendToRedobuff(buf); } else #endif { ins_ch...
false
false
false
false
false
0
reset_images(int type) { int indx; RgbaImageT *imgP; /* image stored in "original" space */ RgbaImageT *dmiP; /* image stored in DIW map */ /* Copy the "original" image into the diw_maps */ for(indx=0; indx<NUM_DIW_MAPS; indx++) { if(global_diw_map[indx].width != 0) { switch(type) { case ...
false
true
false
false
false
1
utf8_fromunicode(char *p, unsigned uc) { if (uc <= 0x7f) { *p = uc; return 1; } else if (uc <= 0x7ff) { *p++ = 0xc0 | ((uc & 0x7c0) >> 6); *p = 0x80 | (uc & 0x3f); return 2; } else if (uc <= 0xffff) { *p++ = 0xe0 | ((uc & 0xf000) >> 12); *p++ =...
false
false
false
false
false
0
next_packet_mpegvideo(bgav_demuxer_context_t * ctx) { int ret; bgav_packet_t * p; bgav_stream_t * s; mpegvideo_priv_t * priv; int bytes_to_read; priv = ctx->priv; s = ctx->tt->cur->video_streams; /* Sample accurate: Read data and output as many packets as available */ if(ctx->next_pa...
false
false
false
false
false
0
sched_info_alloc( __isl_keep isl_map *map) { isl_ctx *ctx; isl_space *dim; struct isl_sched_info *info; int i, n; if (!map) return NULL; dim = isl_space_unwrap(isl_space_domain(isl_map_get_space(map))); if (!dim) return NULL; n = isl_space_dim(dim, isl_dim_in); isl_space_free(dim); ctx = isl_map_get_c...
false
false
false
false
false
0
read_string(char *dest, int dest_size, char *src) { unsigned size = ((unsigned char *)src)[0]; if (size+1 > dest_size) { fprintf(stderr,"Text too large; size %d, max is %d\n", size, dest_size-1); exit(1); } strncpy(dest,src+1,size); dest[size] = '\0'; return size; }
false
false
false
false
false
0
test_stash_save__cannot_stash_against_a_bare_repository(void) { git_repository *local; cl_git_pass(git_repository_init(&local, "sorry-it-is-a-non-bare-only-party", 1)); cl_assert_equal_i(GIT_EBAREREPO, git_stash_save(&stash_tip_oid, local, signature, NULL, GIT_STASH_DEFAULT)); git_repository_free(local); }
false
false
false
false
false
0
ReadFieldComponent(PicArray& pic_data1, PicArray& pic_data2, const CompSort& cs) { if (! *m_ip_pic_ptr) return false; //initially set up for 8-bit file input expanded to 10 bits for array output int xl,yl; if (cs == Y_COMP){...
false
false
false
false
false
0
caml_putword(struct channel *channel, uint32 w) { if (! caml_channel_binary_mode(channel)) caml_failwith("output_binary_int: not a binary channel"); putch(channel, w >> 24); putch(channel, w >> 16); putch(channel, w >> 8); putch(channel, w); }
false
false
false
false
false
0
Q1(MagickRealType x) { MagickRealType p, q; register ssize_t i; static const double Pone[] = { 0.3511751914303552822533318e+3, 0.7210391804904475039280863e+3, 0.4259873011654442389886993e+3, 0.831898957673850827325226e+2, 0.45681716295512267064405e+1, 0.35...
false
false
false
false
false
0
snd_pcm_share_hw_refine_cchange(snd_pcm_t *pcm ATTRIBUTE_UNUSED, snd_pcm_hw_params_t *params, snd_pcm_hw_params_t *sparams) { int err; unsigned int links = (SND_PCM_HW_PARBIT_FORMAT | SND_PCM_HW_PARBIT_SUBFORMAT | SND_PCM_HW_PARBIT_RATE | SND_PCM_HW_PARBIT_PERIOD_SIZE | SND...
false
false
false
false
false
0
bclose(BFILE *bfd) { int stat; Dmsg1(400, "Close file %d\n", bfd->fid); if (bfd->cmd_plugin && plugin_bclose) { stat = plugin_bclose(bfd); bfd->fid = -1; bfd->cmd_plugin = false; } if (bfd->fid == -1) { return 0; } #if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_DONTNE...
false
false
false
false
false
0
tp_svc_channel_dispatch_operation_emit_finished (gpointer instance) { g_assert (instance != NULL); g_assert (G_TYPE_CHECK_INSTANCE_TYPE (instance, TP_TYPE_SVC_CHANNEL_DISPATCH_OPERATION)); g_signal_emit (instance, channel_dispatch_operation_signals[SIGNAL_CHANNEL_DISPATCH_OPERATION_Finished], 0); }
false
false
false
false
false
0
gd_revealer_real_realize (GtkWidget *widget) { GdRevealer *revealer = GD_REVEALER (widget); GdRevealerPrivate *priv = revealer->priv; GtkAllocation allocation; GdkWindowAttr attributes = { 0 }; GdkWindowAttributesType attributes_mask; GtkAllocation child_allocation; GtkWidget *child; GtkStyleContext *co...
false
false
false
false
false
0
fast_parse_cookie(kdc_request_t r, const PA_DATA *pa) { krb5_crypto crypto = NULL; krb5_error_code ret; KDCFastCookie data; krb5_data d1; size_t len; ret = decode_KDCFastCookie(pa->padata_value.data, pa->padata_value.length, &data, &len); if (ret) return ret; if (l...
false
false
false
false
false
0
set_palette_function() { int start_token; char saved_dummy_var[MAX_ID_LEN+1]; ++c_token; strncpy( saved_dummy_var, c_dummy_var[0], MAX_ID_LEN ); /* set dummy variable */ #ifdef ALLOW_DUMMY_VAR_FOR_GRAY if (isstring(c_token)) { quote_str( c_dummy_var[0], c_token, MAX_ID_LEN ); ++c_token; ...
false
false
false
false
false
0
op_split_window(void) { if(!allow_output) return; #ifdef DEBUG_IO n_show_debug(E_OUTPUT, "split_window", operand[0]); #endif if(zversion == 6) return; if(operand[0] > 512) { n_show_error(E_OUTPUT, "game is being ridiculous", operand[0]); return; } if(zversion == 3) z_set_height(uppe...
false
false
false
false
false
0
shadow_cancel(shadow_t *shadow) { GList *r; g_assert(shadow != NULL); g_assert(shadow->filter != NULL); if (GUI_PROPERTY(gui_debug) >= 6) g_debug("cancel shadow for filter: %s", shadow->filter->name); for (r = shadow->added; r != NULL; r = r->next) filter_free_rule(r->data); ...
false
false
false
false
false
0
requestEject(const QModelIndex &index) { Solid::Device device = deviceForIndex(index); Solid::OpticalDrive *drive = device.parent().as<Solid::OpticalDrive>(); if (drive!=0) { connect(drive, SIGNAL(ejectDone(Solid::ErrorType,QVariant,QString)), this, SLOT(_k_storageTeardownDone(Soli...
false
false
false
false
false
0
load_const_pool_def(ulong siz) { char buf[32]; uint pool_id; ulong page_count; ulong page_size; /* read the block data */ read_data(buf, 10, &siz); /* decode the pool identifier, page count, and page size */ pool_id = osrp2(buf); page_count = t3rp4u(buf + 2); p...
false
false
false
false
true
1
open() { if(!prefs->use_sound) { log_printf(WLOG, "Sound disabled!\n"); return 0; } if(audio_start(prefs->samplerate, prefs->latency, prefs->use_oss, prefs->cmd_midi, prefs->cmd_pollaudio) < 0) { log_printf(ELOG, "Couldn't initialize audio;" " disabling sound effects.\n"); return -1; } // Channe...
false
false
false
false
false
0
crc32_string (unsigned chksum, const char *string) { do { unsigned value = *string << 24; unsigned ix; for (ix = 8; ix--; value <<= 1) { unsigned feedback; feedback = (value ^ chksum) & 0x80000000 ? 0x04c11db7 : 0; chksum <<= 1; chksum ^= feedback; } } while (*str...
false
false
false
false
false
0
IsClassBeingUsed( DEFCLASS *cls) { register unsigned i; if (cls->busy > 0) return(TRUE); for (i = 0 ; i < cls->directSubclasses.classCount ; i++) if (IsClassBeingUsed(cls->directSubclasses.classArray[i])) return(TRUE); return(FALSE); }
false
false
false
false
false
0