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
free_stasche_info(Stasche *sinfo) { const int pc_num = sinfo->pc_num; int i; free_unused_stasche_info(sinfo); for (i = 0; i < pc_num; i++) { free(sinfo->sched[i]); } free(sinfo->sched); free(sinfo->ntasks); free(sinfo->start); free(sinfo->end); free(sinfo->taskexepro);...
false
false
false
false
false
0
test_strclear (void) { gchar *str; str = egg_secure_strdup ("secret"); g_assert (str != NULL); g_assert_cmpuint (strlen (str), ==, 6); g_assert (strchr (str, 't') == str + 5); egg_secure_strclear (str); g_assert_cmpuint (strlen (str), ==, 6); g_assert (strchr (str, 't') == NULL); egg_secure_free_full (str, ...
false
false
false
false
false
0
share_allows_delete (struct stat *statbuf, struct _WapiFileShare **share_info) { gboolean file_already_shared; guint32 file_existing_share, file_existing_access; file_already_shared = _wapi_handle_get_or_set_share (statbuf->st_dev, statbuf->st_ino, FILE_SHARE_DELETE, GENERIC_READ, &file_existing_share, &file_existi...
false
false
false
false
false
0
Mod_LoadSurfedges (lump_t *l) { int i, count; int *in, *out; in = (void *)(mod_base + l->fileofs); if (l->filelen % sizeof(*in)) Com_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name); count = l->filelen / sizeof(*in); if (count < 1 || count >= MAX_MAP_SURFEDGES) Com_Erro...
false
false
false
false
false
0
clutter_event_get_state (const ClutterEvent *event) { g_return_val_if_fail (event != NULL, 0); switch (event->type) { case CLUTTER_KEY_PRESS: case CLUTTER_KEY_RELEASE: return event->key.modifier_state; case CLUTTER_BUTTON_PRESS: case CLUTTER_BUTTON_RELEASE: return event->button.mod...
false
false
false
false
false
0
SeriesUIDCallback(DICOMParser *parser, doublebyte, doublebyte, DICOMParser::VRTypes, unsigned char* val, quadbyte) { char*...
false
false
false
false
false
0
save_items (FILE *f, int depth, GtkTreeIter *iter) { do { const char *id = peek_title (iter); if (id) { play_item_t *play_item = peek_play_item (iter); if (play_item) { char *xml = play_item_xml (play_item, depth); fputs (xml, f); free (xml); } else { GtkTreeIter ...
false
false
false
false
false
0
add_if_new(void **list, int num, void *new, int size) { int i; for (i=0; i<num; i++) { if (!memcmp((*list) + i*size, new, size)) break; } if (i==num) { *list = realloc(*list, (num+1)*size); memcpy(*list + num*size, new, size); return 1; } return 0; }
false
true
false
false
false
1
__rep_bulk_log(env, ip, rp, rec, savetime, ret_lsnp) ENV *env; DB_THREAD_INFO *ip; __rep_control_args *rp; DBT *rec; time_t savetime; DB_LSN *ret_lsnp; { DB_LSN last_lsn; DB_REP *db_rep; REP *rep; int ret; db_rep = env->rep_handle; rep = db_rep->region; ret = __rep_log_split(env, ip, rp, rec, ret_lsnp, &...
false
false
false
false
false
0
bcm54xx_config_init(struct phy_device *phydev) { int reg, err; reg = phy_read(phydev, MII_BCM54XX_ECR); if (reg < 0) return reg; /* Mask interrupts globally. */ reg |= MII_BCM54XX_ECR_IM; err = phy_write(phydev, MII_BCM54XX_ECR, reg); if (err < 0) return err; /* Unmask events we are interested in. */ ...
false
false
false
false
false
0
chess_model_animate (ChessModel* self, gdouble timestep) { gboolean result = FALSE; gboolean _tmp0_; gboolean _tmp1_; gdouble _tmp2_; gdouble _tmp3_; gdouble _tmp4_; gdouble _tmp5_ = 0.0; gdouble _tmp6_; gdouble _tmp7_; gdouble _tmp8_; gdouble _tmp9_ = 0.0; g_return_val_if_fail (self != NULL, FALSE); _tmp0...
false
false
false
false
false
0
gconf_locale_list_unref (GConfLocaleList* list) { GConfLocaleListPrivate* priv; priv = (GConfLocaleListPrivate*) list; g_return_if_fail(priv->refcount > 0); priv->refcount -= 1; if (priv->refcount == 0) { g_strfreev(priv->list); g_free(list); } }
false
false
false
false
false
0
__put_ckp_info (lvinfo, ckpinfo) const DB_LOG_VRFY_INFO *lvinfo; const VRFY_CKP_INFO *ckpinfo; { int ret; DBT key, data; memset(&key, 0, sizeof(DBT)); memset(&data, 0, sizeof(DBT)); key.data = (void *)&ckpinfo->lsn; key.size = sizeof(DB_LSN); data.data = (void *)ckpinfo; data.size = sizeof(VRFY_CKP_INFO); ...
false
false
false
false
false
0
follow_ssa_edge_expr (struct loop *loop, gimple at_stmt, tree expr, gimple halting_phi, tree *evolution_of_loop, int limit) { enum tree_code code = TREE_CODE (expr); tree type = TREE_TYPE (expr), rhs0, rhs1; t_bool res; /* The EXPR is one of the following cases: - an SSA_NAME, - an INTEGER_CS...
false
false
false
false
false
0
results_on_line_event(GtkTextTag * tag, GObject * event_object __attribute__ ((unused)), GdkEvent * event, const GtkTextIter * iter, gpointer user_data) { results_t *r = (results_t *) user_data; sediffx_policy_e which_pol = -1; unsigned long line; GtkTextIter *start, *end; if (event->type == GDK_BUTTON_P...
false
false
false
false
true
1
fuzzy_hash_buf(const unsigned char *buf, uint32_t buf_len, char *result) { ss_context *ctx; int done = FALSE; if (NULL == buf || NULL == result) return TRUE; ctx = (ss_context *)malloc(sizeof(ss_context)); if (ctx == NULL) return TRUE; ctx->total_chars = buf_len; ss_in...
false
false
false
false
true
1
find_connection (const ConnectionKey& key, ConnectionCacheValue& cacheval) { if (this->cache_map_.find (ConnectionCacheKey (key), cacheval) == 0) { return true; } return false; }
false
false
false
false
false
0
dPrintMatrix (const dReal *A, int n, int m, char *fmt, FILE *f) { int i,j; int skip = dPAD(m); for (i=0; i<n; i++) { for (j=0; j<m; j++) fprintf (f,fmt,A[i*skip+j]); fprintf (f,"\n"); } }
false
false
false
false
false
0
ExCreateSendModules(Program *p) { int srcfn, tgfn, in_tab, out_tab; int *index, *outdex; gfunc *sgf, *tgf; for (srcfn = 0; srcfn < SIZE_LIST(p->funcs); ++srcfn) { sgf = FETCH_LIST(p->funcs,srcfn); if(!strcmp(sgf->name, "DPSEND")) continue; for (tgfn = srcfn + 1; tgfn < SIZE_LIST(p->fu...
false
false
false
false
false
0
slotReadyRead () { kDebug ( ) << "called: available: " << socket()->bytesAvailable (); appendRead ( socket()->readAll() ); emit readyRead (); }
false
false
false
false
false
0
fill_auxv_note(struct memelfnote *note, struct mm_struct *mm) { elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv; int i = 0; do i += 2; while (auxv[i - 2] != AT_NULL); fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv); }
false
false
false
false
false
0
RFG_Filter_setDefFile( RFG_Filter* filter, const char* fileName ) { if( !filter ) return 0; if( !fileName || *fileName == '\0' ) { fprintf( stderr, "RFG_Filter_setDefFile(): Error: Empty file name\n" ); return 0; } /* if a filter definition file already set, then free this */ if( filter->file...
false
false
false
false
false
0
save_windows_config (GladeWindow *window, GKeyFile *config) { guint i; GdkWindow *gdk_window; gboolean maximized; for (i = 0; i < N_DOCKS; ++i) { ToolDock *dock = &window->priv->docks[i]; key_file_set_window_position (config, &dock->window_pos, dock->id, dock->detached, TRUE, dock->maximized); ...
false
false
false
false
false
0
ceil_with_tolerance(double x, double tol) { double rounded; /* rounded=rint(x);*/ rounded = (double) (x + 0.5); if (fabs(rounded - x) <= tol) return (rounded); else return (ceil(x)); }
false
false
false
false
false
0
ooSendRequestChannelCloseRelease(OOH323CallData *call, int channelNum) { int ret = OO_OK; H245Message *ph245msg = NULL; OOCTXT *pctxt; H245IndicationMessage *indication; ret = ooCreateH245Message(call, &ph245msg, T_H245MultimediaSystemControlMessage_indication); if(ret !...
false
false
false
true
false
1
label(const MSStringVector& label_) { if (MSView::model()!=0) label()=label_; else internalCouple(new MSStringVector(label_)); _numberOfRows=numRows(); }
false
false
false
false
false
0
nfs4_purge_state_owners(struct nfs_server *server) { struct nfs_client *clp = server->nfs_client; struct nfs4_state_owner *sp, *tmp; LIST_HEAD(doomed); spin_lock(&clp->cl_lock); list_for_each_entry_safe(sp, tmp, &server->state_owners_lru, so_lru) { list_move(&sp->so_lru, &doomed); nfs4_remove_state_owner_lock...
false
false
false
false
false
0
killer_xname(struct obj *obj) { struct obj save_obj; unsigned save_ocknown; char *buf, *save_ocuname; /* remember original settings for core of the object; oname and oattached extensions don't matter here--since they aren't modified they don't need to be saved and restored */ save_obj...
false
false
false
false
false
0
removeRedundant(QList<QPoint> & points) { QPoint current = points.last(); int ix = points.count() - 2; int soFar = 1; while (ix > 0) { if (points.at(ix).x() != current.x()) { current = points.at(ix--); soFar = 1; continue; } if (++soFar > 2) { points.removeAt(ix + 1); } ix--; } }
false
false
false
false
false
0
Analyze(CompilationInfo* info) { ASSERT(info->function() != NULL); Scope* top = info->function()->scope(); while (top->outer_scope() != NULL) top = top->outer_scope(); top->AllocateVariables(info->calling_context()); #ifdef DEBUG if (Bootstrapper::IsActive() ? FLAG_print_builtin_scopes :...
false
false
false
false
false
0
kill_all_tasks() { struct task_info *ti; pid_t pid; UINT64_T taskid; if(worker_mode == WORKER_MODE_FOREMAN) { struct list *l; struct work_queue_task *t; l = work_queue_cancel_all_tasks(foreman_q); while((t = list_pop_head(l))) { work_queue_task_delete(t); } list_delete(l); return; } // If the...
false
false
false
false
false
0
GetGenerateColorScalars() { VTK_LEGACY_BODY(GetGenerateColorScalars, "5.7"); return (this->GetScalarMode() != 0); }
false
false
false
false
false
0
armcpu_flagIrq( armcpu_t *armcpu) { if(armcpu->CPSR.bits.I) return FALSE; armcpu->waitIRQ = 0; #ifdef GDB_STUB armcpu->irq_flag = 1; #endif return TRUE; }
false
false
false
false
false
0
FCHIS(double *data,int ndim,int nfree,int mode,double *dfit) { register int ii=0; double diff=0.; double weight=0.; double chisq=0.; if ( nfree > 0 ) { chisq = 0.0; for (ii=0; ii<ndim; ii++) { if ( mode < 0 ) { if ( *data < 0 ) weight = -1. / *data; else ...
false
false
false
false
false
0
generate_baseName(awt_input_mask_global *global_) { return GBS_global_string("%s/marked", global_->get_maskid().c_str()); }
false
false
false
false
false
0
writeToStream(mrpt::utils::CStream &out,int *version) const { if (version) *version = 0; else { uint32_t n; TNodeList::const_iterator it; TArcList::const_iterator it2; // Nodes: n = static_cast<uint32_t>(nodeCount()); out << n; for (it=m_nodes.begin();it!=m_nodes.end();it++) out << *it->second; ...
false
false
false
false
false
0
ExecReScanRecursiveUnion(RecursiveUnionState *node) { PlanState *outerPlan = outerPlanState(node); PlanState *innerPlan = innerPlanState(node); RecursiveUnion *plan = (RecursiveUnion *) node->ps.plan; /* * Set recursive term's chgParam to tell it that we'll modify the working * table and therefore it has to ...
false
false
false
false
false
0
checkCommandChanged() { if (KRun::binaryName(d->w->commandEdit->text(), true) != KRun::binaryName(d->m_origCommandStr, true)) { d->m_origCommandStr = d->w->commandEdit->text(); d->m_dbusStartupType.clear(); // Reset d->m_dbusServiceName.clear(); } }
false
false
false
false
false
0
client_process(int fd, short events) { struct mux_client *client = NULL; FOREACH(struct mux_client *lc, &client_list) { if(lc->fd == fd) { client = lc; break; } } ENDFOREACH if(!client) { usbmuxd_log(LL_ERROR, "client_process: fd %d not found in client list", fd); return; } if(client->state == CLI...
false
false
false
false
false
0
setrights( std::list<std::pair<std::string, std::string> > &rights) { clearrights(); std::list<std::pair<std::string, std::string> >::iterator b=rights.begin(), e=rights.end(); int row=1; size_t maxw=10; while (b != e) { Acl::EditScreen::Entry *p= new Acl::EditScreen::Entry(this, b->first, b->sec...
false
false
false
false
false
0
categoricalLevels (const xmlChar ** attrs, XMLParserData * data) { GGobiData *d = getCurrentXMLData (data); vartabled *el = vartable_element_get (data->current_variable, d); gint i; const gchar *tmp = getAttribute (attrs, "count"); if (tmp != NULL) { el->nlevels = strToInteger (tmp); if (el->nlevels...
false
false
false
false
false
0
cbf_make_positioner (cbf_positioner *positioner) { cbf_failnez (cbf_alloc ((void **) positioner, NULL, sizeof (cbf_positioner_struct), 1)) (*positioner)->matrix [0][0] = 1; (*positioner)->matrix [0][1] = 0; (*positioner)->matrix [0][2] = 0; (*positioner)->matrix [0][3] = 0; (*positioner)->ma...
false
false
false
false
false
0
__pyx_tp_dealloc_array(PyObject *o) { struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_array___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o...
false
false
false
false
false
0
Pickle_clear_memo(Picklerobject *self, PyObject *args) { if (self->memo) PyDict_Clear(self->memo); Py_INCREF(Py_None); return Py_None; }
false
false
false
false
false
0
GetMaxTimestampWidth(wxWindow *win) { int max_width = 0; DeviceSet::const_iterator i = m_device_set->begin(); for( ; i != m_device_set->end(); ++i ) { int this_width = 0; int this_height = 0; if( i->GetExtras() ) { time_t last_sync = i->GetExtras()->m_last_sync_time; if( last_sync ) { win->GetTextExt...
false
false
false
false
false
0
freevimoswcscom ( struct WorldCoor *vimoswcs) /* WCS parameter structure */ { int i; for (i = 0; i < 10; i++) { if (vimoswcscom0[i] != NULL) { free (vimoswcscom0[i]); vimoswcscom0[i] = NULL; } } if (isvimoswcs (vimoswcs)) { for (i = 0; i < 10; i++) { if (vimoswcs->command_format[i] !...
false
false
false
false
false
0
calcGeometrySize(const VertexData* vertexData) { const VertexDeclaration::VertexElementList& elemList = vertexData->vertexDeclaration->getElements(); const VertexBufferBinding::VertexBufferBindingMap& bindings = vertexData->vertexBufferBinding->getBindings(); size_t s...
false
false
false
false
false
0
input_add_uevent_modalias_var(struct kobj_uevent_env *env, struct input_dev *dev) { int len; if (add_uevent_var(env, "MODALIAS=")) return -ENOMEM; len = input_print_modalias(&env->buf[env->buflen - 1], sizeof(env->buf) - env->buflen, dev, 0); if (len >= (sizeof(env->buf) - env->buflen)) re...
false
false
false
false
false
0
RFC2616_Ttl(const struct sess *sp) { unsigned max_age, age; double h_date, h_expires; char *p; const struct http *hp; struct exp *expp; expp = &sp->wrk->busyobj->exp; hp = sp->wrk->busyobj->beresp; assert(expp->entered != 0.0 && !isnan(expp->entered)); /* If all else fails, cache using default ttl */ expp-...
false
false
false
false
false
0
make_complex_modes (enum mode_class cl, const char *file, unsigned int line) { struct mode_data *m; struct mode_data *c; char buf[8]; enum mode_class cclass = complex_class (cl); if (cclass == MODE_RANDOM) return; for (m = modes[cl]; m; m = m->next) { /* Skip BImode. FIXME: BImode pro...
true
true
false
false
false
1
get_parameter(int param) const { switch (param) { case 1: return gain * 100.0; case 2: return static_cast<parameter_t>(channel_rep + 1); } DBC_NEVER_REACHED(); return 0.0; }
false
false
false
false
false
0
print_tasks_with_time(PFormat pf) { char **pentry; char format[64]; sprintf(format, "%%%dc %%%dd: (%%-%ds) |%%-%ds| |%%-%ds| %%%ds %%-%ds (%%d note%%s)\n", pf->indent, pf->max.task.id, pf->max.task.username, pf->max.task.status, pf->max.task.priority, pf->max.task.time, pf->max.task.name ); ...
false
false
false
false
false
0
fs_multicast_stream_transmitter_dispose (GObject *object) { FsMulticastStreamTransmitter *self = FS_MULTICAST_STREAM_TRANSMITTER (object); gint c; if (self->priv->disposed) /* If dispose did already run, return. */ return; if (self->priv->udpsocks) { for (c = 1; c <= self->priv->transmitter->com...
false
false
false
false
false
0
gnc_guid_to_string (const GValue *src, GValue *dest) { const gchar *str; g_return_if_fail (G_VALUE_HOLDS_STRING (dest) && GNC_VALUE_HOLDS_GUID (src)); str = guid_to_string(gnc_value_get_guid (src)); g_value_set_string (dest, str); }
false
false
false
false
false
0
getActiveWindow() const { WindowManager::Property <Window> p; if( !p.getProperty( display, DefaultRootWindow( display ), XA_WINDOW, "_NET_ACTIVE_WINDOW" ) ) return 0; return *p.getData(); }
false
false
false
false
false
0
menuitem_destroy_alpha(MenuItem *item) { debug(RPT_DEBUG, "%s(item=[%s])", __FUNCTION__, ((item != NULL) ? item->id : "(null)")); if (item != NULL) { /* These strings should always be allocated */ free(item->data.alpha.allowed_extra); free(item->data.alpha.value); free(item->data.alpha.edit_str); } }
false
false
false
false
false
0
zdivcount(ZVALUE z1, ZVALUE z2) { long count; /* number of factors removed */ ZVALUE tmp; /* ignored return value */ if (ziszero(z1) || ziszero(z2) || zisunit(z2)) return 0; count = zfacrem(z1, z2, &tmp); zfree(tmp); return count; }
false
false
false
false
false
0
rb_hash_values_at(argc, argv, hash) int argc; VALUE *argv; VALUE hash; { VALUE result = rb_ary_new(); long i; for (i=0; i<argc; i++) { rb_ary_push(result, rb_hash_aref(hash, argv[i])); } return result; }
false
false
false
false
false
0
branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn) { u8 opc1 = OPCODE1(insn); int i; switch (opc1) { case 0xeb: /* jmp 8 */ case 0xe9: /* jmp 32 */ case 0x90: /* prefix* + nop; same as jmp with .offs = 0 */ break; case 0xe8: /* call relative */ branch_clear_offset(auprobe, insn); break;...
false
false
false
false
false
0
need_new_8021x_secrets (NMDeviceWifi *self, guint32 old_state, const char **setting_name) { NMSetting8021x *s_8021x; NMSettingWirelessSecurity *s_wsec; NMSettingSecretFlags secret_flags = NM_SETTING_SECRET_FLAG_NONE; NMConnection *connection; g_assert (setting_name ...
false
false
false
false
false
0
cipher_decrypt (gcry_cipher_hd_t c, byte *outbuf, size_t outbuflen, const byte *inbuf, size_t inbuflen) { gcry_err_code_t rc; switch (c->mode) { case GCRY_CIPHER_MODE_ECB: rc = do_ecb_decrypt (c, outbuf, outbuflen, inbuf, inbuflen); break; case GCRY_CIPHER_MODE_CBC: r...
false
false
false
false
false
0
ekiga_call_window_set_call_hold (EkigaCallWindow *cw, bool is_on_hold) { GtkWidget *child = NULL; g_return_if_fail (EKIGA_IS_CALL_WINDOW (cw)); child = GTK_BIN (gtk_menu_get_widget (cw->priv->main_menu, "hold_call"))->child; if (is_on_hold) { if (GTK_IS_LABEL (child)) ...
false
false
false
false
false
0
recv_config_pppol2tp(int mru, u_int32_t asyncmap, int pcomp, int accomp) { if ((lcp_allowoptions[0].mru > 0) && (mru > lcp_allowoptions[0].mru)) { warn("Overriding mru %d to mtu value %d", mru, lcp_allowoptions[0].mru); mru = lcp_allowoptions[0].mru; } if ((ifunit >= 0) && ioctl...
false
false
false
false
false
0
allocate_version_tree() { version_trees_.push_back(new Version_tree); return version_trees_.back(); }
false
false
false
false
false
0
gtk_source_gutter_renderer_set_alignment (GtkSourceGutterRenderer *renderer, gfloat xalign, gfloat yalign) { gboolean changed_x; gboolean changed_y; g_return_if_fail (GTK_SOURCE_IS_GUTTER_RENDERER...
false
false
false
false
false
0
add_coverart_edit_track_details(GtkWidget *menu) { if (!gtkpod_has_details_editor()) return menu; return hookup_menu_item(menu, _("Edit Track Details"), GTK_STOCK_PREFERENCES, G_CALLBACK (edit_coverart_track_details), NULL); }
false
false
false
false
false
0
getBiblioFirst(char *key) { biblioElem *result = getBiblio(key); if (result != NULL) { char *ref = strdup(result->biblioN); char *res = NULL; if (NULL != ref) { PushSource(NULL,ref); res = getBraceParam(); PopSource(); } safe_free(ref);...
false
false
false
false
false
0
ifstat (LexState *ls, int line) { /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */ FuncState *fs = ls->fs; expdesc v; int escapelist = NO_JUMP; test_then_block(ls, &v); /* IF cond THEN block */ while (ls->t.token == TK_ELSEIF) { luaK_concat(fs, &escapelist, luaK_jump(fs)); ...
false
false
false
false
false
0
water_swirl() { x = (geo->w>>1) + (( (FCos(swirlangle)) * (25) ) >> 16); y = (geo->h>>1) + (( (FSin(swirlangle)) * (25) ) >> 16); swirlangle += 50; if(mode & 0x4000) HeightBlob(x,y, radius>>2, pheight, Hpage); else WarpBlob(x, y, radius, pheight, Hpage); }
false
false
false
false
false
0
available( const MapCoordinate& pos, ContainerBase* subject, int num ) { if ( !commandPending() ) { Vehicle* eht = actmap->getField(pos)->vehicle; if ( eht ) if ( eht->getOwner() == actmap->actplayer) return MoveUnitCommand::avail ( eht ); } else { if ( !NewGu...
false
false
false
false
false
0
rtl2830_get_frontend(struct dvb_frontend *fe) { struct i2c_client *client = fe->demodulator_priv; struct rtl2830_dev *dev = i2c_get_clientdata(client); struct dtv_frontend_properties *c = &fe->dtv_property_cache; int ret; u8 buf[3]; if (dev->sleeping) return 0; ret = rtl2830_bulk_read(client, 0x33c, buf, 2);...
false
false
false
false
false
0
makeTypedObject(const std::string &name) { // GNASH_REPORT_FUNCTION; _type = Element::TYPED_OBJECT_AMF0; if (name.size()) { setName(name); } return *this; }
false
false
false
false
false
0
shift_bits(unsigned int value, unsigned int shift_from, unsigned int shift_to, unsigned int mask) { if (shift_from < shift_to) return (value << (shift_to - shift_from)) & mask; else return (value >> (shift_from - shift_to)) & mask; }
false
false
false
false
false
0
ItclCreateObjVar(interp, vdefn, contextObj) Tcl_Interp* interp; /* interpreter managing this object */ ItclVarDefn* vdefn; /* variable definition */ ItclObject* contextObj; /* object being updated */ { Var *varPtr; Tcl_HashEntry *entry; ItclVarLookup *vlookup; ItclContext conte...
false
false
false
false
false
0
gpk_application_select_exact_match (GpkApplicationPrivate *priv, const gchar *text) { GtkTreeView *treeview; gboolean valid; GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *model; GtkTreeSelection *selection = NULL; gchar *package_id; gchar **split; /* get the first iter in the array */ treeview = GTK_TRE...
false
false
false
false
false
0
tree_search(struct rb_tree* tree, const void* key) { struct rb_node* node = tree->root; while (node) { int res = tree->compare(node->key, key); if (!res) break; node = node->link[res < 0]; } return node; }
false
false
false
false
false
0
zbuildfont2(i_ctx_t *i_ctx_p) { os_ptr op = osp; charstring_font_refs_t refs; build_proc_refs build; int code = build_proc_name_refs(imemory, &build, "%Type2BuildChar", "%Type2BuildGlyph"); gs_type1_data data1; if (code < 0) return code; code = ch...
false
false
false
false
false
0
remove_vote_cast(struct vote *pvote, struct vote_cast *pvc) { if (!pvote || !pvc) { return; } vote_cast_list_remove(pvote->votes_cast, pvc); free(pvc); check_vote(pvote); /* Maybe can pass */ }
false
false
false
false
false
0
cavan_input_device_matcher(struct cavan_event_matcher *matcher, void *data) { struct cavan_input_service *service = data; if (service->matcher) { return service->matcher(matcher, service->private_data); } return true; }
false
false
false
false
false
0
main(int argc, char *argv[]) { KAboutData aboutData("kollision", 0, ki18n("Kollision"), "0.1", ki18n("KDE collision game"), KAboutData::License_GPL, ki18n("(c) 2007 Paolo Capriotti"), KLocalizedString(), "http://games.kde.org/kollision"); aboutData.addAuthor(ki1...
false
false
false
false
false
0
type_to_text (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { guint type; gtk_tree_model_get (model, iter, BLUETOOTH_COLUMN_TYPE, &type, -1); g_object_set (cell, "text", (type == 0) ? _("Unknown") : bluetooth_type_to_string (type), NULL); }
false
false
false
false
false
0
DecodeSwap(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { unsigned Rt = fieldFromInstruction(Insn, 12, 4); unsigned Rt2 = fieldFromInstruction(Insn, 0, 4); unsigned Rn = fieldFromInstruction(Insn, 16, 4); unsigned pred = fieldFromInstruction(Insn, 28, ...
false
false
false
false
false
0
heightForWidth( int width ) const { const int renderFlags = d_data->text.renderFlags(); int indent = d_data->indent; if ( indent <= 0 ) indent = defaultIndent(); width -= 2 * frameWidth(); if ( renderFlags & Qt::AlignLeft || renderFlags & Qt::AlignRight ) width -= indent; int ...
false
false
false
false
false
0
dynamic_add_rule(this_rule) struct rule *this_rule; { char *src, *add_where; struct rule *new_rule; src=this_rule->action_body; if ( (add_where=get_word(&src)) == NULL ) { (void) fprintf(stderr, "don't know where to add rule: %s\n", this_rule->action_body); return; } if ( (new_rule=parse_rule(src)) ==...
false
false
false
false
false
0
IdentifyPointGroup(double tolerance) { // Don't duplicate work, use the more reliable fallback method Symbol pg = IdentifyPointGroupSymbol(tolerance); if (pg == Unknown) pg = C1; // no known symmetry return PointGroups[pg].group_name; }
false
false
false
false
false
0
snapscani_init_device_structure( SnapScan_Device **pd, const SnapScan_Bus bus_type, SANE_String_Const name, const char* vendor, const char* model, const SnapScan_Model model_num ) { static const char me[] = "snapscani_init_device_structure"; SANE_Status status = SANE_STATUS_GOOD;; D...
false
false
false
false
false
0
streamer_read_hwi (struct lto_input_block *ib) { HOST_WIDE_INT result = 0; int shift = 0; unsigned HOST_WIDE_INT byte; while (true) { byte = streamer_read_uchar (ib); result |= (byte & 0x7f) << shift; shift += 7; if ((byte & 0x80) == 0) { if ((shift < HOST_BITS_PER_WIDE_INT) && ...
false
false
false
false
false
0
isl_tab_alloc(struct isl_ctx *ctx, unsigned n_row, unsigned n_var, unsigned M) { int i; struct isl_tab *tab; unsigned off = 2 + M; tab = isl_calloc_type(ctx, struct isl_tab); if (!tab) return NULL; tab->mat = isl_mat_alloc(ctx, n_row, off + n_var); if (!tab->mat) goto error; tab->var = isl_alloc_array(ctx...
false
true
false
false
false
1
pixmap_put_sprite(GdkDrawable *pixmap, int pixmap_x, int pixmap_y, struct sprite *ssprite, int offset_x, int offset_y, int width, int height) { if (ssprite->pixmap) { if (ssprite->mask) { gdk_gc_set_clip_origin(civ_gc, pixmap_x, pixmap_y); gdk_gc_set_clip_mask(civ_g...
false
false
false
false
false
0
authnone_create_once (void) { struct authnone_private_s *ap; XDR xdr_stream; XDR *xdrs; ap = &authnone_private; ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; ap->no_client.ah_ops = (struct auth_ops *) &ops; xdrs = &xdr_stream; xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MA...
false
false
false
false
false
0
OpenFile( const char *pszNewName, int bUpdate, int bTestOpen ) { SHPHandle hSHP; DBFHandle hDBF; const char *pszExtension = CPLGetExtension( pszNewName ); (void) bTestOpen; if( !EQUAL(pszExtension,"shp") && !EQUAL(pszExtension,"shx") && !EQUAL(pszExte...
false
false
false
false
false
0
get_contiguous(PyObject *self, PyObject *args) { PyObject *obj; PyObject *buffertype; PyObject *order; long type; char ord; if (!PyArg_ParseTuple(args, "OOO", &obj, &buffertype, &order)) { return NULL; } if (!PyLong_Check(buffertype)) { PyErr_SetString(PyExc_TypeError, ...
false
false
false
false
false
0
OnRequestUndockWindow(CodeBlocksDockEvent& event) { wxAuiPaneInfo info = m_LayoutManager.GetPane(event.pWindow); if (info.IsOk()) { m_LayoutManager.DetachPane(event.pWindow); DoUpdateLayout(); } }
false
false
false
false
false
0
eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, const void *data_in, const char *cipher_key, int size_in) { void *deciphered = (void *)data_in; void *ret; Eet_Fre...
false
false
false
false
false
0
snd_vt1724_free(struct snd_ice1712 *ice) { if (!ice->port) goto __hw_end; /* mask all interrupts */ outb(0xff, ICEMT1724(ice, DMA_INT_MASK)); outb(0xff, ICEREG1724(ice, IRQMASK)); /* --- */ __hw_end: if (ice->irq >= 0) free_irq(ice->irq, ice); pci_release_regions(ice->pci); snd_ice1712_akm4xxx_free(ice); p...
false
false
false
false
false
0
chise_name_table_grow (CHISE_NAME_TABLE* table) { CHISE_NAME_TABLE *new_table = chise_make_hash_table ( table->size * 2 /* - (table->size * 4 / 5) */ ); int i; if (new_table == NULL) return -1; for (i = 0; i < table->size; i++) { CHISE_NAME_TABLE_ENTRY entry = table->data[i]; ...
false
false
false
false
false
0
new_lanai_vcc(void) { struct lanai_vcc *lvcc; lvcc = kzalloc(sizeof(*lvcc), GFP_KERNEL); if (likely(lvcc != NULL)) { skb_queue_head_init(&lvcc->tx.backlog); #ifdef DEBUG lvcc->vci = -1; #endif } return lvcc; }
false
false
false
false
false
0
getRGBXLine(Guchar *in, Guchar *out, int length) { double r, g, b; for (int i = 0; i < length; i++) { GfxDeviceCMYKColorSpacegetRGBLineHelper(in, r, g, b); *out++ = dblToByte(clip01(r)); *out++ = dblToByte(clip01(g)); *out++ = dblToByte(clip01(b)); *out++ = 255; } }
false
false
false
false
false
0
erase ( dmtcp::ConnectionIdentifier& key ) { iterator i = _connections.find(key); JASSERT(i != _connections.end()); erase(i); }
false
false
false
false
false
0
save_buffer (struct buffer_record *buf) { struct buffer_record *p; buf->next = NULL; buf->curr_line = buf->line_start; if (head == NULL) head = buf; else { for (p = head; p->next; p = p->next) /* Do nothing. */ ; p->next = buf; } }
false
false
false
false
false
0