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 |
|---|---|---|---|---|---|---|
populateLTOPassManager(PassManagerBase &PM,
bool Internalize,
bool RunInliner) {
// Provide AliasAnalysis services for optimizations.
addInitialAliasAnalysisPasses(PM);
// Now that composite has been compiled, scan th... | false | false | false | false | false | 0 |
squishspace(char *buf)
{
char *p, *q;
int space;
for (space = 0, q = p = buf; *q; q++) {
if (isspace((uchar)*q)) {
space++;
continue;
}
if (space && bflag == 1) {
*p++ = ' ';
space = 0;
}
*p++ = *q;
}
*p = 0;
return p - buf;
} | false | false | false | false | false | 0 |
execute()
{
unsigned int new_value,src_value,w_value;
if (access)
source = cpu_pic->register_bank[register_address];
else if (cpu16->extended_instruction() && register_address < 0x60)
source = cpu_pic->registers[register_address + cpu16->ind2.fsr_value];
else
source = cpu_pic->registers[regis... | false | false | false | false | false | 0 |
expandLoadStackGuard(MachineInstrBuilder &MIB,
const TargetInstrInfo &TII) {
MachineBasicBlock &MBB = *MIB->getParent();
DebugLoc DL = MIB->getDebugLoc();
unsigned Reg = MIB->getOperand(0).getReg();
const GlobalValue *GV =
cast<GlobalValue>((*MIB->memoperands_begin())->get... | false | false | false | false | false | 0 |
arg_assoc (struct arg_lookup *k, tree n)
{
if (n == error_mark_node)
return false;
if (TYPE_P (n))
return arg_assoc_type (k, n);
if (! type_unknown_p (n))
return arg_assoc_type (k, TREE_TYPE (n));
if (TREE_CODE (n) == ADDR_EXPR)
n = TREE_OPERAND (n, 0);
if (TREE_CODE (n) == COMPONENT_REF)
... | false | false | false | false | true | 1 |
reset_frame_rate_hack (void)
{
jitcount = 0;
if (currprefs.m68k_speed >= 0)
return;
rpt_did_reset = 1;
is_syncline = 0;
vsyncmintime = read_processor_time () + vsynctimebase;
write_log (_T("Resetting frame rate hack\n"));
} | false | false | false | false | false | 0 |
ixgbe_dcb_calculate_tc_credits(struct ixgbe_hw *hw,
struct ixgbe_dcb_config *dcb_config,
int max_frame, u8 direction)
{
struct tc_bw_alloc *p;
int min_credit;
int min_multiplier;
int min_percent = 100;
/* Initialization values default for Tx settings */
u32 credit_refill = 0;
u32 credit_max ... | false | false | false | false | false | 0 |
file_compare(const struct file *a, const struct file *b)
{
int res = 0;
if (a->st.st_dev == b->st.st_dev && a->st.st_ino == b->st.st_ino)
return 0;
if (res == 0 && opts.maximise)
res = CMP(a->st.st_nlink, b->st.st_nlink);
if (res == 0 && opts.minimise)
res = CMP(b->st.st_nlink, ... | false | false | false | false | false | 0 |
endpointConfigLoadCbk (void *data)
{
FILE *fp = (FILE *) data ;
long ival ;
int rval = 1 ;
if (getInteger (topScope,"stdio-fdmax",&ival,NO_INHERIT))
{
stdioFdMax = ival ;
#if ! defined (FD_SETSIZE)
if (stdioFdMax > 0)
{
logOrPrint (LOG_ERR,fp,NO_STDIO_FDMAX) ;
stdi... | false | false | false | false | false | 0 |
ssl_check_public_cert(server_rec *s,
apr_pool_t *ptemp,
X509 *cert,
int type)
{
int is_ca, pathlen;
if (!cert) {
return;
}
/*
* Some information about the certificate(s)
*/
if (... | false | false | false | false | false | 0 |
MergeArrays(MSortArgs *msa, void *src, void *dest, size_t run1, size_t run2)
{
void *arg, *a, *b, *c;
size_t elsize, runtotal;
int cmp_result;
JSComparator cmp;
JSBool fastcopy;
runtotal = run1 + run2;
elsize = msa->elsize;
cmp = msa->cmp;
arg = msa->arg;
fastcopy = msa->fastco... | false | false | false | false | false | 0 |
GetMaskFlags()
{
poGDS->ScanDirectories();
if( poGDS->poMaskDS != NULL )
{
if( poGDS->poMaskDS->GetRasterCount() == 1)
{
return GMF_PER_DATASET;
}
else
{
return 0;
}
}
else
return GDALPamRasterBand::GetMaskFlags();
} | false | false | false | false | false | 0 |
e_text_model_real_get_text (ETextModel *model)
{
if (model->priv->text)
return model->priv->text->str;
else
return "";
} | false | false | false | false | false | 0 |
dump_typename (tree t, int flags)
{
tree ctx = TYPE_CONTEXT (t);
if (TREE_CODE (ctx) == TYPENAME_TYPE)
dump_typename (ctx, flags);
else
dump_type (ctx, flags & ~TFF_CLASS_KEY_OR_ENUM);
pp_cxx_colon_colon (cxx_pp);
dump_decl (TYPENAME_TYPE_FULLNAME (t), flags);
} | false | false | false | false | false | 0 |
wm8960_set_bias_level_capless(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
u16 pm2 = snd_soc_read(codec, WM8960_POWER2);
int reg, ret;
switch (level) {
case SND_SOC_BIAS_ON:
break;
case SND_SOC_BIAS_PREPARE:
switch (snd_so... | false | false | false | false | false | 0 |
mylockf(int fd, int op, int rdwr)
#else
int
mylockf(fd, op, rdwr)
int fd, op, rdwr;
#endif
{
struct flock myflock;
int ret;
if(op==0) /* Generic unlock the whole file */
{
myflock.l_type=F_UNLCK;
myflock.l_whence=SEEK_SET;
myflock.l_start=0;
myflock.l_len=0; /* The whole file */
myflock.l_pid=getpid();
... | false | false | false | false | false | 0 |
asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
const ASN1_ITEM *it)
{
BIO *tmpbio;
const ASN1_AUX *aux = it->funcs;
ASN1_STREAM_ARG sarg;
int rv = 1;
/* If data is not deteched or resigning then the output BIO is
* already set up to finalise when it is written through.
*/
if (!(flags... | false | false | false | false | false | 0 |
set_threshold (GtkWidget * w, gpointer data)
{
double val;
val = gtk_adjustment_get_value (GTK_ADJUSTMENT (w));
if (channels > 2)
settings.colour_thresholds[settings.preview_channel] = val;
else
settings.gray_thresholds[settings.preview_channel] = val;
} | false | false | false | false | false | 0 |
spcp8x5_port_probe(struct usb_serial_port *port)
{
const struct usb_device_id *id = usb_get_serial_data(port->serial);
struct spcp8x5_private *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
spin_lock_init(&priv->lock);
priv->quirks = id->driver_info;
usb_set_serial_port_data(por... | false | false | false | false | false | 0 |
create_cfi_notes (void)
{
dw_trace_info *ti;
gcc_checking_assert (queued_reg_saves == NULL);
gcc_checking_assert (trace_work_list == NULL);
/* Always begin at the entry trace. */
ti = VEC_index (dw_trace_info, trace_info, 0);
scan_trace (ti);
while (!VEC_empty (dw_trace_info_ref, trace_work_list))
... | false | false | false | false | false | 0 |
CMMF_CertRepContentGetNumResponses(CMMFCertRepContent *inCertRepContent)
{
int numResponses = 0;
PORT_Assert (inCertRepContent != NULL);
if (inCertRepContent != NULL && inCertRepContent->response != NULL) {
while (inCertRepContent->response[numResponses] != NULL) {
numResponses++;
}
}
... | false | false | false | false | false | 0 |
scan_snmp_get_manufacturer(char* oid_str,void* handle)
{
size_t name_len;
oid name[MAX_OID_LEN];
struct snmp_pdu *pdu, *response = NULL;
int status;
int index = 0;
/* create and send request. */
name_len = MAX_OID_LEN;
if (!(*nut_snmp_parse_oid)(oid_str, name, &name_len)) {
index++;
return NU... | false | false | false | false | false | 0 |
ajDiroutOpen(AjPDirout thys)
{
#ifdef WIN32
if(ajStrMatchC(thys->Name, "."))
{
ajStrAssignC(&thys->Name, "");
ajStrAssignC(&thys->Printname, "");
return ajTrue;
}
#endif /* WIN32 */
if(ajStrGetCharLast(thys->Name) != SLASH_CHAR)
{
ajStrAppendC(&thys->Name, SLASH_STRI... | false | false | false | false | false | 0 |
PmlGetIntegerValue( PmlObject_t obj, int * pType, int * pValue )
{
int type;
unsigned char svalue[sizeof( int )];
int accum = 0, i, len;
if( !pType )
{
pType = &type;
}
len = PmlGetPrefixValue( obj, pType, 0, 0, (char *)svalue, sizeof( int ) );
/*if( len == ERROR )
... | false | false | false | false | false | 0 |
elf_load_segment ( struct image *image, Elf_Phdr *phdr,
Elf_Ehdr *ehdr ) {
physaddr_t dest;
userptr_t buffer;
unsigned long e_offset;
int rc;
/* Do nothing for non-PT_LOAD segments */
if ( phdr->p_type != PT_LOAD )
return 0;
/* Check segment lies within image */
if ( ( phdr->p_offset + phdr->p_file... | false | false | false | false | false | 0 |
cmd_away (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{
char *reason = word_eol[2];
if (!(*reason))
{
if (sess->server->is_away)
{
if (sess->server->last_away_reason)
PrintTextf (sess, _("Already marked away: %s\n"), sess->server->last_away_reason);
return FALSE;
}
if (sess-... | false | false | false | false | false | 0 |
set_up_ar_fcast_variance (const MODEL *pmod, int pmax, int npsi,
double **pphi, double **ppsi,
double **perrphi)
{
double *errphi = NULL;
double *psi = NULL;
double *phi = NULL;
int err = 0;
errphi = make_phi_from_arinfo(pmod->arinfo, pmax);
psi = malloc(npsi * sizeof *psi);
... | false | false | false | false | false | 0 |
Oct6100ApiGetTsstSwSizes(
OUT tPOCT6100_API_INSTANCE_SIZES f_pInstSizes )
{
UINT32 ulTempVar;
UINT32 ulResult;
/* Determine amount of TSST needed for TSST allocation table. */
f_pInstSizes->ulTsstAlloc = 4096 / 8;
/* Calculate the API memory required for the TSST entry list. */
f_pInstSizes->ulTsstEntryLis... | false | false | false | false | false | 0 |
c2_cq_get(struct c2_dev *c2dev, int cqn)
{
struct c2_cq *cq;
unsigned long flags;
spin_lock_irqsave(&c2dev->lock, flags);
cq = c2dev->qptr_array[cqn];
if (!cq) {
spin_unlock_irqrestore(&c2dev->lock, flags);
return NULL;
}
atomic_inc(&cq->refcount);
spin_unlock_irqrestore(&c2dev->lock, flags);
return cq;
} | false | false | false | false | false | 0 |
start_gc_thread(struct f2fs_sb_info *sbi)
{
struct f2fs_gc_kthread *gc_th;
dev_t dev = sbi->sb->s_bdev->bd_dev;
int err = 0;
gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL);
if (!gc_th) {
err = -ENOMEM;
goto out;
}
gc_th->min_sleep_time = DEF_GC_THREAD_MIN_SLEEP_TIME;
gc_th->max_sleep_time = D... | false | false | false | false | false | 0 |
validIdentifier(String *s) {
char *c = Char(s);
while (*c) {
if (!(isalnum(*c) || (*c == '_') || (*c == '?') || (*c == '!') || (*c == '=')))
return 0;
c++;
}
return 1;
} | false | false | false | false | false | 0 |
vmw_overlay_update_stream(struct vmw_private *dev_priv,
struct vmw_dma_buffer *buf,
struct drm_vmw_control_stream_arg *arg,
bool interruptible)
{
struct vmw_overlay *overlay = dev_priv->overlay_priv;
struct vmw_stream *stream = &overlay->stream[arg->stream_id];
int ret = 0;
if (!buf)
r... | false | false | false | false | false | 0 |
jadge_upper_bpi(List *bpi_list)
{
List *li;
Block_peel_info *bpi1 = bpi_list->data;
Block_peel_info *bpi2 = bpi_list->next->data;
Block_peel_info *shorter = NULL;
shorter = shorter_bpi_upper(bpi1, bpi2);
for(li = bpi_list->next->next; li != NULL; li = li->next){
bpi1 = li->data;
... | false | false | false | false | false | 0 |
gog_rt_series_element_init_style (GogStyledObject *gso, GOStyle *style)
{
GogSeries const *series = GOG_SERIES (GOG_OBJECT (gso)->parent);
GOStyle *parent_style;
g_return_if_fail (series != NULL);
parent_style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
if (parent_style->interesting_fields & GO_STY... | false | false | false | false | false | 0 |
debug_kernel_version(char *namelist)
{
FILE *pipe;
int argc;
char buf[BUFSIZE];
char command[BUFSIZE];
char *arglist[MAXARGS];
if (debug_kernel_version_string)
return debug_kernel_version_string;
sprintf(command, "/usr/bin/strings %s", namelist);
if ((pipe = popen(command, "r")) == NULL) {
... | false | false | false | false | false | 0 |
context_alloc(jk_context_t **c, char *virt)
{
if (c)
return context_open(*c =
(jk_context_t *)calloc(1, sizeof(jk_context_t)),
virt);
return JK_FALSE;
} | false | false | false | false | false | 0 |
add_sats(GString *string)
{
unsigned i, count;
if (satellite_satellitec == 0) {
g_string_append(string, ",Y=?");
return;
}
g_string_append(string, ",Y=-");
if (time_seconds <= 0) {
g_string_append(string, " ? ");
} else {
g_string_append_printf(string, " %d.000 ", time_seconds);
}
count = MIN(satell... | false | false | false | false | false | 0 |
remove_leading_spaces(char *s)
{
char *t;
fc_assert_ret(NULL != s);
t = skip_leading_spaces(s);
if (t != s) {
while (*t != '\0') {
*s++ = *t++;
}
*s = '\0';
}
} | false | false | false | false | false | 0 |
caps_are_rtp_caps (const GstCaps * caps, const gchar * media, gchar ** format)
{
const GstStructure *s;
const gchar *str;
g_assert (media != NULL && format != NULL);
s = gst_caps_get_structure (caps, 0);
if (!gst_structure_has_name (s, "application/x-rtp"))
return FALSE;
if (!gst_structure_has_field_t... | false | false | false | false | false | 0 |
gitno_buffer_setup(gitno_socket *socket, gitno_buffer *buf, char *data, size_t len)
{
#ifdef GIT_SSL
if (socket->ssl.ctx) {
gitno_buffer_setup_callback(socket, buf, data, len, gitno__recv_ssl, NULL);
return;
}
#endif
gitno_buffer_setup_callback(socket, buf, data, len, gitno__recv, NULL);
} | false | false | false | false | false | 0 |
sge_daemonize(int *keep_open, unsigned long nr_of_fds, sge_gdi_ctx_class_t *ctx)
{
#if !(defined(__hpux) || defined(CRAY) || defined(WIN32) || defined(SINIX) || defined(INTERIX))
int fd;
#endif
#if defined(__sgi) || defined(ALPHA) || defined(HP1164)
# if defined(ALPHA)
extern int getdomainname(char *, int);
#... | false | false | false | false | false | 0 |
combo_box_set_active_text (GtkComboBox *combo,
const gchar *text,
gulong handler_id)
{
GtkTreeModel *model;
GtkTreeIter iter;
gboolean iter_valid;
gboolean next;
gchar *value;
gulong prelight_handler_id;
model = gtk_combo_box_get_model (combo);
next = gtk_tree_model_get_iter_f... | false | false | false | false | false | 0 |
goa_realm_object_skeleton_set_property (GObject *gobject,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GoaRealmObjectSkeleton *object = GOA_REALM_OBJECT_SKELETON (gobject);
GDBusInterfaceSkeleton *interface;
switch (prop_id)
{
case 1:
interface = g_value_get_object ... | false | false | false | false | false | 0 |
BuildToolBar(wxToolBar* toolBar)
{
if (!IsAttached() || !toolBar)
return false;
m_pTbar = toolBar;
wxString my_16x16 = Manager::isToolBar16x16(toolBar) ? _T("_16x16") : _T("");
Manager::Get()->AddonToolBar(toolBar,_T("compiler_toolbar")+my_16x16);
m_pToolTarget = XRCCTRL(*toolBar, "idToolTa... | false | false | false | false | false | 0 |
iowlcd_display_on_off(PrivateData *p, int display, int cursor, int blink)
{
unsigned char lcd_cmd[64] = { 0x05, 1, 0x08, 0, 0, 0, 0, 0 };
if (display) lcd_cmd[2] |= 0x04;
if (cursor) lcd_cmd[2] |= 0x02;
if (blink) lcd_cmd[2] |= 0x01;
return iow_lcd_wcmd(p->udh, IOWLCD_SIZE, lcd_cmd);
} | false | false | false | false | false | 0 |
virt_efi_get_wakeup_time(efi_bool_t *enabled,
efi_bool_t *pending,
efi_time_t *tm)
{
unsigned long flags;
efi_status_t status;
spin_lock_irqsave(&rtc_lock, flags);
spin_lock(&efi_runtime_lock);
status = efi_call_virt(get_wakeup_time, enabled, pending, tm);
spin_unlock(&efi_runtime_lock);
spi... | false | false | false | false | false | 0 |
float4_to_char(PG_FUNCTION_ARGS)
{
float4 value = PG_GETARG_FLOAT4(0);
text *fmt = PG_GETARG_TEXT_P(1);
NUMDesc Num;
FormatNode *format;
text *result;
bool shouldFree;
int out_pre_spaces = 0,
sign = 0;
char *numstr,
*orgnum,
*p;
NUM_TOCHAR_prepare;
if (IS_ROMAN(&Num))
numstr ... | false | false | false | false | false | 0 |
stop_streaming(struct vb2_queue *q)
{
struct cx8800_dev *dev = q->drv_priv;
struct cx88_core *core = dev->core;
struct cx88_dmaqueue *dmaq = &dev->vbiq;
unsigned long flags;
cx_clear(MO_VID_DMACNTRL, 0x11);
cx_clear(VID_CAPTURE_CONTROL, 0x06);
cx8800_stop_vbi_dma(dev);
spin_lock_irqsave(&dev->slock, flags);
w... | false | false | false | false | false | 0 |
gwy_data_window_gradient_changed(GtkTreeSelection *selection,
GwyDataWindow *data_window)
{
GwyResource *resource;
GtkTreeModel *model;
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
gtk_tree_model_get(model, &iter, 0, &resour... | false | false | false | false | false | 0 |
fimc_is_start_firmware(struct fimc_is *is)
{
struct device *dev = &is->pdev->dev;
int ret;
if (is->fw.f_w == NULL) {
dev_err(dev, "firmware is not loaded\n");
return -EINVAL;
}
memcpy(is->memory.vaddr, is->fw.f_w->data, is->fw.f_w->size);
wmb();
ret = fimc_is_cpu_set_power(is, 1);
if (ret < 0)
return r... | false | false | false | false | false | 0 |
OnChar(wxKeyEvent& event)
{
if (event.GetKeyCode() == WXK_TAB)
return;
#ifdef __WXMAC__
if (event.GetKeyCode() == 'v' && event.GetModifiers() == wxMOD_CMD)
{
Paste();
wxTextCtrl* text = ((wxTextCtrl*)m_text);
text->SetStyle(0, text->GetLastPosition(), GetDefaultTextCtrlStyle(text));
return;
}
#... | false | false | false | false | false | 0 |
line(int x1,int y1,int x2,int y2)
{
if (!line_style) return;
gdk_draw_line(dr,gc,x1,y1,x2,y2);
if (drm) gdk_draw_line(drm,gcm,x1,y1,x2,y2);
} | false | false | false | false | false | 0 |
do_typedef (const char *s, type_p t, struct fileloc *pos)
{
pair_p p;
/* temporary kludge - gengtype doesn't handle conditionals or
macros. Ignore any attempt to typedef CUMULATIVE_ARGS, unless it
is coming from this file (main() sets them up with safe dummy
definitions). */
if (!strcmp (s, "CUM... | false | false | false | false | false | 0 |
gkm_wrap_login_remove_secret (const gchar *first, ...)
{
CK_FUNCTION_LIST_PTR module;
CK_SESSION_HANDLE session;
CK_OBJECT_HANDLE collection;
CK_OBJECT_HANDLE item;
GArray *template;
va_list va;
CK_RV rv;
if (first == NULL)
return;
if (!prepare_module_session_and_collection (&module, &session, &collection)... | false | false | false | false | false | 0 |
getGraphicLayer(size_t idx)
{
OFListIterator(DVPSGraphicLayer *) first = list_.begin();
OFListIterator(DVPSGraphicLayer *) last = list_.end();
while (first != last)
{
if ((idx--) == 0) return *first;
++first;
}
return NULL;
} | false | false | false | false | false | 0 |
rb_init_netio_epoll(void)
{
can_do_event = 0; /* shut up gcc */
can_do_timerfd = 0;
ep_info = rb_malloc(sizeof(struct epoll_info));
ep_info->pfd_size = getdtablesize();
ep_info->ep = epoll_create(ep_info->pfd_size);
if(ep_info->ep < 0)
{
return -1;
}
if(rb_open(ep_info->ep, RB_FD_UNKNOWN, "epoll file descri... | false | false | false | false | false | 0 |
blk_mq_queue_reinit(struct request_queue *q,
const struct cpumask *online_mask)
{
WARN_ON_ONCE(!atomic_read(&q->mq_freeze_depth));
blk_mq_sysfs_unregister(q);
blk_mq_update_queue_map(q->mq_map, q->nr_hw_queues, online_mask);
/*
* redo blk_mq_init_cpu_queues and blk_mq_init_hw_queues. FIXME: maybe
* we sh... | false | false | false | false | false | 0 |
zor(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
switch (r_type(op)) {
case t_boolean:
check_type(op[-1], t_boolean);
op[-1].value.boolval |= op->value.boolval;
break;
case t_integer:
check_type(op[-1], t_integer);
op[-1].value.intval |= op->v... | false | false | false | false | false | 0 |
scan_extensions_changed(property_t prop)
{
char *s = gnet_prop_get_string(prop, NULL, 0);
parse_extensions(s);
G_FREE_NULL(s);
return FALSE;
} | false | false | false | false | false | 0 |
rtl8169_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct rtl8169_private *tp = netdev_priv(dev);
struct mii_ioctl_data *data = if_mii(ifr);
return netif_running(dev) ? tp->do_ioctl(tp, data, cmd) : -ENODEV;
} | false | false | false | false | false | 0 |
LC4__CLOSURE__index(base0)
register object *base0;
{ register object *base=vs_base;
register object *sup=base+VM4; VC4
vs_check;
{object V17;
object V18;
V17=(base[0]);
V18=(base[1]);
vs_top=sup;{object V19;
base[2]= CMPcar((V17));
base[3]= CMPcar((V18));
vs_top=(vs_base=base+2)+2;
(void) (*Lnk5)();
vs_top=... | false | false | false | false | false | 0 |
remove_unused_temp_slot_addresses_1 (void **slot, void *data ATTRIBUTE_UNUSED)
{
const struct temp_slot_address_entry *t;
t = (const struct temp_slot_address_entry *) *slot;
if (! t->temp_slot->in_use)
*slot = NULL;
return 1;
} | false | false | false | false | false | 0 |
OpVerifyApp(dacport)
u_short dacport;
{
char name[NAME_LEN];
int stat;
/* verify application */
if ((stat = verify_app(dacport, name)) < 0) {
printf("++ DAC. Error : Communication error with DAC.\n");
exit(0);
}
/* process errors */
if (stat) {
printf("** (%s) verified, all components executable.\n"... | false | false | false | false | false | 0 |
gst_audio_cheb_band_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstAudioChebBand *filter = GST_AUDIO_CHEB_BAND (object);
switch (prop_id) {
case PROP_MODE:
g_mutex_lock (&filter->lock);
filter->mode = g_value_get_enum (value);
generate_coeffi... | false | false | false | false | false | 0 |
mouseReleaseEvent( QMouseEvent* event )
{
QLabel::mouseReleaseEvent( event );
d->setLinkColor( d->highlightedLinkColor );
d->timer->start( 300 );
switch ( event->button() ) {
case Qt::LeftButton:
emit leftClickedUrl();
emit leftClickedUrl( d->url );
break;
case Qt::MidButton:
... | false | false | false | false | false | 0 |
clip_trailing_zeros(char *buf)
{
char *c = strstr(buf,".0");
if (c) {
char a, *p = c+2;
boolean doit = TRUE;
boolean space = FALSE;
while ( (a=*p) ) {
if (a == ' ') {
space = TRUE;
break;
}
if (a != '0') {
doit = FALSE;
break;
}
p++;
}
if (doit && p != c) {
// char... | false | false | false | false | false | 0 |
proc_read_hwinfo(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
struct snd_efw *efw = entry->private_data;
unsigned short i;
struct snd_efw_hwinfo *hwinfo;
hwinfo = kmalloc(sizeof(struct snd_efw_hwinfo), GFP_KERNEL);
if (hwinfo == NULL)
return;
if (snd_efw_command_get_hwinfo(efw, hwinfo) < 0)... | false | false | false | false | false | 0 |
Two_Byte (Object format) {
Check_Type (format, T_Symbol);
if (EQ(format, Sym_1byte))
return 0;
else if (EQ(format, Sym_2byte))
return 1;
Primitive_Error ("index format must be '1-byte or '2-byte");
/*NOTREACHED*/
return 0;
} | false | false | false | false | false | 0 |
intel_runtime_pm_put(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = dev_priv->dev;
struct device *device = &dev->pdev->dev;
assert_rpm_wakelock_held(dev_priv);
if (atomic_dec_and_test(&dev_priv->pm.wakeref_count))
atomic_inc(&dev_priv->pm.atomic_seq);
pm_runtime_mark_last_busy(device);
pm_runti... | false | false | false | false | false | 0 |
netio_fifo_insert_pkt(netio_fifo_desc_t *nfd,netio_fifo_pkt_t *p)
{
pthread_mutex_lock(&nfd->lock);
nfd->pkt_count++;
p->next = NULL;
if (nfd->last) {
nfd->last->next = p;
} else {
nfd->head = p;
}
nfd->last = p;
pthread_mutex_unlock(&nfd->lock);
} | false | false | false | false | false | 0 |
messageTextCallback(size_t n,
string text)
{
if (store)
store->store(n, text);
} | false | false | false | false | false | 0 |
expando_winname(SERVER_REC *server, void *item, int *free_ret)
{
if (active_win == NULL)
return "";
return active_win->name;
} | false | false | false | false | false | 0 |
efx_mcdi_set_link(struct efx_nic *efx, u32 capabilities,
u32 flags, u32 loopback_mode,
u32 loopback_speed)
{
MCDI_DECLARE_BUF(inbuf, MC_CMD_SET_LINK_IN_LEN);
int rc;
BUILD_BUG_ON(MC_CMD_SET_LINK_OUT_LEN != 0);
MCDI_SET_DWORD(inbuf, SET_LINK_IN_CAP, capabilities);
MCDI_SET_DWORD(inbuf, SET_LINK_IN... | false | false | false | false | false | 0 |
xpat_field_callback(Widget w,
XtPointer client_data,
XtPointer call_data)
{
if (global.busy)
return;
if (w == search_widgets.wildcard_field)
XtSetKeyboardFocus(search_widgets.shell,
search_widgets.header_field);
else
XtSetKeyboardFocus(search_widgets.shell,
search_widgets.wildcard_fi... | false | false | false | false | false | 0 |
append_str(str_list_t *list, char *str)
{
struct str_list_entry_t *entry;
if (!str) return list;
if (!list)
{
list = xmalloc( sizeof(*list) );
list_init( list );
}
entry = xmalloc( sizeof(*entry) );
entry->str = str;
list_add_tail( list, &entry->entry );
return list;... | false | false | false | false | false | 0 |
globus_gram_job_manager_add_reference(
globus_gram_job_manager_t * manager,
const char * key,
const char * reason,
globus_gram_jobmanager_request_t ** requestp)
{
int rc = GLOBUS_SUCCESS;
globus_result_t ... | false | false | false | false | false | 0 |
db_set_verb_arg_specs(db_verb_handle vh,
db_arg_spec dobj, db_prep_spec prep, db_arg_spec iobj)
{
handle *h = (handle *) vh.ptr;
db_priv_affected_callable_verb_lookup();
if (h) {
h->verbdef->perms = ((h->verbdef->perms & PERMMASK)
| (dobj << DOBJSHIFT)
| (iobj << IOBJSHIFT));
h->ver... | false | false | false | false | false | 0 |
make_recv_info_in_out_mt(Block *mt_block)
{
Quadruple *quad;
Var_table *v_tbl;
Nt_elem *elem, *add_elem;
Nt_set *set;
int i, list_num;
set = alloc_nt_set();
if(mt_block->kind == DOALL
|| mt_block->kind == LOOP
|| mt_block->kind == DOSUM
|| mt_block->kind == DOACR)
{... | false | false | false | false | false | 0 |
valueCallback(void *action,
const SbVec3f &point,
const SbVec3f &normal)
//
////////////////////////////////////////////////////////////////////////
{
SoAction *a = (SoAction *)action;
//
// See the glTexGen() man page for the math here.
//
// First, map normal and point into eye space:
... | false | false | false | false | false | 0 |
_e_fm2_client_unmount(const char *udi)
{
char *d;
int l, l1;
if (!udi)
return 0;
l1 = strlen(udi);
l = l1 + 1;
d = alloca(l);
strcpy(d, udi);
_e_fm2_client_get();
return _e_fm_client_send_new(E_FM_OP_UNMOUNT, (void *)d, l);
} | false | true | false | false | false | 1 |
vcc_ParseDirector(struct vcc *tl)
{
struct token *t_first;
struct dirlist const *dl;
int isfirst;
t_first = tl->t;
vcc_NextToken(tl); /* ID: director | backend */
vcc_ExpectCid(tl); /* ID: name */
ERRCHK(tl);
tl->t_dir = tl->t;
vcc_NextToken(tl);
isfirst = tl->ndirector;
if (vcc_IdIs(t_first, "backend"... | false | false | false | false | false | 0 |
parse_time_err(const char *text, unsigned *ret, unsigned unit_flags)
{
unsigned imult, idiv;
unsigned omult, odiv;
unsigned value;
omult = odiv = 1;
switch (unit_flags & TIME_UNIT_MASK) {
case TIME_UNIT_US: omult = 1000000; break;
case TIME_UNIT_MS: omult = 1000; break;
case TIME_UNIT_S: break;
case T... | false | false | false | false | false | 0 |
io_cntl(fd, cmd, narg, io_p)
int fd, cmd, io_p;
long narg;
{
int retval;
#ifdef HAVE_FCNTL
TRAP_BEG;
# if defined(__CYGWIN__)
retval = io_p?ioctl(fd, cmd, (void*)narg):fcntl(fd, cmd, narg);
# else
retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg);
# endif
TRAP_END;
#else
if (!io_p... | false | false | false | false | false | 0 |
cpl_image_reject(cpl_image * im,
cpl_size x,
cpl_size y)
{
cpl_binary * pbpm;
/* Test entries */
cpl_ensure_code(im != NULL, CPL_ERROR_NULL_INPUT);
cpl_ensure_code(x >= 1, CPL_ERROR_ACCESS_OUT_OF_RANGE);
cpl_ensure_code(... | false | false | false | false | false | 0 |
bh1750_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{
int ret, tmp;
struct bh1750_data *data = iio_priv(indio_dev);
const struct bh1750_chip_info *chip_info = data->chip_info;
switch (mask) {
case IIO_CHAN_INFO_RAW:
switch (chan->type) {
cas... | false | false | false | false | false | 0 |
xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr)
{
xmlNodePtr children;
children = attr->children;
while (children != NULL) {
switch (children->type) {
case XML_TEXT_NODE:
xmlAttrSerializeTxtContent(buf->buffer, attr->doc,
... | false | false | false | false | false | 0 |
gst_mve_video_palette (GstMveDemux * mve, const guint8 * data, guint16 len)
{
GstBuffer *buf;
guint16 start, count;
const guint8 *pal;
guint32 *pal_ptr;
gint i;
GST_DEBUG_OBJECT (mve, "video palette");
if (mve->video_stream == NULL) {
GST_ELEMENT_ERROR (mve, STREAM, DECODE, (NULL),
("found p... | false | false | false | false | false | 0 |
full_print( std::ostream &os, const problem_t* problem ) const
{
if( size() == 0 )
os << "[ <empty> ]";
else
{
os << "[";
for( size_t i = 0; i < size(); ++i )
{
const Atom *at = problem_t::atom_inv_hash_get(atom( i ));
os << atom( i ) << (atom( i )%2?":(not ":":");
problem->print( os, ... | false | false | false | false | false | 0 |
gitg_command_new (GitgRepository *repository,
...)
{
va_list ap;
GitgCommand *ret;
gchar **arguments;
g_return_val_if_fail (repository == NULL || GITG_IS_REPOSITORY (repository), NULL);
va_start (ap, repository);
arguments = collect_arguments (ap);
ret = gitg_command_newv (repository, CONST_... | false | false | false | false | false | 0 |
Curl_raw_equal(const char *first, const char *second)
{
while(*first && *second) {
if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
/* get out of the loop as soon as they don't match */
break;
first++;
second++;
}
/* we do the comparison here (possibly again), just to make sure th... | false | false | false | false | false | 0 |
device_is_managed_by_native_pciehp(struct pci_dev *pdev)
{
u32 reg32;
acpi_handle tmp;
struct acpi_pci_root *root;
/* Check whether the PCIe port supports native PCIe hotplug */
if (pcie_capability_read_dword(pdev, PCI_EXP_SLTCAP, ®32))
return false;
if (!(reg32 & PCI_EXP_SLTCAP_HPC))
return false;
/*
... | false | false | false | false | false | 0 |
execmode(emode)
exec_type emode;
{
bool more, /* used [more] at end of line */
noquit; /* quit flag for :q, :xit, :wq */
exec_type mode;
zotscreen = diddled = FALSE;
noquit = TRUE;
if (lineonly)
println();
mode=emode;
do {
prompt(FALSE,":");
if (levee_getline(instring))
exec(... | false | false | false | false | false | 0 |
destinator_read_poi(void)
{
waypoint* wpt;
int count = 0;
gbfrewind(fin);
while (!(gbfeof(fin))) {
char* str, *hnum;
double ll;
garmin_fs_t* gmsd;
if (count == 0) {
str = read_wcstr(0);
if ((str == NULL) || (strcmp(str, DST_DYN_POI) != 0)) {
fatal(MYNAME "_poi: Invalid rec... | false | false | false | false | false | 0 |
intif_party_changeoption(int party_id, int account_id, int baby_id, int exp, int item)
{
if (inter_fd < 0)
return;
WFIFOW(inter_fd, 0)=0x3023;
WFIFOL(inter_fd, 2)=party_id;
WFIFOL(inter_fd, 6)=account_id;
WFIFOL(inter_fd,10)=baby_id;
WFIFOB(inter_fd,14)=exp;
WFIFOB(inter_fd,15)=item;
WFIFOSET(inter_fd,16);
... | false | false | false | false | false | 0 |
getClassNames()
{
std::list< std::string > ret;
ret.push_back( "Contact" );
ret.push_back( "Event" );
ret.push_back( "Location" );
return ret;
} | false | false | false | false | false | 0 |
arm_vport_context_events_cmd(struct mlx5_core_dev *dev, u16 vport,
u32 events_mask)
{
int in[MLX5_ST_SZ_DW(modify_nic_vport_context_in)];
int out[MLX5_ST_SZ_DW(modify_nic_vport_context_out)];
void *nic_vport_ctx;
int err;
memset(out, 0, sizeof(out));
memset(in, 0, sizeof(in));
MLX5_SET(modify_nic_vport_co... | false | false | false | false | false | 0 |
cib_cleanup_none(int options, xmlNode ** data, xmlNode ** output)
{
CRM_LOG_ASSERT(*data == NULL);
CRM_LOG_ASSERT(*output == NULL);
return pcmk_ok;
} | false | false | false | false | false | 0 |
WriteValue( VSILFILE *fp, int nCode, const char *pszLine )
{
char szLinePair[300];
snprintf(szLinePair, sizeof(szLinePair), "%3d\n%s\n", nCode, pszLine );
size_t nLen = strlen(szLinePair);
if( VSIFWriteL( szLinePair, 1, nLen, fp ) != nLen )
{
CPLError( CE_Failure, CPLE_FileIO,
... | false | false | false | false | false | 0 |
xtensa_secondary_reload (bool in_p, rtx x, reg_class_t rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
int regno;
if (in_p && constantpool_mem_p (x))
{
if (rclass == FP_REGS)
return RL_REGS;
if (mode == QImode)
sri->icode = CODE_FOR_reloadqi_literal;
else if (mode == HImo... | false | false | false | false | false | 0 |
update_reference_bitmap (MonoBitSet **sets, guint32 offset, uintptr_t *bitmap, int numbits)
{
int idx = ACCESS_SPECIAL_STATIC_OFFSET (offset, index);
if (!sets [idx])
sets [idx] = mono_bitset_new (static_data_size [idx] / sizeof (uintptr_t), 0);
MonoBitSet *rb = sets [idx];
offset = ACCESS_SPECIAL_STATIC_OFFSET (... | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.