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
gst_matroska_mux_handle_buffer (GstCollectPads * pads, GstCollectData * data, GstBuffer * buf, gpointer user_data) { GstMatroskaMux *mux = GST_MATROSKA_MUX (user_data); GstEbmlWrite *ebml = mux->ebml_write; GstMatroskaPad *best; GstFlowReturn ret = GST_FLOW_OK; GST_DEBUG_OBJECT (mux, "Collected pads"); ...
false
false
false
false
false
0
cparse_normalize_void(Node *n) { String *decl = Getattr(n, "decl"); Parm *parms = Getattr(n, "parms"); if (SwigType_isfunction(decl)) { if ((ParmList_len(parms) == 1) && (SwigType_type(Getattr(parms, "type")) == T_VOID)) { Replaceall(decl, "f(void).", "f()."); Delattr(n, "parms"); } } }
false
false
false
false
false
0
dl_running_count_changed(property_t prop) { guint32 val; gnet_prop_get_guint32_val(prop, &val); if (val == 0) gtk_label_printf( GTK_LABEL(gui_main_window_lookup("label_dl_running_count")), _("no sources")); else gtk_label_printf( GTK_LABEL(gui_main_window_l...
false
false
false
false
false
0
zInitPromFactory(zFeatureFactory *fac, zDNA *dna, zScanner **scanners, zScanner **conseqscanners, int feature_count, strand_t strand, bool conseq_enabled, zStopSeq* stop_seq ){ zStrIdx tmp_name; stop_seq = stop_seq; /* compiler hush */ fac->end_offset = ...
false
false
false
false
false
0
bus_dbus_impl_name_owner_changed (BusDBusImpl *dbus, BusConnection *connection, gchar *name, gchar *old_owner, gchar *new_owner) { g_assert (BUS_IS_DBUS_I...
false
false
false
false
false
0
CDB___memp_fremove(dbmfp) DB_MPOOLFILE *dbmfp; { DB_ENV *dbenv; DB_MPOOL *dbmp; dbmp = dbmfp->dbmp; dbenv = dbmp->dbenv; PANIC_CHECK(dbenv); R_LOCK(dbenv, &dbmp->reginfo); /* * Flag that the underlying file has been removed, and remove any * necessity for post-processing pages, anybody can discard them....
false
false
false
false
false
0
gammln (double x) { double p, q, w, z; int i; sgngam = 1; if( x < -34.0 ) { q = -x; w = gammln(q); /* note this modifies sgngam! */ p = floor(q); if( p == q ) goto loverf; i = (int)p; if( (i & 1) == 0 ) sgngam = -1; else sgngam = 1; z = q - p; if( z > 0.5 ) { p += 1.0; z = p ...
false
false
false
false
false
0
rcfs_meta_save (const char *path, HDF *meta) { NEOERR *err; int lock; HDF *m; err = rcfs_lock (path, &lock); if (err) return nerr_pass (err); do { err = rcfs_meta_load (path, &m); if (err) break; err = hdf_copy (m, "Meta", meta); if (err) break; err = _meta_save (path, m); } while (...
false
false
false
false
true
1
x264_denoise_dct( dctcoef *dct, uint32_t *sum, udctcoef *offset, int size ) { for( int i = 0; i < size; i++ ) { int level = dct[i]; int sign = level>>31; level = (level+sign)^sign; sum[i] += level; level -= offset[i]; dct[i] = level<0 ? 0 : (level^sign)-sign; ...
false
false
false
false
false
0
vxfs_read_olt(struct super_block *sbp, u_long bsize) { struct vxfs_sb_info *infp = VXFS_SBI(sbp); struct buffer_head *bp; struct vxfs_olt *op; char *oaddr, *eaddr; bp = sb_bread(sbp, vxfs_oblock(sbp, infp->vsi_oltext, bsize)); if (!bp || !bp->b_data) goto fail; op = (struct vxfs_olt *)bp->b_data; if (op...
false
false
false
false
false
0
gfire_friend_search_proto_create_request(const gchar *p_search) { if(!p_search) return -1; guint32 offset = XFIRE_HEADER_LEN; offset = gfire_proto_write_attr_ss("name", 0x01, p_search, strlen(p_search), offset); offset = gfire_proto_write_attr_ss("fname", 0x01, "", 0, offset); offset = gfire_proto_write_attr_s...
false
false
false
false
false
0
read_vmstat_swap(struct stats_swap *st_swap) { FILE *fp; char line[128]; if ((fp = fopen(VMSTAT, "r")) == NULL) return; while (fgets(line, 128, fp) != NULL) { if (!strncmp(line, "pswpin ", 7)) { /* Read number of swap pages brought in */ sscanf(line + 7, "%lu", &st_swap->pswpin); } else if (!strncm...
true
true
false
false
true
1
add_all_interfaces (GType iface_type, GPtrArray *type_structs) { GType *prereq; guint n_prereq; guint i; g_ptr_array_add (type_structs, g_type_default_interface_ref (iface_type)); prereq = g_type_interface_prerequisites (iface_type, &n_prereq); for (i = 0; i < ...
false
false
false
false
false
0
wss_get_mode(int from_slot, int from_list, int to_slot, int to_list, int wl_ship_slot) { int mode, to_slot_empty=0; Assert( Wss_slots != NULL ); if ( wl_ship_slot >= 0 ) { // weapons loadout if ( to_slot >= 0 ) { if ( Wss_slots[wl_ship_slot].wep_count[to_slot] == 0 ) { to_slot_empty = 1; } } } els...
false
false
false
false
false
0
caml_read_directory(char * dirname, struct ext_table * contents) { DIR * d; #ifdef HAS_DIRENT struct dirent * e; #else struct direct * e; #endif char * p; d = opendir(dirname); if (d == NULL) return -1; while (1) { e = readdir(d); if (e == NULL) break; if (strcmp(e->d_name, ".") == 0 || strcm...
false
false
false
false
false
0
parse_option(uci_t * uci, const char string[]) { option_t * opt; parse_t parse[1]; char command[StringSize]; char option[StringSize]; char argument[StringSize]; ASSERT(uci!=NULL); ASSERT(string!=NULL); // init strcpy(command,"option"); if (uci->option_nb >= OptionNb) return; opt =...
false
false
false
false
false
0
pio_freeze(struct hfi1_devdata *dd) { struct send_context *sc; int i; for (i = 0; i < dd->num_send_contexts; i++) { sc = dd->send_contexts[i].sc; /* * Don't disable unallocated, unfrozen, or user send contexts. * User send contexts will be disabled when the process * calls into the driver to reset its ...
false
false
false
false
false
0
checkBVString(const struct berval *bv) { ber_len_t i; for ( i = 0; i < bv->bv_len; i++ ) { if ( bv->bv_val[i] == '\0' ) return 0; } if ( bv->bv_val[i] != '\0' ) return 0; return 1; }
false
false
false
false
false
0
DestroyConfig(CONFIG *c) #else DestroyConfig(c) CONFIG *c; #endif { if (c == (CONFIG *)0) return; if (c->logfile != (char *)0) free(c->logfile); if (c->passwdfile != (char *)0) free(c->passwdfile); if (c->primaryport != (char *)0) free(c->primaryport); if (c->secondaryport != (char *)0) fre...
false
false
false
false
false
0
tuple_get_str (const Tuple * tuple, int nfield, const char * field) { if (nfield < 0) nfield = tuple_field_by_name (field); if (nfield < 0 || nfield >= TUPLE_FIELDS || tuple_fields[nfield].type != TUPLE_STRING) return NULL; pthread_mutex_lock (& mutex); char * str = NULL; TupleVal...
false
false
false
false
false
0
odf_write_meta (GnmOOExport *state, GsfOutput *child) { GsfXMLOut *xml = create_new_xml_child (state, child); GsfDocMetaData *meta = go_doc_get_meta_data (GO_DOC (state->wb)); GValue *val = g_new0 (GValue, 1); GsfDocProp *prop = gsf_doc_meta_data_steal (meta, GSF_META_NAME_GENERATOR); g_value_init (val, G_TYPE_ST...
false
false
false
false
false
0
messageview_update_msg(gpointer source, gpointer data) { MsgInfoUpdate *msginfo_update = (MsgInfoUpdate *) source; MessageView *messageview = (MessageView *)data; MsgInfo *old_msginfo = messageview->msginfo; if (messageview->msginfo != msginfo_update->msginfo) return FALSE; if ((msginfo_update->flags & MSGINFO...
false
false
false
false
false
0
nvm_setup_sysblks(struct nvm_dev *dev, struct ppa_addr *sysblk_ppas) { int nr_rows = min_t(int, MAX_SYSBLKS, dev->nr_chnls); int i; for (i = 0; i < nr_rows; i++) sysblk_ppas[i].ppa = 0; /* if possible, place sysblk at first channel, middle channel and last * channel of the device. If not, create only one or t...
false
false
false
false
false
0
inferattributetype1(Datasrc* src) { nc_type result = NC_NAT; /* Recurse down any enclosing compound markers to find first non-fill "primitive"*/ while(result == NC_NAT && srcmore(src)) { if(issublist(src)) { srcpush(src); result = inferattributetype1(src); srcpop(src); } else { Consta...
false
false
false
false
false
0
gcr_union_collection_remove (GcrUnionCollection *self, GcrCollection *collection) { GList *objects, *l; g_return_if_fail (GCR_IS_UNION_COLLECTION (self)); g_return_if_fail (GCR_IS_COLLECTION (collection)); g_return_if_fail (g_hash_table_lookup (self->pv->collections, collection)); g_...
false
false
false
false
false
0
Get(AListElem * e) { AListElem * temp = list; while (temp) { if (temp == e) return temp; temp = temp->next; } return 0; }
false
false
false
false
false
0
corrupt(int factor) { boost::mt19937 seed; // Pick the number of errors to create based on the Buffer's data size boost::uniform_int<> errs(1, (_nbytes/factor)); int errors = errs(seed); gnash::log_debug(_("Creating %d errors in the buffer"), errors); for (int i=0; i<errors; i++) { // find...
false
false
false
false
false
0
folder_free_message_info (CamelFolder *folder, CamelMessageInfo *info) { g_return_if_fail (folder->summary != NULL); camel_message_info_free (info); }
false
false
false
false
false
0
_local_readb(void *_css, uint32_t port, unsigned int cs) { struct cpssp *cpssp = (struct cpssp *) _css; uint8_t val8; val8 = 0x0; TRACE(DEBUG_IO,"IO READ -> _local_readb -> port: %08x, cs: %d\n",port ,cs); switch (cs) { case 0: // cs0 sig_cs_readb(cpssp->port_cs0, cpssp, &val8, port); break; cas...
false
false
false
false
false
0
xg_symbolic_immeds_fit (const TInsn *insn, segT pc_seg, fragS *pc_frag, offsetT pc_offset, long stretch) { xtensa_isa isa = xtensa_default_isa; symbolS *symbolP; fragS *sym_frag; offsetT target, pc; uint32 new_offset; int i; int n = insn->ntok; gas_assert (insn->insn_type == ITYPE_INSN); ...
false
false
false
false
false
0
setautogain(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; if (sd->autogain) sd->ag_cnt = AG_CNT_START; else sd->ag_cnt = -1; }
false
false
false
false
false
0
normalize_call(char *call) { char c[8]; int ssid; char *p; strcpy(c, call_call(call)); ssid = call_ssid(call); if (ssid == 0) strcpy(call, c); else sprintf(call, "%s-%i", c, ssid); for (p = call; *p; p++) *p = toupper(*p); return call; }
false
false
false
false
false
0
getParamString() const { return QString("MoveItemCommand ") + BaseCommand::getParamString() + QString(" id:%1 old.x:%2 old.y:%3 old.px:%4 old.py:%5 new.x:%6 new.y:%7 new.px:%8 new.py:%9") .arg(m_itemID) .arg(m_old.loc().x()) .arg(m_old.loc().y()) .arg(m_old.line().p2().x()) .arg(m_old.line().p2().y()) ...
false
false
false
false
false
0
fl_utf8to_mb(const char* src, unsigned srclen, char* dst, unsigned dstlen) { if (!fl_utf8locale()) { #ifdef WIN32 wchar_t lbuf[1024]; wchar_t* buf = lbuf; unsigned length = fl_utf8towc(src, srclen, buf, 1024); unsigned ret; if (length >= 1024) { buf = (wchar_t*)(malloc((length+1)*sizeof(...
true
true
false
false
false
1
allocate_ants ( void ) /* FUNCTION: allocate the memory for the ant colony, the best-so-far and the iteration best ant INPUT: none OUTPUT: none (SIDE)EFFECTS: allocation of memory for the ant colony and two ants that store...
false
true
false
false
false
1
kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, unsigned long arg) { void __user *argp = (void __user *)arg; int r; switch (ioctl) { case KVM_ASSIGN_PCI_DEVICE: { struct kvm_assigned_pci_dev assigned_dev; r = -EFAULT; if (copy_from_user(&assigned_dev, argp, sizeof assigned_dev)) goto ...
false
false
false
false
false
0
gf_odf_parse_descriptor(GF_BitStream *bs, GF_Descriptor **desc, u32 *desc_size) { u32 val, size, sizeHeader; u8 tag; GF_Err err; GF_Descriptor *newDesc; if (!bs) return GF_BAD_PARAM; *desc_size = 0; //tag tag = (u8) gf_bs_read_int(bs, 8); sizeHeader = 1; //size size = 0; do { val = gf_bs_read_int(bs, ...
false
false
false
false
false
0
writeToStream(mrpt::utils::CStream &out,int *version) const { if (version) *version = 2; else { uint32_t N = m_modes.size(); out << N; for (const_iterator it=m_modes.begin();it!=m_modes.end();++it) { out << (it)->log_w; out << (it)->mean; out << (it)->cov(0,0) << (it)->cov(1,1) << (it)->cov(2,2);...
false
false
false
false
false
0
_atspi_dbus_return_hyperlink_from_message (DBusMessage *message) { DBusMessageIter iter; AtspiHyperlink *retval = NULL; const char *signature; if (!message) return NULL; signature = dbus_message_get_signature (message); if (!strcmp (signature, "(so)")) { dbus_message_iter_init (message, &iter...
false
false
false
false
false
0
CreateDataFromImport( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene, Q3BSPZipArchive *pArchive ) { if ( NULL == pModel || NULL == pScene ) return; pScene->mRootNode = new aiNode; if ( !pModel->m_ModelName.empty() ) { pScene->mRootNode->mName.Set( pModel->m_ModelName ); } // Create the face t...
false
false
false
false
false
0
__handle_link_change(struct usbnet *dev) { if (!test_bit(EVENT_DEV_OPEN, &dev->flags)) return; if (!netif_carrier_ok(dev->net)) { /* kill URBs for reading packets to save bus bandwidth */ unlink_urbs(dev, &dev->rxq); /* * tx_timeout will unlink URBs for sending packets and * tx queue is stopped by net...
false
false
false
false
false
0
rtw_get_wps_attr_content23a(const u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_content) { const u8 *attr_ptr; u32 attr_len; attr_ptr = rtw_get_wps_attr23a(wps_ie, wps_ielen, target_attr_id, NULL, &attr_len); if (attr_ptr && attr_len) { if (buf_content) memcpy(buf_content, attr_pt...
false
false
false
false
false
0
gwy_data_field_grains_remove_touching_border(GwyDataField *grain_field) { gint i, xres, yres, ngrains; gdouble *data; gint *grains; gboolean *touching; g_return_if_fail(GWY_IS_DATA_FIELD(grain_field)); xres = grain_field->xres; yres = grain_field->yres; data = grain_field->data; g...
false
false
false
false
false
0
stream_mem_seek (GSeekable *seekable, goffset offset, GSeekType type, GCancellable *cancellable, GError **error) { CamelStreamMemPrivate *priv; goffset position; priv = CAMEL_STREAM_MEM_GET_PRIVATE (seekable); switch (type) { case G_SEEK_SET: ...
false
false
false
false
false
0
FindUseWithSimilarFormula(const Formula &OrigF, const LSRUse &OrigLU) { // Search all uses for the formula. This could be more clever. for (size_t LUIdx = 0, NumUses = Uses.size(); LUIdx != NumUses; ++LUIdx) { LSRUse &LU = Uses[LUIdx]; // Check whether this use is clos...
false
false
false
false
false
0
dvb_io_recording_reader_load_into (DVBioRecordingReader* self) { gboolean result = FALSE; GFile* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; GFile* _tmp6_ = NULL; gboolean _tmp7_ = FALSE; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = self->priv->_directory; _tmp1_ = g_file_query_exists (_tmp0_, NULL); if (!...
false
false
false
false
false
0
fts_sort(FTS *sp, FTSENT *head, int nitems) { FTSENT **ap, *p; /* * Construct an array of pointers to the structures and call qsort(3). * Reassemble the array in the order returned by qsort. If unable to * sort for memory reasons, return the directory entries in their ...
false
false
false
false
false
0
read_count(const char *filename, FILE *f, unsigned long *count) { if (fscanf(f, "%lu\n", count) != 1) { if (feof(f) && !ferror(f)) *count = 0; /* Empty file */ else { fprintf(stderr, ERRPREFIX "Strange contents in page count file `%s'.\n", filename); return -1; } } return 0; }
false
false
false
false
true
1
pdtrc( k, m ) int k; double m; { double v; if( (k < 0) || (m <= 0.0) ) { mtherr( "pdtrc", DOMAIN ); return( 0.0 ); } v = k+1; return( igam( v, m ) ); }
false
false
false
false
false
0
rds_check_eon_entry(struct rds_private_state *priv_state, uint16_t pi) { struct v4l2_rds *handle = &priv_state->handle; /* check if there's an entry for the given PI key */ for (int i = 0; i <= handle->rds_eon.size; i++) { if (handle->rds_eon.eon[i].pi == pi) { return true; } } return false; }
false
false
false
false
false
0
magic_open(int flags) { struct magic_set *ms; ms = ecalloc((size_t)1, sizeof(struct magic_set)); if (magic_setflags(ms, flags) == -1) { errno = EINVAL; goto free; } ms->o.buf = ms->o.pbuf = NULL; ms->c.li = emalloc((ms->c.len = 10) * sizeof(*ms->c.li)); ms->event_flags = 0; ms->error = -1; ms->mlist ...
false
false
false
false
false
0
PCLDeltaCompressImage(const size_t length, const unsigned char *previous_pixels,const unsigned char *pixels, unsigned char *compress_pixels) { int delta, j, replacement; register ssize_t i, x; register unsigned char *q; q=compress_pixels; for (x=0; x < (ssize_t) length; ) { ...
false
false
false
false
false
0
getp_len(VMG_ vm_val_t *retval, const vm_val_t *self_val, const char *lst, uint *argc) { static CVmNativeCodeDesc desc(0); /* check arguments */ if (get_prop_check_argc(retval, argc, &desc)) return TRUE; /* return the element count */ retval->set_int(vmb_...
false
false
false
false
false
0
writeSceneBlendFactor(const SceneBlendFactor sbf_src, const SceneBlendFactor sbf_dst) { if (sbf_src == SBF_ONE && sbf_dst == SBF_ONE ) writeValue("add"); else if (sbf_src == SBF_DEST_COLOUR && sbf_dst == SBF_ZERO) writeValue("modulate"); else if (sbf_src == SBF_SOURCE...
false
false
false
false
false
0
cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t) { struct cmos_rtc *cmos = dev_get_drvdata(dev); unsigned char mon, mday, hrs, min, sec, rtc_control; if (!is_valid_irq(cmos->irq)) return -EIO; mon = t->time.tm_mon + 1; mday = t->time.tm_mday; hrs = t->time.tm_hour; min = t->time.tm_min; sec = t->tim...
false
false
false
false
false
0
_gageOffValueUpdate(gageContext *ctx) { static const char me[]="_gageOffValueUpdate"; int fd, i, j, k; unsigned int sx, sy; if (ctx->verbose) fprintf(stderr, "%s: hello\n", me); sx = ctx->shape->size[0]; sy = ctx->shape->size[1]; fd = 2*ctx->radius; /* HEY: look into special casing this for small fd *...
false
false
false
false
false
0
_job_runnable_test2(struct job_record *job_ptr, bool check_min_time) { int reason; reason = job_limits_check(&job_ptr, check_min_time); if ((reason != job_ptr->state_reason) && ((reason != WAIT_NO_REASON) || (!part_policy_job_runnable_state(job_ptr)))) { job_ptr->state_reason = reason; xfree(job_ptr-...
false
false
false
false
false
0
xmmsv_list_set (xmmsv_t *listv, int pos, xmmsv_t *val) { xmmsv_t *old_val; xmmsv_list_t *l; x_return_val_if_fail (listv, 0); x_return_val_if_fail (val, 0); x_return_val_if_fail (xmmsv_is_type (listv, XMMSV_TYPE_LIST), 0); l = listv->value.list; if (!absolutify_and_validate_pos (&pos, l->size, 0)) { return 0...
false
false
false
false
false
0
hrSWInstalledTable_handler(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_request_info *request; netsnmp_table_request_info *tabl...
false
false
false
false
false
0
conn_close(conn c) { sockwant(&c->sock, 0); close(c->sock.fd); job_free(c->in_job); /* was this a peek or stats command? */ if (c->out_job && !c->out_job->r.id) job_free(c->out_job); c->in_job = c->out_job = NULL; c->in_job_read = 0; if (c->type & CONN_TYPE_PRODUCER) cur_producer_ct-...
false
false
false
false
false
0
__times (struct tms *buf) { INTERNAL_SYSCALL_DECL (err); clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf); if (INTERNAL_SYSCALL_ERROR_P (ret, err) && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0) && buf) { /* This might be an error or not. For architectures which have...
false
false
false
false
false
0
CreateTreeLists(void) { GLUquadricObj *cylquad = gluNewQuadric(); int i; glNewList(STEM, GL_COMPILE); glPushMatrix(); glRotatef(-90, 1, 0, 0); gluCylinder(cylquad, 0.1, 0.08, 1, 10, 2 ); glPopMatrix(); glEndList(); glNewList(LEAF, GL_COMPILE); /* I think this was jeff allen's leaf idea */ g...
false
false
false
false
false
0
bnr_hash_node_create (const char *name) { struct bnr_hash_node *node = (struct bnr_hash_node *) calloc (1, sizeof (struct bnr_hash_node)); if (node) node->name = strdup(name); return node; }
false
false
false
false
false
0
my_strstr(RESULT * result, RESULT * arg1, RESULT * arg2) { char *p; double value; char *haystack = R2S(arg1); char *needle = R2S(arg2); p = strstr(haystack, needle); if (p == NULL) { value = -1; } else { value = p - haystack; } SetResult(&result, R_NUMBER, &value); }
false
false
false
false
false
0
CanAdvanceInto (menuitem_s *item, qboolean allow_capture) { if (item->generic.type != MTYPE_SUBMENU) return false; // if the submenu will "capture" the cursor, only advance into it if the // tab key has been pressed instead an arrow key. if (!allow_capture && (item->generic.flags & QMF_SUBMENU_CAPTURE)) ...
false
false
false
false
false
0
on_global_vars_text_changed (GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer user_data) { GtkTreeModel *global_vars_model = NULL; SnippetsDB *snippets_db = NULL; GtkTreePath *path = NULL; GtkTreeIter iter...
false
false
false
false
false
0
gtkaml_markup_hint_add_creation_method (GtkamlMarkupHint* self, const gchar* creation_method_name) { const gchar* _tmp0_; const gchar* _tmp1_; g_return_if_fail (self != NULL); g_return_if_fail (creation_method_name != NULL); _tmp0_ = creation_method_name; _tmp1_ = gtkaml_markup_hint_NEW; gtkaml_markup_hint_add_h...
false
false
false
false
false
0
ajGraphicsDrawposTextJustify(PLFLT x, PLFLT y, const char *txt, PLFLT just) { if(graphData) { ajFmtPrintF(graphData->File, "Text1 x1 %f y1 %f colour %d size %f %s\n", x,y,currentfgcolour, currentcharscale,txt); graphData->Lines++; } else GraphText(x,y,1.0...
false
false
false
false
false
0
numManaged(void) { int num=0; MSNodeItem *hp=childListHead(); MSNodeItem *np=hp; while ((np=np->next())!=hp) { NotebookEntry *entry=(NotebookEntry *)np->data(); if (entry->managed()==MSTrue) num++; } return num; }
false
false
false
false
false
0
next_for_item(fi_void, arg) void *fi_void; char_u *arg; { forinfo_T *fi = (forinfo_T *)fi_void; int result; listitem_T *item; item = fi->fi_lw.lw_item; if (item == NULL) result = FALSE; else { fi->fi_lw.lw_item = item->li_next; result = (ex_let_vars(arg, &item->li_tv, TRUE, ...
false
false
false
false
false
0
waypt_free(waypoint *wpt) { /* * This and waypt_dupe should be closely synced. */ if (wpt->shortname) { xfree(wpt->shortname); } if (wpt->description) { xfree(wpt->description); } if (wpt->notes) { xfree(wpt->notes); } if (wpt->url) { xfree(wpt->url); } if (wpt->url_link_text) ...
false
false
false
false
false
0
get_pair_string(char pair_char) { char *str = (char*)malloc(5*5*3+1); char *ins = str; for (int i = 0; i<SEC_BOND_BASE_CHARS; ++i) { for (int j = i; j<SEC_BOND_BASE_CHARS; ++j) { if (bond[i][j] == pair_char) { if (ins>str) *ins++ = ' '; *ins++ = SEC_BOND_...
false
false
false
false
false
0
setSelectionAndMargins(DocIterator const & beg, DocIterator const & end) const { setSelection(beg.pos(), end.pos()); if (selection()) { end_margin_sel = isMarginSelected(false, beg, end); begin_margin_sel = isMarginSelected(true, beg, end); } }
false
false
false
false
false
0
receiveLine(UINT8* line, UINT32 maxLen, UINT32 msTimeOut) { UINT32 i = 0; UINT8 byte = 0; SINT32 ret = 0; UINT64 currentTime, endTime; getcurrentTimeMillis(currentTime); set64(endTime,currentTime); add64(endTime,msTimeOut); CASingleSocketGroup oSG(false); oSG.add(*this); do { ret = oSG.select(msTimeOut); ...
false
false
false
false
false
0
bch_btree_insert_node(struct btree *b, struct btree_op *op, struct keylist *insert_keys, atomic_t *journal_ref, struct bkey *replace_key) { struct closure cl; BUG_ON(b->level && replace_key); closure_init_stack(&cl); mutex_lock(&b->write_lock); if (write_block(b) != btree_bset_last(b) && b-...
false
false
false
false
false
0
xeon_ppd_bar4_split(struct intel_ntb_dev *ndev, u8 ppd) { if (ppd & XEON_PPD_SPLIT_BAR_MASK) { dev_dbg(ndev_dev(ndev), "PPD %d split bar\n", ppd); return 1; } return 0; }
false
false
false
false
false
0
pg_tzenumerate_start(void) { pg_tzenum *ret = (pg_tzenum *) palloc0(sizeof(pg_tzenum)); char *startdir = pstrdup(pg_TZDIR()); ret->baselen = strlen(startdir) + 1; ret->depth = 0; ret->dirname[0] = startdir; ret->dirdesc[0] = AllocateDir(startdir); if (!ret->dirdesc[0]) ereport(ERROR, (errcode_for_file...
false
false
false
false
false
0
k_bcmode_set_mode (struct k_bc_t* c, enum bcmode_e mode, int32_t max_workers) { enum k_error_e err = K_ESUCCESS; free_mode_resources(c); c->mode = k_bcmode_get_by_id(mode); if (!c->mode) { err = K_ENOMODE; goto k_bc_set_mode_err; } if ((max_workers != -1) && (c->mode->encrypt_parallelizable || c->mode->de...
false
false
false
false
false
0
guesstransp(){ register FXColor guess=FXRGB(192,192,192); register FXint best,t; FXColor color[4]; if(data && 0<width && 0<height){ best=-1; color[0]=getPixel(0,0); color[1]=getPixel(width-1,0); color[2]=getPixel(0,height-1); color[3]=getPixel(width-1,height-1); if((t=((color[0]==color[1...
false
false
false
false
false
0
mime_dialogue_callback(Widget w, XtPointer client_data, XtPointer call_data) { DialogueReport *report = (DialogueReport *)call_data; VIEWER *v = (VIEWER *)client_data; char *cmd; long n; int fd; pid_t pid; switch (report->reply) { case DialogueReplyLeft: /* save */...
false
false
false
false
false
0
bgzf_read(BGZF* fp, void* data, int length) { if (length <= 0) { return 0; } if (fp->open_mode != 'r') { report_error(fp, "file not open for reading"); return -1; } int bytes_read = 0; bgzf_byte_t* output = data; while (bytes_read < length) { int available = ...
false
true
false
false
false
1
Load(const char* chrIn) { if (!chrIn) { OUT_LOAD_INST_DATA_FAIL; return; } OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ...
false
false
false
false
false
0
alloc_sys(mstate m, size_t nb) { char *tbase = CMFAIL; size_t tsize = 0; /* Directly map large chunks */ if (LJ_UNLIKELY(nb >= DEFAULT_MMAP_THRESHOLD)) { void *mem = direct_alloc(nb); if (mem != 0) return mem; } { size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE; size_t rsize = granulari...
false
false
false
false
false
0
XGIfb_search_crt2type(const char *name) { int i = 0; if (name == NULL) return; while (XGI_crt2type[i].type_no != -1) { if (!strcmp(name, XGI_crt2type[i].name)) { XGIfb_crt2type = XGI_crt2type[i].type_no; XGIfb_tvplug = XGI_crt2type[i].tvplug_no; break; } i++; } if (XGIfb_crt2type < 0) pr_info(...
false
false
false
false
false
0
L23() {register object *base=vs_base; register object *sup=base+VM23; VC23 vs_check; {object V58; V58=(base[0]); vs_top=sup; goto TTL; TTL:; if(immnum_lt((V58),small_fixnum(0))){ goto T123;} if(!(immnum_gt((V58),small_fixnum(127)))){ goto T124;} goto T123; T123:; {frame_ptr fr; fr=frs_sch_catch(((object)VV...
false
false
false
false
false
0
hvcc_dump(GF_Box *a, FILE * trace) { u32 i, count; GF_HEVCConfigurationBox *p = (GF_HEVCConfigurationBox *) a; fprintf(trace, "<HEVCConfigurationBox>\n"); fprintf(trace, "<HEVCDecoderConfigurationRecord nal_unit_size=\"%d\" configurationVersion=\"%d\" profile_space=\"%d\" profile_idc=\"%d\" constraint_indicator_f...
false
false
false
false
false
0
flush_current_id(int patchlen, unsigned char *id, git_SHA_CTX *c) { unsigned char result[20]; char name[50]; if (!patchlen) return; git_SHA1_Final(result, c); memcpy(name, sha1_to_hex(id), 41); printf("%s %s\n", sha1_to_hex(result), name); git_SHA1_Init(c); }
false
false
false
false
false
0
dump_string (char *s) { if ((s == NULL) || (strlen (s) == 0)) fprintf (stdout, "(null)\n"); else fprintf (stdout, ">>%s<<\n", s); }
false
false
false
false
false
0
_gio_file_mkdir(GIOControl *gc,char *path) { if ( GFileMkDir(path)==-1 ) { _GIO_reporterror(gc,errno); } else { gc->return_code = 201; gc->done = true; (gc->receivedata)(gc); } }
false
false
false
false
false
0
skk_rom_kana_converter_is_valid (SkkRomKanaConverter* self, gunichar uc) { gboolean result = FALSE; gunichar _tmp0_; SkkRomKanaMapFile* _tmp1_; SkkRomKanaNode* _tmp2_; gunichar _tmp3_; gboolean _tmp4_; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = uc; if (_tmp0_ > ((gunichar) 128)) { result = FALSE; ...
false
false
false
false
false
0
test_state_run (TestState *state) { clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT, validate_state, state, NULL); while (!state->was_painted) g_main_context_iterat...
false
false
false
false
false
0
test_book_mark_closed( Fixture *fixture, gconstpointer pData ) { g_test_message( "Testing when book is null" ); g_assert_cmpstr( &fixture->book->book_open, == , "y" ); qof_book_mark_closed( NULL ); g_assert_cmpstr( &fixture->book->book_open, == , "y" ); g_test_message( "Testing when book is not nul...
false
false
false
false
false
0
save_macinfo_strings (void) { unsigned len; unsigned i; macinfo_entry *ref; for (i = 0; macinfo_table && macinfo_table->iterate (i, &ref); i++) { switch (ref->code) { /* Match the logic in output_macinfo_op to decide on indirect strings. */ case DW_MACINFO_de...
false
false
false
false
false
0
get_gjs_path () { JSLang* plugin = (JSLang*)getPlugin (); if (!plugin->prefs) plugin->prefs = g_settings_new (JS_SUPPORT_SCHEMA); gchar *path = g_settings_get_string (plugin->prefs, GJS_DIR_KEY); if (!path || strlen (path) < 1) { g_free (path); if (strlen (GJS_PATH) == 0) return NULL; return g_strdup ...
false
false
false
false
false
0
mips64_emit_memop_fast32(mips64_jit_tcb_t *b,int write_op, int opcode,int base,int offset, int target,int keep_ll_bit, memop_fast_access op_handler) { m_uint32_t val = sign_extend(offset,16); u_char *...
false
false
false
false
false
0
remember_password_toggled_cb (GtkToggleButton *button, TpawAccountWidget *self) { tpaw_account_settings_set_remember_password (self->priv->settings, gtk_toggle_button_get_active (button)); if (!self->priv->automatic_change) tpaw_account_widget_changed (self); }
false
false
false
false
false
0
register_config_options(config_option_t *opt, UINTN n, config_option_group_scope_t group) { config_option_group_t *newgrp, **grp; if (opt == NULL || n == 0 || (group != OPTIONS_GROUP_GLOBAL && group != OPTIONS_GROUP_IMAGE)) return -1; VERB_PRT(3, Print(L"registering %d options for group %s\n", n, group == OPTIONS_...
false
false
false
false
false
0
queue_pop_tail(Queue *queue) { QueueEntry *entry; QueueValue result; /* Check the queue is not empty */ if (queue_is_empty(queue)) { return QUEUE_NULL; } /* Unlink the first entry from the tail of the queue */ entry = queue->tail; queue->tail = entry->prev; result = entry->data; if (queue->tail == NULL...
false
false
false
false
false
0
cplus_demangle_v3_components (const char *mangled, int options, void **mem) { size_t len; int type; struct d_info di; struct demangle_component *dc; len = strlen (mangled); if (mangled[0] == '_' && mangled[1] == 'Z') type = 0; else { if ((options & DMGL_TYPES) == 0) return NULL; typ...
false
true
false
false
false
1
extendSelection(FXint pos){ FXDragType types[4]; // Validate position to start of character pos=contents.validate(FXCLAMP(0,pos,contents.length())); // Got a selection at all? if(anchor!=pos){ types[0]=stringType; types[1]=textType; types[2]=utf8Type; types[3]=utf16Type; if(!hasSelection...
false
false
false
false
false
0