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
flood_recalc(fde_t *fd, void *data) { struct Client *client_p = data; struct LocalUser *lclient_p = client_p->localClient; /* allow a bursting client their allocation per second, allow * a client whos flooding an extra 2 per second */ if (IsFloodDone(client_p)) lclient_p->sent_parsed -= 2; else ...
false
false
false
false
false
0
debug_write_unlock(rwlock_t *lock) { RWLOCK_BUG_ON(lock->magic != RWLOCK_MAGIC, lock, "bad magic"); RWLOCK_BUG_ON(lock->owner != current, lock, "wrong owner"); RWLOCK_BUG_ON(lock->owner_cpu != raw_smp_processor_id(), lock, "wrong CPU"); lock->owner = SPINLOCK_OWNER_INIT; lock->owner_cpu = -1; }
false
false
false
false
false
0
mail_signature_script_dialog_commit_cb (GObject *object, GAsyncResult *result, gpointer user_data) { GSimpleAsyncResult *simple; AsyncContext *async_context; GError *error = NULL; simple = G_SIMPLE_ASYNC_RESULT (user_data); async_cont...
false
false
false
false
false
0
kvm_hv_msr_partition_wide(u32 msr) { bool r = false; switch (msr) { case HV_X64_MSR_GUEST_OS_ID: case HV_X64_MSR_HYPERCALL: case HV_X64_MSR_REFERENCE_TSC: case HV_X64_MSR_TIME_REF_COUNT: case HV_X64_MSR_CRASH_CTL: case HV_X64_MSR_CRASH_P0 ... HV_X64_MSR_CRASH_P4: case HV_X64_MSR_RESET: r = true; break; }...
false
false
false
false
false
0
s48_integer_or_floanum_G(long x_734X, long y_735X) { long v_738X; long v_737X; long v_736X; { if ((3 == (3 & x_734X))) { if ((18 == (31 & ((((*((long *) ((((char *) (-3 + x_734X))) + -8))))>>2))))) { if (((*((double *) (((char *) (-3 + y_735X))))) < (*((double *) (((char *) (-3 + x_734X))))))) { ...
false
false
false
false
false
0
cryptui_key_store_set_search_mode (CryptUIKeyStore *ckstore, CryptUIKeyStoreMode mode) { if (ckstore->priv->filter_mode != mode) { ckstore->priv->filter_mode = mode; refilter_later (ckstore); } }
false
false
false
false
false
0
qualcomm_htc_unsolicited_response_handler_construct (GType object_type, FsoGsmModem* modem) { QualcommHtcUnsolicitedResponseHandler * self = NULL; FsoGsmModem* _tmp0_ = NULL; g_return_val_if_fail (modem != NULL, NULL); _tmp0_ = modem; self = (QualcommHtcUnsolicitedResponseHandler*) fso_gsm_at_unsolicited_response_...
false
false
false
false
false
0
search_slot_body(Slot *slot, int mtno, int entry) { Cmp_localize_group_info *g = slot->group_info; if (g != NULL && g->array_access_block[entry] != NULL && in_IntSet(g->array_access_block[entry], mtno)) { return slot; } return NULL; }
false
false
false
false
false
0
std_chg_cmos_gate(register struct gate_t *gp, register word32 i) { register int32 out_chg; if (!chg_cmos_instate(gp, i)) { if (__ev_tracing) trace_gunchg(gp, i); return; } /* this sets __new_gateval to strength if out changed T */ __eval_cmos_gate(gp); if (__new_gateval == __old_gateval) out_chg = FALSE; else ...
false
false
false
false
false
0
getVariable(int vnr) const { CASSERT(mDatenLaenge == ld->mLevelKnoten->getDatenLaenge()); if (vnr < 0) return getSpezConst(vnr); CASSERT(vnr < ld->mLevelKnoten->getDatenLaenge()); return mDaten[vnr]; }
false
false
false
false
false
0
ppp_synctty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct syncppp *ap = sp_get(tty); int __user *p = (int __user *)arg; int err, val; if (!ap) return -ENXIO; err = -EFAULT; switch (cmd) { case PPPIOCGCHAN: err = -EFAULT; if (put_user(ppp_channel_index(&...
false
false
false
false
false
0
glade_gtk_widget_deep_post_create (GladeWidgetAdaptor * adaptor, GObject * widget, GladeCreateReason reason) { GladeWidget *gwidget = glade_widget_get_from_gobject (widget); /* Work around bug 472555 by resetting the default event mask, * this way only user edits will be saved...
false
false
false
false
false
0
find_eqc(struct algn_pos **ap, int seqnum, int pos) { //if(1) printf("%i %i %i\n", ap, seqnum,pos); struct algn_pos *tap = &ap[seqnum][pos]; struct algn_pos *eq_ap; eq_ap = _find_eqc(tap); struct diag_cont *old_dgc; // if(eq_ap->eqcAlgnPos != tap->eqcAlgnPos) { if(eq_ap != tap) { /* if(ta...
false
false
false
false
false
0
KeyUp( const SDL_keysym &key ) { if ( Clicked() && ((key.sym == this->key) || ((flags & WIDGET_DEFAULT) && (key.sym == SDLK_RETURN))) ) { up = ((key.mod & (KMOD_LSHIFT|KMOD_RSHIFT)) == 0); CycleValue(); Release(); return Activate(); } return GUI_OK; }
false
false
false
false
false
0
Move (double x, double y) { Invalidate (); list <Point>::iterator i, end = m_Points.end (); for (i = m_Points.begin (); i != end; i++) { (*i).x += x; (*i).y += y; } BoundsChanged (); Invalidate (); } }
false
false
false
false
false
0
bset_search_write_set(struct bset_tree *t, const struct bkey *search) { unsigned li = 0, ri = t->size; while (li + 1 != ri) { unsigned m = (li + ri) >> 1; if (bkey_cmp(table_to_bkey(t, m), search) > 0) ri = m; else li = m; } return (struct bset_search_iter) { table_to_bkey(t, li), ri <...
false
false
false
false
false
0
dln2_irq_set_type(struct irq_data *irqd, unsigned type) { struct gpio_chip *gc = irq_data_get_irq_chip_data(irqd); struct dln2_gpio *dln2 = container_of(gc, struct dln2_gpio, gpio); int pin = irqd_to_hwirq(irqd); switch (type) { case IRQ_TYPE_LEVEL_HIGH: dln2->irq_type[pin] = DLN2_GPIO_EVENT_LVL_HIGH; break; ...
false
false
false
false
false
0
select1(size_t i) const { if(i==0) return -1; if(i>ones) return -1; // Search over partial sums size_t start=0; size_t end=C_sampling_len-1; size_t med, acc=0, pos; while(start<end-1) { med = (start+end)/2; acc = get_field(C_sampling,C_...
false
false
false
false
false
0
histogram_print_matlab(histogram* h, FILE* fid) { int i; fprintf(fid, "[ "); for (i=0; i<h->Nbins; i++) fprintf(fid, "%s%i", (i ? ", " : ""), h->hist[i]); fprintf(fid, "]"); }
false
false
false
false
false
0
fetchInputData(omni::alignment_t align,size_t required) { OMNIORB_ASSERT(pd_reader); while (1) { omni::ptr_arith_t p1, p2; p1 = omni::align_to((omni::ptr_arith_t)pd_inb_mkr, align); p2 = p1 + required; if (p2 <= (omni::ptr_arith_t)pd_inb_end) return; if (pd_inHeader) { OMNIORB_ASSE...
false
false
false
false
false
0
operator bool() const { if (! quantity) return false; if (quantity->prec <= commodity().precision() || (quantity->flags & BIGINT_KEEP_PREC)) { return mpz_sgn(MPZ(quantity)) != 0; } else { mpz_set(temp, MPZ(quantity)); mpz_ui_pow_ui(divisor, 10, quantity->prec - commodity().precision()); ...
false
false
false
false
false
0
hash (char *v, signed int M) { signed int h = 0; signed int a = 127; /* Skip the 0x at the beginning */ v += 2; for (; *v != '\0'; v++) { h = (a*h + (signed int) *v) % M; } return ((unsigned int) h); }
false
false
false
false
false
0
aq_expand(aqd, newsize) QUEUE *aqd; int4 newsize; { void *new_q; /* new queue array */ int4 size; if (newsize < aqd->aq_maxnelem) { errno = EINVAL; return(LAMERROR); } else if (newsize == aqd->aq_maxnelem) { return(0); } /* * Create a new queue array of a bigger size. */ new_q = (void *) malloc...
false
false
false
false
false
0
cheese_camera_device_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { CheeseCameraDevice *device = CHEESE_CAMERA_DEVICE (object); CheeseCameraDevicePrivate *priv = device->priv; switch (prop_id) { case PROP_NAME: if (priv->name) g_free (priv->na...
false
false
false
false
false
0
ixgbe_reset_hw_X540(struct ixgbe_hw *hw) { s32 status; u32 ctrl, i; /* Call adapter stop to disable tx/rx and clear interrupts */ status = hw->mac.ops.stop_adapter(hw); if (status) return status; /* flush pending Tx transactions */ ixgbe_clear_tx_pending(hw); mac_reset_top: ctrl = IXGBE_CTRL_RST; ctrl |= ...
false
false
false
false
false
0
image_cache_lookup(gx_device_pswrite * pdev, gx_bitmap_id id, int width, int height, bool enter) { int i1, i2; psw_image_params_t *pip1; psw_image_params_t *pip2; if (id == gx_no_bitmap_id) return -1; i1 = id % image_cache_size; pip1 = &pdev->image_cache[i1]; if (...
false
false
false
false
false
0
in_a_p(int p) { /* changed to latched port scheme */ switch( p ) { case 00: break; /* invalid port */ case 01: A = (RP(p) & P1); break; case 02: A = (RP(p) & P2); break; case 03: break; /* invalid port */ default: break; } }
false
false
false
false
false
0
gap_layer_flip(gint32 layer_id, gint32 flip_request) { gint32 center_x; gint32 center_y; gdouble axis; switch(flip_request) { case GAP_STB_FLIP_HOR: axis = (gdouble)(gimp_drawable_width(layer_id)) / 2.0; layer_id = gimp_drawable_transform_flip_simple(layer_id ...
false
false
false
false
false
0
ibdiag_process_opts(int argc, char *const argv[], void *cxt, const char *exclude_common_str, const struct ibdiag_opt custom_opts[], int (*custom_handler) (void *cxt, int val, char *optarg), const char *usage_args, const char *usage_examples[]) { char str_opts[1024]; const struct ibdiag_opt *o;...
true
true
false
false
true
1
es_saveBMP(sdl_data *sd, int len, char* bp) { char *start; SDL_Surface *sptr; int sendlen, res; POPGLPTR(sptr, bp); res = SDL_SaveBMP(sptr, bp); bp = start = sdl_get_temp_buff(sd, 1); put8(bp, res); sendlen = bp - start; sdl_send(sd, sendlen); }
false
false
false
false
false
0
dump(const PDBSymbolTypeFunctionSig &Symbol) { FunctionDumper Dumper(Printer); Dumper.start(Symbol, nullptr, FunctionDumper::PointerType::None); }
false
false
false
false
false
0
Phase1Done(const CECPacket *WXUNUSED(reply)) { CECPacket progress_req(EC_OP_SEARCH_PROGRESS); m_conn->SendRequest(this, &progress_req); return true; }
false
false
false
false
false
0
IEncodeByte(hsStream* S, unsigned int vertsLeft, int chan, const unsigned char*& src, unsigned int stride) { if (fColors[chan].fCount == 0) { ICountBytes(vertsLeft, src, stride, fColors[chan].fCount, fColors[chan].fSame); unsigned short count = fColors[chan].fCount; ...
false
false
false
false
false
0
nautilus_bookmark_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { NautilusBookmark *self = NAUTILUS_BOOKMARK (object); GIcon *new_icon; switch (property_id) { case PROP_ICON: new_icon = g_value_get_object (value); if (new_icon != NULL && !g_icon_equal (s...
false
false
false
false
false
0
redir_probe(AVProbeData *pd) { const char *p; p = pd->buf; while (redir_isspace(*p)) p++; if (av_strstart(p, "http://", NULL) || av_strstart(p, "rtsp://", NULL)) return AVPROBE_SCORE_MAX; return 0; }
false
false
false
false
false
0
equinox_style_draw_resize_grip (GtkStyle * style, GdkWindow * window, GtkStateType state_type, GdkRectangle * area, GtkWidget * widget, const gchar * detail, GdkWindowEdge edge, gint x, gint y, gint width, gint height) { EquinoxStyle *equinox_style ...
false
false
false
false
false
0
isAtNumericField(const UnicodeString &pattern, int32_t patternOffset) { if (patternOffset >= pattern.length()) { // not at any field return FALSE; } UChar ch = pattern.charAt(patternOffset); UDateFormatField f = DateFormatSymbols::getPatternCharIndex(ch); if (f == UDAT_FIELD_COUNT) {...
false
false
false
false
false
0
greallocn(void *p, int nObjs, int objSize, bool checkoverflow) GMEM_EXCEP { int n; if (nObjs == 0) { if (p) { gfree(p); } return NULL; } n = nObjs * objSize; if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) { #if USE_EXCEPTIONS throw GMemException(); #else fprintf(stderr...
false
false
false
false
false
0
getSmallConstantTripCount(Loop *L, BasicBlock *ExitBlock) { const SCEVConstant *ExitCount = dyn_cast<SCEVConstant>(getExitCount(L, ExitBlock)); if (!ExitCount) return 0; ConstantInt *ExitConst = ExitCount->getValue(); // Guard against huge trip count...
false
false
false
false
false
0
P_List_Depths (Object d, Object scr) { int num; register int *p, i; Object ret; Check_Type (d, T_Display); if (!(p = XListDepths (DISPLAY(d)->dpy, Get_Screen_Number (DISPLAY(d)->dpy, scr), &num))) return False; ret = Make_Vector (num, Null); for (i = 0; i < num; i++) ...
false
false
false
false
false
0
ExecARUpdateTriggers(EState *estate, ResultRelInfo *relinfo, ItemPointer tupleid, HeapTuple newtuple) { TriggerDesc *trigdesc = relinfo->ri_TrigDesc; if (trigdesc && trigdesc->n_after_row[TRIGGER_EVENT_UPDATE] > 0) { HeapTuple trigtuple = GetTupleForTrigger(estate, relinfo, tupleid, NULL); ...
false
false
false
false
false
0
dict_foreign_error_report( /*======================*/ FILE* file, /*!< in: output stream */ dict_foreign_t* fk, /*!< in: foreign key constraint */ const char* msg) /*!< in: the error message */ { mutex_enter(&dict_foreign_err_mutex); dict_foreign_error_report_low(file, fk->foreign_table_name); fputs(msg, file); ...
false
false
false
false
false
0
updatePageRect() { if ( mIsResizeEnabled ) { QRectF pageRect(0,0,0,0); pageRect.setWidth( mRect.width() - 2*PAGE_ITEM_OUT_MARGIN ); pageRect.setHeight( mRect.height() - 2*PAGE_ITEM_OUT_MARGIN ); mPage->setRect( pageRect ); mPage->setPos( PAGE_ITEM_OUT_MARGIN , PAGE_ITEM_OUT_MARGIN ); mBackgroundItemResi...
false
false
false
false
false
0
demangle (std::string const & l) { std::string::size_type const b = l.find_first_of ("("); if (b == std::string::npos) { return l; } std::string::size_type const p = l.find_last_of ("+"); if (p == std::string::npos) { return l; } if ((p - b) <= 1) { return l; } std::string const fn = l.substr (b + 1,...
false
false
false
false
false
0
mixer(Act a) { int r = -1; if (m_iMixFd >= 0 && m_Owf.wFormatTag != 0x2000) { int devm; ioctl(m_iMixFd, SOUND_MIXER_READ_DEVMASK, &devm); if (devm & SOUND_MASK_PCM) { int t = 0; switch (a) { case GET: ioctl(m_iMixFd, SOUND_MIXER_READ_PCM, &t); //printf("GET %x\n", t); ...
false
false
false
false
false
0
symbol_deinit(const route_head* hd) { queue* elem, *tmp; waypoint* waypointp; int i; double lat1,lon1,lat2,lon2; double lats,lons,late,lone; double dist,d,dd; lat1 = lon1 = lat2 = lon2 = 0.0; lats = lons = late = lone = 0.0; dist = 0.0; i = 0; QUEUE_FOR_EACH(&(hd->waypoint_list), elem, tmp) { ...
false
false
false
false
false
0
addto_char_list(List char_list, char *names) { int i=0, start=0; char *name = NULL, *tmp_char = NULL; ListIterator itr = NULL; if (!char_list) { error("No list was given to fill in"); return; } itr = list_iterator_create(char_list); if (names) { if (names[i] == '\"' || names[i] == '\'') i++; start =...
false
true
false
false
false
1
_gth_slideshow_close (GthSlideshow *self) { gboolean close_browser; GthBrowser *browser; browser = self->priv->browser; close_browser = ! gtk_widget_get_visible (GTK_WIDGET (browser)); self->priv->projector->show_cursor (self); self->priv->projector->finalize (self); gtk_widget_destroy (GTK_WIDGET (self)); ...
false
false
false
false
false
0
lock_semaphore(key_t key) { struct sembuf s; int id, retval; id = semget(key, 0, 0); if (id < 0) { return ERR_SEMGET; } s.sem_num = 0; s.sem_op = -1; s.sem_flg = SEM_UNDO; retval = semop(id, &s, 1); if (retval) { return ERR_SEMOP; } return 0; }
false
false
false
false
false
0
Evaluate() { ResultList *result = 0; operands.Start_Get(); Query *next = (Query *)operands.Get_Next(); if(next) { result = (ResultList *)next->GetResults(); next = (Query *)operands.Get_Next(); } if(result) { result = new ResultList(*result); } while(result && next) { ResultList *r = next->GetResult...
false
false
false
false
false
0
get_cpu_times (int cpu_id, gint64 *user, gint64 *systemt, gint64 *irq, gint64 *sirq, gint64 *idle) { char buf [256]; char *s; int hz = get_user_hz (); guint64 user_ticks = 0, nice_ticks = 0, system_ticks = 0, idle_ticks = 0, irq_ticks = 0, sirq_ticks = 0; FILE *f = fopen ("/proc/stat", "r"); if (!f) return; if...
true
true
false
false
true
1
store_global_beep(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct nct6683_data *data = dev_get_drvdata(dev); unsigned long val; u8 reg; int ret; if (kstrtoul(buf, 10, &val) || (val != 0 && val != 1)) return -EINVAL; mutex_lock(&data->update_lock); ret = superio...
false
false
false
false
false
0
same_stream_and_mailbox(char *name, MAILSTREAM *stream) { NETMBX mb_s, mb_n; if(same_stream(name, stream) && mail_valid_net_parse(stream->mailbox, &mb_s) && mail_valid_net_parse(name, &mb_n) && (mb_n.mailbox && mb_s.mailbox && (!strcmp(mb_n.mailbox,mb_s.mailbox) /* case depend exc...
false
false
false
false
false
0
nautilus_previewer_call_show_file (NautilusPreviewer *self, const gchar *uri, guint xid, gboolean close_if_already_visible) { GVariant *variant; variant = g_variant_new ("(sib)", uri, xid, close_if_already_visib...
false
false
false
false
false
0
modperl_apr_perlio_PerlIO_to_glob(pTHX_ PerlIO *pio, modperl_apr_perlio_hook_e type) { SV *retval = modperl_perl_gensym(aTHX_ "APR::PerlIO"); GV *gv = (GV*)SvRV(retval); gv_IOadd(gv); switch (type) { case MODPERL_APR_PERLIO_HOOK_WRITE: /* if...
false
false
false
false
false
0
LogDPCM(int romaddress, int dpcmsize){ int i = GetPRGAddress(romaddress); if(i == -1)return; for (int dpcmstart = i; dpcmstart < (i + dpcmsize); dpcmstart++) { if(!(cdloggerdata[dpcmstart] & 0x40)) { cdloggerdata[dpcmstart] |= 0x40; if(!(cdloggerdata[dpcmstart] & 2)){ datacount++; cdlog...
false
false
false
false
false
0
send_tiger_bc(struct tiger_hw *card, struct tiger_ch *bc) { int ret; bc->free += card->send.size / 2; if (bc->free >= card->send.size) { if (!(bc->txstate & (TX_UNDERRUN | TX_INIT))) { pr_info("%s: B%1d TX underrun state %x\n", card->name, bc->bch.nr, bc->txstate); bc->txstate |= TX_UNDERRUN; } bc->...
false
false
false
false
false
0
unpremultiply_data (png_structp png, png_row_infop row_info, png_bytep data) { unsigned int i; for (i = 0; i < row_info->rowbytes; i += 4) { uint8_t *b = &data[i]; uint32_t pixel; uint8_t alpha; memcpy (&pixel, b, sizeof (uint32_t)); ...
false
true
false
false
false
1
ReadResource(const std::string& id, size_t index) const { const Entry* entry = GetEntry(id); if (LS_UNLOCKED != entry->lock_state) return NULL; if (index >= entry->streams) return NULL; scoped_ptr<FileStream> file(new FileStream); if (!file->Open(IdToFilename(...
false
false
false
false
false
0
application_selected_cb (GtkAppChooserWidget *widget, GAppInfo *info, gpointer user_data) { NautilusMimeApplicationChooser *chooser = user_data; GAppInfo *default_app; default_app = g_app_info_get_default_for_type (chooser->details->content_type, FALSE); if (default_app != NULL) { gtk_widget_set_sensitiv...
false
false
false
false
false
0
nm_secret_agent_cancel_secrets (NMSecretAgent *self, gconstpointer call) { NMSecretAgentPrivate *priv; Request *r; g_return_if_fail (self != NULL); priv = NM_SECRET_AGENT_GET_PRIVATE (self); g_return_if_fail (priv->proxy != NULL); r = g_hash_table_lookup (priv->requests, call); g_return_if_fail (r != NULL); ...
false
false
false
false
false
0
lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe) { bool workposted = false; struct lpfc_queue *hrq = phba->sli4_hba.hdr_rq; struct lpfc_queue *drq = phba->sli4_hba.dat_rq; struct hbq_dmabuf *dma_buf; uint32_t status, rq_id; unsigned long iflags; /* sanity check on queue memory */ if (unl...
false
false
false
false
false
0
find_map(struct mixer_build *state, int unitid, int control) { const struct usbmix_name_map *p = state->map; if (!p) return NULL; for (p = state->map; p->id; p++) { if (p->id == unitid && (!control || !p->control || control == p->control)) return p; } return NULL; }
false
false
false
false
false
0
requires_tex_eps(CmdLineArgSet* device, CmdLineObj* cmdline) { if (!cmdline->hasOption(GLE_OPT_CREATE_INC)) { if (device->hasValue(GLE_DEVICE_EPS)) return true; if (device->hasValue(GLE_DEVICE_PDF) && !has_pdflatex(cmdline)) return true; } if (!hasGenerated(GLE_DEVICE_PDF)) { if (device->hasValue(GLE_DEVICE_JP...
false
false
false
false
false
0
__pyx_f_7dumbnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_device = 0; int __pyx_r; char *__pyx_1; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"device",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __p...
false
false
false
false
false
0
ffu2fi1(unsigned short *input, /* I - array of values to be converted */ long ntodo, /* I - number of elements in the array */ double scale, /* I - FITS TSCALn or BSCALE value */ double zero, /* I - FITS TZEROn or BZERO value */ ...
false
false
false
false
false
0
gc_close (void) { FILE *f = getnonullfile(FIRSTARG); if (f != stdin && f != stdout && f != stderr) { CLOSEFILE(f); } }
false
false
false
false
false
0
wlcore_channel_switch_work(struct work_struct *work) { struct delayed_work *dwork; struct wl1271 *wl; struct ieee80211_vif *vif; struct wl12xx_vif *wlvif; int ret; dwork = container_of(work, struct delayed_work, work); wlvif = container_of(dwork, struct wl12xx_vif, channel_switch_work); wl = wlvif->wl; wl127...
false
false
false
false
false
0
mk_MD5Parse(unsigned char in[33], unsigned char out[16]) { int i = 0; for (i = 0; i < 16; i++) { if (in[2*i] >= '0' && in[2*i] <= '9') in[2*i] -= '0'; else if (in[2*i] >= 'A' && in[2*i] <= 'F') in[2*i] += 10 - 'A'; else if (in[2*i] >= 'a' && in[2*i] <= 'f') ...
false
false
false
false
false
0
DeleteLayer( int iLayer) { if( iLayer < 0 || iLayer >= nLayers ) return OGRERR_FAILURE; /* -------------------------------------------------------------------- */ /* Blow away our OGR structures related to the layer. This is */ /* pretty dangerous if anything has a reference to this...
false
false
false
false
false
0
parseDescriptionSetting(wxPanel* page, wxXmlNode* xmln, PrefDlgSetting* enabledby) { #if wxCHECK_VERSION(2, 9, 0) wxString type(xmln->GetAttribute(wxT("type"), wxEmptyString)); wxString style(xmln->GetAttribute(wxT("style"), wxEmptyString)); #else wxString type(xmln->GetPropVal(wxT("type"), wxEmptyStrin...
false
false
false
false
false
0
show_happiness_popup(GtkWidget *w, GdkEventButton *ev, gpointer data) { struct happiness_dialog *pdialog = g_object_get_data(G_OBJECT(w), "pdialog"); if (ev->button == 1) { GtkWidge...
true
true
false
false
false
1
PrintInfo() { std::cerr << "Used options:" << std::endl; std::cerr << "\tText reordering table will be read from: " << m_inPath << std::endl; std::cerr << "\tOutput reordering table will be written to: " << m_outPath << std::endl; std::cerr << "\tStep size for source landmark phrases: 2^" << m_orderBits << "=...
false
false
false
false
false
0
cem3394_set_voltage(int chipnum, int input, double voltage) { sound_chip *chip = &chip_list[chipnum]; double temp; /* don't do anything if no change */ if (voltage == chip->values[input]) return; chip->values[input] = voltage; /* update the stream first */ stream_update(chip->stream, 0); /* sw...
false
false
false
false
false
0
audio_amplify (float * data, int channels, int frames, float * factors) { float * end = data + channels * frames; int channel; while (data < end) { for (channel = 0; channel < channels; channel ++) { * data = * data * factors[channel]; data ++; } } }
false
false
false
false
false
0
GetGain(int fundamental, int binPos, int bandNum) { //first we find whether the binPos is on a positive or negative slope part //auxiliary data TData period = fundamental; //compute mid point int midPoint = int (period * 0.5); bool ascending = false; if ((binPos - fundamental*bandNum)> midPoint || bandNum ==...
false
false
false
false
false
0
dumpTopology(const char *fileName, const char * ibnlDir) { ofstream sout; sout.open(fileName); if (sout.fail()) { cout << "-E- failed to open:" << fileName << " for writing." << endl; return 1; } sout << "# This topology file was automaticlly generated by IBDM" << endl; // we st...
false
false
false
false
false
0
width_dialog(const gchar *text, gint width, void (*func)(gpointer userdata, guint width), gpointer userdata) { Dialog *dlg; GtkWidget *vbox, *label, *spin; GtkAdjustment *adj; vbox = gtk_vbox_new(FALSE, 0); label = gtk_label_new(text); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); spin = gtk_spin...
false
false
false
false
false
0
__ecereMethod_DynamicString_copyLenSingleBlankReplTrim(struct __ecereNameSpace__ecere__com__Instance * this, char * s, char replace, unsigned int trim, int copyLen) { size_t __simpleStruct0; __ecereMethod_DynamicString_privateCommonCopyLenSingleBlankReplTrim(this, s, replace, trim, (__simpleStruct0 = strlen(s), (__sim...
false
false
false
false
false
0
longToString(int64_t l) { if (l == LUCENE_INT64_MIN_SHOULDBE) { // special case, because long is not symetric around zero return stringDuplicate(MIN_STRING_VALUE); } TCHAR* buf = _CL_NEWARRAY(TCHAR, STR_SIZE + 1); if (l < 0) { buf[0] = NEGATIVE_PREFIX[0]; l = LUCENE_INT64_MAX_SHOULDBE + l + 1; } else { ...
false
false
false
false
false
0
g_utf8_strchomp (char *string) { char *scan; gsize len; g_return_val_if_fail (string != NULL, NULL); len = g_utf8_strlen (string, -1); if (len == 0) return string; scan = g_utf8_offset_to_pointer (string, len - 1); while (len--) { gunichar c = g_utf8_get_char (scan); if (g_unichar_isspace (c)) ...
false
false
false
false
false
0
pipeline_thread(void *arg) { int workeridx; int status; WORK_ITEM *item; void *newItem; WORKER_INFO *info; ESL_THREADS *obj; ESL_SQ *sq = NULL; obj = (ESL_THREADS *) arg; esl_threads_Started(obj, &workeridx); info = (WORKER_INFO *) esl_threads_GetDat...
false
false
false
false
false
0
show_master_fader_leds(struct device *dev, struct device_attribute *attr, char *buf) { struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); struct lp55xx_chip *chip = led->chip; int i, ret, pos = 0; u8 val; mutex_lock(&chip->lock); for (i = 0; i < LP5523_MAX_LEDS; i++) { ret = ...
false
false
false
false
false
0
arcmsr_hbaA_postqueue_isr(struct AdapterControlBlock *acb) { uint32_t flag_ccb; struct MessageUnit_A __iomem *reg = acb->pmuA; struct ARCMSR_CDB *pARCMSR_CDB; struct CommandControlBlock *pCCB; bool error; while ((flag_ccb = readl(&reg->outbound_queueport)) != 0xFFFFFFFF) { pARCMSR_CDB = (struct ARCMSR_CDB *)(ac...
false
false
false
false
false
0
__remainderl (long double x, long double y) { if (((__builtin_expect (y == 0.0L, 0) && ! __isnanl (x)) || (__builtin_expect (__isinf_nsl (x), 0) && ! __isnanl (y))) && _LIB_VERSION != _IEEE_) return __kernel_standard_l (x, y, 228); /* remainder domain */ return __ieee754_remainderl (x, y); }
false
false
false
false
false
0
log_msg_append(const gchar *type, const gchar *data) { gchar *entry; entry = g_strdup_printf("%s:%s%c", type, data, LOG_MSEPARATOR); if (strlen(msgbuf.mtext) + strlen(entry) + 1 > LOG_MSG_LEN) { g_warning("log message too long, entry dropped: %s\n", entry); g_free(entry); return; } strcat(msgbuf.mtext, en...
false
false
false
false
false
0
epu_cmd(struct cx18 *cx, struct cx18_in_work_order *order) { switch (order->rpu) { case CPU: { switch (order->mb.cmd) { case CX18_EPU_DMA_DONE: epu_dma_done(cx, order); break; case CX18_EPU_DEBUG: epu_debug(cx, order); break; default: CX18_WARN("Unknown CPU to EPU mailbox command %#0x\n", ...
false
false
false
false
false
0
AddClass(const uc16* elmv, int elmc, ZoneList<CharacterRange>* ranges) { for (int i = 0; i < elmc; i += 2) { ASSERT(elmv[i] <= elmv[i + 1]); ranges->Add(CharacterRange(elmv[i], elmv[i + 1])); } }
false
false
false
false
false
0
Cns_update_unique_gid(dbfd, unique_id) struct Cns_dbfd *dbfd; unsigned int unique_id; { char func[22]; static char insert_stmt[] = "INSERT INTO Cns_unique_gid (ID) VALUES (%d)"; static char query_stmt[] = "SELECT ID FROM Cns_unique_gid FOR UPDATE"; PGresult *res; char sql_stmt[1024]; static char update_stmt[]...
false
false
false
false
false
0
dir_l_add(struct gfs2_inode *dip, const char *filename, int len, struct gfs2_inum *inum, unsigned int type) { struct gfs2_dirent *dent; int err = 0; if (dirent_alloc(dip, dip->i_bh, len, &dent)) { dir_make_exhash(dip); err = dir_e_add(dip, filename, len, inum, type); return err; } gfs2_inum_out(inu...
false
false
false
false
false
0
PR_SetSysfdTableSize(PRIntn table_size) { #if defined(AIX) || defined(SYMBIAN) return -1; #else struct rlimit rlim; PRInt32 tableMax = PR_GetSysfdTableMax(); if (tableMax < 0) return -1; rlim.rlim_max = tableMax; /* Grow as much as we can; even if too big */ if ( rlim.rlim_max < table_size...
false
false
false
false
false
0
__apu_get_register(struct es1968 *chip, u16 channel, u8 reg) { if (snd_BUG_ON(channel >= NR_APUS)) return 0; reg |= (channel << 4); apu_index_set(chip, reg); return __maestro_read(chip, IDR0_DATA_PORT); }
false
false
false
false
false
0
getOuterBoundary() { if ( modelData == NULL || !(modelData->status & BE_OUTER_CHECKED) ) return NULL; return findOuterBoundary(); }
false
false
false
false
false
0
is_connected() { bool connected = false; foreach(DirComm* dircomm, m_dircommHash) { if (dircomm->is_connected()) return true; } return connected; }
false
false
false
false
false
0
delete_rows(LPdata *lp_data, int deletable, int *free_rows) { int i, m = lp_data->m; int *which = lp_data->tmp.i1 + lp_data->m; int delnum = 0; CoinFillN(which, deletable, 0); for (i = 0; i < m; i++){ if (free_rows[i]){ which[delnum++] = i; } } lp_data->si->deleteRows(...
false
false
false
false
false
0
_ipmiconsole_poll (struct pollfd *ufds, unsigned int nfds, int timeout) { int n; struct timeval tv, tv_orig; struct timeval start, end, delta; assert (ufds); /* prep for EINTR handling */ if (timeout >= 0) { /* poll uses timeout in milliseconds */ tv_orig.tv_sec = (long)timeout/1000; ...
true
true
false
false
true
1
e_qa_config_entry_transient_convert(E_Quick_Access_Entry *entry) { if (!entry) return; if (!entry->cfg_entry) return; _list_item_delete(entry); entry->transient = !entry->transient; _list_item_add(entry); entry->transient = !entry->transient; }
false
false
false
false
false
0
Infoclr_init_data(Pixell fg, Pixell bg, int op, int stip) { infoclr *iclr = Infoclr; GC gc; XGCValues gcv; unsigned long gc_mask; /*** Simple error checking of opr and clr ***/ /* Check the 'Pixells' for realism */ if (bg > Metadpy->zg) return (-1); if (fg > Metadpy->zg) return (-1); /* Check the data fo...
false
false
false
false
false
0
brin_vacuum_scan(Relation idxrel, BufferAccessStrategy strategy) { bool vacuum_fsm = false; BlockNumber blkno; /* * Scan the index in physical order, and clean up any possible mess in * each page. */ for (blkno = 0; blkno < RelationGetNumberOfBlocks(idxrel); blkno++) { Buffer buf; CHECK_FOR_INTERRUPT...
false
false
false
false
false
0
validate_struct_blob (ValidateContext *ctx, guint32 offset, guint16 blob_type, GError **error) { GITypelib *typelib = ctx->typelib; StructBlob *blob; gint i; guint32 field_offset; if (typelib->len < offset + sizeof (StructBlob)) { g_set_error (error, ...
false
false
false
false
false
0