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
form_from_map(game *g, point origin, int range) { items.clear(); for (int x = origin.x - range; x <= origin.x + range; x++) { for (int y = origin.y - range; y <= origin.y + range; y++) { for (int i = 0; i < g->m.i_at(x, y).size(); i++) if (!g->m.i_at(x, y)[i].made_of(LIQUID)) add_item(g->m.i_at(x, y)[i]...
false
false
false
false
false
0
findEquivalenceClasses(Function &F) { SmallVector<BasicBlock *, 8> DominatedBBs; DEBUG(dbgs() << "\nBlock equivalence classes\n"); // Find equivalence sets based on dominance and post-dominance information. for (auto &BB : F) { BasicBlock *BB1 = &BB; // Compute BB1's equivalence class once. if (Equ...
false
false
false
false
false
0
assert_proper_normalization(git_index *index, const char *filename, const char *expected_sha) { int index_pos; git_index_entry *entry; add_to_workdir(filename, CONTENT); cl_git_pass(git_index_add_from_workdir(index, filename)); index_pos = git_index_find(index, filename); cl_assert(index_pos >= 0); entry = gi...
false
false
false
false
false
0
__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) { PyObject *r; if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { r = PyList_GET_ITEM(o, i); Py_INCREF(r); } else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { r = PyTuple_G...
false
false
false
false
false
0
DoContextMenu(Point pt) { if (displayPopupMenu) ContextMenu(pt); }
false
false
false
false
false
0
sd_probe(struct device *dev) { struct scsi_device *sdp = to_scsi_device(dev); struct scsi_disk *sdkp; struct gendisk *gd; int index; int error; scsi_autopm_get_device(sdp); error = -ENODEV; if (sdp->type != TYPE_DISK && sdp->type != TYPE_MOD && sdp->type != TYPE_RBC) goto out; SCSI_LOG_HLQUEUE(3, sdev_prin...
false
false
false
false
false
0
ssl3_AppendNumberToItem(SECItem *item, PRUint32 num, PRInt32 lenSize) { SECStatus rv; PRUint8 b[4]; PRUint8 * p = b; switch (lenSize) { case 4: *p++ = (PRUint8) (num >> 24); case 3: *p++ = (PRUint8) (num >> 16); case 2: *p++ = (PRUint8) (num >> 8); case 1: *p = (PRUint8) num; ...
false
false
false
false
false
0
removeHandler(edp) ErrDesc *edp; { if (edp->destroy != NULL) (*edp->destroy)(edp->dpy, edp->client_data); eremove(edp); (void)free((char *)edp); }
false
false
false
false
false
0
amdgpu_cgs_write_ind_register(void *cgs_device, enum cgs_ind_reg space, unsigned index, uint32_t value) { CGS_FUNC_ADEV; switch (space) { case CGS_IND_REG__MMIO: return WREG32_IDX(index, value); case CGS_IND_REG__PCIE: return WREG32_PCIE(index, value); case CGS_IND_REG__SMC: return WREG32_SMC(i...
false
false
false
false
false
0
dvb_ringbuffer_pkt_read_user(struct dvb_ringbuffer *rbuf, size_t idx, int offset, u8 __user *buf, size_t len) { size_t todo; size_t split; size_t pktlen; pktlen = rbuf->data[idx] << 8; pktlen |= rbuf->data[(idx + 1) % rbuf->size]; if (offset > pktlen) return -EINVAL; if ((offset + len) > pktlen) len = pktle...
false
false
false
false
false
0
OnTextureFilterSelected( IGUIComboBox* combo ) { s32 pos = combo->getSelected(); switch (pos) { case 0: if (Model) { Model->setMaterialFlag(video::EMF_BILINEAR_FILTER, false); Model->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false); Model->setMaterialFlag(video::EMF_ANISOTROPIC_...
false
false
false
false
false
0
glusterd_op_ac_none (glusterd_op_sm_event_t *event, void *ctx) { int ret = 0; gf_log (THIS->name, GF_LOG_DEBUG, "Returning with %d", ret); return ret; }
false
false
false
false
false
0
browse (std::string title, std::string widget_name, gboolean file_and_folder, GtkWidget *preview) { GtkWidget *chooser = gtk_file_chooser_dialog_new (title.c_str(), 0, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, 1, NULL); ...
false
false
false
false
false
0
sfh_argv_glue(char **argv, int delim, unint maxlen) { char **p; /* favorite pointer */ char *pp; /* another pointer */ char *str; /* glued string */ unint str_len = 0; /* string length */ unint i; /* favorite index */ /* * Find the total string length in argv including delimiters. * The last delimiter i...
false
false
false
true
true
1
find_iter_for_object (GduDeviceTreeModel *model, UDisksObject *object, GtkTreeIter *out_iter) { FindIterData data; memset (&data, 0, sizeof (data)); data.object = object; data.found = FALSE; gtk_tree_model_foreach (GTK_TREE_MODEL (model), ...
false
false
false
false
false
0
newline() { register int c; if (!nlflag) { while ((c = getc(infile)) != '\n' && c != EOF) ; } nlflag = 0; }
false
true
false
false
true
1
ocfs2_set_buffer_uptodate(struct ocfs2_caching_info *ci, struct buffer_head *bh) { int expand; /* The block may very well exist in our cache already, so avoid * doing any more work in that case. */ if (ocfs2_buffer_cached(ci, bh)) return; trace_ocfs2_set_buffer_uptodate_begin( (unsigned long long)...
false
false
false
false
false
0
select_timeval(ScmObj timeout, struct timeval *tm) { if (SCM_FALSEP(timeout)) return NULL; if (SCM_INTP(timeout)) { int val = SCM_INT_VALUE(timeout); if (val < 0) goto badtv; tm->tv_sec = val / 1000000; tm->tv_usec = val % 1000000; return tm; } else if (SCM_BIGNUMP(ti...
false
false
false
false
false
0
friends_dispatcher_send_message_async_data_free (gpointer _data) { FriendsDispatcherSendMessageAsyncData* _data_; _data_ = _data; #line 54 "/tmp/buildd/libfriends-0.1.2+14.04.20131108.1/src/dispatcher.vala" _g_free0 (_data_->account_id); #line 54 "/tmp/buildd/libfriends-0.1.2+14.04.20131108.1/src/dispatcher.vala" _...
false
false
false
false
false
0
waitAck () { unsigned char breg = 0; int i = 0; Outb (CONTROL, 0x0C); /* select printer + initialize printer */ Outb (CONTROL, 0x0C); Outb (CONTROL, 0x0C); breg = Inb (STATUS) & 0xF8; while ((i < 1024) && ((breg & 0x04) == 0)) { Outb (CONTROL, 0x0E); /* autolinefeed ?.. */ Outb (CONTROL,...
false
false
false
false
true
1
e_selection_data_get_calendar (GtkSelectionData *selection_data) { GdkAtom data_type; const guchar *data = NULL; gint ii; /* XXX May need to do encoding and line ending conversions * here. Not worrying about it for now. */ g_return_val_if_fail (selection_data != NULL, NULL); data = gtk_selection_data_ge...
false
false
false
false
false
0
sg_PlayerMenu(){ uMenu Player_men("$player_mainmenu_text"); uMenuItemFunction vp_selec(&Player_men, "$viewport_assign_text", "$viewport_assign_help", &viewport_menu_x); ArmageTron_viewport_menuitem vp(&Player_men...
false
false
false
false
false
0
write_attached_msg(long int msgno, ATTACH_S **ap, STORE_S *store, int newfile) { char *err = NULL; long start_of_append; gf_io_t pc; MESSAGECACHE *mc; if(ap && *ap && (*ap)->body && (*ap)->body->nested.msg && (*ap)->body->nested.msg->env){ start_of_append = so_tell(store); gf_...
false
false
false
false
false
0
swdTest(void) { // Start = 1 // DP access = 0 // Read access = 1 // DP reg = 00 (IDCODE) // Parity = odd bits -> 1 // Stop = 0 // Park = 1 (not 0!) // First at least fifty ones, then the sequence below to switch from JTAG to SWD and then at least 50 ones again. // The the SWD is reset and r...
false
false
false
false
false
0
pid_lock_file_exists(const char *datadir) { char path[MAXPGPATH]; int fd; snprintf(path, sizeof(path), "%s/postmaster.pid", datadir); if ((fd = open(path, O_RDONLY, 0)) < 0) { /* ENOTDIR means we will throw a more useful error later */ if (errno != ENOENT && errno != ENOTDIR) pg_fatal("could not open f...
true
true
false
false
true
1
process(const float *const *inputBuffers, RealTime timestamp) { FeatureSet fs; if (!m_handle) return fs; int sec = timestamp.sec; int nsec = timestamp.nsec; VampFeatureList *features = m_descriptor->process(m_handle, ...
false
false
false
false
false
0
per_file_ctx(int id, void *ptr, void *data) { struct intel_context *ctx = ptr; struct seq_file *m = data; struct i915_hw_ppgtt *ppgtt = ctx->ppgtt; if (!ppgtt) { seq_printf(m, " no ppgtt for context %d\n", ctx->user_handle); return 0; } if (i915_gem_context_is_default(ctx)) seq_puts(m, " default c...
false
false
false
false
false
0
ldap_pvt_thread_pool_setkey( void *xctx, void *key, void *data, ldap_pvt_thread_pool_keyfree_t *kfree, void **olddatap, ldap_pvt_thread_pool_keyfree_t **oldkfreep ) { ldap_int_thread_userctx_t *ctx = xctx; int i, found; if ( !ctx || !key ) return EINVAL; for ( i=found=0; i<MAXKEYS; i++ ) { if ( ctx->ltu_k...
true
false
false
false
false
1
prodigy192_ak4114_init(struct snd_ice1712 *ice) { static const unsigned char ak4114_init_vals[] = { AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1, /* ice1724 expects I2S and provides clock, * DEM0 disables the deemphasis filter */ AK4114_DIF_I24I2S | AK4114_DEM0 , AK4114_TX1E, AK4114_EFH_1024 |...
false
false
false
false
false
0
moire2_init_1 (struct state *st) { XWindowAttributes xgwa; XGetWindowAttributes (st->dpy, st->window, &xgwa); st->othickness = get_integer_resource(st->dpy, "thickness", "Thickness"); if (mono_p) st->ncolors = 2; else st->ncolors = get_integer_resource (st->dpy, "colors", "Colors"); if (st->ncolor...
false
false
false
false
false
0
doskip(const char *filename) { const char **p; int len = strlen(filename); for (p = skip_list; p && *p; p++) { int n = strlen(*p); if (0 == strncmp(filename + len - n, *p, n)) return 1; } return 0; }
false
false
false
false
true
1
approxidate_str(const char *date, const struct timeval *tv, int *error_ret) { int number = 0; int touched = 0; struct tm tm = {0}, now; time_t time_sec; time_sec = tv->tv_sec; p_localtime_r(&time_sec, &tm); now = tm; tm.tm_year = -1; tm.tm_mon = -1; tm.tm_mday = -1; for (;;) { unsigned...
false
false
false
false
false
0
pto_handler(vector_t *strvec) { virtual_server_t *vs = LIST_TAIL_DATA(check_data->vs); char *str = vector_slot(strvec, 1); int size = sizeof (vs->timeout_persistence); int str_len = strlen(str); if (size > str_len) size = str_len; memcpy(vs->timeout_persistence, str, size); }
false
false
false
false
false
0
rb_get_kcode() { switch (reg_kcode) { case KCODE_SJIS: return "SJIS"; case KCODE_EUC: return "EUC"; case KCODE_UTF8: return "UTF8"; default: return "NONE"; } }
false
false
false
false
false
0
sierra_setup_urb(struct usb_serial *serial, int endpoint, int dir, void *ctx, int len, gfp_t mem_flags, usb_complete_t callback) { struct urb *urb; u8 *buf; urb = usb_alloc_urb(0, mem_flags); if (!urb) return NULL; buf = kmalloc(len, mem_flags); if (buf) { /* Fill URB using supplied data */ ...
false
false
false
false
false
0
rts_mkBool (Capability *cap STG_UNUSED, HsBool b) { if (b) { return (StgClosure *)True_closure; } else { return (StgClosure *)False_closure; } }
false
false
false
false
false
0
_GXCDraw_Clear(GXWindow gw, GRect *rect) { GRect *r = rect, temp; if ( r==NULL ) { temp = gw->pos; temp.x = temp.y = 0; r = &temp; } _cairo_new_path(gw->cc); _cairo_rectangle(gw->cc,r->x,r->y,r->width,r->height); _cairo_set_source_rgba(gw->cc,COLOR_RED(gw->ggc->bg)/255.0,COLOR_GREEN(gw->ggc->...
false
false
false
false
false
0
ibv_init_ah_from_wc(struct ibv_context *context, uint8_t port_num, struct ibv_wc *wc, struct ibv_grh *grh, struct ibv_ah_attr *ah_attr) { uint32_t flow_class; int ret; memset(ah_attr, 0, sizeof *ah_attr); ah_attr->dlid = wc->slid; ah_attr->sl = wc->sl; ah_attr->src_path_bits = wc->dlid_path_bits; ah_attr-...
false
false
false
false
false
0
initGlobalScope() { m_symtable = m_scope = new Scope(); m_scope->setEnvironment(new Environment()); m_stack.push(m_scope->getEnvironment()); m_modmanager.importModule(m_scope, "std.core"); m_mod = m_modmanager.getUserModule(); }
false
false
false
false
false
0
trim(char *s) { int len = strlen(s); while (len > 0 && isspace(s[len-1])) { len--; } if (len == 0) return NULL; s[len] = '\0'; while (isspace(*s)) s++; /* *s is not a space, since in this case we'd return NULL above */ return s; }
false
false
false
false
false
0
nrcpus(char *str) { int nr_cpus; get_option(&str, &nr_cpus); if (nr_cpus > 0 && nr_cpus < nr_cpu_ids) nr_cpu_ids = nr_cpus; return 0; }
false
false
false
false
false
0
delete(void) { long c, last; if (cflag) { memset((char *) f, 0xff, sizeof f); while ((c = canon(&pfrom)) >= 0) CLEARBIT(f, c); } else { while ((c = canon(&pfrom)) >= 0) SETBIT(f, c); } if (sflag) { while ((c = canon(&pto)) >= 0) SETBIT(t, c); } last = 0x10000; while (readrune(0, &c) > 0) { ...
false
false
false
false
true
1
checkEncryption(GooString *ownerPassword, GooString *userPassword) { Object encrypt; GBool encrypted; GBool ret; xref->getTrailerDict()->dictLookup("Encrypt", &encrypt); if ((encrypted = encrypt.isDict())) { if ((secHdlr = SecurityHandler::make(this, &encrypt))) { if (secHdlr->checkEncryption(owner...
false
false
false
false
false
0
Open() { char name[32]; jack_log("JackAudioAdapter::Open fCaptureChannels %d fPlaybackChannels %d", fAudioAdapter->GetInputs(), fAudioAdapter->GetOutputs()); fAudioAdapter->Create(); //jack ports fCapturePortList = new jack_port_t*[fAudioAdapter->GetInputs()]; fPlaybackPortList = new jack_port_...
false
false
false
false
false
0
cob_move_display_to_packed (cob_field *f1, cob_field *f2) { unsigned char *data1; unsigned char *data2; unsigned char *p; size_t digits1; size_t digits2; size_t i; size_t offset; int sign; int scale1; int scale2; unsigned char n; sign = cob_get_sign (f1); data1 = COB_FIELD_DATA (f1); digits1 = COB...
false
false
false
false
false
0
c_env(void) { unit value = readnumber(); if (item_arg2) value = mag(value); *((unit *)(((uschar *)env) + item_arg1)) = value; }
false
false
false
false
false
0
xgene_enet_rx_irq(const int irq, void *data) { struct xgene_enet_desc_ring *rx_ring = data; if (napi_schedule_prep(&rx_ring->napi)) { disable_irq_nosync(irq); __napi_schedule(&rx_ring->napi); } return IRQ_HANDLED; }
false
false
false
false
false
0
g_tls_certificate_gnutls_set_issuer (GTlsCertificateGnutls *gnutls, GTlsCertificateGnutls *issuer) { g_return_if_fail (G_IS_TLS_CERTIFICATE_GNUTLS (gnutls)); g_return_if_fail (!issuer || G_IS_TLS_CERTIFICATE_GNUTLS (issuer)); if (issuer) g_object_ref (issuer); if (gnutl...
false
false
false
false
false
0
u132_hcd_enumeration_address_sent(void *data, struct urb *urb, u8 *buf, int len, int toggle_bits, int error_count, int condition_code, int repeat_number, int halted, int skipped, int actual, int non_null) { struct u132_endp *endp = data; struct u132 *u132 = endp->u132; mutex_lock(&u132->scheduler_lock); if (u132-...
false
false
false
false
false
0
getAddr(SPtr<TIPv6Addr> addr) { SPtr<TClntOptIAAddress> optAddr; this->firstAddr(); while(optAddr=this->getAddr()) { //!memcmp(optAddr->getAddr(),addr,16) if ((*addr)==(*optAddr->getAddr())) return optAddr; }; return SPtr<TClntOptIAAddress>(); }
false
false
false
false
false
0
mxr_s_selection(struct file *file, void *fh, struct v4l2_selection *s) { struct mxr_layer *layer = video_drvdata(file); struct mxr_geometry *geo = &layer->geo; struct mxr_crop *target = NULL; enum mxr_geometry_stage stage; struct mxr_geometry tmp; struct v4l2_rect res; memset(&res, 0, sizeof(res)); mxr_dbg(l...
false
false
false
false
false
0
GetBlueFuzz(SplineFont *sf) { char *str, *end; if ( sf->private==NULL || (str=PSDictHasEntry(sf->private,"BlueFuzz"))==NULL || !isdigit(str[0]) ) return 1; return strtod(str, &end); }
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__dialogs__MessageBox_OnLoadGraphics(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__gui__dialogs__MessageBox * __ecerePointer___ecereNameSpace__ecere__gui__dialogs__MessageBox = (struct __ecereNameSpace__ecere__gui__dialogs__MessageBox *...
false
false
false
true
false
1
PrepareToStop() throw() { // Check if already stopping. if (m_stopping) { return; } // Set basetime by search type. uint32_t baseTime = 0; switch (m_type) { case NODE: case NODECOMPLETE: case NODESPECIAL: case NODEFWCHECKUDP: baseTime = SEARCHNODE_LIFETIME; break; case FILE: baseTime = SEARC...
false
false
false
false
false
0
get_codec_name_list(codec_name_t* names, int entries) { GDir* sysdir = g_dir_open("/sys/class/sound", 0, NULL); int count = 0; if (!sysdir) return 0; while (entries > 1) { gchar** cd = NULL; gboolean ok; const gchar* dirname = g_dir_read_name(sysdir); if (!dirn...
false
false
false
false
false
0
is_one_or_even(uint32_t a) { if (a == 1) return 1; if (a & 1) return 0; return 1; }
false
false
false
false
false
0
garmin_fs_destroy(void* fs) { garmin_fs_t* data = (garmin_fs_t*) fs; if (data != NULL) { garmin_ilink_t* ilinks; if (data->addr != NULL) { xfree(data->addr); } if (data->cc != NULL) { xfree(data->cc); } if (data->city != NULL) { xfree(data->city); } if (data->count...
false
false
false
false
false
0
aa_getpeercon_raw(int fd, char *buf, int *len, char **mode) { socklen_t optlen = *len; char *mode_str; int rc; if (optlen <= 0 || buf == NULL) { errno = EINVAL; return -1; } rc = getsockopt(fd, SOL_SOCKET, SO_PEERSEC, buf, &optlen); if (rc == -1 || optlen <= 0) goto out; /* check for null termination *...
false
false
false
false
false
0
is_aligning_offset (const_tree offset, const_tree exp) { /* Strip off any conversions. */ while (CONVERT_EXPR_P (offset)) offset = TREE_OPERAND (offset, 0); /* We must now have a BIT_AND_EXPR with a constant that is one less than power of 2 and which is larger than BIGGEST_ALIGNMENT. */ if (TREE_COD...
false
false
false
false
false
0
at_cmd_amp_D(at_state_t *s, const char *t) { int val; /* V.250 6.2.9 - Circuit 108 (data terminal ready) behaviour */ t += 2; if ((val = parse_num(&t, 2)) < 0) return NULL; /* TODO: We have no DTR pin, but we need this to get into online command state. */ s->dtr_behaviour ...
false
false
false
false
false
0
ascii_chomp_trailing_spaces(char *str, size_t len) { size_t i; g_assert(str != NULL); if (0 == len) { len = strlen(str); if (0 == len) return 0; } i = len; while (i > 0 && (str[i-1] == ' ' || str[i-1] == '\t')) { str[--i] = '\0'; } return i; }
false
false
false
false
false
0
isAllowedToPassRestrictions(CASocket* pNewMuxSocket) { UINT8* peerIP=new UINT8[4]; SINT32 master = ((CASocket*)pNewMuxSocket)->getPeerIP(peerIP); if(master == E_SUCCESS) { UINT32 size=0; UINT8 remoteIP[4]; CAListenerInterface** intf = pglobalOptions->getInfoServices(size); master = E_UNKNOWN; ...
false
false
false
false
false
0
restorePre() { if (d_core->getCM()->scopeLevel() == d_bottomScope) { DebugAssert(d_prioritySetBottomEntriesSizeStack.size() > 0, "Expected non-empty stack"); d_prioritySetBottomEntriesSize = d_prioritySetBottomEntriesSizeStack.back(); d_prioritySetBottomEntriesSizeStack.pop_back(); while (d_prioritySe...
false
false
false
false
false
0
gitg_changed_file_get_file(GitgChangedFile *file) { g_return_val_if_fail(GITG_IS_CHANGED_FILE(file), NULL); return g_object_ref(file->priv->file); }
false
false
false
false
false
0
check_owner_password_V5(std::string const& owner_password, QPDF::EncryptionData const& data) { // Algorithm 3.12 from the PDF 1.7 extension level 3 std::string user_data = data.getU().substr(0, 48); std::string owner_data = data.getO().substr(0, 32); std::string validation_salt ...
false
false
false
false
false
0
zjacobi(ZVALUE z1, ZVALUE z2) { ZVALUE p, q, tmp; long lowbit; int val; /* firewall */ if (ziszero(z1) || zisneg(z1)) return 0; if (ziseven(z2) || zisneg(z2)) return 0; /* assume a value of 1 unless we find otherwise */ if (zisone(z1)) return 1; val = 1; zcopy(z1, &p); zcopy(z2, &q); for (;;) { zm...
false
false
false
false
false
0
spmi_device_alloc(struct spmi_controller *ctrl) { struct spmi_device *sdev; sdev = kzalloc(sizeof(*sdev), GFP_KERNEL); if (!sdev) return NULL; sdev->ctrl = ctrl; device_initialize(&sdev->dev); sdev->dev.parent = &ctrl->dev; sdev->dev.bus = &spmi_bus_type; sdev->dev.type = &spmi_dev_type; return sdev; }
false
false
false
false
false
0
gss_acquire_cred_from(minor_status, desired_name, time_req, desired_mechs, cred_usage, cred_store, output_cred_handle, actual_mechs, time_rec) OM_uint32 * minor_status; gss_name_t desired_name; OM_uint32 time_req; gss_OID_set desired_mechs; int ...
false
false
false
false
false
0
ginInsertRecordBA(BuildAccumulator *accum, ItemPointer heapptr, OffsetNumber attnum, Datum *entries, int32 nentry) { uint32 i, nbit = 0, offset; if (nentry <= 0) return; Assert(ItemPointerIsValid(heapptr) && attnum >= FirstOffsetNumber); i = nentry - 1; for (; i > 0; i >>= 1) nbit++; nbit =...
false
false
false
false
false
0
mv_cancel (GtkAction *action, BasicAutotoolsPlugin *plugin) { IAnjutaMessageManager *msgman; msgman = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell, IAnjutaMessageManager, NULL); if (msgman != NULL) { IAnjutaMessageView *view; view = ianjuta_message_manager_get_current_view ...
false
false
false
false
false
0
adns_reverse_lookup(const host_addr_t addr, adns_reverse_callback_t user_callback, void *user_data) { struct adns_request req; struct adns_reverse_query *query = &req.query.reverse; g_assert(user_callback); req.common.user_callback = (void (*)(void)) user_callback; req.common.user_data = user_data; req.common....
false
false
false
false
false
0
align_stride( int x, int align, int disalign ) { x = ALIGN( x, align ); if( !(x&(disalign-1)) ) x += align; return x; }
false
false
false
false
false
0
array_equal( EnvT* e) { e->NParam( 2);//, "ARRAY_EQUAL"); BaseGDL* p0 = e->GetParDefined( 0);//, "ARRAY_EQUAL"); BaseGDL* p1 = e->GetParDefined( 1);//, "ARRAY_EQUAL"); if( p0 == p1) return new DByteGDL( 1); SizeT nEl0 = p0->N_Elements(); SizeT nEl1 = p1->N_Elements(); // first case : a...
false
false
false
false
false
0
brasero_metadata_info_clear (BraseroMetadataInfo *info) { if (!info) return; if (info->snapshot) { g_object_unref (info->snapshot); info->snapshot = NULL; } if (info->uri) g_free (info->uri); if (info->type) g_free (info->type); if (info->title) g_free (info->title); if (info->artist) g_free (...
false
false
false
false
false
0
pdf_show_string(pdf_csi *csi, unsigned char *buf, int len) { fz_context *ctx = csi->dev->ctx; pdf_gstate *gstate = csi->gstate + csi->gtop; pdf_font_desc *fontdesc = gstate->font; unsigned char *end = buf + len; int cpt, cid; if (!fontdesc) { fz_warn(ctx, "cannot draw text since font and size not set"); ret...
false
false
false
false
false
0
topdforps(Document *doc, String src, String dst, Document::TFormat fm, uint flags, int fromPage = -1, int toPage = -1, int viewNo = -1) { if (fm == Document::EEps) { if (viewNo < 0 && doc->countTotalViews() > 1) { fprintf(stderr, "The document contains %d views, " "cannot convert to EPS...
false
false
false
false
false
0
t1_link_negotiated(struct adapter *adapter, int port_id, int link_stat, int speed, int duplex, int pause) { struct port_info *p = &adapter->port[port_id]; if (link_stat != netif_carrier_ok(p->dev)) { if (link_stat) netif_carrier_on(p->dev); else netif_carrier_off(p->dev); link_report(p); /* multi-p...
false
false
false
false
false
0
nssToken_Destroy ( NSSToken *tok ) { if (tok) { if (PR_ATOMIC_DECREMENT(&tok->base.refCount) == 0) { PZ_DestroyLock(tok->base.lock); nssTokenObjectCache_Destroy(tok->cache); /* The token holds the first/last reference to the slot. * When the token is actually destroyed, that ref must go too....
false
false
false
false
false
0
extractPages (const char *srcFileName, const char *destFileName) { char pathName[4096]; GooString *gfileName = new GooString (srcFileName); PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL); if (!doc->isOk()) { error(errSyntaxError, -1, "Could not extract page(s) from damaged file ('{0:s}')", srcFileN...
false
false
false
false
false
0
equals(KBlocksField * rhs) { if ((rhs->getWidth() != mWidth) || (rhs->getHeight() != mHeight)) { return false; } for(int i = 0; i < mHeight; i++) { for(int j = 0; j < mWidth; j++) { if (maBoard[i][j] != rhs->getCell(j, i)) { return fals...
false
false
false
false
false
0
scm_i_print_array_dimension (SCM array, int dim, int base, int enclosed, SCM port, scm_print_state *pstate) { scm_t_array_dim *dim_spec = SCM_I_ARRAY_DIMS (array) + dim; long idx; scm_putc ('(', port); for (idx = dim_spec->lbnd; idx <= dim_spec->ubnd; idx++) { if (dim < SCM_I_ARRAY_NDIM(arra...
false
false
false
false
false
0
gstspu_vobsub_get_nibble (SpuState * state, guint16 * rle_offset) { guint8 ret; if (G_UNLIKELY (*rle_offset >= state->vobsub.max_offset)) return 0; /* Overran the buffer */ gst_buffer_extract (state->vobsub.pix_buf, (*rle_offset) / 2, &ret, 1); /* If the offset is even, we shift the ans...
false
false
false
false
false
0
updateWatch(Solver& s, uint32 pos) { uint32 idx = data_.local.idx; if (!isSmall()) { for (Literal* tailS = head_ + ClauseHead::HEAD_LITS, *end = longEnd();;) { for (Literal* it = tailS + idx; it < end; ++it) { if (!s.isFalse(*it)) { std::swap(*it, head_[pos]); data_.local.idx = static_cast<uint32>...
false
false
false
false
false
0
pch_udc_resume(struct pci_dev *pdev) { int ret; pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); ret = pci_enable_device(pdev); if (ret) { dev_err(&pdev->dev, "%s: pci_enable_device failed\n", __func__); return ret; } pci_enable_wake(pdev, PCI_D3hot, 0); return 0; }
false
false
false
false
false
0
NBC_Sched_unpack(void *inbuf, char tmpinbuf, int count, MPI_Datatype datatype, void *outbuf, char tmpoutbuf, NBC_Schedule *schedule) { int size; char* ptr; NBC_Fn_type type = UNPACK; NBC_Args_unpack unpack_args; /* get size of actual schedule */ NBC_GET_SIZE(*schedule, size); /*printf("schedule is %i b...
false
false
false
false
false
0
_wi_set_resize(wi_set_t *set) { _wi_set_bucket_t **buckets, *bucket, *next_bucket; wi_uinteger_t i, index, capacity, buckets_count; capacity = wi_exp2m1(wi_log2(set->data_count) + 1); buckets_count = WI_CLAMP(capacity, set->min_count, _WI_SET_MAX_COUNT); buckets = wi_malloc(buckets_count * sizeof(_wi_set_buck...
false
false
false
false
false
0
termio_final(struct options *op, struct termios *tp, struct chardata *cp) { /* General terminal-independent stuff. */ /* 2-way flow control */ tp->c_iflag |= IXON | IXOFF; tp->c_lflag |= ICANON | ISIG | ECHO | ECHOE | ECHOK | ECHOKE; /* no longer| ECHOCTL | ECHOPRT */ tp->c_oflag |= OPOST; /* tp->c_cflag = 0; *...
false
false
false
false
false
0
tag (char *name, ...) { iks *x; va_list ap; x = my_x; va_start (ap, name); while (1) { char *name = iks_name (x); char *tmp = va_arg (ap, char*); if (NULL == tmp) break; x = iks_find (x, tmp); if (!x) { PR_TEST; printf ("Tag <%s> is not a child of tag <%s>\n", tmp, name); exit (1); } } if (...
false
false
false
false
false
0
config_get_param (char *str) { char *ptr; int i; if (str == NULL) return NULL; /** empty string? */ if (strlen(str) < 1 || str[0] == '\n' || strcmp(str, "\r\n") == 0) return NULL; ptr = str; /** comments? */ if (str[0] == '#') return NULL; /** first alpha character */ while (ptr != NULL && ! isal...
false
false
false
false
false
0
print_pid_environ_list(struct text_object *obj, char *p, int p_max_size) { char *buf = NULL; char *buf2; int bytes_read, total_read; int i = 0; asprintf(&buf, PROCDIR "/%d/environ", strtopid(obj->data.s)); strcpy(obj->data.s, buf); free(buf); buf = readfile(obj->data.s, &total_read, 1); if(buf != NULL) { fo...
false
true
false
false
true
1
array_save(GArray *array, GKeyFile *config, const gchar *prefix, ASaveFunc save_func) { guint size = g_array_get_element_size(array); gchar *end = array->data + size * array->len; gchar *data; guint n = 0; for (data = array->data; data < end; data += size) { char *section = g_strdup_printf("%s_%d", prefix, n);...
false
false
false
false
false
0
str_comp (char *s1, char *s2, int len) { int i; for (i=0; i<len; i++) if (toupper (s1[i]) != toupper (s2[i])) return 0; return 1; }
false
false
false
false
false
0
secret_collection_create_sync (SecretService *service, const gchar *label, const gchar *alias, SecretCollectionCreateFlags flags, GCancellable *cancellable, GError *...
false
false
false
false
false
0
set_ownership(struct archive_write_disk *a) { #ifndef __CYGWIN__ /* unfortunately, on win32 there is no 'root' user with uid 0, so we just have to try the chown and see if it works */ /* If we know we can't change it, don't bother trying. */ if (a->user_uid != 0 && a->user_uid != a->uid) { archive_set_error(&...
false
false
false
false
false
0
setAttribute(const c8* attributeName, const char* enumValue, const char* const* enumerationLiterals) { IAttribute* att = getAttributeP(attributeName); if (att) att->setEnum(enumValue, enumerationLiterals); else Attributes.push_back(new CEnumAttribute(attributeName, enumValue, enumerationLiterals)); }
false
false
false
false
false
0
camel_header_address_unref (struct _camel_header_address *h) { if (h) { if (h->refcount <= 1) { if (h->type == CAMEL_HEADER_ADDRESS_GROUP) { camel_header_address_list_clear (&h->v.members); } else if (h->type == CAMEL_HEADER_ADDRESS_NAME) { g_free (h->v.addr); } g_free (h->name); g_free (h); ...
false
false
false
false
false
0
gnutls_x509_crt_set_key_purpose_oid (gnutls_x509_crt_t cert, const void *oid, unsigned int critical) { int result; gnutls_datum_t old_id, der_data; ASN1_TYPE c2 = ASN1_TYPE_EMPTY; if (cert == NULL) { gnutls_assert (); return GNUTLS_E_INVALID_REQUEST; } ...
false
false
false
false
false
0
getMyRights(mail::callback &getCallback, std::string &rights) const { getCallback.fail("This server does not implement access control lists."); }
false
false
false
false
false
0
cb_playlists_list_activated(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer userdata) { GtkTreeIter iter; GtkTreeModel *model; GMedialib *gml = (GMe...
false
false
false
false
false
0
iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask) { u32 mcr, mcrx; u32 value; unsigned long flags; int ret; /* Access to the GFX unit is handled by GPU code */ if (port == BT_MBI_UNIT_GFX) { WARN_ON(1); return -EPERM; } mcr = iosf_mbi_form_mcr(opcode, port, offset & MBI_MASK_LO); mcrx = ...
false
false
false
false
false
0