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 |
|---|---|---|---|---|---|---|
gst_adder_sink_event (GstCollectPads * pads, GstCollectData * pad,
GstEvent * event, gpointer user_data)
{
GstAdder *adder = GST_ADDER (user_data);
gboolean res = TRUE, discard = FALSE;
GST_DEBUG_OBJECT (pad->pad, "Got %s event on sink pad",
GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (even... | false | false | false | false | false | 0 |
__blk_run_queue_uncond(struct request_queue *q)
{
if (unlikely(blk_queue_dead(q)))
return;
/*
* Some request_fn implementations, e.g. scsi_request_fn(), unlock
* the queue lock internally. As a result multiple threads may be
* running such a request function concurrently. Keep track of the
* number of acti... | false | false | false | false | false | 0 |
EndCompressor(ArchiveHandle *AH, CompressorState *cs)
{
#ifdef HAVE_LIBZ
if (cs->comprAlg == COMPR_ALG_LIBZ)
EndCompressorZlib(AH, cs);
#endif
free(cs);
} | false | false | false | false | false | 0 |
ProcessCollectedScripts() {
Debugger* debugger = Isolate::Current()->debugger();
for (int i = 0; i < collected_scripts_.length(); i++) {
debugger->OnScriptCollected(collected_scripts_[i]);
}
collected_scripts_.Clear();
} | false | false | false | false | false | 0 |
aclutil_evaluate_macro( char * rule, lasInfo *lasinfo,
acl_eval_types evalType )
{
int matched = 0;
aci_t *aci;
char *matched_val = NULL;
char **candidate_list = NULL;
char **inner_list = NULL;
char **sptr = NULL;
char **tptr = NULL;
char *t = NULL;
char *s = NULL;
struct acl_pblock *aclpb = lasinfo->a... | false | false | false | false | false | 0 |
auth_freeacl(ACL *acl)
{
ACL *p;
while ((p = acl)) {
acl = acl->nxt;
globus_libc_free(p->dn);
regfree(&p->re);
globus_libc_free(p);
}
return NULL;
} | false | false | false | false | false | 0 |
GetSafepointEntry(Address pc) {
SafepointTable table(this);
return table.FindEntry(pc);
} | false | false | false | false | false | 0 |
grabaddrs(const char *field, struct name *np, int comma, enum gfield gflags)
{
struct name *nq;
TTYSET_CHECK(np);
loop:
np = sextract(rtty_internal(field, detract(np, comma)), gflags);
for (nq = np; nq != NULL; nq = nq->n_flink)
if (mime_name_invalid(nq->n_name, 1))
goto loop;
return np;
} | false | false | false | false | false | 0 |
socket_waitfd(p_socket ps, int sw, p_timeout tm) {
int ret;
struct pollfd pfd;
pfd.fd = *ps;
pfd.events = sw;
pfd.revents = 0;
if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */
do {
int t = (int)(timeout_getretry(tm)*1e3);
ret = poll(&pfd, 1, t >= 0... | false | false | false | false | false | 0 |
mouseButtonUp(SDL_Event *ev)
{
Global *game = Global::getInstance();
SDL_MouseButtonEvent *mEv = (SDL_MouseButtonEvent*)ev;
if(game->gameMode == Global::Menu)
{
switch(mEv->button)
{
case SDL_BUTTON_LEFT:
game->menu->mousePress(MainToolkit::Left, mEv->x, mEv->y);
break;
case SDL_BUTTON_MIDDLE:
... | false | false | false | false | false | 0 |
OptimizeOnceStoredGlobal(GlobalVariable *GV, Value *StoredOnceVal,
Module::global_iterator &GVI,
TargetData *TD) {
// Ignore no-op GEPs and bitcasts.
StoredOnceVal = StoredOnceVal->stripPointerCasts();
// If we are dealing with a pointer g... | false | false | false | false | false | 0 |
operator== (const SubTree& b) const
{
return sign == b.sign && *tree == *b.tree;
} | false | false | false | false | false | 0 |
IsWritable(SignalingProtocol protocol,
const ContentInfo& content,
const ContentParserMap& parsers) {
ContentParser* parser = GetContentParser(parsers, content.type);
if (parser == NULL) {
return false;
}
return parser->IsWritable(protocol, content.description);
} | false | false | false | false | false | 0 |
dict_col_name_is_reserved(
/*======================*/
const char* name) /*!< in: column name */
{
/* This check reminds that if a new system column is added to
the program, it should be dealt with here. */
#if DATA_N_SYS_COLS != 3
#error "DATA_N_SYS_COLS != 3"
#endif
static const char* reserved_names[] = {
"DB_R... | false | false | false | false | false | 0 |
is_same_operand( Quadruple *qr1, Quadruple *qr2, int no )
{
Operand *op1, *op2;
op1 = qr1->op[no];
op2 = qr2->op[no];
return ( op1->entry == op2->entry && op1->kind == op2->kind );
} | false | false | false | false | false | 0 |
create_model(void)
{
GtkListStore *store;
GtkTreeIter iter;
GkrellmMonitor *mon;
GList *list;
gchar *buf;
store = gtk_list_store_new(N_COLUMNS,
G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_POINTER);
for (list = plugins_list; list; list = list->next)
{
mon = (GkrellmMonitor *) list->data;
if (mon->priva... | false | false | false | false | false | 0 |
CreateDrawable(Display *dpy, struct glx_config *config,
Drawable drawable, const int *attrib_list, CARD8 glxCode)
{
xGLXCreateWindowReq *req;
struct glx_drawable *glxDraw;
CARD32 *data;
unsigned int i;
CARD8 opcode;
GLXDrawable xid;
i = 0;
if (attrib_list) {
while (attrib_l... | false | false | false | false | false | 0 |
ComputeColAMaxImpl(Vector& cols_norms, bool init) const
{
if (init) {
cols_norms.Set(1.);
}
else {
SmartPtr<Vector> v = cols_norms.MakeNew();
v->Set(1.);
cols_norms.ElementWiseMax(*v);
}
} | false | false | false | false | false | 0 |
evhttp_decode_uri(const char *uri)
{
char *ret;
if ((ret = malloc(strlen(uri) + 1)) == NULL)
event_err(1, "%s: malloc(%lu)", __func__,
(unsigned long)(strlen(uri) + 1));
evhttp_decode_uri_internal(uri, strlen(uri),
ret, 0 /*always_decode_plus*/);
return (ret);
} | false | false | false | false | false | 0 |
reset_pallette( void )
{
if ( pmain && pmain->vdata )
{
fl_set_button( pmain->vdata, 0 );
pmain->vdata = 0;
}
} | false | false | false | false | false | 0 |
iscsi_rx_buffered_data ( struct iscsi_session *iscsi,
const void *data, size_t len ) {
/* Allocate buffer on first call */
if ( ! iscsi->rx_buffer ) {
iscsi->rx_buffer = malloc ( iscsi->rx_len );
if ( ! iscsi->rx_buffer )
return -ENOMEM;
}
/* Copy data to buffer */
assert ( ( iscsi->rx_offset + le... | false | true | false | false | false | 1 |
_ssif_cmd_read (ipmi_ctx_t ctx,
uint8_t cmd,
uint8_t group_extension,
fiid_obj_t obj_cmd_rs)
{
uint8_t *pkt = NULL;
unsigned int pkt_len;
int hdr_len, cmd_len, read_len;
fiid_field_t *tmpl = NULL;
int ret, rv = -1;
unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT;
assert (ctx
&& c... | false | false | false | false | false | 0 |
amitk_canvas_get_height(AmitkCanvas * canvas) {
GtkRequisition size;
gint height;
g_return_val_if_fail(AMITK_IS_CANVAS(canvas), 0);
height = canvas->pixbuf_height + 2*canvas->border_width;
gtk_widget_size_request(canvas->label, &size);
height+=size.height;
gtk_widget_size_request(canvas->scrollbar, &... | false | false | false | false | false | 0 |
drawRect(int x1, int y1, int x2, int y2)
{
int x, y;
Position pos;
SDL_Surface *img;
img = images[edit_panel.image_index]->image;
for(y = y1; y < y2; y += img->h / TILE_H) {
for(x = x1; x < x2; x += img->w / TILE_W) {
pos.pos_x = x;
pos.pos_y = y;
setImagePosition(edit_panel.level, edit... | false | false | false | false | false | 0 |
_ibar_focus_next(IBar *b)
{
IBar_Icon *ic, *ic1 = NULL, *ic2 = NULL;
Eina_List *l;
if (!b->focused) return;
if (!b->icons) return;
EINA_LIST_FOREACH(b->icons, l, ic)
{
if (!ic1)
{
if (ic->focused) ic1 = ic;
}
else
{
ic2 = ic... | false | false | false | false | false | 0 |
vmm_dump_pmap_log(logagent_t *la)
{
struct pmap *pm = vmm_pmap();
size_t i;
time_t now = tm_time();
mutex_lock(&pm->lock);
log_debug(la, "VMM current %s pmap (%zu/%zu region%s):",
pm == &kernel_pmap ? "kernel" :
pm == &local_pmap ? "local" : "unknown",
pm->count, pm->size, 1 == pm->count ? "" : "s");
for... | false | false | false | false | false | 0 |
usbhs_status_get_each_irq(struct usbhs_priv *priv,
struct usbhs_irq_state *state)
{
struct usbhs_mod *mod = usbhs_mod_get_current(priv);
u16 intenb0, intenb1;
unsigned long flags;
/******************** spin lock ********************/
usbhs_lock(priv, flags);
state->intsts0 = usbhs_read(priv, INTSTS0);
... | false | false | false | false | false | 0 |
isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v)
{
aff = isl_aff_cow(aff);
if (!aff)
return NULL;
aff->v = isl_vec_cow(aff->v);
if (!aff->v)
return isl_aff_free(aff);
isl_int_set(aff->v->el[1], v);
return aff;
} | false | false | false | false | false | 0 |
pdf14_put_params(gx_device * dev, gs_param_list * plist)
{
pdf14_device * pdev = (pdf14_device *)dev;
gx_device * tdev = pdev->target;
bool was_open = tdev->is_open;
int code = 0;
if (tdev != 0 && (code = dev_proc(tdev, put_params)(tdev, plist)) >= 0) {
gx_device_decache_colors(dev);
... | false | false | false | false | false | 0 |
action_tree_right_or_enter_mode(Widget w, XEvent *event,
String *params, Cardinal *no_params)
{
if (global.busy)
return;
if (global.mode == NewsModeThread &&
global.curr_art && A_CHILD1(global.curr_art))
action_tree_right(w, event, params, no_params);
else
action_enter_mode(w, event, params, n... | false | false | false | false | false | 0 |
f_list(int count, VALUE **vals)
{
VALUE result;
/* initialize VALUE */
result.v_type = V_LIST;
result.v_subtype = V_NOSUBTYPE;
result.v_list = listalloc();
while (count-- > 0)
insertlistlast(result.v_list, *vals++);
return result;
} | false | false | false | false | false | 0 |
find_error (curve_type curve, spline_type spline, unsigned *worst_point,
at_exception_type * exception)
{
unsigned this_point;
at_real total_error = 0.0;
at_real worst_error = FLT_MIN;
*worst_point = CURVE_LENGTH (curve) + 1; /* A sentinel value. */
for (this_point = 0; this_point < CURVE_LENGTH (cu... | false | false | false | false | false | 0 |
ia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct atm_dev *dev;
IADEV *iadev;
int ret;
iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
if (!iadev) {
ret = -ENOMEM;
goto err_out;
}
iadev->pci = pdev;
IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
pdev->bus->nu... | false | false | false | false | false | 0 |
init(const char *fileName, const long fixedLastWordPointer) {
// Ensure against invoking twice
if (dataFile != NULL) {
return false;
}
// Set buffers to zero length
dataBuffer[0] = '\0';
wordBuffer[0] = '\0';
compBuffer[0] = '\0';
// Open DataFile
dataFile = fopen(fileName, "r");
// Return false if failed
... | false | false | false | false | true | 1 |
spl_object_storage_addall(spl_SplObjectStorage *intern, zval *this, spl_SplObjectStorage *other TSRMLS_DC) { /* {{{ */
HashPosition pos;
spl_SplObjectStorageElement *element;
zend_hash_internal_pointer_reset_ex(&other->storage, &pos);
while (zend_hash_get_current_data_ex(&other->storage, (void **)&element, &pos) =... | false | false | false | false | false | 0 |
swan_copy_base(const char *dev_path, const char *cache_file)
{
int ret;
ret = mount_main(dev_path, MOUNT_POINT, "vfat", NULL);
if (ret < 0)
{
error_msg("mount_main");
return ret;
}
ret = file_copy(UPGRADE_FILE_PATH, cache_file, O_SYNC);
if (ret < 0)
{
error_msg("file_copy");
}
umount_directory_wait(M... | false | false | false | false | false | 0 |
destroy_arglist(struct expr_node *arglist)
{
struct expr_node *arglist_next;
while (arglist)
{
arglist_next = arglist->right;
if (arglist->val)
free_value(arglist->val);
arglist->val = 0;
arglist->right = 0;
free(arglist);
arglist = arglist_next;
}
} | true | true | false | false | true | 1 |
q_eval()
{
if(!is_q_for_eval()) {
mark_q_for_eval();
_sim->_evalq_uc->push_back(this);
}else{itested();
}
} | false | false | false | false | false | 0 |
atcommand_homfriendly(const int fd, struct map_session_data* sd, AtCommandType command, const char* message)
{
int friendly;
nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
friendly = atoi(message);
if (sd->status.homun_id > 0 && sd->hd) {
if (friendly < 0 || friendly > 100000)
return -1;
sd... | false | false | false | false | false | 0 |
dwc2_read_common_intr(struct dwc2_hsotg *hsotg)
{
u32 gintsts;
u32 gintmsk;
u32 gahbcfg;
u32 gintmsk_common = GINTMSK_COMMON;
gintsts = dwc2_readl(hsotg->regs + GINTSTS);
gintmsk = dwc2_readl(hsotg->regs + GINTMSK);
gahbcfg = dwc2_readl(hsotg->regs + GAHBCFG);
/* If any common interrupts set */
if (gintsts &... | false | false | false | false | false | 0 |
dht_unlink_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
xlator_t *cached_subvo... | false | false | false | false | false | 0 |
mono_test_marshal_bool_in (int arg, unsigned int expected, unsigned int bDefaultMarsh, unsigned int bBoolCustMarsh,
char bI1CustMarsh, unsigned char bU1CustMarsh, short bVBCustMarsh)
{
switch (arg) {
case 1:
if (bDefaultMarsh != expected)
return 1;
break;
case 2:
if (bBoolCustMarsh != expected)
r... | false | false | false | false | false | 0 |
remove_autopickup_exception(struct autopickup_exception *whichape)
{
struct autopickup_exception *ape, *prev = 0;
int chain = whichape->grab ? AP_GRAB : AP_LEAVE;
for (ape = iflags.autopickup_exceptions[chain]; ape;) {
if (ape == whichape) {
struct autopickup_exception *freeape = ape;
... | false | false | false | false | false | 0 |
_e_mod_action_cb(E_Object *obj, const char *params)
{
E_Zone *zone = NULL;
if (obj)
{
if (obj->type == E_MANAGER_TYPE)
zone = e_util_zone_current_get((E_Manager *)obj);
else if (obj->type == E_CONTAINER_TYPE)
zone = e_util_zone_current_get(((E_Container *)obj)->manager);
... | false | false | false | false | false | 0 |
CloseButton()
{
set_relief(Gtk::RELIEF_NONE);
set_focus_on_click(false);
//set_flags(get_flags() & ~Gtk::CAN_FOCUS);
GtkRcStyle* rc_style = gtk_rc_style_new();
rc_style->xthickness = 0;
rc_style->ythickness = 0;
gtk_widget_modify_style(GTK_WIDGET(gobj()), rc_style);
... | false | false | false | false | false | 0 |
slapi_ch_bvfree(struct berval** v)
{
if (v == NULL || *v == NULL)
return;
slapi_ch_free((void **)&((*v)->bv_val));
slapi_ch_free((void **)v);
return;
} | false | false | false | false | false | 0 |
check_result()
{
const Board & board = get_board();
if (board.is_mate()) {
if (board.get_side() == WHITE) {
result = BLACKMATES;
result_str = "0-1";
result_comment = "Black mates";
} else {
result = WHITEMATES;
result_str = "1-0";
result_comment = "White mates";
}
} else if (board.is_stale... | false | false | false | false | false | 0 |
json_db_del_key(void *db, heim_string_t table, heim_data_t key,
heim_error_t *error)
{
json_db_t jsondb = db;
heim_string_t key_string;
const heim_octet_string *key_data = heim_data_get_data(key);
if (error)
*error = NULL;
if (strnlen(key_data->data, key_data->length) != key_data->length)
retu... | false | false | false | false | false | 0 |
ProcessWriteSlaves()
{
int res = 0;
list<JackDriverInterface*>::const_iterator it;
for (it = fSlaveList.begin(); it != fSlaveList.end(); it++) {
JackDriverInterface* slave = *it;
if (slave->IsRunning()) {
if (slave->ProcessWrite() < 0) {
res = -1;
}
... | false | false | false | false | false | 0 |
libbfio_pool_free(
libbfio_pool_t **pool,
libcerror_error_t **error )
{
libbfio_internal_pool_t *internal_pool = NULL;
static char *function = "libbfio_pool_free";
int handle_iterator = 0;
int result = 1;
if( pool == NULL )
{
libcerror_e... | false | false | false | false | false | 0 |
all_entries (GConfSource* source,
const gchar* key,
const gchar** locales,
GError** err)
{
XMLSource* xs = (XMLSource*)source;
Dir* dir;
dir = cache_lookup(xs->cache, key, FALSE, err);
if (dir == NULL)
return NULL;
else
return dir_all_entries(dir,... | false | false | false | false | false | 0 |
gnc_owner_select_create (GtkWidget *label, GtkWidget *hbox,
QofBook *book, GncOwner *owner)
{
g_return_val_if_fail (hbox != NULL, NULL);
g_return_val_if_fail (book != NULL, NULL);
g_return_val_if_fail (owner != NULL, NULL);
return gnc_owner_new (label, hbox, book, o... | false | false | false | false | false | 0 |
nv50_gr_construct_gene_unk10xx(struct nvkm_grctx *ctx)
{
struct nvkm_device *device = ctx->device;
int i;
/* end of area 2 on pre-NVA0, area 1 on NVAx */
xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */
xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */
xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */
xf_... | false | false | false | false | false | 0 |
get_val()
{
CORBA::TypeCode_ptr tc = actualTc();
CORBA::TCKind k = tc->kind();
if (k != CORBA::tk_value && k != CORBA::tk_value_box)
throw DynamicAny::DynAny::TypeMismatch();
CORBA::Any_var a = pd_member->to_any();
CORBA::ValueBase* v;
a >>= v;
return v;
} | false | false | false | false | false | 0 |
clk_summary_show(struct seq_file *s, void *data)
{
struct clk_core *c;
struct hlist_head **lists = (struct hlist_head **)s->private;
seq_puts(s, " clock enable_cnt prepare_cnt rate accuracy phase\n");
seq_puts(s, "---------------------------------------------------------------... | false | false | false | false | false | 0 |
update()
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
uint8_t *dst = reinterpret_cast<uint8_t*>(out);
uint32_t sizeCounter = size;
uint32_t b, tmp;
while (sizeCounter--)
{
for (b = 0; b... | false | false | false | false | false | 0 |
eliminaTotesFiguresSlot(){
QApplication::setOverrideCursor(Qt::WaitCursor);
while (arbreConcursTreeWidget->topLevelItem(0)->childCount()>0 ){
QTreeWidgetItem *item=arbreConcursTreeWidget->topLevelItem(0)->child(0);
arbreConcursTreeWidget->setCurrentItem(item);
arbreConcursTreeWidget->topLevelIt... | false | false | false | false | false | 0 |
append_ts(DBusMessageIter *iter, void *user_data)
{
GSList *list = user_data;
while (list != NULL) {
char *timeserver = list->data;
if (timeserver != NULL)
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
×erver);
list = g_slist_next(list);
}
} | false | false | false | false | false | 0 |
print(raw_ostream &OS) {
const TargetRegisterInfo *TRI =
AP.MF ? AP.MF->getSubtarget().getRegisterInfo() : nullptr;
OS << WSMP << "callsites:\n";
for (const auto &CSI : CSInfos) {
const LocationVec &CSLocs = CSI.Locations;
const LiveOutVec &LiveOuts = CSI.LiveOuts;
OS << WSMP << "callsite " << ... | false | false | false | false | false | 0 |
get_2nd_let(int let)
{
struct ao_opt *p;
for (p = lam_args_optd->ao_opttop; p; p = p->aoo_next) {
if ((p->aoo_string[0] == let) && (p->aoo_flags & AOTAKEN)) {
p->aoo_flags &= ~AOTAKEN;
return(p->aoo_string[1]);
}
}
return(LAMERROR);
} | false | false | false | false | false | 0 |
parse_(inbuf, vbflag)
char *inbuf;
logical vbflag;
{
/* System generated locals */
integer i__1;
logical ret_val;
/* Local variables */
integer outbuf[40], outlnt;
/* Parameter adjustments */
--inbuf;
/* Function Body */
ret_val = FALSE_;
/* !ASSUME FAILS. */
prsvec_1.pr... | false | false | false | false | false | 0 |
close_thread (GTask *task,
gpointer object,
gpointer task_data,
GCancellable *cancellable)
{
GIOStream *stream = object;
GError *error = NULL;
if (!g_tls_connection_gnutls_close (stream, cancellable, &error))
g_task_return_error (task, error);
else
g_task_return_bo... | false | false | false | false | false | 0 |
v_bignum_sub(VBigDig *x, const VBigDig *y)
{
unsigned int i, xs = *x++, ys = *y++, s, carry, t;
if(x == y)
{
v_bignum_set_zero(x - 1);
return;
}
s = xs < ys ? xs : ys;
for(i = carry = 0; i < s; i++)
{
t = x[i] - y[i] - carry;
x[i] = t;
carry = t > MAX_DIG;
}
for(; carry && i < xs; i++)
{
t = x[i]... | false | false | false | false | false | 0 |
nexthet(i, val, inphase, LINK)
int i;
double val;
boolInt inphase;
struct LOC_recombine *LINK;
{
double newval, recval;
recval = LINK->theta[i - 1];
do {
i++;
LINK->hap1[i - 1] = 0;
LINK->hap2[i - 1] = 0;
if (!LINK->thishet[i - 1] && i != mlocus)
recval = recval * (1 - LINK->theta[i - 1]) +... | false | false | false | false | false | 0 |
__jffs2_dbg_acct_sanity_check_nolock(struct jffs2_sb_info *c,
struct jffs2_eraseblock *jeb)
{
if (unlikely(jeb && jeb->used_size + jeb->dirty_size +
jeb->free_size + jeb->wasted_size +
jeb->unchecked_size != c->sector_size)) {
JFFS2_ERROR("eeep, space accounting for block at 0x%08x is screwed.\n", jeb... | false | false | false | false | false | 0 |
pivot_row(struct isl_tab *tab,
struct isl_tab_var *var, int sgn, int c)
{
int j, r, tsgn;
isl_int t;
unsigned off = 2 + tab->M;
isl_int_init(t);
r = -1;
for (j = tab->n_redundant; j < tab->n_row; ++j) {
if (var && j == var->index)
continue;
if (!isl_tab_var_from_row(tab, j)->is_nonneg)
continue;
if ... | false | false | false | false | false | 0 |
get_guid_val( gpointer pObject )
{
slot_info_t* pInfo = (slot_info_t*)pObject;
g_return_val_if_fail( pObject != NULL, NULL );
if ( kvp_value_get_type( pInfo->pKvpValue ) == KVP_TYPE_GUID )
{
return (gpointer)kvp_value_get_guid( pInfo->pKvpValue );
}
else
{
return NULL;
... | false | false | false | false | false | 0 |
knh_buff_addPackagePath(CTX ctx, kBytes *ba, size_t pos, kbytes_t pkgname)
{
char *epath = knh_getenv("KONOHA_PACKAGE");
if(epath != NULL && isFoundPackage(ctx, ba, pos, B(epath), pkgname)) {
return 1;
}
kString *tpath = knh_getPropertyNULL(ctx, STEXT("konoha.package.path"));
if(tpath != NULL && isFoundPackage(c... | false | false | false | false | false | 0 |
extTextureCallback(void *data, t_symbol*s, int argc, t_atom*argv)
{
int index=5;
switch(argc){
case 5:
if(A_FLOAT!=argv[4].a_type)break;
GetMyClass(data)->m_extUpsidedown=atom_getint(argv+4);
case 4:
index=4;
if(A_FLOAT!=argv[3].a_type)break;
GetMyClass(data)->m_extType=atom_getint(argv+3);
... | false | false | false | false | false | 0 |
est_hex_decode(const char *str){
char *res, *wp;
int i, len;
assert(str);
len = strlen(str);
CB_MALLOC(res, len + 1);
wp = res;
for(i = 0; i < len; i += 2){
*(wp++) = (str[i] >= 'A' ? str[i] - 'A' + 10 : str[i] - '0') * 16 +
(str[i+1] >= 'A' ? str[i+1] - 'A' + 10 : str[i+1] - '0');
}
*wp = '... | false | false | false | true | false | 1 |
showInfo(char *msg,char *btn1)
{
bt.bt1=MESSAGE_ok;
bt.bt2=NULL;
bt.bt3=NULL;
if (btn1) bt.bt1=btn1;
return custom_dialog(GTK_STOCK_DIALOG_INFO,GTK_BUTTONS_OK,msg);
} | false | false | false | false | false | 0 |
test_substrings_vrFilter(
Operation *op,
Attribute *a,
ValuesReturnFilter *vrf,
char ***e_flags )
{
int i, j;
for ( i=0; a != NULL; a = a->a_next, i++ ) {
MatchingRule *mr = a->a_desc->ad_type->sat_substr;
struct berval *bv;
if ( !is_ad_subtype( a->a_desc, vrf->vrf_sub_desc ) ) {
continue;
}
if( ... | false | false | false | false | false | 0 |
gt_encseq_decode_runner(GT_UNUSED int argc, const char **argv,
int parsed_args, void *tool_arguments,
GtError *err)
{
gt_error_check(err);
return decode_sequence_file(argv[parsed_args], tool_arguments, err);
} | false | false | false | false | false | 0 |
asn1PE_H225CryptoH323Token_cryptoGKCert (OOCTXT* pctxt, H225CryptoH323Token_cryptoGKCert* pvalue)
{
int stat = ASN_OK;
/* encode toBeSigned */
stat = asn1PE_H235EncodedPwdCertToken (pctxt, pvalue->toBeSigned);
if (stat != ASN_OK) return stat;
/* encode algorithmOID */
stat = encodeObjectIdentifier... | false | false | false | false | false | 0 |
kgdb_reenter_check(struct kgdb_state *ks)
{
unsigned long addr;
if (atomic_read(&kgdb_active) != raw_smp_processor_id())
return 0;
/* Panic on recursive debugger calls: */
exception_level++;
addr = kgdb_arch_pc(ks->ex_vector, ks->linux_regs);
dbg_deactivate_sw_breakpoints();
/*
* If the break point remove... | false | false | false | false | false | 0 |
free_swap_cache(struct page *page)
{
if (PageSwapCache(page) && !page_mapped(page) && trylock_page(page)) {
try_to_free_swap(page);
unlock_page(page);
}
} | false | false | false | false | false | 0 |
keyPressEvent(QKeyEvent *e)
{
if(e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter )
terminate(true);
else if(e->key() == Qt::Key_Escape)
terminate(false);
else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Up)
{
terminate(true);
KLineEdit::keyPressEvent(e);
}... | false | false | false | false | false | 0 |
sec80211_find_rsn ( union ieee80211_ie *ie, void *ie_end,
int *is_rsn, u8 **end )
{
u8 *rsn = NULL;
if ( ! ieee80211_ie_bound ( ie, ie_end ) )
return NULL;
while ( ie ) {
if ( ie->id == IEEE80211_IE_VENDOR &&
ie->vendor.oui == IEEE80211_WPA_OUI_VEN ) {
DBG ( "RSN detect: old-style WPA IE found\n"... | false | false | false | false | true | 1 |
gnutls_pkcs12_bag_set_key_id (gnutls_pkcs12_bag_t bag, int indx,
const gnutls_datum_t * id)
{
int ret;
if (bag == NULL)
{
gnutls_assert ();
return GNUTLS_E_INVALID_REQUEST;
}
if (indx > bag->bag_elements - 1)
{
gnutls_assert ();
return GNUTLS_E_... | false | false | false | false | false | 0 |
TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s)
{
if (!TIFFCheckTile(tif, x, y, z, s))
return ((tmsize_t)(-1));
/*
* NB: A tile size of -1 is used instead of tif_tilesize knowing
* that TIFFWriteEncodedTile will clamp this to the tile size.
* This is done because the tile s... | false | false | false | false | false | 0 |
gst_direct_control_binding_get_value_array (GstControlBinding * _self,
GstClockTime timestamp, GstClockTime interval, guint n_values,
gpointer values_)
{
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (_self);
gint i;
gdouble *src_val;
gboolean res = FALSE;
GstDirectControlBindingConvertVa... | false | false | false | false | false | 0 |
gkrellm_sensors_sysdep_option(gchar *keyword, gchar *label, void (*func)())
{
SysdepOption *so = NULL;
so = g_new0(SysdepOption, 1);
sysdep_option_list = g_list_append(sysdep_option_list, so);
so->config_keyword = g_strdup(keyword);
so->config_label = g_strdup(label);
so->func = func;
} | false | false | false | false | false | 0 |
transition_equivalent(transition *a, transition *b) {
return (a->type == b->type) &&
(a->transition_character == b->transition_character) &&
(((state *)a->state)->type == ((state *)b->state)->type);
} | false | false | false | false | false | 0 |
setView(QAbstractItemView* view)
{
Q_D(KViewStateSaver);
d->m_scrollArea = view;
if (view) {
d->m_selectionModel = view->selectionModel();
d->m_treeView = qobject_cast<QTreeView*>(view);
} else {
d->m_selectionModel = 0;
d->m_treeView = 0;
}
d->m_view = view;
} | false | false | false | false | false | 0 |
bitnot(PG_FUNCTION_ARGS)
{
VarBit *arg = PG_GETARG_VARBIT_P(0);
VarBit *result;
bits8 *p,
*r;
bits8 mask;
result = (VarBit *) palloc(VARSIZE(arg));
VARATT_SIZEP(result) = VARSIZE(arg);
VARBITLEN(result) = VARBITLEN(arg);
p = VARBITS(arg);
r = VARBITS(result);
for (; p < VARBITEND(arg); p++)
... | false | false | false | false | true | 1 |
es_get_polarisability(const char *mode, const char *opName, double freq)
{
int nocc = ergo.molecule.getNumberOfElectrons();
if(nocc%2 != 0) {
do_output(LOG_CAT_ERROR, LOG_AREA_MAIN,
"es_get_polarisability works only for a closed shell.\n");
return 3;
}
nocc /= 2;
if(opName && strlen(o... | false | false | false | false | false | 0 |
qtreetbl_remove(qtreetbl_t *tbl, const char *name) {
return qtreetbl_remove_by_obj(tbl, name,
(name != NULL) ? strlen(name) + 1 : 0);
} | false | false | false | false | false | 0 |
mud_preferences_window_update_proxy_entry(MudPreferencesWindow *window, MudPrefs *preferences)
{
if(preferences->ProxyHostname)
gtk_entry_set_text(GTK_ENTRY(window->priv->proxy_entry), preferences->ProxyHostname);
} | false | false | false | false | false | 0 |
Rotate(int X, int Y, double *p1, double *p2, double *vpn)
{
double *o = this->PlaneSource->GetOrigin();
double *pt1 = this->PlaneSource->GetPoint1();
double *pt2 = this->PlaneSource->GetPoint2();
double *center = this->PlaneSource->GetCenter();
double v[3]; //vector of motion
double axis[3]; //axis of rota... | false | false | false | false | false | 0 |
TestFuncs(const std::vector<Function*> &Funcs,
std::string &Error) {
// Test to see if the function is misoptimized if we ONLY run it on the
// functions listed in Funcs.
outs() << "Checking to see if the program is misoptimized when "
<< (Funcs.size()==1 ? "th... | false | false | false | false | false | 0 |
is_printable(char *str)
{
unsigned char *tmp = (unsigned char *)str;
if (*tmp > 31 && *tmp < 127) {
return 1;
}
if (mb_fragment_len(str) > 1) {
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
assuan_write_status (assuan_context_t ctx,
const char *keyword, const char *text)
{
char buffer[256];
char *helpbuf;
size_t n;
gpg_error_t ae;
if ( !ctx || !keyword)
return _assuan_error (ctx, GPG_ERR_ASS_INV_VALUE);
if (!text)
text = "";
n = 2 + strlen (keyword) + 1 + strle... | true | true | false | true | false | 1 |
gtk_term_focus_in(GtkWidget *widget, GdkEventFocus *event)
{
GtkTerm *term;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_TERM (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
term = GTK_TERM (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
if (term->timeout_i... | false | false | false | false | false | 0 |
FileListDone( CTransfer * Transfer, DCTransferFileObject * TransferFileObject )
{
DCTransferQueueObject * TransferObject;
CString fn;
// CTransfer has been modified to:
// set the correct src name DC_USER_FILELIST_XMLBZ or DC_USER_FILELIST_BZ or DC_USER_FILELIST_HE3
// and not bz2/he3 decompress the buffer
// a... | false | false | false | false | false | 0 |
cm_find_listen(struct ib_device *device,
__be64 service_id)
{
struct rb_node *node = cm.listen_service_table.rb_node;
struct cm_id_private *cm_id_priv;
while (node) {
cm_id_priv = rb_entry(node, struct cm_id_private, service_node);
if ((cm_id_priv->id.service_mask & service_id) ==
cm_id_priv->i... | false | false | false | false | false | 0 |
ixgbe_is_non_eop(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
u32 ntc = rx_ring->next_to_clean + 1;
/* fetch, update, and store next to clean */
ntc = (ntc < rx_ring->count) ? ntc : 0;
rx_ring->next_to_clean = ntc;
prefetch(IXGBE_RX_DESC(rx_ring, ntc));
/... | false | false | false | false | false | 0 |
gck_session_init (GckSession *self)
{
self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, GCK_TYPE_SESSION, GckSessionPrivate);
self->pv->mutex = g_new0 (GMutex, 1);
g_mutex_init (self->pv->mutex);
} | false | false | false | false | false | 0 |
elm_table_pack_get(Evas_Object *subobj,
int *x,
int *y,
int *w,
int *h)
{
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
unsigned short ix, iy, iw, ih;
ELM_TABLE_CHECK(obj);
ELM_TABLE_DATA_GET(obj, sd);
evas_object_ta... | false | false | false | false | false | 0 |
set_pwm_auto_temp(struct device *dev,
struct device_attribute *devattr,
const char *buf,
size_t count)
{
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
struct adt7462_data *data = dev_get_drvdata(dev);
struct i2c_client *client = data->client;
long temp;
if (kstrtol(buf, 10, &t... | false | false | false | false | false | 0 |
parseString(YYSTYPE *lvalp, yyscan_t scanner, const char q,
enum tokenizer_state tostate)
{
size_t len;
/* look for " terminating the string */
const char *start = &scanner->in[scanner->pos], *end = start;
do {
const size_t siz = &scanner->in[scanner->insize] - end;
end = memchr(end, q, siz);
if(end && end ... | 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.