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
ExtractVoiceVariantName(char *vname, int variant_num, int add_dir) {//=========================================================================== // Remove any voice variant suffix (name or number) from a voice name // Returns the voice variant name char *p; static char variant_name[40]; char variant_prefix[5]; v...
false
false
false
false
false
0
_php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size_t maxlen, size_t *len STREAMS_DC TSRMLS_DC) { char buf[CHUNK_SIZE]; size_t readchunk; size_t haveread = 0; size_t didread; size_t dummy; php_stream_statbuf ssbuf; if (!len) { len = &dummy; } if (maxlen == 0) { *len = 0; return SUCCES...
true
true
false
false
false
1
GetNumberOfFixedTextureUnits() { if ( ! vtkgl::MultiTexCoord2d || ! vtkgl::ActiveTexture ) { if(!this->ExtensionManagerSet()) { vtkWarningMacro(<<"extension manager not set. Return 1."); return 1; } // multitexture is a core feature of OpenGL 1.3. // multitexture is an ARB ext...
false
false
false
false
false
0
sm_metadata_copy_root(struct dm_space_map *sm, void *where_le, size_t max) { struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); struct disk_sm_root root_le; root_le.nr_blocks = cpu_to_le64(smm->ll.nr_blocks); root_le.nr_allocated = cpu_to_le64(smm->ll.nr_allocated); root_le.bitmap_root = cpu_to_l...
false
true
false
false
false
1
help_window_scroll(GtkWidget *text, const gchar *key) { gchar *needle; GtkTextBuffer *buffer; GtkTextIter iter; GtkTextIter start, end; if (!text || !key) return; needle = g_strdup_printf("[section:%s]", key); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)); gtk_text_buffer_get_iter_at_offset(buffer, ...
false
false
false
false
false
0
GetChecked( vector<CComponentInfo*>& vecChecked) { // qDebug() << "WSU get checked"; // Step through list box and pick out the checked ones for (int i = 0; i < ui.updatesList->count(); ++i) { #ifndef Q_WS_MAC if (ui.updatesList->item(i)->checkState() == Qt::Checked) ...
false
false
false
false
false
0
at76_disconnect(struct usb_interface *interface) { struct at76_priv *priv; priv = usb_get_intfdata(interface); usb_set_intfdata(interface, NULL); /* Disconnect after loading internal firmware */ if (!priv) return; wiphy_info(priv->hw->wiphy, "disconnecting\n"); at76_delete_device(priv); usb_put_dev(priv->u...
false
false
false
false
false
0
tracker_result_store_construct (GType object_type, gint _n_columns) { TrackerResultStore * self = NULL; GPtrArray* _tmp0_ = NULL; GPtrArray* _tmp1_ = NULL; GPtrArray* _tmp2_ = NULL; gint _tmp3_ = 0; GtkIconTheme* theme = NULL; GdkScreen* _tmp4_ = NULL; GtkIconTheme* _tmp5_ = NULL; GtkIconTheme* _tmp6_ = NULL; ...
false
false
false
false
false
0
constructArray(TIntermAggregate* aggNode, const TType* type, TOperator op, TSourceLoc line) { TType elementType = *type; int elementCount = type->getArraySize(); TIntermAggregate *newAgg = 0; elementType.clearArrayness(); TNodeArray &seq = aggNode->getNodes(); TNodeArray::iterator sit = seq.begin();...
false
false
false
false
false
0
gtk_meta_get_type() { static GType meta_type = 0; if (!meta_type) { GTypeInfo meta_info = { sizeof (GtkMetaClass), NULL, NULL, (GClassInitFunc) gtk_meta_class_init, NULL, NULL, sizeof (GtkMeta), 0, (GInstanceInitFunc) gtk_meta_init }; meta_type = g_type_register_static (GTK_TYPE...
false
false
false
false
false
0
onCmdHome(FXObject*,FXSelector,void*){ if(allowNavigation()) setDirectory(FXSystem::getHomeDirectory()); return 1; }
false
false
false
false
false
0
init() { // require an atom style with molecule IDs if (atom->molecule == NULL) error->all(FLERR,"Must use atom style with molecule IDs with fix bond/swap"); int icompute = modify->find_compute(id_temp); if (icompute < 0) error->all(FLERR,"Temperature ID for fix bond/swap does not exist"); temperatu...
false
false
false
true
false
1
set_timefilter(struct archive_match *a, int timetype, time_t mtime_sec, long mtime_nsec, time_t ctime_sec, long ctime_nsec) { if (timetype & ARCHIVE_MATCH_MTIME) { if ((timetype & ARCHIVE_MATCH_NEWER) || JUST_EQUAL(timetype)) { a->newer_mtime_filter = timetype; a->newer_mtime_sec = mtime_sec; a->newer_m...
false
false
false
false
false
0
get_block(struct block_allocation *alloc, u32 block) { struct region *reg = alloc->list.iter; block += alloc->list.partial_iter; for (; reg; reg = reg->next) { if (block < reg->len) return reg->block + block; block -= reg->len; } return EXT4_ALLOCATE_FAILED; }
false
false
false
false
false
0
hpm2_get_lan_channel_capabilities(struct ipmi_intf * intf, uint8_t hpm2_lan_params_start, struct hpm2_lan_channel_capabilities * caps) { struct ipmi_rq req; struct ipmi_rs * rsp; uint8_t rq[4]; /* reset result */ memset(caps, 0, sizeof (struct hpm2_lan_channel_capabilities)); /* prepare request */ memset(&...
false
true
false
true
false
1
GetDataBlock_ (xgdIOCtx * fd, unsigned char *buf, int *ZeroDataBlockP) { unsigned char count; if (!ReadOK (fd, &count, 1)) { return -1; } *ZeroDataBlockP = count == 0; if ((count != 0) && (!ReadOK (fd, buf, count))) { return -1; } return count; }
false
false
false
false
false
0
hatsuda_wall_triangle_act(tenm_object *my, const tenm_object *player) { double edge_x; /* sanity check */ if (my == NULL) { fprintf(stderr, "hatsuda_wall_triangle_act: my is NULL\n"); return 0; } if (player == NULL) return 0; (my->count[2])++; if (my->count[1] == 0) { edge_x = hatsud...
false
false
false
false
false
0
decode_attr_rdev(struct xdr_stream *xdr, uint32_t *bitmap, dev_t *rdev) { uint32_t major = 0, minor = 0; __be32 *p; int ret = 0; *rdev = MKDEV(0,0); if (unlikely(bitmap[1] & (FATTR4_WORD1_RAWDEV - 1U))) return -EIO; if (likely(bitmap[1] & FATTR4_WORD1_RAWDEV)) { dev_t tmp; p = xdr_inline_decode(xdr, 8); ...
false
false
false
false
false
0
init_workarounds_ring(struct intel_engine_cs *ring) { struct drm_device *dev = ring->dev; struct drm_i915_private *dev_priv = dev->dev_private; WARN_ON(ring->id != RCS); dev_priv->workarounds.count = 0; if (IS_BROADWELL(dev)) return bdw_init_workarounds(ring); if (IS_CHERRYVIEW(dev)) return chv_init_worka...
false
false
false
false
false
0
stereo_split(short *output1, short *output2, short *input, int n) { int i; for(i=0;i<n;i++) { *output1++ = *input++; *output2++ = *input++; } }
false
false
false
false
false
0
get_category(string name) { if(name != "") { xmlNode* category = doc->children->children; string cat_name = ""; while(category != NULL && !((cat_name = Utils::Xml::get_property(category, "name")) == name)) category = get_next_category(category); if(category != NULL && cat_name == name) ...
false
false
false
false
false
0
push_integer_local(int index) { //fprintf(out, " mov.w r12, r15\n"); //fprintf(out, " sub.w #0x%02x, r15\n", LOCALS(index)); if (reg < reg_max) { //fprintf(out, " mov.w @r15, r%d\n", REG_STACK(reg)); fprintf(out, " mov.w -%d(r12), r%d ; push local_%d\n", LOCALS(index), REG_STACK(reg), index); ...
false
false
false
false
false
0
mpeg_ts_type_find (GstTypeFind * tf, gpointer unused) { /* TS packet sizes to test: normal, DVHS packet size and * FEC with 16 or 20 byte codes packet size. */ const gint pack_sizes[] = { 188, 192, 204, 208 }; const guint8 *data = NULL; guint size = 0; guint64 skipped = 0; while (skipped < GST_MPEGTS_T...
false
false
false
false
false
0
test_object_tree_walk__0(void) { git_oid id; git_tree *tree; int ct; git_oid_fromstr(&id, tree_oid); cl_git_pass(git_tree_lookup(&tree, g_repo, &id)); ct = 0; cl_git_pass(git_tree_walk(tree, treewalk_count_cb, GIT_TREEWALK_PRE, &ct)); cl_assert_equal_i(3, ct); ct = 0; cl_git_pass(git_tree_walk(tree, treew...
false
false
false
false
false
0
vp702x_fe_sleep(struct dvb_frontend *fe) { deb_fe("%s\n",__func__); return 0; }
false
false
false
false
false
0
gedit_file_browser_store_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter) { FileBrowserNode *node; GeditFileBrowserStore *model; g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model), FALSE); g_return_val_if_fail (iter == NULL || iter->user_data != NULL, FALSE); mode...
false
false
false
false
false
0
au_xino_set(struct super_block *sb, struct au_opt_xino *xino, int remount) { int err, skip; struct dentry *parent, *cur_parent; struct qstr *dname, *cur_name; struct file *cur_xino; struct inode *dir; struct au_sbinfo *sbinfo; SiMustWriteLock(sb); err = 0; sbinfo = au_sbi(sb); parent = dget_parent(xino->fil...
false
false
false
false
false
0
solveClusters(btScalar sor) { for(int i=0,ni=m_joints.size();i<ni;++i) { m_joints[i]->Solve(m_sst.sdt,sor); } }
false
false
false
false
false
0
redisAsyncHandleRead(redisAsyncContext *ac) { redisContext *c = &(ac->c); if (redisBufferRead(c) == REDIS_ERR) { __redisAsyncDisconnect(ac); } else { /* Always re-schedule reads */ if (ac->evAddRead) ac->evAddRead(ac->_adapter_data); redisProcessCallbacks(ac); } }
false
false
false
false
false
0
nrrdKindSize(int kind) { static const char me[]="nrrdKindSize"; unsigned int ret; if (!( AIR_IN_OP(nrrdKindUnknown, kind, nrrdKindLast) )) { /* they gave us invalid or unknown kind */ return 0; } switch (kind) { case nrrdKindDomain: case nrrdKindSpace: case nrrdKindTime: case nrrdKindList: ...
false
false
false
false
false
0
handle_output_queue(GuardType& g) { if (msg_queue()->is_empty()) return cancel_wakeup_output(g); ACE_Message_Block* mblk; if (msg_queue()->dequeue_head(mblk, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1) { sLog.outError("WorldSocket::handle_output_queue dequeue_head"); return ...
false
false
false
false
false
0
ioremap_change_attr(unsigned long vaddr, unsigned long size, enum page_cache_mode pcm) { unsigned long nrpages = size >> PAGE_SHIFT; int err; switch (pcm) { case _PAGE_CACHE_MODE_UC: default: err = _set_memory_uc(vaddr, nrpages); break; case _PAGE_CACHE_MODE_WC: err = _set_memory_wc(vaddr, nrpages); b...
false
false
false
false
false
0
globus_rls_client_lrc_attr_value_get(globus_rls_handle_t *h, char *key, char *name, globus_rls_obj_type_t objtype, globus_list_t **attr_list) { static char *method = "lrc_attr_value_get"; globus_result_t r; globus_result_t saver; BUFFER b; char obuf[100]; char nbuf[BUFLEN]; char tbuf...
false
false
false
false
false
0
create_verify_ctx(char *data, char *digest, char *queryfile, char *ca_path, char *ca_file, char *untrusted) { TS_VERIFY_CTX *ctx = NULL; BIO *input = NULL; TS_REQ *request = NULL; int ret = 0; if (data != NULL || digest != NULL) { if (!(ctx = TS_VERIFY_CTX_new())) goto err; ctx->flags = TS...
false
false
false
false
false
0
updateColumnTransposePFI ( CoinIndexedVector * regionSparse) const { double *region = regionSparse->denseVector ( ); int numberNonZero = regionSparse->getNumElements(); int *index = regionSparse->getIndices ( ); int i; #ifdef COIN_DEBUG for (i=0;i<numberNonZero;i++) { int iRow=index[i]; assert (iRow...
false
false
false
false
false
0
parse_fragmentation_key(section_config_t *section, char *value) { if(!strcasecmp(value, "enable")) { section->config.fragmentation_enabled = 1; } else if (!strcasecmp(value, "disable")) { section->config.fragmentation_enabled = 0; } else { ML_ERROR(("Line %d, unexpected fragmentation...
false
false
false
false
false
0
load(const std::string &fontname) { if (fontname.empty()) return false; XFontSet set = createFontSet(fontname.c_str(), m_utf8mode); if (set == 0) return false; if (m_fontset != 0) XFreeFontSet(App::instance()->display(), m_fontset); m_fontset = set; m_setextents = XExt...
false
false
false
false
false
0
mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) { mp_digit D, r, rr; int x, res; mp_int t; /* if the shift count is <= 0 then we do no work */ if (b <= 0) { res = mp_copy (a, c); if (d != NULL) { mp_zero (d); } return res; } if ((res = mp_init (&t)) != MP_OKAY) { re...
false
false
false
false
false
0
parse_noopt( char **sp, const char *shortopt, const char *longopt, lList **ppcmdline, lList **alpp ) { DENTER (TOP_LAYER, "parse_noopt"); if ( (!strcmp(shortopt, *sp)) || (longopt && !strcmp(longopt, *sp)) ) { if(!lGetElemStr(*ppcmdline, SPA_switch, shortopt)) { sge_add_noarg(ppcmdline, 0, short...
false
false
false
false
false
0
ext2fs_image_super_read(ext2_filsys fs, int fd, int flags EXT2FS_ATTR((unused))) { char *buf; ssize_t actual, size; errcode_t retval; size = fs->blocksize * (fs->group_desc_count + 1); buf = malloc(size); if (!buf) return ENOMEM; /* * Read it all in. */ actual = read(fd, buf, size); if (actual ...
false
true
false
false
true
1
ISO2UNIX(char *timestring) { char c, *p; struct tm when; time_t t; // let localtime fill in all default fields such as summer time, TZ etc. t = time(NULL); localtime_r(&t, &when); when.tm_sec = 0; when.tm_wday = 0; when.tm_yday = 0; when.tm_isdst = -1; if ( strlen(timestring) != 12 ) { LogError( "Wrong ti...
false
false
false
false
true
1
pscr(int l, int o) { if((l >= 0 && l <= term.t_nrow) && (o >= 0 && o < term.t_ncol)) return(&(pscreen[l]->v_text[o])); else return(NULL); }
false
false
false
false
false
0
handle_skipped_hlink(struct file_struct *file, int itemizing, enum logcode code, int f_out) { char fbuf[MAXPATHLEN]; int new_last_ndx; struct file_list *save_flist = cur_flist; /* If we skip the last item in a chain of links and there was a * prior non-skipped hard-link waiting to finish, finish it now. */ ...
false
false
false
false
false
0
run_task(Task *) { if (!_active) return false; Packet *p; while (1) { p = read_packet(0); if (_dead) { if (_stop) router()->please_stop_driver(); return false; } // check sampling probability if (_sampling_prob >= (1 << SAMPLING_SHIFT) || (click_random() & ((1 << SAMPLING_SHIFT) - 1)...
false
false
false
false
false
0
cdb_make_put(struct cdb_make *cdbmp, const void *key, unsigned klen, const void *val, unsigned vlen, enum cdb_put_mode mode) { unsigned hval = cdb_hash(key, klen); int r; switch(mode) { case CDB_PUT_REPLACE: case CDB_PUT_INSERT: case CDB_PUT_WARN: case CDB_PUT_REPLACE0: r ...
false
false
false
false
false
0
fxresize(void** ptr,unsigned long size){ register void *p=NULL; if(size!=0){ if((p=realloc(*ptr,size))==NULL) return FALSE; } else{ if(*ptr) free(*ptr); } *ptr=p; return TRUE; }
false
false
false
false
false
0
obtain_firmware(struct hfi1_devdata *dd) { int err = 0; mutex_lock(&fw_mutex); if (fw_state == FW_ACQUIRED) { goto done; /* already acquired */ } else if (fw_state == FW_ERR) { err = fw_err; goto done; /* already tried and failed */ } if (fw_8051_load) { err = obtain_one_firmware(dd, fw_8051_name, &fw_8...
false
false
false
false
false
0
tax_brief_op_dec (NODE_T * p) { if (p != NO_NODE) { if (IS (p, BRIEF_OPERATOR_DECLARATION)) { tax_brief_op_dec (SUB (p)); tax_brief_op_dec (NEXT (p)); } else if (is_one_of (p, OP_SYMBOL, COMMA_SYMBOL, STOP)) { tax_brief_op_dec (NEXT (p)); } else if (IS (p, DEFINING_OPERATOR)) { TAG...
false
false
false
false
false
0
i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err) { switch (aq_err) { case I40E_AQ_RC_OK: return "OK"; case I40E_AQ_RC_EPERM: return "I40E_AQ_RC_EPERM"; case I40E_AQ_RC_ENOENT: return "I40E_AQ_RC_ENOENT"; case I40E_AQ_RC_ESRCH: return "I40E_AQ_RC_ESRCH"; case I40E_AQ_RC_EINTR: return "I4...
false
false
false
false
false
0
bValidate( void ) { // Validate the base class SimnBase::bValidate( ); if( ! m_oCmdOPT.bIsValid( ) ) SetErrMsg( m_oCmdOPT.rosGetErrMsg( ) ); if( ! m_oCmdPR .bIsValid( ) ) SetErrMsg( m_oCmdPR .rosGetErrMsg( ) ); if( ! m_oCmdGEN.bIsValid( ) ) SetErrMsg( m_oCmdGEN.rosGetErrMsg( ) ); switch( eGetAnaType( ) ) ...
false
false
false
false
false
0
free_rule_list_func (void *data) { DBusList **list = data; if (list == NULL) /* DBusHashTable is on crack */ return; _dbus_list_foreach (list, free_rule_func, NULL); _dbus_list_clear (list); dbus_free (list); }
false
false
false
false
false
0
showAddTags(AjPStr *tagsout, const AjPFeature feat, AjBool values) { AjPStr tagnam = NULL; AjPStr tagval = NULL; AjIList titer; /* ** iterate through the tags and test for match to patterns */ (void) values; /* make it used */ tagval = ajStrNew(); tagnam = ajStrNew(); tite...
false
false
false
false
false
0
ocfs2_rw_unlock(struct inode *inode, int write) { int level = write ? DLM_LOCK_EX : DLM_LOCK_PR; struct ocfs2_lock_res *lockres = &OCFS2_I(inode)->ip_rw_lockres; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); mlog(0, "inode %llu drop %s RW lock\n", (unsigned long long)OCFS2_I(inode)->ip_blkno, write ...
false
false
false
false
false
0
Pan() { if (this->CurrentRenderer == NULL) { return; } vtkRenderWindowInteractor *rwi = this->Interactor; double ViewFocus[4]; double NewPickPoint[4]; // Calculate the focal depth since we'll be using it a lot vtkCamera* camera = this->CurrentRenderer->GetActiveCamera(); camera->GetFoc...
false
false
false
false
false
0
redo() { if (!m_undoOnly) { m_sketchWidget->moveLegBendpoint(m_fromID, m_fromConnectorID, m_index, m_newPos); } BaseCommand::redo(); }
false
false
false
false
false
0
create_convert(std::locale const &in,cdata const &cd,character_facet_type type) { switch(type) { case char_facet: #ifdef WITH_CASE_MAPS if(cd.utf8) return std::locale(in,new utf8_converter_impl(cd)); #endif return std::locale(in,new con...
false
false
false
false
false
0
nvkm_device_init(struct nvkm_device *device) { struct nvkm_subdev *subdev; int ret, i; s64 time; ret = nvkm_device_preinit(device); if (ret) return ret; nvkm_device_fini(device, false); nvdev_trace(device, "init running...\n"); time = ktime_to_us(ktime_get()); if (device->func->init) { ret = device->fu...
false
false
false
false
false
0
gtk_text_region_new (GtkTextBuffer *buffer) { GtkTextRegion *region; g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), NULL); region = g_new (GtkTextRegion, 1); region->subregions = NULL; region->time_stamp = 0; region->buffer = buffer; g_object_add_weak_pointer (G_OBJECT (buffer), (gpointer *)&regio...
false
false
false
false
false
0
ProcessGenericSpell(Unit *u,int spell, OrdersCheck *pCheck ) { CastOrder *orders = new CastOrder; orders->spell = spell; orders->level = 1; u->ClearCastOrders(); u->castorders = orders; }
false
false
false
false
false
0
__ecereNameSpace__ecere__gui__Desktop3DTitleBarClicked(struct __ecereNameSpace__ecere__com__Instance * clickedWindow, int x, int y) { struct __ecereNameSpace__ecere__sys__Size __simpleStruct3; struct __ecereNameSpace__ecere__sys__Size __simpleStruct2; struct __ecereNameSpace__ecere__sys__Point __simpleStruct1; struct _...
false
false
false
false
false
0
libnet_host_lookup_r(u_long in, u_short use_name, u_char *hostname) { u_char *p; struct hostent *host_ent = NULL; struct in_addr addr; if (use_name == LIBNET_RESOLVE) { addr.s_addr = in; host_ent = gethostbyaddr((char *)&addr, sizeof(struct in_addr), AF_INET); } if (!hos...
false
false
false
false
true
1
screen_monitor_pointer() { gint x, y; if (!screen_pointer_pos(&x, &y)) x = y = 0; return screen_find_monitor_point(x, y); }
false
false
false
false
false
0
write(hsStream* S, plResManager* mgr) { plBitmap::write(S, mgr); S->writeInt(fVisWidth); S->writeInt(fVisHeight); S->writeBool(fHasAlpha); S->writeInt(fInitBufferLen); if (fInitBuffer != NULL) S->writeInts(fInitBufferLen, (uint32_t*)fInitBuffer); }
false
false
false
false
false
0
f2fs_llseek(struct file *file, loff_t offset, int whence) { struct inode *inode = file->f_mapping->host; loff_t maxbytes = inode->i_sb->s_maxbytes; switch (whence) { case SEEK_SET: case SEEK_CUR: case SEEK_END: return generic_file_llseek_size(file, offset, whence, maxbytes, i_size_read(inode)); case SEE...
false
false
false
false
false
0
DoScavenge(ObjectVisitor* scavenge_visitor, Address new_space_front) { do { ASSERT(new_space_front <= new_space_.top()); // The addresses new_space_front and new_space_.top() define a // queue of unprocessed copied objects. Process them until the // queue is empty. while...
false
false
false
false
false
0
Print(const char *label, const char *varName, Prt_TYPE fmt, ...) { static char *buffer = NULL; /* Copy of message generated so far. */ va_list ap; /* pointer to variable argument list. */ sInt4 lival; /* Store a sInt4 val from argument list. */ char *sval; /* Store a string val fro...
false
false
false
false
false
0
debrief_init_music() { int score = SCORE_DEBRIEF_AVERAGE; Debrief_music_timeout = 0; if ( (Game_mode & GM_CAMPAIGN_MODE) && (Campaign.next_mission == Campaign.current_mission) ) { // you failed the mission, so you get the fail music score = SCORE_DEBRIEF_FAIL; } else if ( mission_goals_met() ) { // you comp...
false
false
false
false
false
0
fromRGB565(PyObject *self, PyObject *args){ guchar* rgbdata; gint width, height; gint swap_bytes; // = TRUE; gint rotate; // = FALSE; gchar* savefilename; // = "gpixpod_imgconvert_test.png"; gint rgbdatalen; if(!PyArg_ParseTuple(args, "s#iiiis", &rgbdata, &rgbdatalen, &width, &height, &swap_bytes, &rotate, &save...
false
false
false
false
false
0
createTipLabel(const QString& text, QWidget* parent) { PsiTipLabel* label = new PsiTipLabel(parent); label->init(text); return label; }
false
false
false
false
false
0
parse_emacs_modeline (gchar *s, ModelineOptions *options) { guint intval; GString *key, *value; key = g_string_sized_new (8); value = g_string_sized_new (8); while (*s != '\0') { while (*s != '\0' && (*s == ';' || g_ascii_isspace (*s))) s++; if (*s == '\0' || strncmp (s, "-*-", 3) == 0)...
false
false
false
false
false
0
ooH323EpPrintConfig(void) { OOTRACEINFO1("H.323 Endpoint Configuration is as follows:\n"); OOTRACEINFO2("\tTrace File: %s\n", gH323ep.traceFile); if(!OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART)) { OOTRACEINFO1("\tFastStart - disabled\n"); } else{ OOTRACEINFO1("\tFastStart - enabled\n")...
false
false
false
false
false
0
CopyElement(const List * l, size_t position, void *outBuffer) { ListElement *rvp; if (l == NULL || outBuffer == NULL) { if (l) l->RaiseError("iList.CopyElement", CONTAINER_ERROR_BADARG); else NullPtrError("CopyElement"); return CONTAINER_ERROR_BADARG; } ...
false
false
false
false
false
0
mq_delete_contribution_node (dict_t *dict, char *key, inode_contribution_t *contribution) { if (dict_get (dict, key) != NULL) goto out; QUOTA_FREE_CONTRIBUTION_NODE (contribution); out: return 0; }
false
false
false
false
false
0
host_aliases_dialog_prepare (OobsStaticHost *host) { GtkWidget *address, *aliases; GtkTextBuffer *buffer; GList *alias_list; gchar *alias_str; address = gst_dialog_get_widget (tool->main_dialog, "host_alias_address"); aliases = gst_dialog_get_widget (tool->main_dialog, "host_alias_list"); buffer = gtk_te...
false
false
false
false
false
0
addAppender(Logger& logger, log4cplus::SharedAppenderPtr& appender) { for(LoggerListIterator it=loggerList.begin(); it!=loggerList.end(); ++it) { if((*it).value == logger.value) { LOG4CPLUS_MUTEX_UNLOCK( logger.value->appender_list_mutex ); logger.addAppender(appender); L...
false
false
false
false
false
0
AbsoluteToPercentage(double value) { double convertedVal = 0; // convert from absolute to percent if (_hundred_percent == 0) { if (_percentage_is_increment) convertedVal = 0; else convertedVal = 100; } else { double hundred_converted = _hundred_percent / ...
false
false
false
false
false
0
get_messages(struct chat_history_data* data, size_t num, struct cbuffer* outbuf) { struct linked_list* messages = data->chat_history; char* message; int skiplines = 0; size_t lines = 0; size_t total = list_size(messages); if (total == 0) return 0; if (num <= 0 || num > total) num = total; if (num != tota...
false
false
false
false
false
0
aarch64_strip_shift (rtx x) { rtx op = x; if ((GET_CODE (op) == ASHIFT || GET_CODE (op) == ASHIFTRT || GET_CODE (op) == LSHIFTRT) && CONST_INT_P (XEXP (op, 1))) return XEXP (op, 0); if (GET_CODE (op) == MULT && CONST_INT_P (XEXP (op, 1)) && ((unsigned) exact_log2 (INTVAL (XEX...
false
false
false
false
false
0
process_next_chunk(struct web_session *session) { GString *buf = session->send_buffer; const guint8 *body; gsize length; if (session->input_func == NULL) { session->more_data = FALSE; return; } session->more_data = session->input_func(&body, &length, session->user_data); if (length > 0) { g_string...
false
false
false
false
false
0
readblock( int port, unsigned short len) { int retval,i; memset( frage, 0x00, sizeof(frage)); if(tcgetattr(port,&tios)==-1)err(1,NULL); tios.c_cc[VMIN]=len; if(tcsetattr(port,TCSANOW,&tios)==-1)err(1,NULL); retval=read(port,frage,len); if (retval < 0)return retval; #ifdef DEBUG /* fprintf(...
false
false
false
false
false
0
pdfextract_main(int argc, char **argv) { char *infile; char *password = ""; int c, o; while ((c = fz_getopt(argc, argv, "p:r")) != -1) { switch (c) { case 'p': password = fz_optarg; break; case 'r': dorgb++; break; default: usage(); break; } } if (fz_optind == argc) usage(); infile = argv[fz_op...
false
false
false
false
true
1
gw_menu_file_exit_save_file_ok ( GtkWidget *bt, GtkWindow *dg) { GWDBCatalog *catalog = NULL; gboolean result = FALSE; #ifdef GW_DEBUG_GUI_CALLBACK_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); #endif gtk_widget_destroy ( GTK_WIDGET ( dg)); /* Checks if it's a new ...
false
false
false
false
false
0
binder_vma_open(struct vm_area_struct *vma) { struct binder_proc *proc = vma->vm_private_data; binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, (unsigne...
false
false
false
false
false
0
cb_index_styles (GnmStyle *style, IndexerState *state) { if (gnm_style_is_element_set (style, MSTYLE_HLINK)) { GnmHLink const *lnk = gnm_style_get_hlink (style); if (lnk != NULL) ssindex_hlink (state, lnk); } if (gnm_style_is_element_set (style, MSTYLE_VALIDATION)) { GnmValidation const *valid = gnm_style_...
false
false
false
false
false
0
PyNumber_ToBase(PyObject *n, int base) { PyObject *res = NULL; PyObject *index = PyNumber_Index(n); if (!index) return NULL; if (PyLong_Check(index)) res = _PyLong_Format(index, base, 0, 1); else if (PyInt_Check(index)) res = _PyInt_Format((PyIntObject*)index, base, 1); ...
false
false
false
false
false
0
clean_up (void) { GdkWindow *root; GdkDeviceManager *dev_manager; GdkDevice *device; GList *devices, *l; root = gdk_get_default_root_window (); dev_manager = gdk_display_get_device_manager (gdk_display_get_default ()); gdk_window_remove_filter (root, (GdkFilterFunc) target_filter, NULL)...
false
false
false
false
false
0
get_atomic_generic_size (location_t loc, tree function, VEC(tree,gc) *params) { unsigned int n_param; unsigned int n_model; unsigned int x; int size_0; tree type_0; /* Determine the parameter makeup. */ switch (DECL_FUNCTION_CODE (function)) { case BUILT_IN_ATOMIC_EXCHANGE: n_param = 4; ...
false
false
false
false
false
0
btrfs_free_block_groups(struct btrfs_fs_info *info) { struct btrfs_block_group_cache *block_group; struct btrfs_space_info *space_info; struct btrfs_caching_control *caching_ctl; struct rb_node *n; down_write(&info->commit_root_sem); while (!list_empty(&info->caching_block_groups)) { caching_ctl = list_entry(i...
false
false
false
false
false
0
get_frame( hnd_t handle, cli_pic_t *output, int frame ) { depth_hnd_t *h = handle; if( h->prev_filter.get_frame( h->prev_hnd, output, frame ) ) return -1; if( h->bit_depth < 16 && output->img.csp & X264_CSP_HIGH_DEPTH ) { dither_image( &h->buffer.img, &output->img, h->error_buf ); ...
false
false
false
false
false
0
Timestamp2Unix(const Glib::ustring &stamp, time_t &result) { struct tm split; bool utc; if( !Barry::Sync::iso_to_tm(stamp.c_str(), &split, utc) ) return false; split.tm_isdst = -1; if( utc ) result = Barry::Sync::utc_mktime(&split); else result = mktime(&split); return result != (time_t)-1; }
false
false
false
false
false
0
find_ticket (context, cc, client, server, found) krb5_context context; krb5_ccache cc; krb5_principal client; krb5_principal server; krb5_boolean *found; { krb5_creds tgt, tgtq; krb5_error_code retval; *found = FALSE; memset(&tgtq, 0, sizeof(tgtq)); memset(&tgt, 0, sizeof(tgt)...
false
false
false
false
false
0
array_free_wipe(array *a) { size_t bytes = a->allocated; if (bytes) memset(a->mem, 0, bytes); array_free(a); }
false
false
false
false
false
0
snmplite_ups_get_capabilities(UPSINFO *ups) { struct snmplite_ups_internal_data *sid = (struct snmplite_ups_internal_data *)ups->driver_internal_data; write_lock(ups); // Walk the OID map, issuing an SNMP query for each item, one at a time. // If the query succeeds, sanity check the returned value a...
false
false
false
false
false
0
UndefconstructCommand( void *theEnv, char *command, struct construct *constructClass) { char *constructName; char buffer[80]; /*==============================================*/ /* Get the name of the construct to be deleted. */ /*==============================================*/ s...
true
true
true
false
false
1
eprimer32_send_range_pair(FILE * stream, const char * tag, const AjPRange avalue, const AjPRange bvalue, ajint begin) { AjPStr str; ajuint n = 0; ajuint start; ajuint end; ajuint asize...
false
false
false
false
false
0
glusterd_friend_add (const char *hoststr, int port, glusterd_friend_sm_state_t state, uuid_t *uuid, glusterd_peerinfo_t **friend, gf_boolean_t restore, glusterd_peerctx_args_t *args) { int ...
false
false
false
false
false
0
Clamp8b(int val) { const int min_val = 0; const int max_val = 0xff; return (val < min_val) ? min_val : (val > max_val) ? max_val : val; }
false
false
false
false
false
0
set_listen_port (unsigned port) { listen_iface.protocol = "tcp"; listen_iface.voip_protocol = "h323"; listen_iface.id = "*"; if (port > 0) { std::stringstream str; RemoveListener (NULL); str << "tcp$*:" << port; if (StartListeners (PStringArray (str.str ()))) { listen_iface.port = port...
false
false
false
false
false
0
tree_lower_complex (void) { int old_last_basic_block; gimple_stmt_iterator gsi; basic_block bb; if (!init_dont_simulate_again ()) return 0; complex_lattice_values = VEC_alloc (complex_lattice_t, heap, num_ssa_names); VEC_safe_grow_cleared (complex_lattice_t, heap, complex_lattice_values, num_ssa_n...
false
false
false
false
false
0
putChar(ByteOutStream & os, StdVnChar stdChar, int & outLen) { outLen = sizeof(UnicodeChar); return os.putW((stdChar >= VnStdCharOffset)? m_toUnicode[stdChar-VnStdCharOffset] : (UnicodeChar)stdChar); }
false
false
false
false
false
0