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 |
|---|---|---|---|---|---|---|
plugin_load_unload (GtkWidget *widget, void *data)
{
char *plugin_name = (char *) data;
int i;
for ( i = 0; i < length_activate_plugin; i++ ) {
if ( !strcmp (plugin_name ? plugin_name : "",
plugin_list[i].plugin_name ? plugin_list[i].plugin_name : "") )
break;
}
if ( strcm... | false | false | false | false | false | 0 |
addedToScene(bool temporary)
{
if (this->scene() && m_viewID == ViewLayer::SchematicView) {
// do not understand why plan setLabel() doesn't work the same as the Mystery Part setChipLabel() in addedToScene()
if (!this->transform().isIdentity()) {
// need to establish correct bounding rect ... | false | false | false | false | false | 0 |
drawFieldHeadings(Window xid_,int cs_,int ce_)
{
V v = (model()!=0)?((AplusModel *)model())->aplusVar():0;
A a = (model()!=0)?((AplusModel *)model())->a():aplus_nl;
if (v!=0 && isNull(a)==MSFalse)
{
int offset=panner()->highlightThickness()+panner()->shadowThickness();
int y=offset;
int x=co... | false | false | false | false | false | 0 |
u16vector_mul(const char *name,
ScmObj d, ScmObj s0, ScmObj s1, int clamp)
{
int i, size = SCM_U16VECTOR_SIZE(d), oor;
long r, v0, v1;
ScmObj rr, vv1;
switch (arg2_check(name, s0, s1, TRUE)) {
case ARGTYPE_UVECTOR:
for (i=0; i<size; i++) {
v0 = (... | false | false | false | false | false | 0 |
type_suffix (tree type)
{
static const char *const suffixes[] = { "", "U", "L", "UL", "LL", "ULL" };
int unsigned_suffix;
int is_long;
if (type == long_long_integer_type_node
|| type == long_long_unsigned_type_node)
is_long = 2;
else if (type == long_integer_type_node
|| type == long_unsigned_t... | false | false | false | false | false | 0 |
X509_PURPOSE_cleanup(void)
{
unsigned int i;
sk_X509_PURPOSE_pop_free(xptable, xptable_free);
for(i = 0; i < X509_PURPOSE_COUNT; i++) xptable_free(xstandard + i);
xptable = NULL;
} | false | false | false | false | false | 0 |
getRelaxedOpcodeArith(unsigned Op) {
switch (Op) {
default:
return Op;
// IMUL
case X86::IMUL16rri8: return X86::IMUL16rri;
case X86::IMUL16rmi8: return X86::IMUL16rmi;
case X86::IMUL32rri8: return X86::IMUL32rri;
case X86::IMUL32rmi8: return X86::IMUL32rmi;
case X86::IMUL64rri8: return X86::IMUL... | false | false | false | false | false | 0 |
pop_lang_context (void)
{
current_lang_name = VARRAY_TOP_TREE (current_lang_base);
VARRAY_POP (current_lang_base);
} | false | false | false | false | false | 0 |
acdAttrValue(const AcdPAcd thys, const char *attrib)
{
AcdPAttr attr;
AjPStr *attrstr;
AcdPAttr defattr;
AjPStr *defstr;
ajint i;
attrstr = thys->AttrStr;
defattr = acdAttrDef;
defstr = thys->DefStr;
if(acdIsQtype(thys))
attr = acdType[thys->Type].Attr;
else
attr = acdKeyw... | false | false | false | false | false | 0 |
done_find_no_password (GnomeKeyringResult res, const gchar* password, gpointer unused)
{
find_no_password_result = res;
g_assert (password == NULL);
egg_test_wait_stop ();
} | false | false | false | false | false | 0 |
posOfChar(int chr, int &x, int &y) const
{
if (!parent())
return false;
parent()->absolutePosition( x, y, false );
int pos;
const InlineTextBox * s = findInlineTextBox( chr, pos );
if ( s ) {
// s is the line containing the character
x += s->m_x; // this is the x of the beg... | false | false | false | false | false | 0 |
book_client_dispose (GObject *object)
{
EBookClientPrivate *priv;
priv = E_BOOK_CLIENT_GET_PRIVATE (object);
if (priv->dbus_proxy_error_handler_id > 0) {
g_signal_handler_disconnect (
priv->dbus_proxy,
priv->dbus_proxy_error_handler_id);
priv->dbus_proxy_error_handler_id = 0;
}
if (priv->dbus_proxy_no... | false | false | false | false | false | 0 |
bufreader_read_line(bufreader_t * self, char **line) {
char c;
apr_size_t i;
apr_status_t status = APR_SUCCESS;
int leave_loop = 0;
*line = NULL;
i = 0;
c = 0;
while (leave_loop == 0 && (status = apr_file_eof(self->fp)) != APR_EOF) {
if (self->i >= self->len) {
if ((status = bufreader_fi... | false | false | false | false | false | 0 |
xps_encode_font_char(fz_font *font, int code)
{
FT_Face face = font->ft_face;
int gid = FT_Get_Char_Index(face, code);
if (gid == 0 && face->charmap && face->charmap->platform_id == 3 && face->charmap->encoding_id == 0)
gid = FT_Get_Char_Index(face, 0xF000 | code);
return gid;
} | false | false | false | false | false | 0 |
oboWriteList(AjPFile outf, const AjPObo obo)
{
if(!outf) return ajFalse;
if(!obo) return ajFalse;
ajWritelineNewline(outf, obo->Fullid);
return ajTrue;
} | false | false | false | false | false | 0 |
adv76xx_fill_format(struct adv76xx_state *state,
struct v4l2_mbus_framefmt *format)
{
memset(format, 0, sizeof(*format));
format->width = state->timings.bt.width;
format->height = state->timings.bt.height;
format->field = V4L2_FIELD_NONE;
format->colorspace = V4L2_COLORSPACE_SRGB;
if (state->timings.bt.flag... | false | false | false | false | false | 0 |
_mouse_wheel_cb(void *data,
Evas *e __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info)
{
Elm_Map_Smart_Data *sd = data;
if (!sd->paused)
{
Evas_Event_Mouse_Wheel *ev = event_info;
_zoom_do(sd, sd->zoom_detail - ((double)ev->z / 10));
... | false | false | false | false | false | 0 |
mutex_destroy(mutex_t *m)
{
bool was_locked;
mutex_check(m);
if (spinlock_hidden_try(&m->lock)) {
g_assert(MUTEX_MAGIC == m->magic);
was_locked = FALSE;
} else if (mutex_is_owned(m)) {
g_assert(MUTEX_MAGIC == m->magic);
was_locked = TRUE;
/*
* If the locking depth is not 1, we may have a problem whe... | false | false | false | false | false | 0 |
flexcop_i2c_write4(struct flexcop_device *fc,
flexcop_ibi_value r100, u8 *buf)
{
flexcop_ibi_value r104;
int len = r100.tw_sm_c_100.total_bytes; /* remember total_bytes is buflen-1 */
r104.raw = 0;
/* there is at least one byte, otherwise we wouldn't be here */
r100.tw_sm_c_100.data1_reg = buf[0];
r104.tw_sm_c... | false | false | false | false | true | 1 |
mutexed_compare_and_swap(void **dest, void *newval, void *oldval) {
umtx_lock(&implMutex);
void *temp = *dest;
if (temp == oldval) {
*dest = newval;
}
umtx_unlock(&implMutex);
return temp;
} | false | false | false | false | false | 0 |
ibus_property_set_state (IBusProperty *prop,
IBusPropState state)
{
g_assert (IBUS_IS_PROPERTY (prop));
g_assert (state == PROP_STATE_UNCHECKED ||
state == PROP_STATE_CHECKED ||
state == PROP_STATE_INCONSISTENT);
prop->priv->state = state;
} | false | false | false | false | false | 0 |
bdisp_ctx_state_is_set(u32 mask, struct bdisp_ctx *ctx)
{
unsigned long flags;
bool ret;
spin_lock_irqsave(&ctx->bdisp_dev->slock, flags);
ret = (ctx->state & mask) == mask;
spin_unlock_irqrestore(&ctx->bdisp_dev->slock, flags);
return ret;
} | false | false | false | false | false | 0 |
Allocate(size_t size, int type) {
// Prevent an integer overflow / crash with large allocation sizes.
// TODO - Note that for a e.g. 64-bit size_t, max_size_t may not actually
// be the maximum value, depending on how the compiler treats ~0. The worst
// practical effect is that allocations are limited ... | false | false | false | false | false | 0 |
process_option_group(struct fuse_opt_context *ctx, const char *opts)
{
int res;
char *copy;
const char *sep = strchr(opts, ',');
if (!sep)
return process_gopt(ctx, opts, 1);
copy = strdup(opts);
if (!copy) {
fprintf(stderr, "fuse: memory allocation failed\n");
return -1;... | false | false | false | false | false | 0 |
randomByte (const uchar limit)
{
if (! playback) {
uchar value = randomGen->getLong ((unsigned long) limit);
// A zero-byte terminates recording->draws, so add 1 when recording ...
dbe2 "Draw %03d, index %04d, limit %02d\n", value, randIndex, limit);
recording->draws [randIndex++] = ... | false | false | false | false | false | 0 |
cs421x_suspend(struct hda_codec *codec)
{
struct cs_spec *spec = codec->spec;
unsigned int coef;
snd_hda_shutup_pins(codec);
snd_hda_codec_write(codec, CS4210_DAC_NID, 0,
AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
snd_hda_codec_write(codec, CS4210_ADC_NID, 0,
AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
... | false | false | false | false | false | 0 |
SetArrayElement(JSContext *cx, JSObject *obj, jsdouble index, jsval v)
{
JS_ASSERT(index >= 0);
if (OBJ_IS_DENSE_ARRAY(cx, obj)) {
/* Predicted/prefetched code should favor the remains-dense case. */
if (index <= jsuint(-1)) {
jsuint idx = jsuint(index);
if (!INDEX_TOO_S... | false | false | false | false | false | 0 |
o2net_sc_postpone_idle(struct o2net_sock_container *sc)
{
struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
/* clear fence decision since the connection recover from timeout*/
if (atomic_read(&nn->nn_timeout)) {
o2quo_conn_up(o2net_num_from_nn(nn));
cancel_delayed_work(&nn->nn_still_up);
atomic_... | false | false | false | false | false | 0 |
Argusgen_multicast(proto)
int proto;
{
register struct block *b0, *b1;
register struct slist *s;
switch (proto) {
case Q_DEFAULT:
case Q_LINK:
s = new_stmt(BPF_LD|BPF_B|BPF_ABS);
s->s.k = 88;
b0 = new_block(JMP(BPF_JSET));
b0->s.k = 1;
b0->stmts = s;
return b0;
c... | false | false | false | false | false | 0 |
cgroup_migrate_finish(struct list_head *preloaded_csets)
{
struct css_set *cset, *tmp_cset;
lockdep_assert_held(&cgroup_mutex);
spin_lock_bh(&css_set_lock);
list_for_each_entry_safe(cset, tmp_cset, preloaded_csets, mg_preload_node) {
cset->mg_src_cgrp = NULL;
cset->mg_dst_cset = NULL;
list_del_init(&cset->m... | false | false | false | false | false | 0 |
gst_bin_get_by_interface (GstBin * bin, GType iface)
{
GstIterator *children;
GValue result = { 0, };
GstElement *element;
gboolean found;
GValue viface = { 0, };
g_return_val_if_fail (GST_IS_BIN (bin), NULL);
g_return_val_if_fail (G_TYPE_IS_INTERFACE (iface), NULL);
g_value_init (&viface, G_TYPE_POIN... | false | false | false | false | false | 0 |
igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
{
u32 hash_value, hash_mask;
u8 bit_shift = 0;
/* Register count multiplied by bits per register */
hash_mask = (hw->mac.mta_reg_count * 32) - 1;
/* For a mc_filter_type of 0, bit_shift is the number of left-shifts
* where 0xFF would still fall within the hash... | false | false | false | false | false | 0 |
genders_handle_destroy_corner_case(int verbose)
{
int i = 0;
int errcount = 0;
genders_handle_destroy_corner_case_t *tests = &genders_handle_destroy_corner_case_tests[0];
while (!(tests[i].num < 0))
{
genders_t handle;
int return_value, errnum;
handle = genders_handle_get(tests[i].param... | false | false | false | false | false | 0 |
ban_resource(const char *rsc_id, const char *host, GListPtr allnodes, cib_t * cib_conn)
{
char *later_s = NULL;
int rc = pcmk_ok;
char *id = NULL;
xmlNode *fragment = NULL;
xmlNode *location = NULL;
if(host == NULL) {
GListPtr n = allnodes;
for(; n && rc == pcmk_ok; n = n->next)... | false | false | false | true | false | 1 |
SetVariableValue( const string& aName, const string& aValue )
{
t_nameValueData& nv = ((NameValueParser*)m_pParser)->GetConfigurationData();
t_fullFileData& ffd = ((NameValueParser*)m_pParser)->GetFullFileData();
bool bFound = false;
t_fullFileData::const_iterator iter;
// Insert in full file data, if it wa... | false | false | false | false | false | 0 |
out_write_frame( void )
{
int err;
int add_frame = 0;
int n = -frm_fps / inp_fps;
if( frm_fps > 0 ) {
drop_no++;
printi( 2, "out_write_frame(): drop this frame.\n" );
}
if( cut_cut ) {
drop_no++;
printi( 2, "out_write_frame(): cut this frame.\n" );
return 0;
}
while( frm_fps <= 0 ... | false | false | false | false | false | 0 |
rl_kill_region (count, ignore)
int count, ignore;
{
int r, npoint;
npoint = (rl_point < rl_mark) ? rl_point : rl_mark;
r = region_kill_internal (1);
_rl_fix_point (1);
rl_point = npoint;
return r;
} | false | false | false | false | false | 0 |
client_cpu_setup(gchar *line)
{
gint instance;
if (!strncmp(line, "n_cpus", 6))
sscanf(line, "%*s %d", &n_cpus);
else if (!strncmp(line, "cpu_instance", 12))
{
sscanf(line, "%*s %d", &instance);
instance_list = g_list_append(instance_list,
GINT_TO_POINTER(instance));
}
else if (!strcmp(line, "nice_t... | false | false | false | false | false | 0 |
array_invoke(array_t *array, array_callback_t cb, void *user)
{
if (array)
{
void *obj;
int i;
for (i = array->head; i < array->count + array->head; i++)
{
obj = array->data + get_size(array, i);
if (!array->esize)
{
/* dereference if we store store pointers */
obj = *(void**)obj;
}
cb... | false | false | false | false | false | 0 |
parmCallback(void *data, t_symbol*s, int argc, t_atom*argv){
#ifndef DONT_WANT_FREEFRAME
if('#'==s->s_name[0]) {
int i = atoi(s->s_name+1);
GetMyClass(data)->parmMess(i, (argc>0)?argv:NULL);
} else {
GetMyClass(data)->parmMess(std::string(s->s_name), (argc>0)?argv:NULL);
}
#endif /* DONT_WANT_FREEFRAM... | false | false | false | false | false | 0 |
out( MifOutputByteStream &os ) const {
os << '\n' << MifOutputByteStream::INDENT << "<Ruling ";
os.indent();
CHECK_PROPERTY( RulingTag );
CHECK_PROPERTY( RulingPenWidth );
CHECK_PROPERTY( RulingGap );
CHECK_PROPERTY( RulingColor );
CHECK_PROPERTY( RulingPen );
CHECK_PROPERTY( RulingLine... | false | false | false | false | false | 0 |
snd_hda_mixer_amp_switch_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
hda_nid_t nid = get_amp_nid(kcontrol);
int chs = get_amp_channels(kcontrol);
int dir = get_amp_direction(kcontrol);
int idx = get_amp_index(kcontrol);
long... | false | false | false | false | false | 0 |
scan_build(int slotId, int raceId)
{
enum { MAX_SCAN_ID = 100 };
TownSlot* townSlot = town_res.get_slot(slotId);
TownBuildType* buildType;
TownBuild* townBuild;
int i, buildRecno, matchCount=0;
int scanIdArray[MAX_SCAN_ID];
//---- get the building type of the slot ------//
buildType = town_res.get_b... | false | false | false | false | false | 0 |
calculate_snr(u32 mse, u32 c)
{
if (mse == 0) /* no signal */
return 0;
mse = intlog10(mse);
if (mse > c) {
/* Negative SNR, which is possible, but realisticly the
demod will lose lock before the signal gets this bad. The
API only allows for unsigned values, so just return 0 */
return 0;
}
return 10*(c... | false | false | false | false | false | 0 |
ca_gtk_play_for_event(GdkEvent *e, uint32_t id, ...) {
va_list ap;
int ret;
ca_proplist *p;
GdkScreen *s;
ca_return_val_if_fail(e, CA_ERROR_INVALID);
ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED);
if ((ret = ca_proplist_create(&p)) < 0)
... | false | false | false | false | false | 0 |
lf_alloc_destroy(LF_ALLOCATOR *allocator)
{
uchar *node= allocator->top;
while (node)
{
uchar *tmp= anext_node(node);
my_free(node);
node= tmp;
}
lf_pinbox_destroy(&allocator->pinbox);
allocator->top= 0;
} | false | false | false | false | false | 0 |
setFieldPosition(int f, const QString& pos)
{
if (pos == "TopLeft")
setFieldPosition(f, DrawParams::TopLeft);
else if (pos == "TopCenter")
setFieldPosition(f, DrawParams::TopCenter);
else if (pos == "TopRight")
setFieldPosition(f, DrawParams::TopRight);
else if (pos == "BottomLeft")
setFieldPosi... | false | false | false | false | false | 0 |
AcpiDmCommonAscendingOp (
ACPI_PARSE_OBJECT *Op,
UINT32 Level,
void *Context)
{
ACPI_OP_WALK_INFO *Info = Context;
const ACPI_OPCODE_INFO *OpInfo;
ACPI_OBJECT_TYPE ObjectType;
/* Close scope if necessary */
OpInfo = AcpiPsGetOpco... | false | false | false | false | false | 0 |
get_floor_tile_list(lua_State *L, struct dynarray *filenames, struct dynarray *images)
{
struct image empty_image = EMPTY_IMAGE;
lua_pushnil(L);
while (lua_next(L, -2) != 0) {
if (lua_type(L, -1) == LUA_TSTRING) {
const char *filename = strdup(lua_tostring(L, -1));
dynarray_add(filenames, &filename, sizeof(... | false | false | false | false | false | 0 |
fsp_page_reg_write(struct psmouse *psmouse, int reg_val)
{
struct ps2dev *ps2dev = &psmouse->ps2dev;
unsigned char v;
int rc = -1;
ps2_begin_command(ps2dev);
if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0)
goto out;
ps2_sendbyte(ps2dev, 0x38, FSP_CMD_TIMEOUT2);
ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOU... | false | false | false | false | false | 0 |
_cally_text_delete_text_cb (ClutterText *clutter_text,
gint start_pos,
gint end_pos,
gpointer data)
{
CallyText *cally_text = NULL;
g_return_if_fail (CALLY_IS_TEXT (data));
/* Ignore zero lengh deletions */
... | false | false | false | false | false | 0 |
_access_state_cb(void *data __UNUSED__,
Evas_Object *obj,
Elm_Widget_Item *item __UNUSED__)
{
char *ret;
Eina_Strbuf *buf = eina_strbuf_new();
const char *txt = elm_layout_text_get(obj, "elm.units");
if (txt) eina_strbuf_append(buf, txt);
if (elm_widget_disabled_get... | false | false | false | false | false | 0 |
gee_tree_map_real_has_key (GeeAbstractMap* base, gconstpointer key) {
GeeTreeMap * self;
gboolean result = FALSE;
GeeTreeMapNode* cur = NULL;
GeeTreeMapNode* _tmp0_ = NULL;
self = (GeeTreeMap*) base;
_tmp0_ = self->priv->root;
cur = _tmp0_;
while (TRUE) {
GeeTreeMapNode* _tmp1_ = NULL;
gint res = 0;
GComp... | false | false | false | false | false | 0 |
want_fail_eventcb(struct bufferevent *bev, short what, void *ctx)
{
struct event_base *base = ctx;
const char *err;
evutil_socket_t s;
if (what & BEV_EVENT_ERROR) {
s = bufferevent_getfd(bev);
err = evutil_socket_error_to_string(evutil_socket_geterror(s));
TT_BLATHER(("connection failure %s", err));
test_o... | false | false | false | false | false | 0 |
act_if_link(WorldGUI *gui, GtkTextIter *iter, GdkEventButton *event)
{
GtkTextIter start;
GtkTextIter end;
gchar *matched_url;
if (!gtk_text_iter_has_tag(iter, gui->txttag_url)) {
return FALSE;
}
start = end = *iter;
if (!gtk_text_iter_backward_to_tag_toggle(&start, gui->txttag_url)) {
/... | false | false | false | false | false | 0 |
H5HF_huge_init(H5HF_hdr_t *hdr)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
*/
HDassert(hdr);
/* Compute information about 'huge' objects for the heap */
/* Check if we can completely hold the 'huge' object's offset & length in
* the file in the heap ID (which will speed... | false | false | false | false | false | 0 |
PredictorDecodeTile(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
{
TIFFPredictorState *sp = PredictorState(tif);
assert(sp != NULL);
assert(sp->codetile != NULL);
if ((*sp->codetile)(tif, op0, occ0, s)) {
tsize_t rowsize = sp->rowsize;
assert(rows... | false | false | false | false | false | 0 |
gee_array_list_finalize (GObject* obj) {
GeeArrayList * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TYPE_ARRAY_LIST, GeeArrayList);
(self->priv->_equal_func_target_destroy_notify == NULL) ? NULL : (self->priv->_equal_func_target_destroy_notify (self->priv->_equal_func_target), NULL);
self->priv->_equal_func =... | false | false | false | false | false | 0 |
eof() throw(ParserError) {
return m_Input->has_more_tokens() == 0 ? true : false;
} | false | false | false | false | false | 0 |
set_var(struct fbtft_par *par)
{
u8 madctl_par = 0;
if (par->bgr)
madctl_par |= MADCTL_BGR;
switch (par->info->var.rotate) {
case 0:
break;
case 90:
madctl_par |= (MADCTL_MV | MADCTL_MY);
break;
case 180:
madctl_par |= (MADCTL_MX | MADCTL_MY);
break;
case 270:
madctl_par |= (MADCTL_MV | MADCTL_MX)... | false | false | false | false | false | 0 |
of_bus_pci_get_flags(const __be32 *addr)
{
unsigned int flags = 0;
u32 w = be32_to_cpup(addr);
switch((w >> 24) & 0x03) {
case 0x01:
flags |= IORESOURCE_IO;
break;
case 0x02: /* 32 bits */
case 0x03: /* 64 bits */
flags |= IORESOURCE_MEM;
break;
}
if (w & 0x40000000)
flags |= IORESOURCE_PREFETCH;
re... | false | false | false | false | false | 0 |
print_only_size (uintmax_t n_bytes)
{
char buf[LONGEST_HUMAN_READABLE + 1];
fputs ((n_bytes == UINTMAX_MAX
? _("Infinity")
: human_readable (n_bytes, buf, human_output_opts,
1, output_block_size)),
stdout);
} | false | false | false | false | false | 0 |
ZopfliInitCache(size_t blocksize, ZopfliLongestMatchCache* lmc) {
size_t i;
lmc->length = (unsigned short*)malloc(sizeof(unsigned short) * blocksize);
lmc->dist = (unsigned short*)malloc(sizeof(unsigned short) * blocksize);
/* Rather large amount of memory. */
lmc->sublen = (unsigned char*)malloc(ZOPFLI_CACHE... | false | true | false | false | false | 1 |
CloseParent( void ) {
if ( parent_menu ) {
parent_menu->CloseParent();
view->CloseWindow( parent_menu );
parent_menu = NULL;
}
} | false | false | false | false | false | 0 |
lookup_fnfields_1 (tree type, tree name)
{
if (!CLASS_TYPE_P (type))
return -1;
if (COMPLETE_TYPE_P (type))
{
if ((name == ctor_identifier
|| name == base_ctor_identifier
|| name == complete_ctor_identifier))
{
if (CLASSTYPE_LAZY_DEFAULT_CTOR (type))
lazily_declare_fn (sfk_constructo... | false | false | false | false | false | 0 |
sp_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
dict_t *params)
{
int32_t ret = -1, op_errno = EINVAL;
char need_unwind = 1;
sp_inode_ctx_t *inode_ctx = NULL;
sp_local_t *local = NULL;
GF_ASSERT (frame)... | false | false | false | true | false | 1 |
cciss_check_queues(ctlr_info_t *h)
{
int start_queue = h->next_to_run;
int i;
/* check to see if we have maxed out the number of commands that can
* be placed on the queue. If so then exit. We do this check here
* in case the interrupt we serviced was from an ioctl and did not
* free any new commands.
*/
... | false | false | false | false | false | 0 |
_g_uri_get_file_extension (const char *uri)
{
char *p;
if (uri == NULL)
return NULL;
p = strrchr (uri, '.');
if (p == NULL)
return NULL;
if (p != uri) {
char *p2;
p2 = p - 1;
while ((*p2 != '.') && (p2 != uri))
p2--;
if (strncmp (p2, ".tar.", 5) == 0)
p = p2;
}
return p;
} | false | false | false | false | true | 1 |
evaluate16Bit(DCM_OBJECT* obj)
{
CONDITION cond;
static U16 pixels[33];
void* ctx = 0;
U32 length = 0;
int idx = 0;
int errorFlag = 0;
DCM_ELEMENT e =
{ DCM_PXLPIXELDATA, DCM_OW, "", 0, sizeof(pixels), (void*)pixels };
cond = DCM_GetElementValue(&obj, &e, &length, &ctx);
if (cond != DCM_NORMAL) {
... | false | false | false | false | false | 0 |
processYUVImage(imageStruct &image)
{
int datasize = (image.xsize/2) * image.ysize;
unsigned char *base = image.data;
while(datasize--)
{
//if (base[0] < m_thresh[1]) base[0] = 0; //u
if (base[1] < m_Y) base[1] = 0;//y1
//if (base[2] < m_thresh[2]) base[2] = 0;//v
if (base[3] < m_Y) base[3] = ... | false | false | false | false | false | 0 |
jcl_options_find_keyword(char **opts, const char *line,
const char *jclstr)
{
if (!opts)
return NULL;
while (*opts)
{
if (jcl_keywords_equal(*opts, line, jclstr))
return *opts;
opts++;
}
return NULL;
} | false | false | false | false | false | 0 |
first_negative_parent(Topform c)
{
Ilist parents = get_parents(c->justification, TRUE);
Ilist p;
Topform first_neg = NULL;
for (p = parents; p && first_neg == NULL; p = p->next) {
Topform c = find_clause_by_id(p->i);
if (negative_clause_possibly_compressed(c))
first_neg = c;
}
zap_ilist(p);
... | false | false | false | false | false | 0 |
add_line_text(struct view *view, char *data, enum line_type type)
{
if (data)
data = strdup(data);
return data ? add_line_data(view, data, type) : NULL;
} | false | false | false | false | false | 0 |
build() {
WidgetKit& wk = *WidgetKit::instance();
const LayoutKit& lk = *LayoutKit::instance();
mainglyph = lk.vbox();
mainglyph->append(lk.hcenter(wk.label(lab)));
buildbox();
mainglyph->append(lk.hcenter(_buttonbox));
if (_noframe)
body(mainglyph);
else
body(wk.inset_frame... | false | false | false | false | false | 0 |
ioctl_tree_new_from_bin(unsigned long id, const void *data, int ret)
{
const ioctl_type *type;
ioctl_tree *t;
type = ioctl_type_get_by_id(id);
if (type == NULL) {
DBG("ioctl_tree_new_from_bin: unknown ioctl %lX\n", id);
return NULL;
}
/* state independent ioctl? */
if (type->init_from_bin... | false | false | false | false | false | 0 |
config_get_bool(CONFIG_REC *rec, const char *section, const char *key, int def)
{
char *str;
str = config_get_str(rec, section, key, NULL);
if (str == NULL) return def;
return i_toupper(*str) == 'T' || i_toupper(*str) == 'Y';
} | false | false | false | false | false | 0 |
a68g_print_flat_mode (FILE_T f, MOID_T * z)
{
if (IS (z, STANDARD)) {
int i = DIM (z);
if (i > 0) {
while (i--) {
WRITE (f, "LONG ");
}
} else if (i < 0) {
while (i++) {
WRITE (f, "SHORT ");
}
}
ASSERT (snprintf (output_line, SNPRINTF_SIZE, "%s", NSYMBOL (NO... | false | false | false | false | false | 0 |
accept_listener_arg(struct Listener *listener, char *arg) {
if (listener->addr.ss_family == 0) {
if (isnumeric(arg))
listener->addr_len = parse_address(&listener->addr, NULL, atoi(arg));
else
listener->addr_len = parse_address(&listener->addr, arg, 0);
if (listener-... | false | false | false | false | true | 1 |
selector_thread_wakeup_drain_pipes (void)
{
gchar buffer [128];
gint received;
for (;;) {
#if !defined(HOST_WIN32)
received = read (threadpool_io->wakeup_pipes [0], buffer, sizeof (buffer));
if (received == 0)
break;
if (received == -1) {
if (errno != EINTR && errno != EAGAIN)
g_warning ("selector_t... | false | false | false | false | false | 0 |
make_ep_lists(struct udc *dev)
{
/* make gadget ep lists */
INIT_LIST_HEAD(&dev->gadget.ep_list);
list_add_tail(&dev->ep[UDC_EPIN_STATUS_IX].ep.ep_list,
&dev->gadget.ep_list);
list_add_tail(&dev->ep[UDC_EPIN_IX].ep.ep_list,
&dev->gadget.ep_list);
list_add_tail(&dev->ep[UDC_EPOUT_IX].ep.ep_list,
&... | false | false | false | false | false | 0 |
splitc(char *first, char *rest, char divider)
{
char *p = strchr(rest, divider);
if (p == NULL) {
if (first != rest && first)
first[0] = 0;
return;
}
*p = 0;
if (first != NULL)
strcpy(first, rest);
if (first != rest)
/* In most circumstances, strcpy with src and dst being the same ... | false | true | false | false | false | 1 |
read_set_tile_size(command_buf_t *pcb, tile_slot *bits, bool for_pattern)
{
const byte *cbp = pcb->ptr;
uint rep_width, rep_height;
uint pdepth;
byte bd = *cbp++;
bits->cb_depth = cmd_code_to_depth(bd);
if (for_pattern)
cmd_getw(bits->id, cbp);
cmd_getw(rep_width, cbp);
cmd_getw... | false | false | false | false | false | 0 |
ivtv_irq_dma_read(struct ivtv *itv)
{
struct ivtv_stream *s = NULL;
struct ivtv_buffer *buf;
int hw_stream_type = 0;
IVTV_DEBUG_HI_IRQ("DEC DMA READ\n");
del_timer(&itv->dma_timer);
if (!test_bit(IVTV_F_I_UDMA, &itv->i_flags) && itv->cur_dma_stream < 0)
return;
if (!test_bit(IVTV_F_I_UDMA, &itv->i_flags)) ... | false | false | false | false | false | 0 |
sic_exists_hashstr_entry(Vfs_handle *h, char *hashstr)
{
int st;
if ((st = vfs_exists(h, sic_make_key_from_hashstr(hashstr))) == -1) {
log_msg((LOG_DEBUG_LEVEL, "Cannot find entry for hashstr \"%s\"",
hashstr));
return(-1);
}
log_msg((LOG_DEBUG_LEVEL, "Entry %s for hashstr=\"%s\"",
(st == 0) ? "exi... | false | false | false | false | false | 0 |
sureThisIsHeredoc(int iPrev,
Accessor &styler,
char *prevWord) {
// Not so fast, since Ruby's so dynamic. Check the context
// to make sure we're OK.
int prevStyle;
int lineStart = styler.GetLine(iPrev);
int lineStartPosn = styler.LineSta... | false | false | false | false | false | 0 |
readIG(struct ReadSeqVars *V)
{
char *nm;
/* position past ';' comments */
do {
SeqfileGetLine(V);
} while (! (feof(V->f) || ((*V->buf != 0) && (*V->buf != ';')) ));
if (!feof(V->f))
{
if ((nm = strtok(V->buf, "\n\t ")) != NULL)
SetSeqinfoString(V->sqinfo, nm, SQINFO_NAME);
readLoop(0... | false | false | false | false | false | 0 |
getUIDir(Tree pathname)
{
//cerr << "Documentator : getUIDir : print(pathname, stdout) = "; print(pathname, stdout); cerr << endl;
string s;
Tree dir = reverse(tl(pathname));
while (!isNil(dir)) {
string tmp = tree2str(tl(hd(dir)));
if ( (tmp[0] != '[') && (!tmp.empty()) ) {
s += tmp + '/';
}
dir = tl(... | false | false | false | false | false | 0 |
icalmime_test(char* (*get_string)(char *s, size_t size, void *d),
void *data)
{
char *out;
struct sspm_part *parts;
int i;
if ( (parts = (struct sspm_part *)
malloc(NUM_PARTS*sizeof(struct sspm_part)))==0) {
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
return 0;
}
memset(parts,0,sizeof(... | false | false | false | false | true | 1 |
irq_chip_enable_parent(struct irq_data *data)
{
data = data->parent_data;
if (data->chip->irq_enable)
data->chip->irq_enable(data);
else
data->chip->irq_unmask(data);
} | false | false | false | false | false | 0 |
__lambda50_ (UnityMprisPlayer* self, GObject* obj, GParamSpec* pspec) {
const gchar* _tmp0_ = NULL;
UnityMusicPlayer* _tmp1_ = NULL;
UnityPlaybackState _tmp2_ = 0;
UnityPlaybackState _tmp3_ = 0;
gchar* update = NULL;
const gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
UnityPropertyUpdateManager* _tmp6_ = NULL;
G... | false | false | false | false | false | 0 |
print_statistics (char c, real_t costs, const wfa_t *wfa, const image_t *image,
const range_t *range)
{
unsigned max_level, min_level, state, label, lincomb;
for (max_level = 0, min_level = MAXLEVEL, state = wfa->basis_states;
state < wfa->states; state++)
{
for (lincomb = 0, label = 0; label < ... | false | false | false | false | false | 0 |
epr_create_record_from_info(EPR_SRecordInfo* record_info)
{
EPR_SRecord* record = NULL;
EPR_SFieldInfo* field_info = NULL;
uint field_infos_index = 0;
/* int field_infos_length; */
if (record_info == NULL)
{
epr_set_err(e_err_out_of_memory,
"epr_create_record_from_in... | false | false | false | false | false | 0 |
OnWrite (HPDF_Dict obj,
HPDF_Stream stream)
{
HPDF_FontAttr attr = (HPDF_FontAttr)obj->attr;
HPDF_BasicEncoderAttr encoder_attr =
(HPDF_BasicEncoderAttr)attr->encoder->attr;
HPDF_UINT i;
HPDF_STATUS ret;
char buf[128];
char *pbuf = buf;
char *eptr = buf + 1... | true | true | false | false | false | 1 |
i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv,
struct i40e_dcbx_config *dcbcfg)
{
struct i40e_dcb_ets_config *etscfg;
u8 *buf = tlv->tlvinfo;
u16 offset = 0;
u8 priority;
int i;
etscfg = &dcbcfg->etscfg;
if (tlv->en_will_err & I40E_CEE_FEAT_TLV_WILLING_MASK)
etscfg->willing = 1;
etscfg->c... | false | false | false | false | true | 1 |
_eina_cpu_count_internal(void)
{
#ifdef EFL_HAVE_THREADS
# if defined (_WIN32)
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
return sysinfo.dwNumberOfProcessors;
# elif defined (__sun) || defined(__GNU__)
/*
* _SC_NPROCESSORS_ONLN: number of processors that are online, that
... | false | false | false | false | false | 0 |
build_vcall_offset_vtbl_entries (tree binfo, vtbl_init_data* vid)
{
/* We only need these entries if this base is a virtual base. We
compute the indices -- but do not add to the vtable -- when
building the main vtable for a class. */
if (binfo == TYPE_BINFO (vid->derived)
|| (BINFO_VIRTUAL_P (binf... | false | false | false | false | false | 0 |
sfe(name, argv)
char *name;
char *argv[];
{
int fildes[2];
if (socketpair(PF_UNIX, SOCK_STREAM, 0, fildes) == -1) {
fildes[0] = -1;
} else {
/* Fork new process */
#if defined(__sgi)
switch (fork()) {
#else
switch (vfork()) {
#endif
case -1: /* Error */
fildes[0] = -1;
(void)cl... | false | false | false | false | true | 1 |
ac97_probing_bugs(struct pci_dev *pci)
{
const struct snd_pci_quirk *q;
q = snd_pci_quirk_lookup(pci, atiixp_quirks);
if (q) {
dev_dbg(&pci->dev, "atiixp quirk for %s. Forcing codec %d\n",
snd_pci_quirk_name(q), q->value);
return q->value;
}
/* this hardware doesn't need workarounds. Probe for codec */
... | false | false | false | false | false | 0 |
url_decode(const std::string& url) {
std::ostringstream rets;
std::string hexstr;
for(size_t n = 0; n < url.size(); n++) {
switch(url[n]) {
case '+':
rets << ' ';
break;
case '%':
hexstr = url.substr(n+1, 2);
n += 2;
if (hexstr == "26" || hexstr == "3D")
rets << '%' << hexstr;
else {
... | false | false | false | false | false | 0 |
goBack()
{
const int count = d->m_history.count();
if (d->m_historyIndex < count - 1) {
const KUrl newUrl = locationUrl(d->m_historyIndex + 1);
emit urlAboutToBeChanged(newUrl);
++d->m_historyIndex;
d->updateContent();
emit historyChanged();
emit urlChanged(loca... | 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.