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
lua_pushstring (char *s) { if (s == NULL) tag(top) = LUA_T_NIL; else { tsvalue(top) = lua_createstring(s); tag(top) = LUA_T_STRING; } incr_top; }
false
false
false
false
false
0
is_input_event (XEvent *event) { MetaDisplay *display = meta_get_display (); return (event->type == GenericEvent && event->xcookie.extension == display->xinput_opcode); }
false
false
false
false
false
0
formatHex(const void *buf, int length) { static char hex[385]; u_char *p = (u_char *)buf; int i; if (length > 128) length = 128; for (i=0; i<length; i++) sprintf(hex+3*i,"%02x:", p[i]); hex[3*length-1] = '\0'; return hex; }
false
false
false
false
false
0
rb_io_set_sync(io, mode) VALUE io, mode; { OpenFile *fptr; GetOpenFile(io, fptr); if (RTEST(mode)) { fptr->mode |= FMODE_SYNC; } else { fptr->mode &= ~FMODE_SYNC; } return mode; }
false
false
false
false
false
0
get_medion_keymap(struct usb_interface *interface) { struct usb_device *udev = interface_to_usbdev(interface); /* * There are many different Medion remotes shipped with a receiver * with the same usb id, but the receivers have subtle differences * in the USB descriptors allowing us to detect them. */ if (u...
false
false
false
false
false
0
gdkselection_gdk_selection_owner_get(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj selection_scm; GdkAtom selection; ScmObj SCM_SUBRARGS[1]; int SCM_i; SCM_ENTER_SUBR("gdk-selection-owner-get"); for (SCM_i=0; SCM_i<1; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i); } selection_scm = SCM_...
false
false
false
false
false
0
rxq_process(struct ieee80211_hw *hw, int index, int limit) { struct mwl8k_priv *priv = hw->priv; struct mwl8k_vif *mwl8k_vif = NULL; struct mwl8k_rx_queue *rxq = priv->rxq + index; int processed; processed = 0; while (rxq->rxd_count && limit--) { struct sk_buff *skb; void *rxd; int pkt_len; struct ieee80...
false
false
false
false
false
0
TransformPoint(SplinePoint *sp, real transform[6]) { BpTransform(&sp->me,&sp->me,transform); if ( !sp->nonextcp ) { BpTransform(&sp->nextcp,&sp->nextcp,transform); } else sp->nextcp = sp->me; if ( !sp->noprevcp ) { BpTransform(&sp->prevcp,&sp->prevcp,transform); } else sp->prevcp = sp->me; ...
false
false
false
false
false
0
draw(PainterInfo & pi, int x, int y) const { StyleChanger dummy(pi.base, style_); cell(0).draw(pi, x + 1, y); drawMarkers(pi, x, y); }
false
false
false
false
false
0
smi_redirect(uint32_t base) { uint32_t ret; /* enable APMC decoding/SMI generation in the PIIX configspace */ ret = pci_creadl(0, PIIX_DEV, PIIX_PM_FN, DEVACTB); if (ret & APMC_EN) { dprintf("BIOS: trigger_smi: APMC_EN was already set!\n"); } ret |= APMC_EN; outl(ret, PCICONF_DATA); /* enable SMI generation...
false
false
false
false
false
0
save(const FXdouble* p,FXuval n){ register const FXuchar *q=(const FXuchar*)p; if(code==FXStreamOK){ n<<=3; FXASSERT(begptr<=rdptr); FXASSERT(rdptr<=wrptr); FXASSERT(wrptr<=endptr); if(swap){ while(0<n){ if(wrptr+n>endptr && writeBuffer((wrptr-endptr)+n)<8){ code=FXStreamFull; retu...
false
false
false
false
false
0
vgacon_doresize(struct vc_data *c, unsigned int width, unsigned int height) { unsigned long flags; unsigned int scanlines = height * c->vc_font.height; u8 scanlines_lo = 0, r7 = 0, vsync_end = 0, mode, max_scan; raw_spin_lock_irqsave(&vga_lock, flags); vgacon_xres = width * VGA_FONTWIDTH; vgacon_yres = height...
false
false
false
false
false
0
handle(int e) { char key = Fl::event_key(); switch (e) { case FL_FOCUS: if (type()!=FL_INPUT_FREE && type()!=FL_ALL_FREE) return 0; break; case FL_PUSH: case FL_DRAG: case FL_RELEASE: key = 4-Fl::event_button(); break; case FL_SHORTCUT: return 0; } if (hfunc(this, e, float(Fl::even...
false
false
false
false
false
0
wi_error_set_libwired_error_with_string(int code, wi_string_t *string) { wi_string_t *errorstring; errorstring = wi_string_init_with_cstring(wi_mutable_string_alloc(), _wi_error_strings[code]); if(wi_string_length(string) > 0) { if(wi_string_length(errorstring) > 0) wi_mutable_string_append_string(errorstri...
false
false
false
false
false
0
ebiin_title( xml *node, fields *info, int title_level ) { if ( xml_hasdata( node ) ) fields_add( info, "TITLE", xml_data( node ), title_level ); }
false
false
false
false
false
0
store_pwm_enable(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) { struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); struct abituguru_data *data = dev_get_drvdata(dev); u8 orig_val; ssize_t ret; unsigned long user_val; ret = kstrtoul(buf, 10, &user_val)...
false
false
false
false
false
0
MngInfoFreeStruct(MngInfo *mng_info, MagickBooleanType *have_mng_structure) { if (*have_mng_structure != MagickFalse && (mng_info != (MngInfo *) NULL)) { register ssize_t i; for (i=1; i < MNG_MAX_OBJECTS; i++) MngInfoDiscardObject(mng_info,i); if (mng_info->global_plte != (...
false
false
false
false
false
0
write_shape_info ( bool force // If set, always write. ) { if ((force || shape_info_modified) && vgafile) { Shapes_vga_file *svga = (Shapes_vga_file *) vgafile->get_ifile(); // Make sure data's been read in. svga->read_info(false, true);//+++++BG? svga->write_info(false);//++++BG? } shape_in...
false
false
false
false
false
0
erst_get_erange(struct erst_erange *range) { struct apei_exec_context ctx; int rc; erst_exec_ctx_init(&ctx); rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_RANGE); if (rc) return rc; range->base = apei_exec_ctx_get_output(&ctx); rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_LENGTH); if (rc) return rc; range-...
false
false
false
false
false
0
slotSelectEngine(QListWidgetItem* currentItem, QListWidgetItem* previousItem) { int previous = ui.engineList->row(previousItem); int current = ui.engineList->row(currentItem); if(previous != -1) { updateEngineData(previous); } if(current != -1) { ui.engineEditWidget->setEna...
false
false
false
false
false
0
parse() { args.clear(); while (more_args()) { sstring opt = next_string(); if (opt[0] != '-') args.push_back (opt); else { opt.erase (opt.begin()); opt.to_lower(); const Parse_status stat = parse_opt (opt); if (stat == PARSE_OK || stat == PARSE_NOT_OK) return stat == PARSE...
false
false
false
false
false
0
append_block_(foreign_metadata_t *fm, FLAC__off_t offset, FLAC__uint32 size, const char **error) { foreign_block_t *fb = safe_realloc_muladd2_(fm->blocks, sizeof(foreign_block_t), /*times (*/fm->num_blocks, /*+*/1/*)*/); if(fb) { fb[fm->num_blocks].offset = offset; fb[fm->num_blocks].size = size; fm->num_blocks...
false
false
false
false
false
0
parseOptions() { GError *err; gboolean ret; err = NULL; ret = g_option_context_parse (m_context, &XArgs->m_argc, &XArgs->m_argv, &err); if (!ret || err) { fprintf (stderr, "%s\n", err->message); g_error_free (err); err = NULL; return; } #ifdef WIN32 // otherwise, decode arguments const char **arr; arr=m...
false
false
false
false
false
0
dasharray( const size_t* dasharray_ ) { _dasharray=(double *) RelinquishMagickMemory(_dasharray); if(dasharray_) { // Count elements in dash array size_t n = 0; { const size_t *p = dasharray_; while(*p++ != 0) n++; } _size = n; // Allocate elements...
false
false
false
false
false
0
RemoveFragment (Fragment* pFragment) { std::map<gcu::Atom*, gcu::Bond*>::iterator i; Atom* pAtom = pFragment->GetAtom (); Bond* pBond; while ((pBond = (Bond*) pAtom->GetFirstBond (i))) { if (!m_bUndoRedo && !m_bIsLoading && m_pCurOp) m_pCurOp->AddObject (pBond); RemoveBond (pBond); } Molecule *pMol = (Mole...
false
false
false
false
false
0
transformAssignmentSubscripts(ParseState *pstate, Node *basenode, const char *targetName, Oid targetTypeId, int32 targetTypMod, List *subscripts, bool isSlice, ListCell *next_indirection, Node *rhs, int location) { Node *result; Oid ...
false
false
false
false
false
0
_e_fm2_file_del(Evas_Object *obj, const char *file) { E_Fm2_Smart_Data *sd; E_Fm2_Icon *ic; Eina_List *l; sd = evas_object_smart_data_get(obj); if (!sd) return; EINA_LIST_FOREACH(sd->icons, l, ic) { if (!strcmp(ic->info.file, file)) { if (!ic->inserted) abort(); ...
false
false
false
false
false
0
dumpToStream( mrpt::utils::CStream &out ) const { out.printf("[Novatel OEM6 VERSION]\n"); out.printf(" Number of components: %u\n", static_cast<unsigned int>(this->num_comps)); for (unsigned i=0;i<components.size();i++){ out.printf(" Component #%u:\n Model: `%.*s`\n Serial: `%.*s`\n SW version:`%.*s`\n",i, ...
false
false
false
false
false
0
isdefd(STRING_ *str) { register int i; register char *id = str->data; return (i = finddef(id)) >= 0 && strcmp(defined[i].redef, "0"); }
false
false
false
false
false
0
LineAndFile(RefAST ast) { GrpASTNode * wrNode = dynamic_cast<GrpASTNode *>(ast->getNode()); Assert(wrNode); if (!wrNode) return GrpLineAndFile(0, 0, ""); GrpLineAndFile lnf = wrNode->LineAndFile(); if (!lnf.NotSet()) return lnf; if (ast->getFirstChild()) return LineAndFile(ast->getFirstChild()); if (ast-...
false
false
false
false
false
0
tree_clean(struct tree *tree) { if (tree->dirty) { list_for_each(c, tree->children) tree_clean(c); } tree->dirty = 0; }
false
false
false
false
false
0
alps_process_touchpad_packet_v7(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; struct input_dev *dev = psmouse->dev; struct alps_fields *f = &priv->f; memset(f, 0, sizeof(*f)); if (priv->decode_fields(f, psmouse->packet, psmouse)) return; alps_report_mt_data(psmouse, alps_get_mt_count(...
false
false
false
false
false
0
bng_set(t_bng *x) { if(x->x_flashed) { x->x_flashed = 0; (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); clock_delay(x->x_clock_brk, x->x_flashtime_break); x->x_flashed = 1; } else { x->x_flashed = 1; (*x->x_gui.x_draw)(x, x->x_gui.x...
false
false
false
false
false
0
rio_device_probe(struct device *dev) { struct rio_driver *rdrv = to_rio_driver(dev->driver); struct rio_dev *rdev = to_rio_dev(dev); int error = -ENODEV; const struct rio_device_id *id; if (!rdev->driver && rdrv->probe) { if (!rdrv->id_table) return error; id = rio_match_device(rdrv->id_table, rdev); rio...
false
false
false
false
false
0
entry_in_menu (char *arg, REFERENCE **menu, int exact) { REFERENCE *entry; /* First, try to find the specified menu item verbatim. */ entry = info_get_labeled_reference (arg, menu); /* If the item wasn't found, search the list sloppily. Perhaps we have "Option Summary", but ARG is "option". */ if (!...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gfx__drivers__OpenGLDisplayDriver_Unlock(struct __ecereNameSpace__ecere__com__Instance * display) { if(__ecereNameSpace__ecere__gfx__drivers__useSingleGLContext) return ; ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance * displaySystem))__ecereClass___ecereNameSpac...
false
false
false
false
false
0
mxser_read_register(int port, unsigned short *regs) { int i, k, value, id; unsigned int j; id = mxser_program_mode(port); if (id < 0) return id; for (i = 0; i < 14; i++) { k = (i & 0x3F) | 0x180; for (j = 0x100; j > 0; j >>= 1) { outb(CHIP_CS, port); if (k & j) { outb(CHIP_CS | CHIP_DO, port); ...
false
false
false
false
false
0
UpdateVariance(float *prVariance, const float rSum, const float rSumAdd, const int nGames) { if (!nGames || nGames == 1) { *prVariance = 0; return; } else { /* See <URL:http://mathworld.wolfram.com/SampleVarianceComputation.html> * for formula */ float rDelta = rSumAd...
false
false
false
false
false
0
stream_rewind(mpg123_handle *fr) { if(fr->rdat.flags & READER_SEEKABLE) fr->rdat.buffer.fileoff = fr->rdat.filepos = stream_lseek(fr,0,SEEK_SET); if(fr->rdat.flags & READER_BUFFERED) { fr->rdat.buffer.pos = 0; fr->rdat.buffer.firstpos = 0; fr->rdat.filepos = fr->rdat.buffer.fileoff; } }
false
false
false
false
false
0
diagnosticHandler(const DiagnosticInfo &DI, void *Context) { raw_ostream &OS = errs(); OS << (char *)Context << ": "; switch (DI.getSeverity()) { case DS_Error: OS << "error: "; break; case DS_Warning: OS << "warning: "; break; case DS_Remark: OS << "remark: "; break; case DS_Note: OS << "note: "; break; ...
false
false
false
false
false
0
iperf_setaffinity(int affinity) { #ifdef linux cpu_set_t cpu_set; CPU_ZERO(&cpu_set); CPU_SET(affinity, &cpu_set); if (sched_setaffinity(0, sizeof(cpu_set_t), &cpu_set) != 0) { i_errno = IEAFFINITY; return -1; } return 0; #else /*linux*/ i_errno = IEAFFINITY; return -1; #endif ...
false
false
false
false
false
0
chart_write_LEGEND (XLChartWriteState *s, GogObject const *legend) { GogObjectPosition pos = gog_object_get_position_flags (legend, GOG_POSITION_COMPASS | GOG_POSITION_ALIGNMENT); guint16 flags = 0x1f; guint8 XL_pos; guint8 *data; switch (pos) { case GOG_POSITION_S | GOG_POSITION_ALIGN_CENTER: XL_pos = 0; bre...
false
false
false
false
false
0
request_update (unsigned int interval) throw () { if (interval == 0) { double until = threshold - timer.elapsed (); interval = (until > 0.0) ? (unsigned int) (until * 1000.0) : 0u; } if (!update_conn) update_conn = Glib::signal_timeout ().connect (sigc::bind (sigc::mem_fun (*this, &Throttle::update), false...
false
false
false
false
false
0
setup_bare_git_dir(const char *work_tree_env, int offset, int len, char *cwd, int *nongit_ok) { int root_len; inside_git_dir = 1; if (!work_tree_env) inside_work_tree = 0; if (offset != len) { if (chdir(cwd)) die_errno("Cannot come back to cwd"); root_len = offset_1st_component(cwd); cwd[offset > root...
false
false
false
false
false
0
improve_lunch_attack(int lunch, int attack_point) { int color = OTHER_COLOR(board[lunch]); int defense_point; int k; if (safe_move(attack_point, color)) { if (is_edge_vertex(lunch) && is_edge_vertex(attack_point) && neighbor_of_string(attack_point, lunch)) { int stones = countstones(lunch); i...
false
false
false
false
false
0
_has_extension (const char *extension_list, const char *extension) { char **extensions; guint i; gboolean ret; g_return_val_if_fail (extension != NULL, TRUE); /* Extension_list is one big string, containing extensions * separated by spaces. */ i...
false
false
false
false
false
0
nextStringArg (const char** const next) { char* result = NULL; const char* start; Assert (*next != NULL); for (start = *next ; isspace ((int) *start) ; ++start) ; if (*start == '\0') *next = start; else { size_t length; const char* end; for (end = start ; *end != '\0' && ! isspace ((int) *end)...
false
false
false
false
false
0
flush_file(Stream_t *Stream) { DeclareThis(File_t); direntry_t *entry = &This->direntry; if(isRootDir(Stream)) { return 0; } if(This->FirstAbsCluNr != getStart(entry->Dir, &entry->dir)) { set_word(entry->dir.start, This->FirstAbsCluNr & 0xffff); set_word(entry->dir.startHi, This->FirstAbsCluNr >> 16); di...
false
false
false
false
false
0
stun_attr_add_str(u08bits* buf, size_t *len, u16bits attr, const u08bits* avalue, int alen) { if(alen<0) alen=0; u08bits tmp[1]; if(!avalue) { alen=0; avalue=tmp; } int clen = stun_get_command_message_len_str(buf,*len); int newlen = clen + 4 + alen; int newlenrem4=newlen & 0x00000003; if(newlenr...
false
false
false
false
true
1
ecore_imf_module_context_create(const char *ctx_id) { Ecore_IMF_Module *module; Ecore_IMF_Context *ctx = NULL; if (!modules) return NULL; module = eina_hash_find(modules, ctx_id); if (module) { ctx = module->create(); if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { ...
false
false
false
false
false
0
jme_mdio_write(struct net_device *netdev, int phy, int reg, int val) { struct jme_adapter *jme = netdev_priv(netdev); int i; jwrite32(jme, JME_SMI, SMI_OP_WRITE | SMI_OP_REQ | ((val << SMI_DATA_SHIFT) & SMI_DATA_MASK) | smi_phy_addr(phy) | smi_reg_addr(reg)); wmb(); for (i = JME_PHY_TIMEOUT * 50 ; i > 0 ...
false
false
false
false
false
0
upnp_service_adjust_urls(GSList *services, const char *desc_url, const char *base_url) { GSList *sl; g_assert(desc_url != NULL); GM_SLIST_FOREACH(services, sl) { upnp_service_t *usd = sl->data; const char *base = base_url != NULL ? base_url : desc_url; char *absolute; upnp_service_check(usd); absolute...
false
false
false
false
false
0
sgen_clear_nursery_fragments (void) { if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION) { sgen_clear_allocator_fragments (&mutator_allocator); sgen_minor_collector.clear_fragments (); } }
false
false
false
false
false
0
addPref(JMPref* pref) { // First element? if (prefListHead == NULL && prefListTail == NULL) prefListHead = prefListTail = pref; else prefListHead = pref; }
false
false
false
false
false
0
add_route(const DjVuPort * src, DjVuPort * dst) // Adds route src->dst { GCriticalSectionLock lock(&map_lock); if (cont_map.contains(src) && src->get_count()>0 && cont_map.contains(dst) && dst->get_count()>0) { if (!route_map.contains(src)) route_map[src]=new GList<void *>(); GList<voi...
false
false
false
false
false
0
ch_graph_widget_draw_grid (ChGraphWidget *graph, cairo_t *cr) { guint i; gdouble b; gdouble dotted[] = {1., 2.}; gdouble divwidth = (gdouble)graph->priv->box_width / 10.0f; gdouble divheight = (gdouble)graph->priv->box_height / 10.0f; cairo_save (cr); cairo_set_line_width (cr, 1); cairo_set_dash (cr, dotted,...
false
false
false
false
false
0
rtl8723e_dm_bt_set_fw_bt_hid_info(struct ieee80211_hw *hw, bool b_enable) { struct rtl_priv *rtlpriv = rtl_priv(hw); u8 h2c_parameter[1] = {0}; h2c_parameter[0] = 0; if (b_enable) { h2c_parameter[0] |= BIT(0); rtlpriv->btcoexist.fw_coexist_all_off = false; } RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_...
false
false
false
false
false
0
WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream, std::vector<cmLocalGenerator *> &lGenerators ) { cmLocalUnixMakefileGenerator3 *lg; // now list all the target info files cmakefileStream << "# Dependency information fo...
false
false
false
false
false
0
is_good_con_id(struct usbtest_dev *tdev, u8 *buf) { struct usb_ss_container_id_descriptor *con_id; con_id = (struct usb_ss_container_id_descriptor *) buf; if (con_id->bLength != USB_DT_USB_SS_CONTN_ID_SIZE) { ERROR(tdev, "bogus container id descriptor length\n"); return 0; } if (con_id->bReserved) { /* rese...
false
false
false
false
false
0
setRedoLimit(int limit) { if ( limit>0 && limit != d->m_redoLimit ) { d->m_redoLimit = limit; clipCommands(); } }
false
false
false
false
false
0
get_rollback_list( libspectrum_rzx *rzx ) { libspectrum_rzx_iterator it; GSList *rollback_points; size_t frames; it = libspectrum_rzx_iterator_begin( rzx ); rollback_points = NULL; frames = 0; while( it ) { libspectrum_rzx_block_id id = libspectrum_rzx_iterator_get_type( it ); switch( id ) { ...
false
false
false
false
false
0
xsh_scharr_y(cpl_image* in) { cpl_image* scharr_y=NULL; float* pscharr_y=NULL; float* pin=NULL; int sx=0; int sy=0; int i=0; int j=0; check(scharr_y=cpl_image_duplicate(in)); check(pscharr_y=cpl_image_get_data_float(scharr_y)); check(pin=cpl_image_get_data_float(in)); check(sx=cpl_image_get_siz...
false
false
false
false
false
0
mt9m032_set_pad_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_format *fmt) { struct mt9m032 *sensor = to_mt9m032(subdev); int ret; mutex_lock(&sensor->lock); if (sensor->streaming && fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { ret = -EBUSY; goto done; } ...
false
false
false
false
false
0
insert(const string &s, size_type x, size_type y) { enlarge(x + s.length(), y + 1); Cell *cell = &cells_[y][x]; for (string::size_type i = 0; i < s.length(); i++) { cell->character = s[i]; cell->attribute = Cell::NONE; cell++; } }
false
false
false
false
false
0
snd_azf3328_gameport(struct snd_azf3328 *chip, int dev) { struct gameport *gp; chip->gameport = gp = gameport_allocate_port(); if (!gp) { dev_err(chip->card->dev, "cannot alloc memory for gameport\n"); return -ENOMEM; } gameport_set_name(gp, "AZF3328 Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_...
false
false
false
false
false
0
exhalbtc_lps_notify(struct btc_coexist *btcoexist, u8 type) { struct rtl_priv *rtlpriv = btcoexist->adapter; struct rtl_hal *rtlhal = rtl_hal(rtlpriv); u8 lps_type; if (!halbtc_is_bt_coexist_available(btcoexist)) return; btcoexist->statistics.cnt_lps_notify++; if (btcoexist->manual_control) return; if (EAC...
false
false
false
false
false
0
test_diff_rename__file_partial_exchange(void) { git_buf c1 = GIT_BUF_INIT, c2 = GIT_BUF_INIT; git_index *index; git_tree *tree; git_diff *diff; git_diff_options diffopts = GIT_DIFF_OPTIONS_INIT; git_diff_find_options opts = GIT_DIFF_FIND_OPTIONS_INIT; diff_expects exp; int i; cl_git_pass(git_futils_readbuffer...
false
false
false
false
false
0
SetText(int id, const wxString& text, bool& failure) { wxTextCtrl* pTextCtrl = wxDynamicCast(FindWindow(id), wxTextCtrl); if (!pTextCtrl) { failure = true; return false; } pTextCtrl->ChangeValue(text); return true; }
false
false
false
false
false
0
init() { for (int x = 0; x < grx; x++) for (int y = 0; y <= gry; y++) mDaten[x][y] = Blop(blopart_keins); mRueberReihe = false; //mTestPlatz = false; }
false
false
false
false
false
0
NITFDESGetTRE( NITFDES* psDES, int nOffset, char szTREName[7], char** ppabyTREData, int* pnFoundTRESize) { char szTREHeader[12]; char szTRETempName[7]; NITFSegmentInfo* psSegInfo; VSILFILE* fp; int nTRESize; mem...
false
false
false
false
false
0
LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid) { // create item before any checks for store correct guid // and allow use "FSetState(ITEM_REMOVED); SaveToDB();" for deleting item from DB Object::_Create(guidLow, 0, HIGHGUID_ITEM); if (!LoadValues(fields[0].GetString())) { s...
false
false
false
false
false
0
clutter_stage_hide (ClutterActor *self) { ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv; g_assert (priv->impl != NULL); _clutter_stage_window_hide (priv->impl); CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->hide (self); }
false
false
false
false
false
0
_handle_kvs_put(int fd, int lrank, client_req_t *req) { int rc = SLURM_SUCCESS; client_resp_t *resp; char *key = NULL, *val = NULL; debug3("mpi/pmi2: in _handle_kvs_put"); client_req_parse_body(req); client_req_get_str(req, KEY_KEY, &key); client_req_get_str(req, VALUE_KEY, &val); /* no need to add k-v to has...
false
false
false
false
false
0
oggpackB_write(oggpack_buffer *b,u32 value,s32 bits){ if(b->endbyte+4>=b->storage){ b->buffer = (unsigned char *)gf_realloc(b->buffer,b->storage+BUFFER_INCREMENT); b->storage+=BUFFER_INCREMENT; b->ptr=b->buffer+b->endbyte; } value=(value&mask[bits])<<(32-bits); bits+=b->endbit; b->ptr[0]|=value...
false
false
false
false
false
0
PPchar(c, cp) ZXchar c; char *cp; { if (jisprint(c)) { cp[0] = c; cp[1] = '\0'; } else if (c < DEL) { strcpy(cp, "^?"); cp[1] = c +'@'; } else if (c == DEL) { strcpy(cp, "^?"); } else { cp[0] = '\\'; cp[1] = '0'+(c >> 6); cp[2] = '0'+((c >> 3) & 07); cp[3] = '0'+(c & 07); cp[4] = '\0'; } }
false
false
false
false
false
0
RtlWriteInstance( RtlFigure ) rtlfig_list *RtlFigure; { rtlins_list *ScanIns; rtlmap_list *ScanMap; rtlgen_list *ScanGen; for ( ScanIns = RtlFigure->INSTANCE; ScanIns != (rtlins_list *)0; ScanIns = ScanIns->NEXT ) { fprintf( RtlFile, "INSTANCE\t%ld\t%s\n", (long)ScanIns...
false
false
false
false
false
0
igb_lower_eec_clk(struct e1000_hw *hw, u32 *eecd) { *eecd = *eecd & ~E1000_EECD_SK; E1000_WRITE_REG(hw, E1000_EECD, *eecd); E1000_WRITE_FLUSH(hw); usec_delay(hw->nvm.delay_usec); }
false
false
false
false
false
0
applyClicked(void) { setXPFromLocal(); previewExposed(); Apply(); if(isModal()) { setAnswer(AP_Dialog_Lists::a_OK); } }
false
false
false
false
false
0
xcf_load_image(void) { Layer *layer; DATA32 saved_pos; DATA32 offset; int num_successful_elements = 0; /* read the image properties */ if (!xcf_load_image_props()) goto hard_error; while (1) { /* read in the offset of the next layer */ image->cp += xcf_read_int32(image->file,...
false
false
false
false
false
0
_copyCreateTableSpaceStmt(CreateTableSpaceStmt *from) { CreateTableSpaceStmt *newnode = makeNode(CreateTableSpaceStmt); COPY_STRING_FIELD(tablespacename); COPY_STRING_FIELD(owner); COPY_STRING_FIELD(location); return newnode; }
false
false
false
false
false
0
qlcnic_set_channels(struct net_device *dev, struct ethtool_channels *channel) { struct qlcnic_adapter *adapter = netdev_priv(dev); int err; if (!(adapter->flags & QLCNIC_MSIX_ENABLED)) { netdev_err(dev, "No RSS/TSS support in non MSI-X mode\n"); return -EINVAL; } if (channel->other_count || channel...
false
false
false
false
false
0
glade_base_editor_is_child (GladeBaseEditor * e, GladeWidget * gchild, gboolean valid_type) { GladeWidget *gcontainer = glade_widget_get_parent (gchild); if (!gcontainer) return FALSE; if (valid_type) { GObject *child = glade_widget_get_object (gchild); if (glade...
false
false
false
false
false
0
doSearchForward( const FilePosition &start_position ) { bool found = false; int found_start_col; int found_end_col; if ( ! quickFindPattern_->isActive() ) return -1; // Optimisation: if we are already after the last match, // we don't do any search at all. if ( lastMatch_.isLater( ...
false
false
false
false
false
0
ath5k_hw_set_opmode(struct ath5k_hw *ah) { u32 pcu_reg, beacon_reg, low_id, high_id; /* Preserve rest settings */ pcu_reg = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & 0xffff0000; pcu_reg &= ~(AR5K_STA_ID1_ADHOC | AR5K_STA_ID1_AP | AR5K_STA_ID1_KEYSRCH_MODE | (ah->ah_version == AR5K_AR5210 ? (AR5K_STA_ID1_PWR_...
false
false
false
false
false
0
snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm, const char *pin, int status) { struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); dapm_assert_locked(dapm); if (!w) { dev_err(dapm->dev, "ASoC: DAPM unknown pin %s\n", pin); return -EINVAL; } if (w->connected != status) { dapm_mar...
false
false
false
false
false
0
try_to_fix_pino(struct inode *inode) { struct f2fs_inode_info *fi = F2FS_I(inode); nid_t pino; down_write(&fi->i_sem); fi->xattr_ver = 0; if (file_wrong_pino(inode) && inode->i_nlink == 1 && get_parent_ino(inode, &pino)) { fi->i_pino = pino; file_got_pino(inode); up_write(&fi->i_sem); mark_inode_dirty...
false
false
false
false
false
0
Open( const char * pszFilename, int bUpdate ) { OGRVRTDataSource *poDS; char *pszXML = NULL; /* -------------------------------------------------------------------- */ /* Are we being passed the XML definition directly? */ /* Skip any leading s...
false
false
false
false
false
0
indicator_keyboard_service_handle_unity_greeter_name_appeared (IndicatorKeyboardService* self, GDBusConnection* connection, const gchar* name, const gchar* name_owner) { GError * _inner_error_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (connection != NULL); g_return_if_fail (name != NULL); g_return_...
false
false
false
false
false
0
addShadowVolumeSceneNode(const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) { if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) return 0; if (Shadow) return Shadow; if (!shadowMesh) shadowMesh = Mesh; // if null is given, use the mesh of node Sh...
false
false
false
false
false
0
dev_pm_qos_constraints_destroy(struct device *dev) { struct dev_pm_qos *qos; struct dev_pm_qos_request *req, *tmp; struct pm_qos_constraints *c; struct pm_qos_flags *f; mutex_lock(&dev_pm_qos_sysfs_mtx); /* * If the device's PM QoS resume latency limit or PM QoS flags have been * exposed to user space, they...
false
false
false
false
false
0
_step_connect(const char *directory, const char *nodename, uint32_t jobid, uint32_t stepid) { int fd; int len; struct sockaddr_un addr; char *name = NULL; if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { debug("_step_connect: socket: %m"); return -1; } memset(&addr, 0, sizeof(addr)); addr.sun_fami...
true
true
false
false
false
1
display_buffer_hex(uint8_t *buffer, size_t length) { size_t i; if (ceci_global_log_level > LIBCEC_LOG_LEVEL_INFO) { return; } for (i=0; i<length; i++) { if (!(i%0x10)) fprintf(ceci_logger, " "); fprintf(ceci_logger, " %02X", buffer[i]); } fp...
false
false
false
false
false
0
itd1000_set_lo(struct itd1000_state *state, u32 freq_khz) { int i, j; u32 plln, pllf; u64 tmp; plln = (freq_khz * 1000) / 2 / FREF; /* Compute the factional part times 1000 */ tmp = plln % 1000000; plln /= 1000000; tmp *= 1048576; do_div(tmp, 1000000); pllf = (u32) tmp; state->frequency = ((plln * 1000)...
false
false
false
false
false
0
jconfig_add(const char *domain, const char *key, const char *value, int line) { struct jconfig *ptr; /* char *tmps; while (isspace(*value)) value++; while (isspace(*domain)) domain++; while (isspace(*key)) key++; tmps = value+strlen(value)-1; while (isspace(*tmps)) { *tmps = 0; tmps--; } tmps = domain+...
false
false
false
false
false
0
gc_master_client_choose_address_provider (GcMasterClient *client, GList *providers) { GcMasterClientPrivate *priv = GET_PRIVATE (client); GcMasterProvider *new_p; /* choose and start provider */ priv->address_provider_choice_in_progress = TRUE; new_p = gc_master_clien...
false
false
false
false
false
0
workdir_iterator__enter_dir(fs_iterator *fi) { /* only push new ignores if this is not top level directory */ if (fi->stack->next != NULL) { workdir_iterator *wi = (workdir_iterator *)fi; ssize_t slash_pos = git_buf_rfind_next(&fi->path, '/'); (void)git_ignore__push_dir(&wi->ignores, &fi->path.ptr[slash_pos + ...
false
false
false
false
false
0
bd_entry_virt_space(struct mm_struct *mm) { unsigned long long virt_space; unsigned long long GB = (1ULL << 30); /* * This covers 32-bit emulation as well as 32-bit kernels * running on 64-bit harware. */ if (!is_64bit_mm(mm)) return (4ULL * GB) / MPX_BD_NR_ENTRIES_32; /* * 'x86_virt_bits' returns what...
false
false
false
false
false
0
gst_shm_sink_start (GstBaseSink * bsink) { GstShmSink *self = GST_SHM_SINK (bsink); GError *err = NULL; self->stop = FALSE; if (!self->socket_path) { GST_ELEMENT_ERROR (self, RESOURCE, OPEN_READ_WRITE, ("Could not open socket."), (NULL)); return FALSE; } GST_DEBUG_OBJECT (self, "Creating ...
false
false
false
false
false
0
setIdColAcol() { // Flavours and colours are trivial. int idX = 10* (abs(idA) / 10) + 9900000; if (idA < 0) idX = -idX; setId( idA, idB, idX, idB); setColAcol( 0, 0, 0, 0, 0, 0, 0, 0); }
false
false
false
false
false
0
getLocationForward(double length) const { if (length <= 0.0) return LinearLocation(); double totalLength = 0.0; LinearIterator it (linearGeom); while (it.hasNext()) { /** * Special handling is required for the situation when the * length references exactly to a component endpoint. * In this case, th...
false
false
false
false
false
0