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 |
|---|---|---|---|---|---|---|
fields_record_expand(struct fields_record *self, char *cursor)
{
char * buffer;
size_t buffer_size;
unsigned i;
size_t offset;
if (!self->expand)
return NULL;
offset = cursor - self->buffer;
buffer_size = self->buffer_size * 2;
buffer = realloc(self->buffer,... | false | false | false | false | false | 0 |
VerifyAbsoluteLink(char *destination,char *source,struct Attributes attr,struct Promise *pp)
{ char absto[CF_BUFSIZE];
char expand[CF_BUFSIZE];
char linkto[CF_BUFSIZE];
Debug("VerifyAbsoluteLink(%s,%s)\n",destination,source);
if (*source == '.')
{
strcpy(linkto,destination);
ChopLastNode(linkto);
A... | false | false | false | false | false | 0 |
panel_fit_number(buf, number, flags, maxlen)
char *buf;
off64_t number;
int flags;
int maxlen;
{
char *str=NULL;
int scaled=(flags & human_autoscale);
str=panel_beautify_number(buf,number,(flags | (GroupDigits ? human_group_digits : 0)));
/* if too big, force autoscale */
if((str == ... | false | false | false | false | false | 0 |
syn_rule_class_state_get_cur(const qpol_iterator_t * iter)
{
syn_rule_class_state_t *srcs = NULL;
const policydb_t *db = NULL;
if (!iter || !(srcs = (syn_rule_class_state_t *) qpol_iterator_state(iter)) ||
!(db = qpol_iterator_policy(iter)) || qpol_iterator_end(iter)) {
errno = EINVAL;
return NULL;
}
re... | false | false | false | false | false | 0 |
setup_rss(struct adapter *adap)
{
int i, j, err;
for_each_port(adap, i) {
const struct port_info *pi = adap2pinfo(adap, i);
/* Fill default values with equal distribution */
for (j = 0; j < pi->rss_size; j++)
pi->rss[j] = j % pi->nqsets;
err = cxgb4_write_rss(pi, pi->rss);
if (err)
return err;
}
... | false | false | false | false | false | 0 |
__isnanl(long double x)
{
int32_t se,hx,lx;
GET_LDOUBLE_WORDS(se,hx,lx,x);
se = (se & 0x7fff) << 1;
/* The additional & 0x7fffffff is required because Intel's
extended format has the normally implicit 1 explicit
present. Sigh! */
lx |= hx & 0x7fffffff;
se |= (u_int32_t)(lx|(-lx))>>31;
se = 0xfffe - se;... | false | false | false | false | false | 0 |
cmd_undo(void)
{
SetDataToEngine( "force\nundo" );
ChangeColor( true );
SetAutoGo( !(flags & MANUAL) );
if (GameCnt >= 0)
UnmakeMove (board.side, &Game[GameCnt].move);
else
printf (_("No moves to undo!\n"));
MoveLimit[board.side]++;
TimeLimit[board.side] += Game[GameCnt+1].et;
if (!(flags & XBOA... | false | false | false | false | false | 0 |
getGpsLeverArm(CmtVector& arm, const CmtDeviceId deviceId)
{
CMT3LOG("L3: getGpsLeverArm %08x\n",deviceId);
CMT3EXITLOG;
DO_DATA_REQUEST(CMT_MID_REQGPSLEVERARM);
arm.m_data[0] = rcv.getDataFloat(0);
arm.m_data[1] = rcv.getDataFloat(4);
arm.m_data[2] = rcv.getDataFloat(8);
return m_lastResult = XRV_OK;
} | false | false | false | false | false | 0 |
clearUi()
{
foreach(QLineEdit *edit, q->findChildren<QLineEdit*>()) {
edit->clear();
}
foreach(QCheckBox *check, q->findChildren<QCheckBox*>()) {
check->setChecked(false);
}
foreach(QAbstractSpinBox *spin, q->findChildren<QAbstractSpinBox*>()) {
... | false | false | false | false | false | 0 |
dtmf_tx_initialise(void)
{
int row;
int col;
if (dtmf_tx_inited)
return;
for (row = 0; row < 4; row++)
{
for (col = 0; col < 4; col++)
{
make_tone_gen_descriptor(&dtmf_digit_tones[row*4 + col],
(int) dtmf_row[row],
... | false | false | false | false | false | 0 |
dav_validate_root(const apr_xml_doc *doc,
const char *tagname)
{
return doc->root &&
doc->root->ns == APR_XML_NS_DAV_ID &&
strcmp(doc->root->name, tagname) == 0;
} | false | false | false | false | false | 0 |
spanNot(const UChar *s, int32_t length) const {
int32_t pos=0, rest=length;
int32_t i, stringsLength=strings.size();
do {
// Span until we find a code point from the set,
// or a code point that starts or ends some string.
i=pSpanNotSet->span(s+pos, rest, USET_SPAN_NOT_CONTAINED);
... | false | false | false | false | false | 0 |
slapi_send_ldap_search_reference(
Slapi_PBlock *pb,
Slapi_Entry *e,
struct berval **references,
LDAPControl **ectrls,
struct berval **v2refs
)
{
SlapReply rs = { REP_SEARCHREF };
int rc;
rs.sr_err = LDAP_SUCCESS;
rs.sr_matched = NULL;
rs.sr_text = NULL;
rc = bvptr2obj( references, &rs.sr_ref, NULL );
i... | false | false | false | false | false | 0 |
ldap_keysort_entries(
LDAP *ld,
LDAPMessage **chain,
void *arg,
LDAP_KEYGEN_CALLBACK *gen,
LDAP_KEYCMP_CALLBACK *cmp,
LDAP_KEYFREE_CALLBACK *fre)
{
int count, i;
keycmp_t kc = {0};
keything_t **kt;
LDAPMessage *e, *last;
if ( NULL == ld || chain == NULL || cmp ==... | false | false | false | false | false | 0 |
tg3_disable_ints(struct tg3 *tp)
{
int i;
tw32(TG3PCI_MISC_HOST_CTRL,
(tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT));
for (i = 0; i < tp->irq_max; i++)
tw32_mailbox_f(tp->napi[i].int_mbox, 0x00000001);
} | false | false | false | false | false | 0 |
duplwild(dst, src)
wild_t *dst;
CONST wild_t *src;
{
memcpy((char *)dst, (char *)src, sizeof(wild_t));
dst -> fixed.s = Xmalloc(src -> fixed.size);
memcpy(dst -> fixed.s, src -> fixed.s, src -> fixed.len + 1);
dst -> path.s = Xmalloc(src -> path.size);
memcpy(dst -> path.s, src -> path.s, src -> path.len + 1);
#i... | false | false | false | false | false | 0 |
set_eraser_values(GPEraserType type, GPEraserSize size)
{
switch(type)
{
case GP_ERASER_TYPE_ROUND:
m_priv->eraser_type = type;
m_priv->draw_eraser = draw_round_eraser;
m_priv->spacing = 2.0;
set_eraser_size(size);
break;
case GP_ERASER_TYPE_RECTANGLE:
m_priv->eraser_type = type;... | false | false | false | false | false | 0 |
FetchStandardParallels( const char *pszGridMappingValue )
{
char szTemp[ MAX_NC_NAME ];
const char *pszValue;
char **papszValues = NULL;
//cf-1.0 tags
strcpy( szTemp,pszGridMappingValue );
strcat( szTemp, "#" );
strcat( szTemp, CF_PP_STD_PARALLEL );
pszValue = CSLFetchN... | false | false | false | false | false | 0 |
btnOkClicked()
{
emit onOkClicked(dirTextBox->text());
accept();
} | false | false | false | false | false | 0 |
PyFFContour_IndexAssign( PyObject *self, Py_ssize_t pos, PyObject *val ) {
PyFF_Contour *cont = (PyFF_Contour *) self;
PyObject *old;
if ( !PyType_IsSubtype(&PyFF_PointType,((PyObject *)val)->ob_type) ) {
PyErr_Format(PyExc_TypeError, "Value must be a (FontForge) Point");
return( -1 );
}
if ( pos<... | false | false | false | false | false | 0 |
lg4573_get_modes(struct drm_panel *panel)
{
struct drm_connector *connector = panel->connector;
struct drm_display_mode *mode;
mode = drm_mode_duplicate(panel->drm, &default_mode);
if (!mode) {
dev_err(panel->drm->dev, "failed to add mode %ux%ux@%u\n",
default_mode.hdisplay, default_mode.vdisplay,
default_... | false | false | false | false | false | 0 |
nm_device_get_state_reason (NMDevice *device, NMDeviceStateReason *reason)
{
g_return_val_if_fail (NM_IS_DEVICE (device), NM_DEVICE_STATE_UNKNOWN);
_nm_object_ensure_inited (NM_OBJECT (device));
if (reason)
*reason = NM_DEVICE_GET_PRIVATE (device)->reason;
return NM_DEVICE_GET_PRIVATE (device)->state;
} | false | false | false | false | false | 0 |
Bitstring_Equal(Object b1, Object b2) {
struct S_Bitstring *a = BITSTRING(b1), *b = BITSTRING(b2);
if (a->len != b->len)
return 0;
return !memcmp(a->data, b->data, bits_to_bytes(a->len));
} | false | false | false | false | false | 0 |
job_stdout_hard_resource(job_handler_t *handler, const char* name, const char* value, double uc, lList **alpp)
{
qstat_stdout_ctx_t *ctx = (qstat_stdout_ctx_t*)handler->ctx;
DENTER(TOP_LAYER, "job_stdout_hard_resource");
if(ctx->hard_resource_count > 0 ) {
printf(" ");
}
... | false | false | false | false | false | 0 |
destroy_table(struct tables *table)
{
struct columns *column;
ast_rwlock_wrlock(&table->lock);
while ((column = AST_LIST_REMOVE_HEAD(&table->columns, list))) {
ast_free(column);
}
ast_rwlock_unlock(&table->lock);
ast_rwlock_destroy(&table->lock);
ast_free(table);
} | false | false | false | false | false | 0 |
_do_get_interface()
{
CORBA::_objref_InterfaceDef* p = _get_interface();
if( p ) return p->_PR_getobj();
// If we get here then we assume that _get_interface has not
// been overriden, and provide the default implementation.
const char* repoId = 0;
omniCurrent* current = omniCurrent::get();
if (curren... | false | false | false | false | false | 0 |
settings_notify_cb (GObject *object,
GParamSpec *pspec,
NautilusPathBar *path_bar)
{
const char *name;
name = g_param_spec_get_name (pspec);
if (! strcmp (name, "gtk-icon-theme-name") || ! strcmp (name, "gtk-icon-sizes")) {
reload_icons (path_bar);
}
} | false | false | false | false | false | 0 |
acpi_os_execute(acpi_execute_type type,
acpi_osd_exec_callback function, void *context)
{
acpi_status status = AE_OK;
struct acpi_os_dpc *dpc;
struct workqueue_struct *queue;
int ret;
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
"Scheduling function [%p(%p)] for deferred execution.\n",
function, context));
/... | false | false | false | false | false | 0 |
OTF_KeyValueList_clone(OTF_KeyValueList* list) {
OTF_KeyValueList *new_list;
new_list = OTF_KeyValueList_new();
if ( new_list == NULL || list == NULL ) {
return new_list;
}
OTF_KeyValueList_appendKeyValueList( new_list, list );
return new_list;
} | false | false | false | false | false | 0 |
determineInterpreter (const char* const cmd)
{
vString* const interpreter = vStringNew ();
const char* p = cmd;
do
{
vStringClear (interpreter);
for ( ; isspace ((int) *p) ; ++p)
; /* no-op */
for ( ; *p != '\0' && ! isspace ((int) *p) ; ++p)
vStringPut (interpreter, (int) *p);
vStringTermina... | false | false | false | false | false | 0 |
bws_uniform_allocation(bsched_bws_t bws, bool uniform)
{
bsched_t *bs;
bool was_uniform;
bs = bsched_get(bws);
was_uniform = booleanize(bs->flags & BS_F_UNIFORM_BW);
if (uniform)
bs->flags |= BS_F_UNIFORM_BW;
else
bs->flags &= ~BS_F_UNIFORM_BW;
return was_uniform;
} | false | false | false | false | false | 0 |
knh_write_utf8(CTX ctx, kOutputStream *w, kbytes_t t, int hasUTF8)
{
if(hasUTF8 && w->encNULL != NULL) {
io2_writeMultiByteChar(ctx, w->io2, t.text, t.len, w->encNULL);
}
else {
io2_write(ctx, w->io2, t.text, t.len);
}
} | false | false | false | false | false | 0 |
do_plaintext( IOBUF out, int ctb, PKT_plaintext *pt )
{
int i, rc = 0;
u32 n;
byte buf[1000]; /* this buffer has the plaintext! */
int nbytes;
write_header(out, ctb, calc_plaintext( pt ) );
iobuf_put(out, pt->mode );
iobuf_put(out, pt->namelen );
for(i=0; i < pt->namelen; i++ )
iobuf_p... | false | false | false | false | true | 1 |
UTF16LEToUTF8(unsigned char* out, int outlen, const unsigned char* inb, int inlenb)
{
unsigned char* outstart = out;
const unsigned char* processed = inb;
unsigned char* outend = out + outlen;
unsigned short* in = (unsigned short*) inb;
unsigned short* inend;
unsigned int c, d, inlen;
unsign... | false | false | false | false | false | 0 |
SUBR_rnd(ushort code)
{
double min = 0.0, max = 1.0;
SUBR_ENTER();
if (NPARAM >= 1)
{
VALUE_conv_float(&PARAM[0]);
max = PARAM->_float.value;
}
if (NPARAM == 2)
{
min = max;
VALUE_conv_float(&PARAM[1]);
max = PARAM[1]._float.value;
}
RETURN->type = T_FLOAT;
RETURN->_float.val... | false | false | false | false | false | 0 |
eqphone_helper (const gchar *ps1,
const gchar *ps2,
const gchar *region,
EPhoneNumberMatch required_match)
{
const EPhoneNumberMatch actual_match =
e_phone_number_compare_strings_with_region (
ps1, ps2, region, NULL);
return actual_match >= E_PHONE_NUMBER_MATCH_EX... | false | false | false | false | false | 0 |
http_GET(struct wgetfile *finfo)
{
extern struct cfg global_cfg;
FILE *f;
long pos;
int nheaders;
char **headers;
char *get_req;
int hdidx;
nheaders = 16;
headers = malloc(nheaders * sizeof(char *));
if(!headers){
output_perror("malloc()");
return 1;
}
if(global_cfg.http_proxy){
get_req = xstrprint... | false | true | false | false | true | 1 |
do_user_quota(struct sync_name_list *master_quotaroots,
struct sync_quota_list *replica_quota)
{
int r;
struct sync_name *mitem;
struct sync_quota *rquota;
struct quota q;
/* set any new or changed quotas */
for (mitem = master_quotaroots->head; mitem; mitem = mitem->next) {
rquota = sync_... | false | false | false | false | false | 0 |
start_complete_test (CutStreamParserPrivate *priv, GMarkupParseContext *context,
const gchar *element_name, GError **error)
{
if (g_str_equal("test", element_name)) {
PUSH_STATE(priv, IN_TEST);
priv->complete_test->test = cut_test_new_empty();
PUSH_TEST(priv, priv->compl... | false | false | false | false | false | 0 |
Refresh(void)
{
if ( gui_active )
{
gui_active = false;
GetSelectedFramesForFX().Repaint();
gui_active = true;
}
} | false | false | false | false | false | 0 |
nfs3_free_readdirp3res (readdirp3res *res)
{
entryp3 *ent = NULL;
entryp3 *next = NULL;
if (!res)
return;
ent = res->readdirp3res_u.resok.reply.entries;
while (ent) {
next = ent->nextentry;
GF_FREE (ent->name);
GF... | false | false | false | false | false | 0 |
qib_update_sdma_dca(struct qib_pportdata *ppd, int cpu)
{
struct qib_devdata *dd = ppd->dd;
struct qib_chip_specific *cspec = dd->cspec;
unsigned pidx = ppd->port - 1;
if (!(dd->flags & QIB_DCA_ENABLED))
return;
if (cspec->sdma_cpu[pidx] != cpu) {
cspec->sdma_cpu[pidx] = cpu;
cspec->dca_rcvhdr_ctrl[4] &= ~(... | false | false | false | false | false | 0 |
imon_remote_key_lookup(struct imon_context *ictx, u32 scancode)
{
u32 keycode;
u32 release;
bool is_release_code = false;
/* Look for the initial press of a button */
keycode = rc_g_keycode_from_table(ictx->rdev, scancode);
ictx->rc_toggle = 0x0;
ictx->rc_scancode = scancode;
/* Look for the release of a butt... | false | false | false | false | false | 0 |
my_load_jump_back_helper(unsigned long kexec_flags, void *entry)
{
int result;
if (kexec_loaded()) {
fprintf(stderr, "There is kexec kernel loaded, make sure "
"you are in kexeced kernel.\n");
return -1;
}
if (!entry) {
fprintf(stderr, "Please specify jump back entry "
"in command line\n");
return -1... | false | false | false | false | false | 0 |
print_to(const std::string& filename, const format& fmt)
{
const char* fn(filename.c_str());
std::ofstream output(fn);
if (!output)
{
epix_warning("Cannot open file " + filename);
return;
}
// else
the_page.clear();
the_page.paste(the_canvas);
const pair offset(the_hoffset... | false | false | false | false | false | 0 |
ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw)
{
u32 autoc2_reg;
u16 ee_ctrl_2 = 0;
hw->eeprom.ops.read(hw, IXGBE_EEPROM_CTRL_2, &ee_ctrl_2);
if (!ixgbe_mng_present(hw) && !hw->wol_enabled &&
ee_ctrl_2 & IXGBE_EEPROM_CCD_BIT) {
autoc2_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
autoc2_reg |= IXGBE_AUTO... | false | false | false | false | false | 0 |
_plugin_next(Tab_View *v)
{
Eina_List *l;
Evry_Plugin *p = NULL;
const Evry_State *s = v->state;
if (!s->plugin) return;
l = eina_list_data_find_list(s->cur_plugins, s->plugin);
if (l && l->next)
p = l->next->data;
else if (s->plugin != s->cur_plugins->data)
p = s->cur_plugins->data;
... | false | false | false | false | false | 0 |
GenerateInterfaceProperties(cmTarget *target,
std::ostream& os,
const ImportPropertyMap &properties)
{
if (!properties.empty())
{
std::string targetName = this->Namespace;
targetName += target->GetExportName();
os << "set_... | false | false | false | false | false | 0 |
setup_pattern_button (GdkScreen *screen,
GtkBuilder *gui,
char const *const name,
PatternPicker *picker,
gboolean const flag,
int const index,
int const select_index,
unsigned size)
{
GtkWidget *tmp = go_gtk_builder_get_widget (gui, name);
if (tmp != NULL) {
... | false | false | false | false | false | 0 |
jffs2_flash_setup(struct jffs2_sb_info *c) {
int ret = 0;
if (jffs2_cleanmarker_oob(c)) {
/* NAND flash... do setup accordingly */
ret = jffs2_nand_flash_setup(c);
if (ret)
return ret;
}
/* and Dataflash */
if (jffs2_dataflash(c)) {
ret = jffs2_dataflash_setup(c);
if (ret)
return ret;
}
/* and... | false | false | false | false | false | 0 |
rv3029c2_i2c_read_alarm(struct i2c_client *client, struct rtc_wkalrm *alarm)
{
struct rtc_time *const tm = &alarm->time;
int ret;
u8 regs[8];
ret = rv3029c2_i2c_get_sr(client, regs);
if (ret < 0) {
dev_err(&client->dev, "%s: reading SR failed\n", __func__);
return -EIO;
}
ret = rv3029c2_i2c_read_regs(clien... | false | false | false | false | false | 0 |
endPthreadJoin(pthread_t thread)
{
_do_lock_tbl();
if (_pthreadJoinId.find(thread) != _pthreadJoinId.end() &&
pthread_equal(_pthreadJoinId[thread], pthread_self())) {
_pthreadJoinId.erase(thread);
}
_do_unlock_tbl();
} | false | false | false | false | false | 0 |
isMounted() const {
const QString dev = device->currentText();
return !dev.isEmpty() && KMountPoint::currentMountPoints().findByDevice(dev);
} | false | false | false | false | false | 0 |
save_cwd (struct saved_cwd *cwd)
{
cwd->name = NULL;
cwd->desc = fd_safer (open (".", O_RDONLY));
if (cwd->desc < 0)
{
cwd->desc = fd_safer (open (".", O_WRONLY));
if (cwd->desc < 0)
{
cwd->name = xgetcwd ();
return cwd->name ? 0 : -1;
}
}
return 0;
} | false | false | false | false | false | 0 |
dictiter_iternextitem(dictiterobject *di)
{
PyObject *key, *value, *result = di->di_result;
register Py_ssize_t i, mask, offset;
PyDictObject *d = di->di_dict;
PyObject **value_ptr;
if (d == NULL)
return NULL;
assert (PyDict_Check(d));
if (di->di_used != d->ma_used) {
PyErr... | false | false | false | false | true | 1 |
__ecereMethod___ecereNameSpace__ecere__gfx__Surface_WriteTextDotsf(struct __ecereNameSpace__ecere__com__Instance * this, int alignment, int x, int y, int width, char * format, ...)
{
struct __ecereNameSpace__ecere__gfx__Surface * __ecerePointer___ecereNameSpace__ecere__gfx__Surface = (struct __ecereNameSpace__ecere__gf... | true | true | false | false | true | 1 |
processDialogCdi0(void)
{
D(bug("disk: dialog create disk image, step 1"));
int retval = Dialog::GUI_CONTINUE;
state = STATE_MAIN;
if (dlgAlert && dlgAlert->pressedOk()) {
if (File_Exists(cdi_path)) {
dlgAlert = (DlgAlert *) DlgAlertOpen("File Exists. Overwrite?", ALERT_OKCANCEL);
SDLGui_Open(dlgAlert);
... | false | false | false | false | false | 0 |
dcc_chat_row_cb (GtkTreeSelection *sel, gpointer user_data)
{
struct DCC *dcc;
GSList *list;
list = dcc_chat_get_selected ();
if (!list)
{
gtk_widget_set_sensitive (dcccwin.accept_button, FALSE);
gtk_widget_set_sensitive (dcccwin.abort_button, FALSE);
return;
}
gtk_widget_set_sensitive (dcccwin.abort_but... | false | false | false | false | false | 0 |
read_ant_info_record(int *bytes_read = NULL, int *sum = NULL)
{
for (int i = 0; i < 6; i++) {
int device_type = read_bytes(1, bytes_read, sum);
if (device_type < 255) {
QString text = read_text(20, bytes_read, sum);
while(text.endsWith( QChar(0) )) te... | false | false | false | false | false | 0 |
getnamlen(size, fat, boundary, dirsize, ofs)
int size, fat, boundary, dirsize, ofs;
{
if (fat == FAT_NONE) {
size -= dirsize;
size = (size & ~(boundary - 1)) - 1 - ofs;
if (size > MAXNAMLEN) size = MAXNAMLEN;
}
else if (size <= DOSDIRENT) size = DOSBODYLEN;
else {
size -= DOSDIRENT;
size = (size / DOSDIRE... | false | false | false | false | false | 0 |
cmd_undump(char *tag, char *name)
{
int r = 0;
char mailboxname[MAX_MAILBOX_BUFFER];
char *acl;
/* administrators only please */
if (!imapd_userisadmin) {
r = IMAP_PERMISSION_DENIED;
}
if (!r) {
r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
imapd_userid, ma... | true | true | true | false | false | 1 |
write_int64(uint64_t val)
{
#ifdef DEBUG_MORE
printf("%ld : l %llu 0x%llX\n", get_pos(), val, val);
#endif
if (UNLIKELY(_swap))
SWAP_int64((int64_t *)&val);
if (UNLIKELY(_pbuffer >= _mbuffer))
flush_buffer();
*((uint64_t *)_pbuffer) = val;
_pbuffer += sizeof(val);
_pos += sizeof(val);
} | false | false | false | false | false | 0 |
fs_rtp_bitrate_adapter_get_suggested_caps (FsRtpBitrateAdapter *self)
{
GstCaps *allowed_caps;
GstCaps *wanted_caps;
GstCaps *caps = NULL;
GST_OBJECT_LOCK (self);
if (self->caps)
caps = gst_caps_ref (self->caps);
GST_OBJECT_UNLOCK (self);
if (!caps)
return NULL;
allowed_caps = gst_pad_get_all... | false | false | false | false | false | 0 |
mailmime_encoding_parse(const char * message, size_t length,
size_t * indx, int * result)
{
size_t cur_token;
int encoding;
cur_token = * indx;
if (cur_token >= length)
return MAILIMF_ERROR_PARSE;
switch ((char) toupper((unsigned char) message[cur_token])) {
case 'Q':
encoding = MAILMIME_E... | false | false | false | false | false | 0 |
OP_TST_LSR_IMM(armcpu_t *cpu)
{
u32 i = cpu->instruction;
S_LSR_IMM;
OP_TST(1);
} | false | false | false | false | false | 0 |
__blob_vrfy(env, blob_id, blob_size, file_id, sdb_id, pgno, flags)
ENV *env;
uintmax_t blob_id;
off_t blob_size;
uintmax_t file_id;
uintmax_t sdb_id;
db_pgno_t pgno;
u_int32_t flags;
{
DB_FH *fhp;
char *blob_sub_dir, *dir, *path;
int isdir, ret, t_ret;
off_t actual_size;
u_int32_t mbytes, bytes;
blob_sub_... | false | false | false | false | false | 0 |
group_handle_motion( Group *group, int x, int y )
{
int i;
if ( !group->frame->img->bkgnd->hide )
if ( x >= group->frame->img->bkgnd->surf_rect.x && y >= group->frame->img->bkgnd->surf_rect.y )
if ( x < group->frame->img->bkgnd->surf_rect.x + group->frame->img->bkgnd->surf_rect.w )
if ( y < group->f... | false | false | false | false | false | 0 |
poppler_page_get_image_output_dev (PopplerPage *page,
GBool (*imgDrawDeviceCbk)(int img_id, void *data),
void *imgDrawCbkData)
{
CairoImageOutputDev *image_dev;
Gfx *gfx;
image_dev = new CairoImageOutputDev ();
if (imgDrawDeviceCbk) {
image_dev->setImageDrawDecideCbk (imgDrawDeviceCbk,
... | false | false | false | false | false | 0 |
sge_do_priority(lList *running_jobs, lList *pending_jobs)
{
lListElem *jep;
const double min_priority = 0;
const double max_priority = 2048;
double priority;
for_each(jep, running_jobs) {
priority = (double)lGetUlong(jep, JB_priority);
lSetDouble(jep, JB_nppri, sge_normalize_value(priority, ... | false | false | false | false | false | 0 |
xgene_enet_free_desc_rings(struct xgene_enet_pdata *pdata)
{
struct device *dev = &pdata->pdev->dev;
struct xgene_enet_desc_ring *ring;
int i;
for (i = 0; i < pdata->txq_cnt; i++) {
ring = pdata->tx_ring[i];
if (ring) {
if (ring->cp_ring && ring->cp_ring->cp_skb)
devm_kfree(dev, ring->cp_ring->cp_skb);
... | false | false | false | false | false | 0 |
pr_pixbuf_size_sync(PixbufRenderer *pr)
{
pr->stereo_pixbuf_offset_left = 0;
pr->stereo_pixbuf_offset_right = 0;
if (!pr->pixbuf) return;
switch (pr->orientation)
{
case EXIF_ORIENTATION_LEFT_TOP:
case EXIF_ORIENTATION_RIGHT_TOP:
case EXIF_ORIENTATION_RIGHT_BOTTOM:
case EXIF_ORIENTATION_LEFT_BOTTOM:
pr... | false | false | false | false | false | 0 |
frame_warp_icon_update( int ms )
{
//printf( "%i > %i\n", game->bricks_left, game->warp_limit );
if ( game->game_type != GT_LOCAL ) return;
if ( game->level_type == LT_PINGPONG ) return;
if ( game->bricks_left > game->warp_limit ) return;
if ( warp_blinks == 0 ) {
warp_blink = 1;
return;
}
if ( delay_... | false | false | false | false | false | 0 |
intel_hsw_transaction(struct pebs_record_skl *pebs)
{
u64 txn = (pebs->tsx_tuning & PEBS_HSW_TSX_FLAGS) >> 32;
/* For RTM XABORTs also log the abort code from AX */
if ((txn & PERF_TXN_TRANSACTION) && (pebs->ax & 1))
txn |= ((pebs->ax >> 24) & 0xff) << PERF_TXN_ABORT_SHIFT;
return txn;
} | false | false | false | false | false | 0 |
glusterd_send_log_rotate_signal (pid_t pid, char *logfile1, char *logfile2)
{
int ret = 0;
struct stat stbuf = {0,};
char rlogfile[PATH_MAX] = {0,};
time_t rottime = 0;
ret = glusterd_send_sigstop (-pid);
rottime = time (NULL);
snp... | true | true | false | false | true | 1 |
op_loglik (const double *theta, void *ptr)
{
op_container *OC = (op_container *) ptr;
double x, ll = 0.0;
int i, s, t, v;
int err;
if (theta != OC->theta) {
op_get_real_theta(OC, theta);
}
s = 0;
for (t=OC->t1; t<=OC->t2; t++) {
if (na(OC->pmod->uhat[t])) {
continue;
}
x = 0.0... | false | false | false | false | false | 0 |
outstring ARGS1((outmsg),
CONST char *outmsg)
{
if ( quiet_flag || !outmsg ) return;
if ( broken_pipe_flag )
{ broken_pipe_flag = 0; kb_error(1349,"Broken pipe.\n",RECOVERABLE); }
if ( outfd == NULL ) outfd = stdout; /* maybe after error */
if ( logfile_flag && (outfd==stdout) )
fprintf(logfilefd,o... | false | false | false | false | false | 0 |
SameObject(Expression* e1, Expression* e2) {
VariableProxy* v1 = e1->AsVariableProxy();
VariableProxy* v2 = e2->AsVariableProxy();
if (v1 != NULL && v2 != NULL) {
return v1->name()->Equals(*v2->name());
}
Property* p1 = e1->AsProperty();
Property* p2 = e2->AsProperty();
if ((p1 == NULL... | false | false | false | false | false | 0 |
cz_smu_populate_single_scratch_task(
struct pp_smumgr *smumgr,
enum cz_scratch_entry fw_enum,
uint8_t type, bool is_last)
{
uint8_t i;
struct cz_smumgr *cz_smu = (struct cz_smumgr *)smumgr->backend;
struct TOC *toc = (struct TOC *)cz_smu->toc_buffer.kaddr;
struct SMU_Task *task = &toc->tasks[cz_smu->toc_en... | false | false | false | false | false | 0 |
combineInstrProfRecords(InstrProfRecord &Dest,
InstrProfRecord &Source,
uint64_t &MaxFunctionCount) {
// If the number of counters doesn't match we either have bad data
// or a hash collision.
if (Dest.Counts.size() != S... | false | false | false | false | false | 0 |
next_line(struct archive_read *a,
const char **b, ssize_t *avail, ssize_t *ravail, ssize_t *nl)
{
ssize_t len;
int quit;
quit = 0;
if (*avail == 0) {
*nl = 0;
len = 0;
} else
len = get_line_size(*b, *avail, nl);
/*
* Read bytes more while it does not reach the end of line.
*/
while (*nl == 0 && l... | false | false | false | false | false | 0 |
_php_math_round(double value, int places, int mode) {
double f1, f2;
double tmp_value;
int precision_places;
if (!php_math_is_finite(value)) {
return value;
}
precision_places = 14 - php_intlog10abs(value);
f1 = php_intpow10(abs(places));
/* If the decimal precision guaranteed by FP arithmetic is higher ... | false | false | false | false | false | 0 |
expandEnv(const std::string&value, bool bashfilename) {
std::string ret;
/* FIXXME:
* ouch, on linux value has to include "$VARIABLENAME", check whether we need "%VARIABLENAME%" on w32
*/
if(value.empty())
return value;
if(bashfilename) {
char bashBuffer[MAXPDST... | false | false | false | false | false | 0 |
canon_header(Email_message *em, Email_header *header)
{
Email_dkim *dkim;
if ((dkim = em->dkim) == NULL)
return(0);
switch (dkim->canon_alg) {
case CANON_SIMPLE:
case CANON_NONE:
ds_asprintf(dkim->canon_headers, "%s: %s\r\n", header->name, header->value);
break;
case CANON_RELAXED:
/*
* RFC 4871 (3... | false | false | false | false | false | 0 |
set_location_cb (GObject *object,
GAsyncResult *res,
gpointer user_data)
{
FspSession *session = FSP_SESSION (object);
GError *error = NULL;
gboolean result = FALSE;
result = fsp_session_set_loca... | false | true | false | false | true | 1 |
__pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
{
int result = EBUSY;
lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
{
rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
result = 0;
}
lll_unlo... | false | false | false | false | false | 0 |
cg_delete_cgroup_controller_recursive(char *cgroup_name,
char *controller, FILE *target_tasks, int flags,
int delete_root)
{
int ret;
void *handle;
struct cgroup_file_info info;
int level, group_len;
char child_name[FILENAME_MAX];
cgroup_dbg("Recursively removing %s:%s\n", controller, cgroup_name);
ret = c... | true | true | false | false | true | 1 |
invalidate_source(CdlValueSource source)
{
CYG_REPORT_FUNCNAME("CdlValue::invalidate_source");
CYG_REPORT_FUNCARG2XV(this, source);
CYG_PRECONDITION_THISC();
CYG_PRECONDITIONC(CdlValueSource_Default != source);
CYG_PRECONDITIONC((0 <= source) && (source < CdlValue_number_of_sources));
if (CdlVa... | false | false | false | false | false | 0 |
fl_set_top_level_value(value_t *args, u_int32_t nargs)
{
argcount("set-top-level-value!", nargs, 2);
symbol_t *sym = tosymbol(args[0], "set-top-level-value!");
if (!isconstant(sym))
sym->binding = args[1];
return args[1];
} | false | false | false | false | false | 0 |
ini_progress(char *fname){
int fd;
if (fp) { fclose(fp); fp=NULL; }
if (fname) if (fname[0]) {
fd=atoi(fname);
if(fd>255 || fname[((fd>99)?3:((fd>9)?2:1))]) fd=-1; /* be sure */
if (fname[0]=='-' && fname[1]==0) { fp=stdout; }
#ifdef __USE_POSIX
else if (fd>0) { fp=fdopen(fd,"w"); } /* not sure th... | false | false | false | false | true | 1 |
tg3_set_loopback(struct net_device *dev, netdev_features_t features)
{
struct tg3 *tp = netdev_priv(dev);
if (features & NETIF_F_LOOPBACK) {
if (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK)
return;
spin_lock_bh(&tp->lock);
tg3_mac_loopback(tp, true);
netif_carrier_on(tp->dev);
spin_unlock_bh(&tp->lock);
... | false | false | false | false | false | 0 |
usage( char *name, char *extraname )
{
char *usagestr = NULL;
char *extraspace;
if ( extraname == NULL ) {
extraspace = extraname = "";
} else {
extraspace = " ";
}
switch( slapd_exemode ) {
case SLAPD_EXEMODE_DB2LDIF:
usagestr = "usage: %s %s%s-D configdir [-n backend-instance-name] [... | false | false | true | false | true | 1 |
ToHexString(char* buffer, int buffer_size) const {
ASSERT(IsClamped());
// Each bigit must be printable as separate hex-character.
ASSERT(kBigitSize % 4 == 0);
const int kHexCharsPerBigit = kBigitSize / 4;
if (used_digits_ == 0) {
if (buffer_size < 2) return false;
buffer[0] = '0';
buffer[1] = '\... | false | false | false | false | false | 0 |
clutter_actor_meta_finalize (GObject *gobject)
{
ClutterActorMetaPrivate *priv = CLUTTER_ACTOR_META (gobject)->priv;
if (priv->destroy_id != 0 && priv->actor != NULL)
g_signal_handler_disconnect (priv->actor, priv->destroy_id);
g_free (priv->name);
G_OBJECT_CLASS (clutter_actor_meta_parent_class)->finali... | false | false | false | false | false | 0 |
cgit_print_summary()
{
html("<table summary='repository info' class='list nowrap'>");
cgit_print_branches(ctx.cfg.summary_branches);
html("<tr class='nohover'><td colspan='4'> </td></tr>");
cgit_print_tags(ctx.cfg.summary_tags);
if (ctx.cfg.summary_log > 0) {
html("<tr class='nohover'><td colspan='4'> ... | false | false | false | false | false | 0 |
SerializeCompactRDFSchemas ( const XMP_Node & xmpTree,
XMP_VarString & outputStr,
XMP_StringPtr newline,
XMP_StringPtr indentStr,
XMP_Index baseIndent )
{
XMP_Index level;
size_t schema, schemaLim;
// Begin the rdf:Description start tag.
for ( level = baseIndent+2; level > ... | false | false | false | false | false | 0 |
ntlmssp_free_av_pairs(NTLMSSP* ntlmssp)
{
AV_PAIRS *av_pairs = ntlmssp->av_pairs;
if (av_pairs != NULL)
{
if (av_pairs->NbComputerName.value != NULL)
xfree(av_pairs->NbComputerName.value);
if (av_pairs->NbDomainName.value != NULL)
xfree(av_pairs->NbDomainName.value);
if (av_pairs->DnsComputerName.value... | false | false | false | false | false | 0 |
__quota_error(struct super_block *sb, const char *func,
const char *fmt, ...)
{
if (printk_ratelimit()) {
va_list args;
struct va_format vaf;
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
printk(KERN_ERR "Quota error (device %s): %s: %pV\n",
sb->s_id, func, &vaf);
va_end(args);
}... | false | false | false | false | false | 0 |
acpi_button_notify(struct acpi_device *device, u32 event)
{
struct acpi_button *button = acpi_driver_data(device);
struct input_dev *input;
switch (event) {
case ACPI_FIXED_HARDWARE_EVENT:
event = ACPI_BUTTON_NOTIFY_STATUS;
/* fall through */
case ACPI_BUTTON_NOTIFY_STATUS:
input = button->input;
if (butt... | false | false | false | false | false | 0 |
checked_store(Table *table, Symbol *sym)
{
Type type = gettype(table, sym);
int place = check_declared(table, sym);
if (getlevel(table, sym) == 0)
emit3(putstatic, place);
else
{
if (isint(type))
emit2(istore, place);
else if (isfloat(type))
emit2(fstor... | false | false | false | false | false | 0 |
icalcomponent_convert_errors(icalcomponent* component)
{
icalproperty *p, *next_p;
icalcomponent *c;
for(p = icalcomponent_get_first_property(component,ICAL_ANY_PROPERTY);
p != 0;
p = next_p){
next_p = icalcomponent_get_next_property(component,ICAL_ANY_PROPERTY);
if(icalproperty_isa(p) == ICAL_XLICE... | 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.