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
CMD_wait_buff_status (PKV_DEV dev, int *front_size, int *back_size) { SANE_Status status = SANE_STATUS_GOOD; int cnt = 0; *front_size = 0; *back_size = 0; DBG (DBG_proc, "CMD_wait_buff_status: enter feed %s\n", dev->val[OPT_MANUALFEED].s); do { DBG (DBG_proc, "CMD_wait_buff_status: tray #...
false
false
false
false
false
0
AcpiDmPldBuffer ( UINT32 Level, UINT8 *ByteData, UINT32 ByteCount) { ACPI_PLD_INFO *PldInfo; ACPI_STATUS Status; /* Check for valid byte count */ if (ByteCount < ACPI_PLD_REV1_BUFFER_SIZE) { return; ...
false
false
false
false
false
0
Perl_gp_free(pTHX_ GV *gv) { dVAR; GP* gp; int attempts = 100; if (!gv || !isGV_with_GP(gv) || !(gp = GvGP(gv))) return; if (gp->gp_refcnt == 0) { Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL), "Attempt to free unreferenced glob pointers" pTHX__FORMAT pTHX__VALUE); return; } ...
false
false
false
false
false
0
_e_smart_monitor_thumb_cb_mouse_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event) { Evas_Event_Mouse_Up *ev; ev = event; if (ev->button == 1) { Evas_Object *mon; E_Smart_Data *sd; /* try to get the objects smart data */ if (!(mon = data)) return; ...
false
false
false
false
false
0
cl_update_hash(void *ctx, void *data, size_t sz) { int winres=0; if (!(ctx) || !(data)) return -1; EXCEPTION_PREAMBLE if (!EVP_DigestUpdate((EVP_MD_CTX *)ctx, data, sz)) return -1; EXCEPTION_POSTAMBLE if (winres) return -1; return 0; }
false
false
false
false
false
0
process_keys(){ float angle_factor = .1; float translate_factor = .1; float scale_factor = .01; if (keys[Up_Arrow]) Theta[Xaxis] += angle_factor; if (keys[Down_Arrow]) Theta[Xaxis] -= angle_factor; if (keys[Left_Arrow]) Theta[Zaxis] -= angle_factor; if (keys[Right_Arr...
false
false
false
false
false
0
parse_pap_value(Octstr *attr_name, Octstr *attr_value, WAPEvent **e) { Octstr *ros; if (*e != NULL) wap_event_dump(*e); ros = octstr_imm("erroneous"); if (octstr_compare(attr_name, octstr_imm("product-name")) == 0) { /* * XXX This is a kludge. * We can't add the pro...
false
false
false
false
false
0
getvalue(Widget w, XtPointer address, XrmQuark type, Cardinal size) #else static void getvalue(w, address, type, size) Widget w; XtPointer address; XrmQuark type; Cardinal size; #endif { if (type == XmtQString) *(String *)address = XmTextFieldGetString(w); else if (type == XmtQBuffer) { String s = XmTextField...
false
false
false
false
false
0
locks_free_lock(struct file_lock *fl) { BUG_ON(waitqueue_active(&fl->fl_wait)); BUG_ON(!list_empty(&fl->fl_list)); BUG_ON(!list_empty(&fl->fl_block)); BUG_ON(!hlist_unhashed(&fl->fl_link)); locks_release_private(fl); kmem_cache_free(filelock_cache, fl); }
false
false
false
false
false
0
PREV(void) { dialog.items[dialog.current].type->unselect(dialog.items + dialog.current); dialog.current = dialog.current ? (dialog.current - 1) : dialog.nitems - 1; uih->display = 1; }
false
false
false
false
false
0
sxgbe_rx_dma_int_status(void __iomem *ioaddr, int channel_no, struct sxgbe_extra_stats *x) { u32 int_status = readl(ioaddr + SXGBE_DMA_CHA_STATUS_REG(channel_no)); u32 clear_val = 0; u32 ret_val = 0; /* RX Normal Interrupt Summary */ if (likely(int_status & SXGBE_DMA_INT_STATUS_NIS)) { x->normal_irq_n++;...
false
false
false
false
false
0
add2seen (dnode_t *cnode) { if (seeni >= seenn) { seenp = Marraygrow (seenp, (long) (seenn + SEENINCR) * SEENSIZE); seenn += SEENINCR; } seenp[seeni].vo = cnode->vo; seenp[seeni++].path = cnode->path; }
false
false
false
false
false
0
GetTag_Double ( XMP_Uns8 ifd, XMP_Uns16 id, double* data ) const { const InternalTagInfo* thisTag = this->FindTagInIFD ( ifd, id ); if ( (thisTag == 0) || (thisTag->dataPtr == 0) ) return false; if ( (thisTag->type != kTIFF_DoubleType) || (thisTag->dataLen != 8) ) return false; if ( data != 0 ) *data = this->GetDo...
false
false
false
false
false
0
zend_multibyte_set_filter(const zend_encoding *onetime_encoding TSRMLS_DC) { const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C); const zend_encoding *script_encoding = onetime_encoding ? onetime_encoding: zend_multibyte_find_script_encoding(TSRMLS_C); if (!script_encoding) { r...
false
false
false
false
false
0
resolve_stack_conflicts(struct player *pplayer, struct player *aplayer, bool verbose) { unit_list_iterate_safe(pplayer->units, punit) { struct tile *ptile = unit_tile(punit); if (is_non_allied_unit_tile(ptile, pplayer)) { unit_list_iterate_safe(ptile->units, aunit) {...
false
false
false
false
true
1
bufgets_peek_line_length (const char *buf) { const char *p = rbuf_get_point(buf); size_t len = 0; if (p == NULL || *p == '\0') { return 0; } while (*p) { if (*p == '\r' || *p == '\n') { break; } else { len++; p++; } } return len + 1; }
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); OptionsTab *_t = static_cast<OptionsTab *>(_o); switch (_id) { case 0: _t->dataChanged(); break; case 1: _t->noDirty((*r...
false
false
false
false
false
0
xmp_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi) { int fd; int res; (void) fi; fd = open(path, O_RDONLY); if (fd == -1) return -errno; res = pread(fd, buf, size, offset); if (res == -1) res = -errno; close(fd); return res; }
false
false
false
false
true
1
set_real_ip_addresses() { char *env; int result; /* localhost ipaddr */ inet_aton( LOCALHOST, &real_local_ipaddr ); /* peer ipaddr */ env = getenv( "REAL_PEER_IPADDR" ); if ( env ) { result = inet_aton( env, &real_peer_ipaddr ); if ( result == 0 ) { printf( "Invalid real peer IP address given.\n" ); ...
false
false
false
false
false
0
displayValuation(BDD& goodVal) { for(stringToBDDvect::const_iterator iter = parVariableNameToBDDVec.begin(); iter != parVariableNameToBDDVec.end(); ++iter) { string varName = iter->first; vector<BDD> pvarv = iter->second; cout << varName << " -> { "; bool nonempty = false; for(unsigned int i...
false
false
false
false
false
0
DirectClean(bool reset, bool all) { while (all ? !empty() : size() > 1) { MovementGenerator* curr = top(); pop(); curr->Finalize(*m_owner); if (!isStatic(curr)) delete curr; } if (!all && reset) { MANGOS_ASSERT(!empty()); top()->Reset(*m_...
false
false
false
false
false
0
krelease(But *but, const char *keystr, KeySym sym) { ButOut retval = BUTOUT_CAUGHT; int newflags = but->flags; Cb *cb = but->iPacket; newflags &= ~(BUT_KEYPRESSED); cb->on = !cb->on; if (cb->press != NULL) retval |= cb->press(but, cb->on); snd_play(&but_upSnd); if (newflags != but->flags) ...
false
false
false
false
false
0
direction_shift_square_set_by_amount_test (void) { g_assert(direction_shift_square_set_by_amount(N, 0xFFFFFFFFFFFFFFFF, 1) == 0x00FFFFFFFFFFFFFF); g_assert(direction_shift_square_set_by_amount(N, 0xFFFFFFFFFFFFFFFF, 2) == 0x0000FFFFFFFFFFFF); g_assert(direction_shift_square_set_by_amount(N, 0xFFFFFFFFFFFFFFFF,...
false
false
false
false
false
0
control_adjust_event_log_severity(void) { int i; int min_log_event=EVENT_ERR_MSG, max_log_event=EVENT_DEBUG_MSG; for (i = EVENT_DEBUG_MSG; i <= EVENT_ERR_MSG; ++i) { if (EVENT_IS_INTERESTING(i)) { min_log_event = i; break; } } for (i = EVENT_ERR_MSG; i >= EVENT_DEBUG_MSG; --i) { if (E...
false
false
false
false
false
0
memoizedGetFlowThrough(unsigned int radInd, unsigned int angInd, unsigned int firstDemand, unsigned int numDemands) { if(numDemands == 0 ) { ...
false
false
false
false
false
0
focusblur_shine_filter_gray_alpha (guchar *pixel, gint gate, gfloat scale, gfloat level, gfloat curve) { const gfloat color_fnum = 1.0f / 255...
false
false
false
false
false
0
warning(const char *fmt, ...) { va_list ap; if (warn_prog != NULL) fprintf(stderr, "%s: ", warn_prog); va_start(ap, fmt); if (fmt != NULL) vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, "\n"); }
false
false
false
false
true
1
set_rank_data(int onlyHasContact) { Nation* viewingNation = NULL; Nation* nationPtr; int rankPos=0; if( nation_array.player_recno && !nation_array.is_deleted(info.viewing_nation_recno) ) viewingNation = nation_array[info.viewing_nation_recno]; memset( nation_rank_data_array, 0, sizeof(nation_rank_data_arra...
false
false
false
false
false
0
test_run_with_input_and_output (Test *test, gconstpointer unused) { const gchar *argv[] = { NULL }; const gchar *data = "one\ntwenty two\nthree\nfourty four\n"; GInputStream *input; GOutputStream *output; GError *error = NULL; GString *string; gchar *script; gboolean ret; scrip...
false
false
false
false
false
0
free_data_buffer(void) { if(data_buffer == NULL) return; for(unsigned int i = 0;i<data_buffer_num;i++) { free(data_buffer[i].data); }; free(data_buffer); data_buffer=NULL; }
false
false
false
false
false
0
AllocStackPos() { SQInteger npos=_vlocals.size(); _vlocals.push_back(SQLocalVarInfo()); if(_vlocals.size()>((SQUnsignedInteger)_stacksize)) { if(_stacksize>MAX_FUNC_STACKSIZE) Error(_SC("internal compiler error: too many locals")); _stacksize=_vlocals.size(); } return npos; }
false
false
false
false
false
0
setup_merge_file(int mergelist_num, filter_rule *ex, filter_rule_list *lp) { char buf[MAXPATHLEN]; char *x, *y, *pat = ex->pattern; unsigned int len; if (!(x = parse_merge_name(pat, NULL, 0)) || *x != '/') return 0; if (DEBUG_GTE(FILTER, 2)) { rprintf(FINFO, "[%s] performing parent_dirscan for mergel...
true
true
false
false
false
1
ReadIntBlock(FILE* fp, int n, int* block) { if (this->BinaryFile) { int retVal=static_cast<int>(fread(block, sizeof(int), n, fp)); if (this->ByteOrder == FILE_LITTLE_ENDIAN) { vtkByteSwap::Swap4LERange(block, n); } else { vtkByteSwap::Swap4BERange(block, n); } r...
false
false
false
false
false
0
mmc_blk_remove_parts(struct mmc_card *card, struct mmc_blk_data *md) { struct list_head *pos, *q; struct mmc_blk_data *part_md; __clear_bit(md->name_idx, name_use); list_for_each_safe(pos, q, &md->part) { part_md = list_entry(pos, struct mmc_blk_data, part); list_del(pos); mmc_blk_remove_req(part_md); ...
false
false
false
false
false
0
prefix() { if (d->prefix.isEmpty()) { return d->prefix; } return d->prefix.left(d->prefix.size() - 1); }
false
false
false
false
false
0
copy_option (GrlOperationOptions *source, GrlOperationOptions *destination, const gchar *key) { const GValue *value; value = g_hash_table_lookup (source->priv->data, key); if (value != NULL) set_value (destination, key, value); }
false
false
false
false
false
0
OnDraw(wxDC& dc) {//================================ int x1,y1; int vX,vY,vW,vH; // Dimensions of client area in pixels int line, start, end; wxRegionIterator upd(GetUpdateRegion()); // get the update rect list while (upd) { vX = upd.GetX(); vY = upd.GetY(); vW = upd.GetW(); vH = upd.GetH(); ...
false
false
false
false
false
0
warnings_enabled(pTHX) { dSP; I32 count; bool isEnabled; SV * mysv; ENTER ; SAVETMPS; PUSHMARK(SP) ; XPUSHs(sv_2mortal(newSVpv("Algorithm::Cluster",18))); PUTBACK ; count = perl_call_pv("warnings::enabled", G_SCALAR) ; if (count != 1) croak("No arguments returned from c...
false
false
false
false
false
0
r128_do_init_pageflip(struct drm_device *dev) { drm_r128_private_t *dev_priv = dev->dev_private; DRM_DEBUG("\n"); dev_priv->crtc_offset = R128_READ(R128_CRTC_OFFSET); dev_priv->crtc_offset_cntl = R128_READ(R128_CRTC_OFFSET_CNTL); R128_WRITE(R128_CRTC_OFFSET, dev_priv->front_offset); R128_WRITE(R128_CRTC_OFFSET_...
false
false
false
false
false
0
vorbis_encode_map_n_res_setup(vorbis_info *vi,double s, vorbis_mapping_template *maps){ codec_setup_info *ci=vi->codec_setup; int i,j,is=s,modes=2; vorbis_info_mapping0 *map=maps[is].map; vorbis_info_mode *mode=_mode_template; vorbis_residue_template *res=maps[is].res; if(ci->blocksizes[0]==ci->blo...
false
false
false
false
false
0
boundary_read_extra_bc (GfsBoundary * b, GtsFile * fp) { gboolean ret = FALSE; if (fp->type != '{') return ret; fp->scope_max++; gts_file_next_token (fp); while (fp->type != GTS_ERROR && fp->type != '}') { if (fp->type == '\n') { gts_file_next_token (fp); continue; } if (fp->typ...
false
true
false
false
true
1
mousePopupMenuImplementation(const QPoint& pos) { QMenu *popup = mousePopupMenu(); if ( popup ) { aboutToShowContextMenu(popup); popup->exec( pos ); delete popup; } }
false
false
false
false
false
0
escape(const std::string& str) { std::string res = "\""; for(size_t n=0; n<str.size(); n++) { char c = str[n]; if(c=='"') res += "\\\""; else if(c=='\\') res += "\\\\"; else res += c; } res += '"'; return res; }
false
false
false
false
false
0
stv090x_search_car_loop(struct stv090x_state *state, s32 inc, s32 timeout, int zigzag, s32 steps_max) { int no_signal, lock = 0; s32 cpt_step = 0, offst_freq, car_max; u32 reg; car_max = state->search_range / 1000; car_max += (car_max / 10); car_max = (65536 * car_max / 2); car_max /= (state->internal->mclk /...
false
false
false
false
false
0
_constructWindow(void) { // load the dialog from the UI file #if GTK_CHECK_VERSION(3,0,0) GtkBuilder* builder = newDialogBuilder("ap_UnixDialog_Stylist.ui"); #else GtkBuilder* builder = newDialogBuilder("ap_UnixDialog_Stylist-2.ui"); #endif const XAP_StringSet * pSS = m_pApp->getStringSet (); m_windowMain = GT...
false
false
false
false
false
0
cache_curtain(Gameboard *g){ int x,y; cairo_t *wc = gdk_cairo_create(g->w.window); cairo_t *c; g->curtains= cairo_surface_create_similar (cairo_get_target (wc), CAIRO_CONTENT_COLOR_ALPHA, CW,CW); cairo_destroy(wc); c = cairo_create(g->curtains); cairo_save(c); cairo_set_operator(c,CAIRO...
false
false
false
false
false
0
init_local_memory_template(const int lm_word, const int dsm_word, const int full_slot_size, const int max_kind, const int all_pe_num) { Lm **lm; int i; lm = zcalloc(all_pe_num, sizeof(Lm*)); for...
false
false
false
false
false
0
_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc __UNUSED__, int line, const char *fmt, void *data __UNUSED__, va_list args) { const char *color; color = eina_log_level_color_get(level); fprintf(stdout, "%s%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%s...
false
false
false
false
true
1
ecv_dispose (GObject *object) { GalA11yECellVbox *gaev = GAL_A11Y_E_CELL_VBOX (object); if (gaev->a11y_subcells) g_free (gaev->a11y_subcells); if (parent_class->dispose) parent_class->dispose (object); }
false
false
false
false
false
0
map_next(mapobject *lz) { PyObject *val; PyObject *argtuple; PyObject *result; Py_ssize_t numargs, i; numargs = PyTuple_Size(lz->iters); argtuple = PyTuple_New(numargs); if (argtuple == NULL) return NULL; for (i=0 ; i<numargs ; i++) { val = PyIter_Next(PyTuple_GET_ITEM(...
false
false
false
false
true
1
do_matches(self_t *self, apr_table_t *headers, int write) { apr_table_entry_t *e; const char *val; int i; char *dup; char *cookie; char *last; char *ignore; char *key; if (!write) { return APR_SUCCESS; } /* write headers */ e = (apr_table_entry_t *) apr_table_elts(headers)->elts; for (...
false
false
false
false
false
0
udp_clone(struct transport *ut, struct sockaddr *raddr) { struct udp_transport *u = (struct udp_transport *)ut; struct udp_transport *u2; struct transport *t; t = malloc(sizeof *u); if (!t) { log_error("udp_clone: malloc (%lu) failed", (unsigned long)sizeof *u); return 0; } u2 = (struct udp_transport ...
false
false
false
false
true
1
happy_meal_bb_read(struct happy_meal *hp, void __iomem *tregs, int reg) { u32 tmp; int retval = 0; int i; ASD(("happy_meal_bb_read: reg=%d ", reg)); /* Enable the MIF BitBang outputs. */ hme_write32(hp, tregs + TCVR_BBOENAB, 1); /* Force BitBang into the idle state. */ for (i = 0; i < 32; i++) BB_...
false
false
false
false
false
0
test_object_tag_list__list_by_pattern(void) { // list all tag names from the repository matching a specified pattern size_t i = 0; while (matches[i].pattern) ensure_tag_pattern_match(g_repo, &matches[i++]); }
false
false
false
false
false
0
open ( void ) throw ( Exception ) { int format; int i; unsigned int u; if ( isOpen() ) { return false; } switch ( getBitsPerSample() ) { case 8: format = AFMT_U8; break; case 16: forma...
false
false
false
false
false
0
config_tls_cleanup(ConfigArgs *c) { int rc = 0; if ( slap_tls_ld ) { int opt = 1; ldap_pvt_tls_ctx_free( slap_tls_ctx ); /* Force new ctx to be created */ rc = ldap_pvt_tls_set_option( slap_tls_ld, LDAP_OPT_X_TLS_NEWCTX, &opt ); if( rc == 0 ) { /* The ctx's refcount is bumped up here */ ldap_pvt_tl...
false
false
false
false
false
0
block_has_import_func_for_sb(Block *block, Boolean sb_flg) { Block *b; Quadruple *qr = block_search_func_qr(block); if (qr != NULL && qr_is_import_func(qr)) return TRUE; else if (qr != NULL && qr_is_import_call(qr)) return TRUE; if (sb_flg && block->kind == SB && block_has_im...
false
false
false
false
false
0
ssh_portcmp(void *av, void *bv) { struct ssh_portfwd *a = (struct ssh_portfwd *) av; struct ssh_portfwd *b = (struct ssh_portfwd *) bv; int i; if (a->type > b->type) return +1; if (a->type < b->type) return -1; if (a->addressfamily > b->addressfamily) return +1; if (a->addressfamily < b->...
false
false
false
false
false
0
italic_angle() const { if (_override_italic_angle) return _italic_angle; else if (cff) { double d; (void) cff->dict_value(Efont::Cff::oItalicAngle, &d); return d; } else return post->italic_angle(); }
false
false
false
false
false
0
mwifiex_cleanup_evt_ring(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; struct mwifiex_evt_buf_desc *desc; struct sk_buff *skb; int i; for (i = 0; i < MWIFIEX_MAX_EVT_BD; i++) { desc = card->evtbd_ring[i]; if (card->evt_buf_list[i]) { skb = card->evt_buf_list[i]; mwif...
false
false
false
false
false
0
get_contributors_xml_string_by_name (GUPnPDIDLLiteObject *object, const char *name) { GList *contributors = NULL; char *ret = NULL; GList *l; xmlBuffer *buffer; contributors = gupnp_didl_lite_object_get_properties (objec...
false
false
false
false
false
0
nlm_search_and_delete (fd_t *fd, char *caller_name) { nlm_fde_t *fde = NULL; nlm_client_t *nlmclnt = NULL; int nlmclnt_found = 0; int fde_found = 0; int transit_cnt = 0; LOCK (&nlm_client_list_lk); list_for_each_entry (nlmclnt, &nlm_c...
false
false
false
false
false
0
msr_read_counter(struct perf_event *event) { u64 now; if (event->hw.event_base) rdmsrl(event->hw.event_base, now); else rdtscll(now); return now; }
false
false
false
false
false
0
custom_attr_window_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data) { if (event && event->keyval == GDK_KEY_Escape) custom_attr_window_close(); else if (event && event->keyval == GDK_KEY_Delete) custom_attr_popup_delete(NULL, NULL); return FALSE; }
false
false
false
false
false
0
addrharvest_set_folder_size( AddressHarvester* harvester, const gint value ) { cm_return_if_fail( harvester != NULL ); if( value > 0 ) { harvester->folderSize = value; } }
false
false
false
false
false
0
Fix() { Isolate* isolate = GetIsolate(); HandleScope scope(isolate); Handle<JSProxy> self(this); if (IsJSFunctionProxy()) { isolate->factory()->BecomeJSFunction(self); // Code will be set on the JavaScript side. } else { isolate->factory()->BecomeJSObject(self); } ASSERT(self->IsJSObject()); ...
false
false
false
false
false
0
snprint_mp_rr_weight (char * buff, int len, void * data) { struct mpentry * mpe = (struct mpentry *)data; if (!mpe->rr_weight) return 0; if (mpe->rr_weight == RR_WEIGHT_PRIO) return snprintf(buff, len, "priorities"); return 0; }
false
false
false
false
false
0
position_set_y (Position* self, gint value) { gint _tmp0_ = 0; gint _tmp1_ = 0; gboolean _tmp2_ = FALSE; gboolean _tmp3_ = FALSE; gboolean _tmp4_ = FALSE; gboolean _tmp7_ = FALSE; gint _tmp12_ = 0; gint _tmp13_ = 0; gboolean _tmp14_ = FALSE; gboolean _tmp15_ = FALSE; gboolean _tmp16_ = FALSE; gboolean _tmp1...
false
false
false
false
false
0
put_octet_array(const _CORBA_Octet* b, int size, omni::alignment_t align) { omni::ptr_arith_t p1, p2; if (pd_remaining) { OMNIORB_ASSERT(!pd_inChunk); OMNIORB_ASSERT(!pd_inHeader); p1 = omni::align_to((omni::ptr_arith_t)pd_outb_mkr, align); p2 = p1 + size; if (p2 > (omni::ptr_arith_t)pd_outb_...
false
false
false
false
false
0
gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs) { struct scatterlist *s, *ps, *start_sg, *sgmap; int need = 0, nextneed, i, out, start; unsigned long pages = 0; unsigned int seg_size; unsigned int max_seg_size; if (nents == 0) re...
false
false
false
false
false
0
removeEmoticon(const QString &emo) { QString emoticon = QFileInfo(emoticonsMap().key(emo.split(' '))).fileName(); QDomElement fce = m_themeXml.firstChildElement("plist").firstChildElement("dict").firstChildElement("dict"); if (fce.isNull()) { return false; } QDomNodeList nl = fce.childNode...
false
false
false
false
false
0
AddZoneToList(GtkWidget *w, gpointer NewZone) { gchar *rowdata[2]; gint row; extern gint changed; GtkTreeView *clocklist; GtkListStore *clocklistModel; GString *description; GString *TZ; GtkTreeIter iter; description = g_string_new( gtk_entry_get_text((GtkEntry *)((AddZoneStruct *)NewZone)->Desc...
false
false
false
false
false
0
Position (const DBObjRecord *record) const { class { private: public: DBUShort Row; DBUShort Col; } uPos; DBPosition pos; if (Length () == sizeof (uPos)) { memcpy (&uPos,(char *) record->Data () + StartByte (),sizeof (uPos)); pos.Row = (DBInt) uPos.Row; pos.Col = (DBInt) uPos.Col; } else ...
false
false
false
false
false
0
firestring_estr_chomp(struct firestring_estr_t * const s) { /* remove trailing whitespace */ while (s->l > 0 && isspace(s->s[s->l - 1])) s->l--; }
false
false
false
false
false
0
build_index_pathkeys(PlannerInfo *root, IndexOptInfo *index, ScanDirection scandir) { List *retval = NIL; ListCell *lc; int i; if (index->sortopfamily == NULL) return NIL; /* non-orderable index */ i = 0; foreach(lc, index->indextlist) { TargetEntry *indextle = (TargetEntry *) lfirst(...
false
false
false
false
false
0
decl_namespace_context (tree decl) { while (1) { if (TREE_CODE (decl) == NAMESPACE_DECL) return decl; else if (TYPE_P (decl)) decl = CP_DECL_CONTEXT (TYPE_MAIN_DECL (decl)); else decl = CP_DECL_CONTEXT (decl); } }
false
false
false
false
false
0
evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h) { #ifdef RECTUPDATE /* int i; if ((w <= 0) || (h <= 0)) return 0; RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); if ((w <= 0) || (h <= 0)) return 0; for (i = 0; i < h; i++) evas_common_regionbuf_span_add(t...
false
false
false
false
false
0
Write(int l,const char *s) { if(!WillOutput(l)) return; DoWrite(s); }
false
false
false
false
false
0
fxrecvtypes(Display *display,Window window,Atom prop,FXDragType*& types,FXuint& numtypes,FXbool del){ unsigned long numitems,bytesleft; unsigned char *ptr; int actualformat; Atom actualtype; types=NULL; numtypes=0; if(prop){ if(XGetWindowProperty(display,window,prop,0,1024,del,XA_ATOM,&actualtype,&act...
false
false
false
false
false
0
bez_get_point(vec3d *out, float u) { int idx; float bez_val; Assert(out != NULL); if(out == NULL){ return; } // calc out->xyz.x = 0.0f; out->xyz.y = 0.0f; out->xyz.z = 0.0f; for(idx=0; idx<num_pts; idx++){ // bez val bez_val = BEZ(idx, num_pts-1, u); // x component out->xyz.x += pts[idx].xyz.x *...
false
false
false
false
false
0
findVerilogTags (void) { vString *const name = vStringNew (); volatile boolean newStatement = TRUE; volatile int c = '\0'; exception_t exception = (exception_t) setjmp (Exception); if (exception == ExceptionNone) while (c != EOF) { c = vGetc (); switch (c) { case ';': case '\n': newStatement = TR...
false
false
false
false
false
0
saa7164_irq_vbi(struct saa7164_port *port) { struct saa7164_dev *dev = port->dev; /* Store old time */ port->last_irq_msecs_diff = port->last_irq_msecs; /* Collect new stats */ port->last_irq_msecs = jiffies_to_msecs(jiffies); /* Calculate stats */ port->last_irq_msecs_diff = port->last_irq_msecs - port->la...
false
false
false
false
false
0
parse_list(char *list, int count, int flags, char **error) { char **lvalue, *p2, *p3, *p4; int was_quoted = 0; int remove_surrounding_double_quotes; int commas_may_be_escaped; remove_surrounding_double_quotes = (flags & PL_REMSURRQUOT); commas_may_be_escaped = (flags & PL_COMMAQUOTE); ...
false
false
false
false
false
0
init_dep (dep_t dep, rtx pro, rtx con, enum reg_note kind) { ds_t ds; if ((current_sched_info->flags & USE_DEPS_LIST)) ds = dk_to_ds (kind); else ds = 0; init_dep_1 (dep, pro, con, kind, ds); }
false
false
false
false
false
0
compat_pagesize_intern(void) #if defined (_SC_PAGESIZE) || defined(_SC_PAGE_SIZE) { long ret; errno = 0; #if defined (_SC_PAGESIZE) ret = sysconf(_SC_PAGESIZE); #else ret = sysconf(_SC_PAGE_SIZE); #endif if (-1L == ret) { return_value_unless(0 == errno, 0); } return ret; }
false
false
false
false
false
0
store_pwm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); struct i2c_client *client = to_i2c_client(dev); struct w83791d_data *data = i2c_get_clientdata(client); int nr = sensor_attr->index; unsigned long ...
false
false
false
false
false
0
getClosestPoint(const SbVec2f & p) const { SbVec2f closest = p; SbVec2f center = this->getCenter(); float devx = closest[0] - center[0]; float devy = closest[1] - center[1]; float halfwidth = (maxpt[0] - minpt[0]) / 2.0f; float halfheight = (maxpt[1] - minpt[1]) / 2.0f; // Move point to be on the neares...
false
false
false
false
false
0
pdf14_output_page(gx_device * dev, int num_copies, int flush) { pdf14_device * pdev = (pdf14_device *)dev; if (pdev->target != NULL) return (*dev_proc(pdev->target, output_page)) (pdev->target, num_copies, flush); return 0; }
false
false
false
false
false
0
f_unparsedeclsinfoofalternatives #ifdef KC_USE_PROTOTYPES (alternatives a_alternatives) #else (a_alternatives) alternatives a_alternatives; #endif #line 713 "../gutil.k" { unparsedeclsinfo tmp = Nilunparsedeclsinfo(); { #line 715 "../gutil.k" alternatives kc_fe_selvar_1 = a_alternatives ; #line 715 "../gutil.k...
false
false
false
true
false
1
f_putenv(int count, VALUE **vals) { VALUE result; char *putenv_str; /* initialize VALUE */ result.v_type = V_NUM; result.v_subtype = V_NOSUBTYPE; /* * parse args */ if (count == 2) { /* firewall */ if (vals[0]->v_type != V_STR || vals[1]->v_type != V_STR) { math_error("Non-string argument for putenv...
false
false
false
false
false
0
mtdblock_writesect(struct mtd_blktrans_dev *dev, unsigned long block, char *buf) { struct mtdblk_dev *mtdblk = container_of(dev, struct mtdblk_dev, mbd); if (unlikely(!mtdblk->cache_data && mtdblk->cache_size)) { mtdblk->cache_data = vmalloc(mtdblk->mbd.mtd->erasesize); if (!mtdblk->cache_data) return...
false
false
false
false
false
0
push_read_file(const char *file) { if (curr_read_depth >= MAX_READ_DEPTH) { fvwm_msg( ERR, "Read", "Nested Read limit %d is reached", MAX_READ_DEPTH); return 0; } prev_read_files[curr_read_depth++] = curr_read_file; curr_read_file = safestrdup(file); if (curr_read_dir) { free(curr_read_dir); } curr...
false
false
false
false
false
0
mouseInput(KGameIO* input, QDataStream& stream, QMouseEvent* mouse, bool* eatevent) { // Only react to mouse pressed not released if (mouse->type() != QEvent::MouseButtonPress ) return; if (mouse->button() != Qt::LeftButton) return ; if (!mIsRunning) return; // Our player KPlayer* player=input->player();...
false
false
false
false
false
0
qhasharr_remove_by_obj(qhasharr_t *tbl, const char *name, size_t namesize) { if (tbl == NULL || name == NULL || namesize == 0) { errno = EINVAL; return false; } qhasharr_data_t *tbldata = tbl->data; // get hash integer uint32_t hash = qhashmurmur3_32(name, namesize) % tbldata->maxs...
false
false
false
false
false
0
_expandColorMap(Field tf, ubyte cmap[768] ) /* Extract the color map and convert to ubyte[3] format */ { Type type; int i, n, rank, shape[32]; Array array; array = (Array)DXGetComponentValue(tf, "color map"); if (! array) { DXSetError(ERROR_MISSING_DATA, "texture map...
false
false
false
false
false
0
check_bitlen_dsa(DSA *dsa, int ispub, unsigned int *pmagic) { int bitlen; bitlen = BN_num_bits(dsa->p); if ((bitlen & 7) || (BN_num_bits(dsa->q) != 160) || (BN_num_bits(dsa->g) > bitlen)) goto badkey; if (ispub) { if (BN_num_bits(dsa->pub_key) > bitlen) goto badkey; *pmagic = MS_DSS1MAGIC; } else ...
false
false
false
false
false
0
autohelperowl_defendpat334(int trans, int move, int color, int action) { int A, B; UNUSED(color); UNUSED(action); A = AFFINE_TRANSFORM(685, trans, move); B = AFFINE_TRANSFORM(646, trans, move); return countlib(A) <= 2 && (somewhere(color, 0, 1, B) || !ATTACK_MACRO(A) || DEFEND_MACRO(A)); }
false
false
false
false
false
0
alloc_expr_node(enum node_type nt) { struct expr_node *x = calloc(1,sizeof(struct expr_node)); if (!x) { ast_log(LOG_ERROR, "Allocation for expr_node FAILED!!\n"); return 0; } x->type = nt; return x; }
false
false
false
false
false
0
atcommand_killmonster_sub(struct block_list *bl,va_list ap) { struct mob_data *md; int drop = va_arg(ap, int); nullpo_retr(0, bl); nullpo_retr(0, md = (struct mob_data *)bl); if (drop) mob_damage(NULL, md, md->hp, 2); else unit_remove_map(&md->bl, 1, 0); return 0; }
false
false
false
false
false
0
sas_ata_wait_eh(struct domain_device *dev) { struct ata_port *ap; if (!dev_is_sata(dev)) return; ap = dev->sata_dev.ap; ata_port_wait_eh(ap); }
false
false
false
false
false
0