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
say_datetime(struct ast_channel *chan, time_t t, const char *ints, const char *lang) { if (!strncasecmp(lang, "en", 2)) { /* English syntax */ return ast_say_datetime_en(chan, t, ints, lang); } else if (!strncasecmp(lang, "de", 2)) { /* German syntax */ return ast_say_datetime_de(chan, t, ints, lang); } e...
false
false
false
false
false
0
cancel_current_search (NautilusShellSearchProvider *self) { if (self->current_search != NULL) nautilus_search_provider_stop (NAUTILUS_SEARCH_PROVIDER (self->current_search->engine)); }
false
false
false
false
false
0
synth_move (byte *newboard, byte *board) { static byte movbuf [1024]; int i, j, m = 0; for (i=0; i<board_wid; i++) for (j=0; j<board_heit; j++) if (newboard [j * board_wid + i] != board [j * board_wid + i]) { movbuf[m++] = i; movbuf[m++] = j; movbuf[m++] = newboard [j * board_wid + i]; } movb...
false
false
false
false
false
0
cli_unarj_open(fmap_t *map, const char *dirname, arj_metadata_t *metadata, size_t off) { cli_dbgmsg("in cli_unarj_open\n"); metadata->map = map; metadata->offset = off; if (!is_arj_archive(metadata)) { cli_dbgmsg("Not in ARJ format\n"); return CL_EFORMAT; } if (!arj_read_main_header(metadata)) { cli_dbgmsg(...
false
false
false
false
false
0
bsd_assign_dos_partition(struct fdisk_context *cxt) { struct fdisk_bsd_label *l = self_label(cxt); size_t i; for (i = 0; i < 4; i++) { fdisk_sector_t ss; l->dos_part = fdisk_dos_get_partition(cxt->parent, i); if (!l->dos_part || !is_bsd_partition_type(l->dos_part->sys_ind)) continue; ss = dos_partitio...
false
false
false
false
false
0
udisks_mount_monitor_finalize (GObject *object) { UDisksMountMonitor *monitor = UDISKS_MOUNT_MONITOR (object); if (monitor->mounts_channel != NULL) g_io_channel_unref (monitor->mounts_channel); if (monitor->mounts_watch_source != NULL) g_source_destroy (monitor->mounts_watch_source); if (monitor->swap...
false
false
false
false
false
0
FcStrBufString (FcStrBuf *buf, const FcChar8 *s) { FcChar8 c; while ((c = *s++)) if (!FcStrBufChar (buf, c)) return FcFalse; return FcTrue; }
false
false
false
false
false
0
log_feature_mark(int flag) { int i; if (flag) log_set_default(0); for (i = 0; i < LS_LAST_SYSTEM; i++) { if (!(logDesc[i].mark & LOG_MARK_FILE)) { if (logDesc[i].subsys != LS_DEBUG) { /* debug is special */ if (logDesc[i].file) /* destroy previous entry... */ log_file_destroy(logDesc[i].file);...
false
false
false
false
false
0
report_undefined_key(status_message) char *status_message; { char *prev = tty_get_previous_key_seq(); size_t length = strlen(prev); if (length && (prev[length - 1] != key_INTERRUPT)) { char *str = (char *)tty_key_machine2human(prev); char *buf = xmalloc(128 + strlen(str)); sprintf(buf, "%s: not ...
false
false
false
false
false
0
_daemonize(void) { int child_status; int fd; pid_t pid; struct rlimit rlim; struct timeval tval; sigset_t my_sigset; sigemptyset(&my_sigset); if (sigprocmask(SIG_SETMASK, &my_sigset, NULL) < 0) { fprintf(stderr, "Unable to restore signals.\n"); exit(EXIT_FAILURE); } signal(SIGTERM, &_exit_handler); swi...
false
false
false
false
false
0
tag_wpt(const char** attrv) { const char** avp = &attrv[0]; wpt_tmp = waypt_new(); cur_tag = NULL; while (*avp) { if (strcmp(avp[0], "lat") == 0) { sscanf(avp[1], "%lf", &wpt_tmp->latitude); } else if (strcmp(avp[0], "lon") == 0) { sscanf(avp[1], "%lf", &wpt_tmp->...
false
false
false
false
false
0
project_attach( const char* url, const char* auth, const char* name ) { int retval; SET_LOCALE sl; char buf[768]; RPC rpc(this); snprintf(buf, sizeof(buf), "<project_attach>\n" " <project_url>%s</project_url>\n" " <authenticator>%s</authenticator>\n" " <projec...
false
false
false
false
false
0
pci_reset_notify(struct pci_dev *dev, bool prepare) { const struct pci_error_handlers *err_handler = dev->driver ? dev->driver->err_handler : NULL; if (err_handler && err_handler->reset_notify) err_handler->reset_notify(dev, prepare); }
false
false
false
false
false
0
pstate_history_list_convert(void *that) { pstate_history_list_ty *this_thing; size_t j; rpt_value::pointer vp; this_thing = *(pstate_history_list_ty **)that; if (!this_thing) return rpt_value::pointer(); trace(("pstate_history_list_convert(this_thing = %08lX)\n{\n", (long)this_thing)); ass...
false
false
false
false
false
0
rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length, my_off_t page, int level) { uchar *k; uchar *last; uint nod_flag; int res; uchar *page_buf; uint k_len; uint *saved_key = (uint*) (info->rtree_recursion_state) + level; if (!(page_buf = (uchar*)my_alloca((uint...
false
true
false
false
false
1
lad_sm_make_cmp_localize_all(StripMining *sm) { List *li; int amax = get_max_array_entry(sm->module->array_head); for (li = sm->loops; li != NULL; li = li->next) { StripMiningInnerLoop *smil = li->data; Cmp_localize *cl; smil->block->cmp_localize = cl = alloc_cmp_localize(); ...
false
false
false
false
false
0
win_window_pos_get(const WinInfo *wi, guint32 id, gint *x, gint *y) { WinDef *wd; if((wd = window_find(wi, id)) != NULL) { if(x) *x = wd->x; if(y) *y = wd->y; return TRUE; } return FALSE; }
false
false
false
false
false
0
dirac_encoder_load (dirac_encoder_t *encoder, unsigned char *uncdata, int uncdata_size) { TEST (encoder != NULL); TEST (encoder->compressor != NULL); DiracEncoder *compressor = (DiracEncoder *)encoder->compressor; int ret_stat = 0; try { if ( compressor->LoadNextFrame (uncdata, uncdata_s...
false
false
false
false
false
0
MaybeExtendOffsetSlru(void) { int pageno; pageno = MultiXactIdToOffsetPage(MultiXactState->nextMXact); LWLockAcquire(MultiXactOffsetControlLock, LW_EXCLUSIVE); if (!SimpleLruDoesPhysicalPageExist(MultiXactOffsetCtl, pageno)) { int slotno; /* * Fortunately for us, SimpleLruWritePage is already prepar...
false
false
false
false
false
0
Reset_IO (int destructive) { Discard_Input (Curr_Input_Port); if (destructive) Discard_Output (Curr_Output_Port); else Flush_Output (Curr_Output_Port); Curr_Input_Port = Standard_Input_Port; Curr_Output_Port = Standard_Output_Port; }
false
false
false
false
false
0
ipack_device_read_id(struct ipack_device *dev) { u8 __iomem *idmem; int i; int ret = 0; idmem = ioremap(dev->region[IPACK_ID_SPACE].start, dev->region[IPACK_ID_SPACE].size); if (!idmem) { dev_err(&dev->dev, "error mapping memory\n"); return -ENOMEM; } /* Determine ID PROM Data Format. If we find the id...
false
false
false
false
false
0
caml_extunix_signalfd_read(value vfd) { CAMLparam1(vfd); CAMLlocal1(vret); struct signalfd_siginfo ssi; ssize_t nread = 0; caml_enter_blocking_section(); nread = read(Int_val(vfd), &ssi, SSI_SIZE); caml_leave_blocking_section(); if (nread != SSI_SIZE) unix_error(EINVAL,"signalfd_read",Nothing); vr...
false
false
false
false
false
0
mines_show_custom_game_screen (Mines* self) { GtkAspectFrame* _tmp0_ = NULL; MinefieldView* _tmp1_ = NULL; GtkAspectFrame* _tmp2_ = NULL; g_return_if_fail (self != NULL); self->priv->is_new_game_screen = FALSE; _tmp0_ = self->priv->custom_game_screen; gtk_widget_show ((GtkWidget*) _tmp0_); _tmp1_ = self->priv->...
false
false
false
false
false
0
_open_pictures_in_external_viewer (FrogrMainView *self) { GSList *pictures = NULL; if (!_pictures_selected_required_check (self)) return; pictures = _get_selected_pictures (self); frogr_util_open_pictures_in_viewer (pictures); g_slist_foreach (pictures, (GFunc)g_object_unref, NULL); g_slist_free (pict...
false
false
false
false
false
0
ap_set_file_slot(cmd_parms *cmd, void *struct_ptr, const char *arg) { /* Prepend server_root to relative arg. * This allows most args to be independent of server_root, * so the server can be moved or mirrored with less pain. */ const char *path; ...
false
false
false
false
false
0
snd_hdspm_set_defaults(struct hdspm * hdspm) { /* ASSUMPTION: hdspm->lock is either held, or there is no need to hold it (e.g. during module initialization). */ /* set defaults: */ hdspm->settings_register = 0; switch (hdspm->io_type) { case MADI: case MADIface: hdspm->control_register = 0x2...
false
false
false
false
false
0
daemonize (const ACE_TCHAR pathname[], bool close_all_handles, const ACE_TCHAR program_name[]) { ACE_TRACE ("ACE::daemonize"); #if !defined (ACE_LACKS_FORK) pid_t pid = ACE_OS::fork (); if (pid == -1) return -1; else if (pid != 0) ACE_OS::exit (0); // Parent exits. //...
false
false
false
false
false
0
projectColour(const cPDVector& sub) const { vector<PDT::Colour> res(sub.size()); transform(sub.begin(),sub.end(),res.begin(),pickColour()); return res; }
false
false
false
false
false
0
cmpc_keys_idev_init(struct input_dev *inputdev) { int i; set_bit(EV_KEY, inputdev->evbit); for (i = 0; cmpc_keys_codes[i] != KEY_MAX; i++) set_bit(cmpc_keys_codes[i], inputdev->keybit); }
false
false
false
false
false
0
attachLine() { m_extracted = false; if (m_object->isBox()) static_cast<RenderBox*>(m_object)->setPlaceHolderBox(this); }
false
false
false
false
false
0
AcpiDbTestBufferType ( ACPI_NAMESPACE_NODE *Node, UINT32 BitLength) { ACPI_OBJECT *Temp1 = NULL; ACPI_OBJECT *Temp2 = NULL; ACPI_OBJECT *Temp3 = NULL; UINT8 *Buffer; ACPI_OBJECT WriteValue; ACPI_STATUS...
false
false
false
false
false
0
spawnl(unsigned logopt, const char *prog, ...) { va_list arg; int argc; char **argv, **p; va_start(arg, prog); for (argc = 1; va_arg(arg, char *); argc++); va_end(arg); if (!(argv = alloca(sizeof(char *) * argc))) return -1; va_start(arg, prog); p = argv; while ((*p++ = va_arg(arg, char *))); va_end(arg...
false
false
false
false
true
1
hfi1_qp_init(struct hfi1_ibdev *dev) { struct hfi1_devdata *dd = dd_from_dev(dev); int i; int ret = -ENOMEM; /* allocate parent object */ dev->qp_dev = kzalloc(sizeof(*dev->qp_dev), GFP_KERNEL); if (!dev->qp_dev) goto nomem; /* allocate hash table */ dev->qp_dev->qp_table_size = hfi1_qp_table_size; dev->qp_...
false
false
false
false
false
0
snd_pcm_rate_move_applptr(snd_pcm_t *pcm, snd_pcm_sframes_t frames) { snd_pcm_rate_t *rate = pcm->private_data; snd_pcm_uframes_t orig_appl_ptr, appl_ptr = rate->appl_ptr, slave_appl_ptr; snd_pcm_sframes_t diff, ndiff; snd_pcm_t *slave = rate->gen.slave; orig_appl_ptr = rate->appl_ptr; if (frames > 0) snd_pcm_...
false
false
false
false
false
0
validate_step(PyObject *step) { /* No step specified, use a step of 1. */ if (!step) return PyLong_FromLong(1); step = PyNumber_Index(step); if (step) { Py_ssize_t istep = PyNumber_AsSsize_t(step, NULL); if (istep == -1 && PyErr_Occurred()) { /* Ignore OverflowError,...
false
false
false
false
false
0
Image_conclude(stp_image_t *image) { Gimp_Image_t *im = (Gimp_Image_t *) (image->rep); gimp_progress_update(1); if (im->alpha_table) stp_free(im->alpha_table); if (im->tmp) stp_free(im->tmp); }
false
false
false
false
false
0
find_engine(const char *family, int priority, char *database, int dbsiz, char *table, int tabsiz) { struct ast_config_engine *eng, *ret = NULL; struct ast_config_map *map; ast_mutex_lock(&config_lock); for (map = config_maps; map; map = map->next) { if (!strcasecmp(family, map->name) && (priority == map->priori...
false
false
false
false
false
0
irecv_hexdump(unsigned char* buf, unsigned int len, unsigned int addr) { int i, j; printf("0x%08x: ", addr); for (i = 0; i < len; i++) { if (i % 16 == 0 && i != 0) { for (j=i-16; j < i; j++) { unsigned char car = buf[j]; if (car < 0x20 || car > 0x7f) car = '.'; printf("%c", car); } printf("\n"); add...
false
false
false
false
false
0
trace_access_lock(int cpu) { if (cpu == RING_BUFFER_ALL_CPUS) { /* gain it for accessing the whole ring buffer. */ down_write(&all_cpu_access_lock); } else { /* gain it for accessing a cpu ring buffer. */ /* Firstly block other trace_access_lock(RING_BUFFER_ALL_CPUS). */ down_read(&all_cpu_access_lock); ...
false
false
false
false
false
0
r8712_os_recvbuf_resource_free(struct _adapter *padapter, struct recv_buf *precvbuf) { if (precvbuf->pskb) dev_kfree_skb_any(precvbuf->pskb); if (precvbuf->purb) { usb_kill_urb(precvbuf->purb); usb_free_urb(precvbuf->purb); } return _SUCCESS; }
false
false
false
false
false
0
ath_tx_queue_tid(struct ath_txq *txq, struct ath_atx_tid *tid) { struct ath_atx_ac *ac = tid->ac; if (tid->paused) return; if (tid->sched) return; tid->sched = 1; list_add_tail(&tid->list, &ac->tid_q); if (ac->sched) return; ac->sched = 1; list_add_tail(&ac->list, &txq->axq_acq); }
false
false
false
false
false
0
contig_align() const { static const contig_align_t empty_set; if (is_full_segment()) return sread()._contig_align; return empty_set; }
false
false
false
false
false
0
field_byte_offset (decl) tree decl; { unsigned int type_align_in_bytes; unsigned int type_align_in_bits; unsigned HOST_WIDE_INT type_size_in_bits; HOST_WIDE_INT object_offset_in_align_units; HOST_WIDE_INT object_offset_in_bits; HOST_WIDE_INT object_offset_in_bytes; tree type; tree field_size_tree; ...
false
false
false
false
false
0
rpc_out(void *ptr, size_t eltsize, size_t nmemb, void *buffer_) { size_t max = eltsize * nmemb; struct rpc_state *rpc = buffer_; size_t avail = rpc->len - rpc->pos; if (!avail) { rpc->initial_buffer = 0; avail = packet_read_line(rpc->out, rpc->buf, rpc->alloc); if (!avail) return 0; rpc->pos = 0; rp...
false
false
false
false
false
0
destroyCacheLists(cacheCollection* lpCaches) { cacheList* lpTemp; while ((lpTemp = lpCaches->lpL1Caches) != NULL) { lpCaches->lpL1Caches = lpTemp->lpNext; free(lpTemp); } while ((lpTemp = lpCaches->lpL2Caches) != NULL) { lpCaches->lpL2Caches = lpTemp->lpNext; free(lpTemp); } while ((lpTemp = lpCaches-...
false
false
false
false
false
0
xmmsc_io_out_handle (xmmsc_connection_t *c) { x_check_conn (c, -1); x_api_error_if (!xmmsc_ipc_io_out (c->ipc), "without pending output", -1); return xmmsc_ipc_io_out_callback (c->ipc); }
false
false
false
false
false
0
outOfBitsStrategy(algo_t const* that, const int sfwork[SFBMAX], const int vbrsfmin[SFBMAX], int target) { int wrk[SFBMAX]; int const dm = sfDepth(sfwork); int const p = that->cod_info->global_gain; int nbits; /* PART 1 */ { int bi = dm / 2; int bi_ok = -1; ...
false
false
false
false
false
0
save_update_preview(PixmapSaveControls *controls) { GdkPixbuf *pixbuf; gdouble zoom; zoom = gtk_adjustment_get_value(GTK_ADJUSTMENT(controls->zoom)); controls->args->font_size *= controls->args->zoom/zoom; if (controls->args->ztype == PIXMAP_NONE && controls->args->xytype != PIXMAP_RULERS)...
false
false
false
false
false
0
shift_derivatives_of_b() { map<int,int> subst; for (int yi = 0; yi < diff_b.nrows(); yi++) for (int ll = minlag; ll < 0; ll++) if (diff_b(yi, ll-minlag) != ogp::OperationTree::zero) { model.variable_shift_map(model.eqs.nulary_of_term(diff_b(yi, ll-minlag)), -ll, subst); diff_b(yi, ll-minlag) =...
false
false
false
false
false
0
gnutls_certificate_set_x509_trust_file (gnutls_certificate_credentials_t res, const char *cafile, gnutls_x509_crt_fmt_t type) { int ret, ret2; size_t size; gnutls_datum_t cas; #ifdef ENABLE_PKCS11 if (strncmp (cafile, "pkcs11:", 7)...
false
false
false
false
false
0
bmp_565_8888(int fd, struct pixel8888 *fb, int width, int height, int xres, int yres) { int ret; int i, j; struct pixel8888 *tmp_fb; struct pixel565 buff[width]; for (i = height - 1; i >= 0; i--) { ret = read(fd, &buff, sizeof(buff)); if (ret < 0) { print_error("read"); return ret; } for (j = 0...
false
true
false
false
true
1
device_match_driver(struct btd_device *device, struct btd_device_driver *driver, GSList *profiles) { const char **uuid; GSList *uuids = NULL; for (uuid = driver->uuids; *uuid; uuid++) { GSList *match; /* skip duplicated uuids */ if (g_slist_find_custom(uuids, *uuid, (GCompareFunc) strcasecmp)) ...
false
false
false
false
false
0
choose_wl_class_and_type(struct cfq_data *cfqd, struct cfq_group *cfqg) { unsigned slice; unsigned count; struct cfq_rb_root *st; unsigned group_slice; enum wl_class_t original_class = cfqd->serving_wl_class; /* Choose next priority. RT > BE > IDLE */ if (cfq_group_busy_queues_wl(RT_WORKLOAD, cfqd, cfqg)) cfq...
false
false
false
false
false
0
my_timer_function(GB_TIMER *timer) { if (timer->id) { GB.RaiseTimer(timer); if (timer->id) { MyTimerTag *tag = (MyTimerTag *)timer->tag; GTimer *t = tag->timer; int elapsed = (int)(g_timer_elapsed(t, NULL) * 1000) - tag->timeout; int next = timer->delay - elapsed; if (next < 10) next = 1...
false
false
false
false
false
0
spin_point_size_changed_value(GtkSpinButton *spinbutton, gpointer user_data) { if(user_data && G_IS_OBJECT(user_data)) { GtkWidget* xyplot = GTK_WIDGET(user_data); XYPlotData* data = g_object_get_data(G_OBJECT (spinbutton), "CurentData"); g_return_if_fail (GABEDIT_IS_XYPLOT (xyplot)); if(data) { da...
false
false
false
false
false
0
exsltMathConstant (xmlChar *name, double precision) { xmlChar *str; double ret; if ((name == NULL) || (xmlXPathIsNaN(precision)) || (precision < 1.0)) { return xmlXPathNAN; } if (xmlStrEqual(name, BAD_CAST "PI")) { int len = xmlStrlen(EXSLT_PI); if (precision <= len) ...
false
false
false
false
false
0
ExportSpatiaLiteGeometry( const OGRGeometry *poGeometry, GInt32 nSRID, OGRwkbByteOrder eByteOrder, int bHasM, int bSpatialite2D, ...
false
false
false
false
false
0
triton_timer_del(struct triton_timer_t *ud) { struct _triton_timer_t *t = (struct _triton_timer_t *)ud->tpd; epoll_ctl(epoll_fd, EPOLL_CTL_DEL, t->fd, &t->epoll_event); close(t->fd); spin_lock(&t->ctx->lock); t->ud = NULL; list_del(&t->entry); if (t->pending) { list_del(&t->entry2); __sync_sub_and_fetch(&tri...
false
false
false
false
false
0
setPos(const vec3& pos, bool keep_angle) { if(keep_angle) { vec3 dir = target - this->pos; this->pos = pos; this->target = pos + dir; } else { this->pos = pos; } }
false
false
false
false
false
0
RewriteCurrentSource(unsigned NewReg, unsigned NewSubReg) override { // We cannot rewrite out of bound operands. // Moreover, rewritable sources are at odd positions. if ((CurrentSrcIdx & 1) != 1 || CurrentSrcIdx > CopyLike.getNumOperands()) return false; MachineOperand &MO = CopyLike.getOperand(...
false
false
false
false
false
0
cstate_get_attr_cpumask(struct device *dev, struct device_attribute *attr, char *buf) { struct pmu *pmu = dev_get_drvdata(dev); if (pmu == &cstate_core_pmu) return cpumap_print_to_pagebuf(true, buf, &cstate_core_cpu_mask); else if (pmu == &cstate_pkg_pmu) return cpumap_print_to_pagebuf(tru...
false
false
false
false
false
0
operator() (double x) const { if (_asInteger) { if (_intPower==0) { return 1; } else if (_intPower>0) { double f = 1; for (int i=0;i<_intPower;i++) { f *=x; } return f; } else { double f = 1; for (int i=0;i<-_intPower;i++) { f /=x; } return f; } } ...
false
false
false
false
false
0
ipath_get_egrbuf(struct ipath_devdata *dd, u32 bufnum) { return dd->ipath_port0_skbinfo ? (void *) dd->ipath_port0_skbinfo[bufnum].skb->data : NULL; }
false
false
false
false
false
0
camel_sasl_challenge_sync (CamelSasl *sasl, GByteArray *token, GCancellable *cancellable, GError **error) { CamelSaslClass *class; GByteArray *response; g_return_val_if_fail (CAMEL_IS_SASL (sasl), NULL); class = CAMEL_SASL_GET_CLASS ...
false
false
false
true
false
1
configureAdditivity() { helpers::Properties additivityProperties = properties.getPropertySubset(DCMTK_LOG4CPLUS_TEXT("additivity.")); OFVector<tstring> additivitysProps = additivityProperties.propertyNames(); for(OFVector<tstring>::const_iterator it = additivitysProps.begin(); it !=...
false
false
false
false
false
0
acct_gather_parse_freq(int type, char *freq) { int freq_int = -1; char *sub_str = NULL; if (!freq) return freq_int; switch (type) { case PROFILE_ENERGY: if ((sub_str = slurm_strcasestr(freq, "energy="))) freq_int = _get_int(sub_str + 7); break; case PROFILE_TASK: /* backwards compatibility for when t...
false
false
false
false
false
0
fstatvfs (int fd, struct statvfs *buf) { struct statfs fsbuf; struct stat64 st; /* Get as much information as possible from the system. */ if (__fstatfs (fd, &fsbuf) < 0) return -1; /* Convert the result. */ __internal_statvfs (NULL, buf, &fsbuf, fstat64 (fd, &st) == -1 ? NULL : &st); /* We signa...
false
false
false
false
false
0
makePixelSumTab8(void) { l_uint8 byte; l_int32 i; l_int32 *tab; PROCNAME("makePixelSumTab8"); if ((tab = (l_int32 *)CALLOC(256, sizeof(l_int32))) == NULL) return (l_int32 *)ERROR_PTR("tab not made", procName, NULL); for (i = 0; i < 256; i++) { byte = (l_uint8)i; tab[i] = (byt...
false
false
false
false
false
0
grig_hstock_button (const gchar *stock_id, const gchar *text, const gchar *tooltip) { GtkWidget *button; GtkWidget *image; GtkWidget *box; image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); box = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE,...
false
false
false
false
false
0
buildStereometricRecord(DcmDirectoryRecord *record, DcmFileFormat *fileformat, const OFString &referencedFileID, const OFFilename &...
false
false
false
false
false
0
LangDumpVec(char *who, int count, SV **data) { int i; PerlIO_printf(PerlIO_stderr(), "%s (%d):\n", who, count); for (i = 0; i < count; i++) { SV *sv = data[i]; if (sv) { PerlIO_printf(PerlIO_stderr(), "%2d ", i); sv_dump(sv); } } }
false
false
false
false
false
0
RecursiveQueueAndDequeueAllSequenceTest() { QString sequence; AppendCharacterJob jobA ( QChar( 'a' ), &sequence, this ); AppendCharacterJob jobB ( QChar( 'b' ), &sequence, this ); AppendCharacterJob jobC ( QChar( 'c' ), &sequence, this ); AppendCharacterJob jobD ( QChar( 'd' ), &sequence, this ); ...
false
false
false
false
false
0
load_module(void) { struct ast_db_entry *dbtree, *tmp; char groupname[AST_MAX_EXTENSION], *ptr; if ((group_container = ao2_container_alloc(37, group_hash_fn, group_cmp_fn))) { /* Refresh groups from astdb */ if ((dbtree = ast_db_gettree("dialgroup", NULL))) { for (tmp = dbtree; tmp; tmp = tmp->next) { as...
true
true
false
false
false
1
SPLAverageCps(SplinePointList *spl) { SplinePoint *sp; while ( spl!=NULL ) { for ( sp=spl->first ; ; ) { SPAverageCps(sp); if ( sp->next==NULL ) break; sp = sp->next->to; if ( sp==spl->first ) break; } spl = spl->next; } }
false
false
false
false
false
0
sst_mem_block_register(struct sst_dsp *dsp, u32 offset, u32 size, enum sst_mem_type type, struct sst_block_ops *ops, u32 index, void *private) { struct sst_mem_block *block; block = kzalloc(sizeof(*block), GFP_KERNEL); if (block == NULL) return NULL; block->offset = offset; block->size = size; block->index ...
false
false
false
false
false
0
file_info_hash_insert(fileinfo_t *fi) { const fileinfo_t *xfi; file_info_check(fi); g_assert(!fi->hashed); g_assert(fi->guid); g_assert(NULL == fi->sf); if (GNET_PROPERTY(fileinfo_debug) > 4) g_debug("FILEINFO insert 0x%p \"%s\" " "(%s/%s bytes done) sha1=%s", cast_to_constpointer(fi), fi->pathname, ...
false
false
false
false
false
0
tree_view_frame_scroll_to_cursor (GtkTreeView *tree_view) { GtkTreePath *path = NULL; gtk_tree_view_get_cursor (tree_view, &path, NULL); if (path != NULL) { gtk_tree_view_scroll_to_cell ( tree_view, path, NULL, FALSE, 0.0, 0.0); gtk_tree_path_free (path); } }
false
false
false
false
false
0
syn_ps2_init_stick(int fd) { if (!stick_enabled) return; gpm_report(GPM_PR_DEBUG,"Initializing Synaptics PS/2 Stick Device"); /* Reset it, set defaults, streaming */ syn_ps2_send_reset(fd,DEVICE_STICK); syn_ps2_putbyte(fd,DEVICE_STICK,PS2_SET_DEFAULT); syn_ps2_putbyte(fd,DEVICE_STICK,PS2_STREAM_MODE); ...
false
false
false
false
false
0
speech_stop() { if(Speech_init == false) return true; #ifdef _WIN32 return SUCCEEDED(Voice_device->Speak( NULL, SPF_PURGEBEFORESPEAK, NULL )); #else STUB_FUNCTION; return true; #endif }
false
false
false
false
false
0
google_chooser_dialog_realize (GtkWidget *widget) { EGoogleChooserDialogPrivate *priv; GdkCursor *cursor; GdkWindow *window; GdkDisplay *display; priv = E_GOOGLE_CHOOSER_DIALOG_GET_PRIVATE (widget); /* Chain up to parent's realize() method. */ GTK_WIDGET_CLASS (e_google_chooser_dialog_parent_class)-> realize...
false
false
false
false
false
0
block_picker_signals (DateCell *cell) { PopBox *box = cell->cell.gui_private; if (!box->signals_connected) return; g_signal_handlers_block_matched (box->date_picker, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, cell); }
false
false
false
false
false
0
fmtlong(long lng, char *fmt) { static int i; int r; char buf[30]; r = rfmtlong(lng, fmt, buf); printf("r: %d ", r); if (r == 0) { printf("%d: %s (fmt was: %s)\n", i++, buf, fmt); } else check_return(r); }
true
true
false
false
false
1
ncd_for_two_cands (basic_block bb1, basic_block bb2, slsr_cand_t c1, slsr_cand_t c2, slsr_cand_t *where) { basic_block ncd; if (!bb1) { *where = c2; return bb2; } if (!bb2) { *where = c1; return bb1; } ncd = nearest_common_dominator (CDI_DOMINATORS, bb1, bb2); ...
false
false
false
false
false
0
getAddrMode2OffsetOpValue(const MCInst &MI, unsigned OpIdx, SmallVectorImpl<MCFixup> &Fixups, const MCSubtargetInfo &STI) const { // {13} 1 == imm12, 0 == Rm // {12} isAdd // {11-0} imm12/Rm const MCOperand &MO = MI.getOperand(OpIdx); const MCOpera...
false
false
false
false
false
0
separate_subclust(graph_t * g) { int i, j, margin; graph_t *low, *high; graph_t *left, *right; margin = late_int (g, G_margin, CL_OFFSET, 0); for (i = 1; i <= GD_n_cluster(g); i++) make_lrvn(GD_clust(g)[i]); for (i = 1; i <= GD_n_cluster(g); i++) { for (j = i + 1; j <= GD_n_cluster(g); j++) {...
false
false
false
false
false
0
countChineseCharsUtf8(const string& content) { int cnt = 0; for (size_t i = 0; i < content.size();) { char c = content[i]; if ((c & 0x80) == 0) { ++i; } else if ((c & 0xe0) == 0xc0) { i += 2; } else if ((c & 0xf0) == 0xe0) { i += 3; ++cnt; } else { abort(); } ...
false
false
false
false
false
0
attach() { assert(!attached()); assert(!m_render); assert(parentNode()); RenderStyle* const _style = document()->styleSelector()->styleForElement(this); _style->ref(); if (parentNode()->renderer() && _style->display() != NONE) { m_render = new (document()->renderArena()) RenderTextArea(...
false
false
false
false
false
0
alarm_intr(int alnum) { if (currently_testing >= blocks) return; signal(SIGALRM, alarm_intr); alarm(5); if (!currently_testing) return; printf("%lld... ", (unsigned long long)currently_testing); fflush(stdout); }
false
false
false
false
false
0
revealed_by_phoenix(int xLoc, int yLoc) { Unit* unitPtr; int effectiveRange = unit_res[UNIT_PHOENIX]->visual_range; for( int i=unit_array.size() ; i>0 ; i-- ) { if( unit_array.is_deleted(i) ) continue; unitPtr = unit_array[i]; if( unitPtr->unit_id == UNIT_PHOENIX && unitPtr->nation_recno == nation_...
false
false
false
false
false
0
combine_bucket (ht_entry_t *h, nsieve_t *ns){ while (1){ if (h == NULL) return; if (h->rel->poly->group->victim == NULL){ h = h->next; continue; } rel_t *base_rel = h->rel; uint64_t base_factors[ns->row_len]; fl_concat (base_rel, base_rel->poly->group->victim); fl_fillrow (base_rel, &base_factors[0...
false
false
false
false
false
0
NCompareSzPart(ap1, ap2) int ap1, ap2; { byte *pch1, *pch2; int ich; pch1 = ai[ap1].form; pch2 = ai[ap2].form; for (ich = 0; pch1[ich] && pch1[ich] == pch2[ich]; ich++) { if (!us.fArabicFlip) { /* If formulas are being displayed in alternate form, we need to */ /* effectively swap two sections...
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &mf) { clear(); MF = &mf; LIS = &pass.getAnalysis<LiveIntervals>(); MDT = &pass.getAnalysis<MachineDominatorTree>(); TRI = mf.getSubtarget().getRegisterInfo(); LS.initialize(mf); DEBUG(dbgs() << "********** COMPUTING LIVE DEBUG VARIABLES: " << mf.getName...
false
false
false
false
false
0
get_quest_by_number(player *pl, int number) { quest_state *state; quest_player *pq = get_or_create_quest(pl); int questnum = 0; if (number <= 0 || !pq) { return NULL; } /* count through completed quests first */ state = pq->quests; while (state) { /* count up the num...
false
false
false
false
false
0
isCrosses(int dimensionOfGeometryA, int dimensionOfGeometryB) const { if ((dimensionOfGeometryA==Dimension::P && dimensionOfGeometryB==Dimension::L) || (dimensionOfGeometryA==Dimension::P && dimensionOfGeometryB==Dimension::A) || (dimensionOfGeometryA==Dimension::L && dimensionOfGeometryB==Dimension::A)) { ret...
false
false
false
false
false
0
commit_inmem_pages(struct inode *inode, bool abort) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct inmem_pages *cur, *tmp; bool submit_bio = false; struct f2fs_io_info fio = { .sbi = sbi, .type = DATA, .rw = WRITE_SYNC | REQ_PRIO, .encrypted_page = NULL, ...
false
false
false
false
false
0
init_PXC200(struct bttv *btv) { static int vals[] = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00 }; unsigned int i; int tmp; u32 val; /* Initialise GPIO-connevted stuff */ gpio_inout(0xffffff, (1<<13)); gpio_write(0); udelay(3); gpio_write(1<<13); /* GPIO inputs are...
false
false
false
false
false
0
f_isrel(NUMBER *val1, NUMBER *val2) { if (qisfrac(val1) || qisfrac(val2)) { math_error("Non-integer for isrel"); /*NOTREACHED*/ } return itoq((long) zrelprime(val1->num, val2->num)); }
false
false
false
false
false
0
parseconnections() { if(!p.findbegin()) return; token t; while(p.parse(t)) switch(t.type) { case token::END: return; case token::PROP: if(!strcmp(t.s, "C")) parseconnection(); else p.skipprop(); ...
false
false
false
false
false
0
ParseMemory( const char * s, int size ) { FreeDoc(); if ( (pDoc = xmlRecoverMemory(s,size)) == 0 ) { return false; } return true; }
false
false
false
false
false
0
get_uids_and_rev_cb (gpointer user_data, gint col, gchar **cols, gchar **name) { GHashTable *uids_and_rev = user_data; if (col == 2 && cols[0]) g_hash_table_insert (uids_and_rev, g_strdup (cols[0]), g_strdup (cols[1] ? cols[1] : "")); return 0; }
false
false
false
false
false
0