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 |
|---|---|---|---|---|---|---|
validateRange(ConstantRange R) {
if (R.getBitWidth() > MaxIntegerBW + 1)
return badRange();
return R;
} | false | false | false | false | false | 0 |
fill_fi (CamelStore *store,
CamelFolderInfo *fi,
guint32 flags)
{
CamelFolder *folder;
fi->unread = -1;
fi->total = -1;
folder = camel_object_bag_peek (store->folders, fi->full_name);
if (folder) {
if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
camel_folder_refresh_info_sync (folder, NULL... | false | false | false | false | false | 0 |
nextPosition(AiSprite sp,double mult)
{
double abs_2,nx,ny,sq,eg;
if(!sp.sun)
{
abs_2=sp.x*sp.x+sp.y*sp.y;
if(abs_2<1)
abs_2=1;
sq=sqrt(abs_2);
nx=sp.x/sq;
ny=sp.y/sq;
eg=cfg->gravity*mult;
sp.dx-=eg*nx/abs_2;
sp.dy-=eg*ny/abs_2;
sp.x+=sp.dx*mult;... | false | false | false | false | false | 0 |
hi_diff_calculate(hi_file *src, hi_file *dst, enum hi_diff_algorithm algorithm)
{
switch (algorithm)
{
case HI_DIFF_ALG_RABINKARP:
return hi_diff_calculate_rabinkarp(src,dst);
break;
case HI_DIFF_ALG_SIMPLE:
return hi_diff_calculate_simple(src,dst);
break;
}
return NULL;
} | false | false | false | false | false | 0 |
print_sanitized_string2 (FILE *fp, const char *string, int delim, int delim2)
{
return string? print_sanitized_buffer2 (fp, string, strlen (string),
delim, delim2):0;
} | false | false | false | false | false | 0 |
CopyAndAddInvertedQual(Query *parsetree,
Node *rule_qual,
int rt_index,
CmdType event)
{
/* Don't scribble on the passed qual (it's in the relcache!) */
Node *new_qual = (Node *) copyObject(rule_qual);
acquireLocksOnSubLinks_context context;
context.for_execute = true;
/*
* In case t... | false | false | false | false | false | 0 |
get_hash(const char * const key,
size_t const key_len) {
unsigned char retval;
size_t i;
XMLRPC_ASSERT(key != NULL);
retval = 0;
for (i = 0; i < key_len; i++)
retval += key[i];
return retval;
} | false | false | false | true | false | 1 |
fill_buffer (int16_t *dest, xmmsc_vis_properties_t* prop, int channels, int size, short *src)
{
int i, j;
if (prop->type == VIS_PEAK) {
short l = 0, r = 0;
for (i = 0; i < size; i += channels) {
if (src[i] > 0 && src[i] > l) {
l = src[i];
}
if (src[i] < 0 && -src[i] > l) {
l = -src[i];
}
if... | false | false | false | false | false | 0 |
check_use_var_for_def_var(Block *loop,
Statement *stm_head,
Quadruple *qpt)
{
Def_use_table *def_var, *use_var;
Boolean ret = FALSE;
int entry;
entry = qpt->op[0]->entry;
for (def_var = stm_head->def_var_list;
def_var && def_var->entry != entry;
def_var = def_var->n... | false | false | false | false | false | 0 |
router_parse_addr_policy(directory_token_t *tok)
{
addr_policy_t newe;
char *arg;
tor_assert(tok->tp == K_REJECT || tok->tp == K_REJECT6 ||
tok->tp == K_ACCEPT || tok->tp == K_ACCEPT6);
if (tok->n_args != 1)
return NULL;
arg = tok->args[0];
if (!strcmpstart(arg,"private"))
return rou... | false | false | false | false | false | 0 |
hash_props(void *user_data, void *reply_data, DBusError *error)
{
printf("%s:\n", (char*)user_data);
E_Ukit_Get_All_Properties_Return *ret = reply_data;
if (!ret || dbus_error_is_set(error))
{
free(user_data);
dbus_error_free(error);
return;
}
eina_hash_foreach(ret->prope... | false | false | false | false | false | 0 |
rnd_transmit(struct team *team, struct sk_buff *skb)
{
struct team_port *port;
int port_index;
port_index = prandom_u32_max(team->en_port_count);
port = team_get_port_by_index_rcu(team, port_index);
if (unlikely(!port))
goto drop;
port = team_get_first_port_txable_rcu(team, port);
if (unlikely(!port))
goto ... | false | false | false | false | false | 0 |
btrfs_find_ordered_sum(struct inode *inode, u64 offset, u64 disk_bytenr,
u32 *sum, int len)
{
struct btrfs_ordered_sum *ordered_sum;
struct btrfs_ordered_extent *ordered;
struct btrfs_ordered_inode_tree *tree = &BTRFS_I(inode)->ordered_tree;
unsigned long num_sectors;
unsigned long i;
u32 sectorsize = BTRFS... | false | false | false | false | false | 0 |
afr_sh_metadata_done (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
local = frame->local;
sh = &local->self_heal;
afr_sh_reset (frame, this);
if (local->govinda_gOvinda) {
gf_log (this->name, GF_LOG_INF... | false | false | false | false | false | 0 |
retrocl_get_changenumbers(void)
{
cnumRet cr;
if (retrocl_be_changelog == NULL) return -1;
cr.cr_cnum = 0;
cr.cr_time = 0;
slapi_seq_callback(RETROCL_CHANGELOG_DN,SLAPI_SEQ_FIRST,
(char *)attr_changenumber, /* cast away const */
NULL,NULL,0,&cr,NULL,handle_cnum_result,
... | false | false | false | false | false | 0 |
set_refuse_options(char *bp)
{
struct poptOption *op;
char *cp, shortname[2];
int is_wild, found_match;
shortname[1] = '\0';
while (1) {
while (*bp == ' ') bp++;
if (!*bp)
break;
if ((cp = strchr(bp, ' ')) != NULL)
*cp= '\0';
is_wild = strpbrk(bp, "*?[") != NULL;
found_match = 0;
for (op = long... | false | false | false | false | false | 0 |
objectsInSchemaToOids(GrantObjectType objtype, List *nspnames)
{
List *objects = NIL;
ListCell *cell;
foreach(cell, nspnames)
{
char *nspname = strVal(lfirst(cell));
Oid namespaceId;
List *objs;
namespaceId = LookupExplicitNamespace(nspname);
switch (objtype)
{
case ACL_OBJECT_RELATIO... | false | false | false | false | false | 0 |
gcut_egg_new_argv (gint args, gchar **argv)
{
GCutEgg *egg;
gint i;
GArray *command_line;
command_line = g_array_new(TRUE, TRUE, sizeof(gchar *));
for (i = 0; i < args && argv[i]; i++) {
const gchar *command = argv[i];
g_array_append_val(command_line, command);
}
egg = gcut_... | false | false | false | false | false | 0 |
_build_bitmaps_pre_select(void)
{
struct part_record *part_ptr;
struct node_record *node_ptr;
ListIterator part_iterator;
int i;
/* scan partition table and identify nodes in each */
part_iterator = list_iterator_create(part_list);
while ((part_ptr = (struct part_record *) list_next(part_iterator))) {
FRE... | false | false | false | false | false | 0 |
getPickAction(void)
{
if (this->pickaction == NULL) {
this->pickaction = new SoRayPickAction(this->viewport);
}
return this->pickaction;
} | false | false | false | false | false | 0 |
MakeColumnEditable( unsigned int column,
bool editable )
{
wxASSERT( column != 1 );
wxArrayInt& cols = m_pState->m_editableColumns;
if ( editable )
{
cols.push_back(column);
}
else
{
for ( int i = cols.size() - 1; i > 0; i-- )
... | false | false | false | false | false | 0 |
vwarnx (const char *format, __gnuc_va_list ap)
{
flockfile (stderr);
if (_IO_fwide (stderr, 0) > 0)
{
#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
__fwprintf (stderr, L"%s: ", __progname);
convert_and_print (format, ap);
putwc_unlocked (L'\n', stderr);
#else
abort ();
#endif
}
else
{... | false | false | false | false | false | 0 |
log_syslog(kadm5_hook_modinfo *config, int priority, const char *fmt,
va_list args)
{
char *message;
int status;
/* If configured not to log, do nothing. */
if (!config->syslog)
return;
/* Log the message. */
status = vasprintf(&message, fmt, args);
if (status < 0)
... | false | false | false | false | false | 0 |
__lambda2_ (Block1Data* _data1_, GParamSpec* pspec) {
BoxesBoxConfig * self;
BoxesBoxConfigSyncProperty* _tmp0_ = NULL;
gint _tmp0__length1 = 0;
#line 150 "/extra-data/checkout/gnome/gnome-boxes/src/box-config.vala"
self = _data1_->self;
#line 150 "/extra-data/checkout/gnome/gnome-boxes/src/box-config.vala"
g_retu... | false | false | false | false | false | 0 |
vxml_parser_skip(vxml_parser_t *vp, size_t amount)
{
size_t skipped = 0;
g_assert(0 == vp->unread_offset); /* No pending unread characters */
while (vp->input != NULL) {
size_t needed = amount - skipped;
size_t avail;
struct vxml_buffer *vb;
struct vxml_buffer_memory *m;
avail = vxml_parser_buffer_remai... | false | false | false | false | false | 0 |
jpeg_start (struct zoran *zr)
{
int reg;
zr->frame_num = 0;
/* deassert P_reset, disable code transfer, deassert Active */
btwrite(ZR36057_JPC_P_Reset, ZR36057_JPC);
/* stop flushing the internal code buffer */
btand(~ZR36057_MCTCR_CFlush, ZR36057_MCTCR);
/* enable code transfer */
btor(ZR36057_JPC_CodTrnsEn,... | false | false | false | false | false | 0 |
fc_utf8_validate_trunc(char *utf8_string)
{
char *end;
fc_assert_ret_val(NULL != utf8_string, NULL);
if (!fc_utf8_validate(utf8_string, (const char **) &end)) {
*end = '\0';
}
return utf8_string;
} | false | false | false | false | false | 0 |
v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls,
u8 manual_val, bool set_volatile)
{
struct v4l2_ctrl *master = controls[0];
u32 flag = 0;
int i;
v4l2_ctrl_cluster(ncontrols, controls);
WARN_ON(ncontrols <= 1);
WARN_ON(manual_val < master->minimum || manual_val > master->maximum);
... | false | false | false | false | false | 0 |
onig_renumber_name_table(regex_t* reg, GroupNumRemap* map)
{
NameTable* t = (NameTable* )reg->name_table;
if (IS_NOT_NULL(t)) {
onig_st_foreach(t, i_renumber_name, (HashDataType )map);
}
return 0;
} | false | false | false | false | false | 0 |
emit_sfm (int base_reg, int count)
{
rtx par;
rtx dwarf;
rtx tmp, reg;
int i;
par = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count));
dwarf = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (count + 1));
reg = gen_rtx_REG (XFmode, base_reg++);
XVECEXP (par, 0, 0)
= gen_rtx_SET (VOIDmode,
gen_frame_m... | false | false | false | false | false | 0 |
cli_rawaddr(uint32_t vaddr, struct cli_exe_section *sects, uint16_t nsects, unsigned int *err)
{
unsigned int i, found = 0;
for(i = 0; i < nsects; i++) {
if(sects[i].rva <= vaddr && sects[i].rva + sects[i].vsz > vaddr) {
found = 1;
break;
}
}
if(!found) {
*err = 1;
return 0;
}
*err... | false | false | false | false | false | 0 |
nm_ip4_route_dup (NMIP4Route *source)
{
NMIP4Route *route;
g_return_val_if_fail (source != NULL, NULL);
g_return_val_if_fail (source->refcount > 0, NULL);
route = nm_ip4_route_new ();
route->dest = source->dest;
route->prefix = source->prefix;
route->next_hop = source->next_hop;
route->metric = source->metric... | false | false | false | false | false | 0 |
displayPlanetInfo(Planet *planet)
{
if (!planet) {
if (m_planetInfoItem) {
m_planetInfoItem->hide();
}
return;
}
/**
* @todo Figure out why coord.y and coord.x seem to be used the other way
* around.
*/
QPointF pos(
planet->sector()->coord().... | false | false | false | false | false | 0 |
gtk_plot_data_destroy (GtkObject *object)
{
GtkPlotData *data;
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_PLOT_DATA (object));
data = GTK_PLOT_DATA (object);
if(data->labels_attr.font) g_free(data->labels_attr.font);
data->labels_attr.font = NULL;
if(data->labels_attr.text) g_free(data... | false | false | false | false | false | 0 |
m68k_op_roxl_32_s(void)
{
#if M68K_USE_64_BIT
uint* r_dst = &DY;
uint shift = (((REG_IR >> 9) - 1) & 7) + 1;
uint64 src = *r_dst;
uint64 res = src | (((uint64)XFLAG_AS_1()) << 32);
res = ROL_33_64(res, shift);
FLAG_C = FLAG_X = res >> 24;
res = MASK_OUT_ABOVE_32(res);
*r_dst = res;
FLAG_N = NFLAG_3... | false | false | false | false | false | 0 |
fc_remove_host(struct Scsi_Host *shost)
{
struct fc_vport *vport = NULL, *next_vport = NULL;
struct fc_rport *rport = NULL, *next_rport = NULL;
struct workqueue_struct *work_q;
struct fc_host_attrs *fc_host = shost_to_fc_host(shost);
unsigned long flags;
spin_lock_irqsave(shost->host_lock, flags);
/* Remove an... | false | false | false | false | false | 0 |
GetPlayer(ObjectGuid guid)
{
Player* plr = ObjectAccessor::FindPlayer(guid); // return only in world players
return plr && plr->GetMap() == this ? plr : NULL;
} | false | false | false | false | false | 0 |
do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori,
long offset, int do_bind TSRMLS_DC) /* {{{ */
{
if (!stmt->executed) {
return 0;
}
if (!dispatch_param_event(stmt, PDO_PARAM_EVT_FETCH_PRE TSRMLS_CC)) {
return 0;
}
if (!stmt->methods->fetcher(stmt, ori, offset TSRMLS_CC)) {
return 0;
}
... | false | false | false | false | false | 0 |
jpeg_huff_decode (bitread_working_state * state,
register bit_buf_type get_buffer, register int bits_left,
d_derived_tbl * htbl, int min_bits)
{
register int l = min_bits;
register INT32 code;
/* HUFF_DECODE has determined that the code is at least min_bits */
/* bits long, so fetch that many bits in o... | false | false | false | false | false | 0 |
SelectableCell(txt_table_t *table, int x, int y)
{
txt_widget_t *widget;
int i;
if (x < 0 || x >= table->columns)
{
return 0;
}
i = y * table->columns + x;
if (i >= 0 && i < table->num_widgets)
{
widget = table->widgets[i];
return widget != NULL
&& ... | false | false | false | false | false | 0 |
IsComputerNameLocal(const wxString& strMachine) {
static wxString strHostName = wxEmptyString;
static wxString strFullHostName = wxEmptyString;
if (strHostName.empty()) {
strHostName = ::wxGetHostName().Lower();
}
if (strFullHostName.empty()) {
strFullHostName = ::wxGetFullHostName(... | false | false | false | false | false | 0 |
sparse_file_resparse(struct sparse_file *in_s, unsigned int max_len,
struct sparse_file **out_s, int out_s_count)
{
struct backed_block *bb;
unsigned int overhead;
struct sparse_file *s;
struct sparse_file *tmp;
int c = 0;
tmp = sparse_file_new(in_s->block_size, in_s->len);
if (!tmp) {
return -ENOMEM;
}
... | false | false | false | false | false | 0 |
check_search_path(char **newval, void **extra, GucSource source)
{
bool result = true;
char *rawname;
List *namelist;
ListCell *l;
/* Need a modifiable copy of string */
rawname = pstrdup(*newval);
/* Parse string into list of identifiers */
if (!SplitIdentifierString(rawname, ',', &namelist))
{
/... | false | false | false | false | false | 0 |
setuidgid(const char *userarg,
const char *grouparg)
{
if (grouparg)
{
gid_t gid = 0;
struct group *gr;
if (isid(grouparg))
gid=atoi(grouparg);
else if ((gr=getgrnam(grouparg)) == 0)
{
fprintf(stderr, "Group not found: %s\n", grouparg);
exit(1);
}
else gid=gr->gr_gid;
libmail_changeg... | false | false | false | false | false | 0 |
setExecutionCount(const MachineBasicBlock *MBB, double w) {
DEBUG(dbgs() << "Creating Block " << MBB->getBasicBlock()->getName()
<< " (weight: " << format("%.20g",w) << ")\n");
BlockInformation[MBB->getParent()][MBB] = w;
} | false | false | false | false | false | 0 |
gnome_keyring_item_get_info_sync (const char *keyring,
guint32 id,
GnomeKeyringItemInfo **info)
{
gkr_init ();
return gnome_keyring_item_get_info_full_sync (keyring, id, GNOME_KEYRING_ITEM_INFO_ALL, info);
} | false | false | false | false | false | 0 |
executeUrlDesktopFile(const KNewFileMenuSingleton::Entry& entry)
{
KNameAndUrlInputDialog* dlg = new KNameAndUrlInputDialog(i18n("File name:"), entry.comment, m_popupFiles.first(), m_parentWidget);
m_copyData.m_templatePath = entry.templatePath;
dlg->setModal(q->isModal());
dlg->setAttribute(Qt::WA_Dele... | false | false | false | false | false | 0 |
y_transfer_next(y_transfer * pyt, gx_device * dev)
{
gx_device_memory * const mdev = (gx_device_memory *)dev;
int my = mdev->mapped_y, mh = mdev->mapped_height;
int ms = mdev->mapped_start;
int ty = pyt->y_next += pyt->transfer_height;
int th = pyt->height_left;
int bh = 1 << mdev->log2_scale.y;... | false | false | false | false | false | 0 |
py_attack(int y, int x) {
int blow_energy = 10000 / p_ptr->state.num_blows;
int blows = 0;
bool fear = FALSE;
monster_type *m_ptr = cave_monster_at(cave, y, x);
/* disturb the player */
disturb(p_ptr, 0,0);
/* Initialize the energy used */
p_ptr->energy_use = 0;
/* Attack until energy runs out or enemy die... | true | true | false | false | false | 1 |
define_builtin_macros_for_compilation_flags (cpp_reader *pfile)
{
if (flag_pic)
{
cpp_define_formatted (pfile, "__pic__=%d", flag_pic);
cpp_define_formatted (pfile, "__PIC__=%d", flag_pic);
}
if (flag_pie)
{
cpp_define_formatted (pfile, "__pie__=%d", flag_pie);
cpp_define_formatt... | false | false | false | false | false | 0 |
qib_7220_tempsense_rd(struct qib_devdata *dd, int regnum)
{
int ret;
u8 rdata;
if (regnum > 7) {
ret = -EINVAL;
goto bail;
}
/* return a bogus value for (the one) register we do not have */
if (!((1 << regnum) & VALID_TS_RD_REG_MASK)) {
ret = 0;
goto bail;
}
ret = mutex_lock_interruptible(&dd->eep_lo... | false | false | false | false | false | 0 |
dblayer_set_recovery_required(struct ldbminfo *li)
{
if (NULL == li || NULL == li->li_dblayer_private)
{
LDAPDebug(LDAP_DEBUG_ANY,"set_recovery_required: no dblayer info\n",
0, 0, 0);
return;
}
li->li_dblayer_private->dblayer_recovery_required = 1;
} | false | false | false | false | false | 0 |
_driver_stats_seq_next(struct seq_file *s, void *v, loff_t *pos)
{
++*pos;
if (*pos >= ARRAY_SIZE(hfi1_statnames))
return NULL;
return pos;
} | false | false | false | false | false | 0 |
SProcAuSetElementStates(ClientPtr client)
{
char n;
int i;
auElementState *states;
REQUEST(auSetElementStatesReq);
swaps(&stuff->length, n);
swapl(&stuff->numStates, n);
REQUEST_AT_LEAST_SIZE(auSetElementStatesReq); /* not EXACT */
states = (auElementState *) & stuff[1];
for ... | false | false | false | false | false | 0 |
spawn_thread_manager(void *ctx_)
{
/* In thread_manager, we use only some of the ctx fields. */
struct uct_thread_ctx *mctx = ctx_;
struct uct *u = mctx->u;
struct tree *t = mctx->t;
fast_srandom(mctx->seed);
int played_games = 0;
pthread_t threads[u->threads];
int joined = 0;
uct_halt = 0;
/* Garbage coll... | false | false | false | false | false | 0 |
cg_combo_flags_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
CgComboFlags *combo_flags;
CgComboFlagsPrivate *priv;
g_return_if_fail(CG_IS_COMBO_FLAGS (object));
combo_flags = CG_COMBO_F... | false | false | false | false | false | 0 |
clone(void) const
{
OSSDEVICE* target = new OSSDEVICE(label(), precise_srate_mode);
return target;
} | false | false | false | false | false | 0 |
finish()
{
m_gameEntries.clear();
if (m_activeGames.isEmpty())
cleanup();
else
m_finishing = true;
} | false | false | false | false | false | 0 |
GetDebugEventContext() {
Handle<Context> context = Debug::debugger_entry()->GetContext();
// Top::context() may have been NULL when "script collected" event occured.
if (*context == NULL) {
return v8::Local<v8::Context>();
}
Handle<Context> global_context(context->global_context());
return v8::Utils::To... | false | false | false | false | false | 0 |
af_glastgenkey (list, gen)
Af_revlist *list;
int gen;
{
register int i = list->af_listlen-1;
static Af_key lastgenkey;
lastgenkey.af_ldes = list;
while (!(list->af_list[i].af_class & AF_VALID) ||
(list->af_list[i].af_gen != gen)) {
i--;
if (i == 0)
return (NULL);
}
lastgenkey.af_l... | false | false | false | false | false | 0 |
get_insert_comment_uri (GDataCommentable *self, GDataComment *comment_)
{
GDataGDFeedLink *feed_link;
feed_link = GDATA_YOUTUBE_VIDEO (self)->priv->comments_feed_link;
if (feed_link == NULL) {
return NULL;
}
return _gdata_service_fix_uri_scheme (gdata_gd_feed_link_get_uri (feed_link));
} | false | false | false | false | false | 0 |
raiseSaneError (SANE_Status st)
{
const char *string;
if (st == SANE_STATUS_GOOD)
{
Py_INCREF (Py_None);
return (Py_None);
}
string = sane_strstatus (st);
//PyErr_SetString (ErrorObject, string);
PyErr_SetObject(ErrorObject, PyInt_FromLong(st));
return NULL;
} | false | false | false | false | false | 0 |
close_con_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
{
struct iwch_ep *ep = ctx;
struct iwch_qp_attributes attrs;
unsigned long flags;
int release = 0;
PDBG("%s ep %p\n", __func__, ep);
BUG_ON(!ep);
/* The cm_id may be null if we failed to connect */
spin_lock_irqsave(&ep->com.lock, flags);
swi... | false | false | false | false | false | 0 |
StartDrawImage(
opvp_int_t sourceWidth, opvp_int_t sourceHeight, opvp_int_t sourcePitch,
opvp_imageformat_t imageFormat, opvp_int_t destinationWidth,
opvp_int_t destinationHeight)
{
if (!supportStartDrawImage) {
*opvpErrorNo = OPVP_NOTSUPPORTED;
return -1;
}
return procs->opvpStartDrawImage(printerC... | false | false | false | false | false | 0 |
ParseMCOVLine(std::string const& line,
std::string& routine,
std::string& function,
int& linenumber,
int& count)
{
// this method parses lines from the .mcov file... | false | false | false | false | false | 0 |
ario_browser_cmd_albums_properties (GtkAction *action,
ArioBrowser *browser)
{
ARIO_LOG_FUNCTION_START;
g_return_if_fail (IS_ARIO_TREE_ALBUMS (browser->priv->popup_tree));
/* Show album properties */
if (browser->priv->popup_tree)
ario... | false | false | false | false | false | 0 |
js_GetPrinterOutput(JSPrinter *jp)
{
JSContext *cx;
JSString *str;
cx = jp->sprinter.context;
if (!jp->sprinter.base)
return cx->runtime->emptyString;
str = JS_NewStringCopyZ(cx, jp->sprinter.base);
if (!str)
return NULL;
JS_FreeArenaPool(&jp->pool);
INIT_SPRINTER(cx, &j... | false | false | false | false | false | 0 |
emitEnumeration(File *file, String *name, Node *n) {
Printf(file, "%s = {", name);
int i;
bool gencomma = false;
int max = aToL(Getattr(n, "max"));
Hash *items = Getattr(n, "items");
for (i = 0; i <= max; i++) {
if (gencomma) {
Printf(file, ",");
}
Printf(file, "\n");
ge... | false | false | false | false | false | 0 |
drag(int x, int y, int b)
{
if (b > 1) return;
last_n = n_droppable(x, y);
stack_continue_drag(last_n, x, y);
} | false | false | false | false | false | 0 |
dumpConversion(Archive *fout, DumpOptions *dopt, ConvInfo *convinfo)
{
PQExpBuffer query;
PQExpBuffer q;
PQExpBuffer delq;
PQExpBuffer labelq;
PGresult *res;
int i_conforencoding;
int i_contoencoding;
int i_conproc;
int i_condefault;
const char *conforencoding;
const char *contoencoding;
const cha... | false | false | false | false | false | 0 |
close_tables_if()
{
unlock_tables_if();
DENA_VERBOSE(100, fprintf(stderr, "HNDSOCK close tables\n"));
close_thread_tables(thd);
#if MYSQL_VERSION_ID >= 50505
thd->mdl_context.release_transactional_locks();
#endif
if (!table_vec.empty()) {
statistic_increment(close_tables_count, &LOCK_status);
tabl... | false | false | false | false | false | 0 |
grow_pa_list(krb5_pa_data ***out_pa_list, int *out_pa_list_size,
krb5_pa_data **addition, int num_addition)
{
krb5_pa_data **pa_list;
int i;
/* Allocate space for new entries and a null terminator. */
pa_list = realloc(*out_pa_list, (*out_pa_list_size + num_addition + 1) *
... | false | false | false | false | false | 0 |
cairo_surface_to_pixbuf (cairo_surface_t *surface)
{
gint stride, width, height, x, y;
guchar *data, *output, *output_pixel;
/* This doesn't deal with alpha --- it simply converts the 4-byte Cairo ARGB
* format to the 3-byte GdkPixbuf packed RGB format. */
g_assert (cairo_image_surface_get_format (surface) == CA... | false | false | false | false | false | 0 |
vala_provider_construct_member_access (ValaProvider* self, gchar** names, int names_length1) {
ValaExpression* result = NULL;
ValaExpression* expr;
g_return_val_if_fail (self != NULL, NULL);
expr = NULL;
{
gint i;
i = 0;
{
gboolean _tmp0_;
_tmp0_ = TRUE;
while (TRUE) {
gboolean _tmp1_;
gchar... | false | false | false | false | false | 0 |
RegisterInternalFilter(GenericFilterType *filter, float weight)
{
// Observe the filter
unsigned long progressTag =
filter->AddObserver(ProgressEvent(), m_CallbackCommand);
unsigned long iterationTag =
filter->AddObserver(IterationEvent(), m_CallbackCommand);
// Create a record for the filter
struct ... | false | false | false | false | false | 0 |
lu_decomposition (double **a, int n, int *index, int *sign)
{
int i, imax = 0, j, k;
double big, sum, temp;
double *v;
v = (double *) malloc (n * sizeof (double));
*sign = 1;
for (i = 0; i < n; i++)
{
big = 0;
for (j = 0; j < n; j++)
if ((temp = fabs (a[i][j])) > big)
bi... | false | false | false | false | false | 0 |
construct_ctr_preload(u8 *ctr_preload, sint a4_exists, sint qc_exists,
u8 *mpdu, u8 *pn_vector, sint c)
{
sint i;
for (i = 0; i < 16; i++)
ctr_preload[i] = 0x00;
i = 0;
ctr_preload[0] = 0x01; /* flag */
if (qc_exists && a4_exists)
ctr_preload[1] = mpdu[30] & 0x0f;
if (qc_exists && !a4_exists)
ctr_... | false | false | false | false | false | 0 |
inode_xattr_modify(struct inode *inode, int xmlMode, const char *attrname,
void *value, size_t size)
{
struct xattrs *xattrs = xmlMode ? &inode->i_xmlattrs : &inode->i_xattrs;
struct xattr_entry *entry = xattr_find(xattrs, attrname);
if (entry == NULL)
return (GFARM_ERR_NO_SUCH_OBJECT);
if (entry->cached_attrv... | false | true | false | false | false | 1 |
cook_args(char **argv)
{
FILE *fp;
fp = stdin;
filename = "stdin";
do {
if (*argv) {
if (!strcmp(*argv, "-"))
fp = stdin;
else if ((fp = fopen(*argv,
fflag ? "rf" : "r")) == NULL) {
perror("fopen");
rval = 1;
++argv;
continue;
}
filename = *argv++;
}
cook_buf(fp);
... | false | false | false | false | true | 1 |
set_field_ptr(Field **ptr, const uchar *new_buf,
const uchar *old_buf)
{
my_ptrdiff_t diff= (new_buf - old_buf);
DBUG_ENTER("set_field_ptr");
do
{
(*ptr)->move_field_offset(diff);
} while (*(++ptr));
DBUG_VOID_RETURN;
} | false | false | false | false | false | 0 |
pv_set_value(struct sip_msg* msg, pv_spec_p sp,
int op, pv_value_t *value)
{
struct sip_msg* pv_msg;
if(msg==NULL || sp==NULL || sp->setf==NULL || sp->type==PVT_NONE)
{
LM_ERR("bad parameters\n");
return -1;
}
if(sp->pvc && sp->pvc->contextf)
{
pv_msg = sp->pvc->contextf(msg);
if(pv_msg == NULL || pv_... | false | false | false | false | false | 0 |
copybw(int32 *lptr, int32 n)
{
while(n>=8) {
lptr[0] = 0xff000000+(0x010101*(lptr[0]&0xff));
lptr[1] = 0xff000000+(0x010101*(lptr[1]&0xff));
lptr[2] = 0xff000000+(0x010101*(lptr[2]&0xff));
lptr[3] = 0xff000000+(0x010101*(lptr[3]&0xff));
lptr[4] = 0xff000000+(0x010101*(lptr[4]&0xff));
lptr[5] =... | false | false | false | false | false | 0 |
_dbus_list_copy (DBusList **list,
DBusList **dest)
{
DBusList *link;
_dbus_assert (list != dest);
*dest = NULL;
link = *list;
while (link != NULL)
{
if (!_dbus_list_append (dest, link->data))
{
/* free what we have so far */
_dbus_list_clear (dest);
... | false | false | false | false | false | 0 |
filteringaction_new(int type, int account_id,
gchar * destination,
gint labelcolor, gint score, gchar * header)
{
FilteringAction * action;
action = g_new0(FilteringAction, 1);
action->type = type;
action->account_id = account_id;
if (destination) {
action->destination = g_strdup(destinat... | false | false | false | false | false | 0 |
test_enums(void)
{
hid_t dtype;
size_t size = 16;
char name1[16];
int value1 = 7;
const char *name2 = "WHITE";
int value2;
H5T_class_t type_class;
char* dt_str;
size_t str_len;
TESTING3(" text for enum types");
if((dtype = H5LTtext_to_dtype("H5T_E... | false | false | false | false | false | 0 |
codec_blueprint_has_factory (CodecBlueprint *blueprint,
gboolean is_send)
{
if (is_send)
return (blueprint->send_pipeline_factory != NULL);
else
return (blueprint->receive_pipeline_factory != NULL);
} | false | false | false | false | false | 0 |
ShortenDeadCopyLiveRange(LiveInterval &li,
MachineInstr *CopyMI) {
SlotIndex CopyIdx = li_->getInstructionIndex(CopyMI);
LiveInterval::iterator MLR =
li.FindLiveRangeContaining(CopyIdx.getDefIndex());
if (MLR == li.end())
return false; // Already re... | false | false | false | false | false | 0 |
nextline ( int einzug, const char* txtptr )
{
if ( tvt_dispactive == 0 && txtptr ) {
if ( ( tvt_startpoint == NULL && (tvt_yp > 500) ) || ( tvt_startpoint && ( tvt_yp > (tvt_startpoint->ypos+500) ))) {
pstartpoint newstartpoint = new ( tstartpoint );
newstartpoint->ypos = tvt_yp;
... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
comedi_t *device;
int retval;
struct parsed_options options;
init_parsed_options(&options);
parse_options(&options, argc, argv);
device = comedi_open(options.filename);
if(!device)
{
comedi_perror(options.filename);
exit(-1);
}
/*FIXME: check that device is counter */
prin... | false | false | false | false | false | 0 |
change(GlyphIndex index) {
CompositionComponent& component = component_->item_ref(index);
Glyph* contents = body();
for (CompositorIndex b = item(index)/2; b < breaks_->count(); ++b) {
Break& br = breaks_->item_ref(b);
if (br.viewed() && index >= br.first_ && index <= br.last_+1) {
... | false | false | false | false | false | 0 |
search_array_du_from_memory_access_region_table(Array_def_use_table_semnode *head,
Memory_access_region_table *martbl)
{
Array_def_use_table_semnode *apt;
for (apt = head; apt != NULL; apt = apt->next) {
if(apt->pa_object_list != NULL)
if (apt->entry == martbl->entry &&
apt->kind == martbl->kin... | false | false | false | false | false | 0 |
parse_vopdquant (GstBitReader * br, GstVC1FrameHdr * framehdr, guint8 dquant)
{
GstVC1VopDquant *vopdquant = &framehdr->vopdquant;
GST_DEBUG ("Parsing vopdquant");
vopdquant->dqbilevel = 0;
if (dquant == 2) {
vopdquant->dquantfrm = 0;
READ_UINT8 (br, vopdquant->pqdiff, 3);
if (vopdquant->pqdiff... | false | false | false | false | false | 0 |
asp_send(int s, int len, char* msg, struct sockaddr* to){
int out_stat, err, err_size = sizeof(int);
if((out_stat = sendto(s, msg, len, 0, to, sizeof(struct sockaddr))) == -1){
/* local send error */
#ifndef ENABLE_DEBUG
if(errno != ECONNREFUSED) asp_perror("sendto");
#endif
}
#ifndef ENABLE_DEBUG
if(ve... | false | false | false | false | false | 0 |
OTF_Writer_getStream( OTF_Writer* writer, uint32_t streamId ) {
uint32_t a;
uint32_t b;
uint32_t c;
uint32_t i;
/* search if already present */
a= 0;
b= writer->n;
if ( 0 < writer->n ) {
if ( streamId == writer->streams[0]->id ) {
return writer->streams[0];
}
if ( streamId == writer->streams... | false | false | false | false | false | 0 |
setgray(char t, float *f)
{
if ( t == 'g' ) {
if( f[0] >= 0.0 ) printf("%f setgray\n", f[0] );
} else if ( t == 'c' ) {
printf("%f %f %f setrgbcolor\n", f[0], f[1], f[2] );
}
} | false | false | false | false | false | 0 |
_get_update_config_stages(int noreset)
{
std::vector<uint32_t> stages;
uint32_t *base_stages;
int num_base_stages;
if (is_z_remote() || is_mh_remote()) {
base_stages = (uint32_t*)update_configuration_zwave_mh_stages;
num_base_stages = update_configuration_zwave_mh_num_stages;
} else {
base_stages = (uint32_... | false | false | false | false | false | 0 |
ArticleViewPopup( const std::string& url, bool show_abone )
: ArticleViewBase( url, url ), m_show_abone( show_abone )
{
#ifdef _DEBUG
std::cout << "ArticleViewPopup::ArticleViewPupup " << get_url() << " show_abone " << m_show_abone << std::endl;
#endif
setup_view();
} | false | false | false | false | false | 0 |
RegisterVideoProcessor(uint32 ssrc,
VideoProcessor* processor) {
VideoProcessorParams processor_params(ssrc, processor);
return (Send(MSG_REGISTERVIDEOPROCESSOR, &processor_params) &&
processor_params.result);
} | false | false | false | false | false | 0 |
ajCharCmpCase(const char* txt, const char* txt2)
{
const char* cp;
const char* cq;
for(cp = txt, cq = txt2; *cp && *cq; cp++, cq++)
if(toupper((int) *cp) != toupper((int) *cq))
{
if(toupper((int) *cp) > toupper((int) *cq))
return 1;
else
return -1;
}
if(*cp)
return 1;
if(*cq)
r... | false | false | false | false | false | 0 |
set_lhs_expr_drvrtyp(struct expr_t *xp, int32 drvr_typ, int32 fnind,
int32 flcnt)
{
int32 ri1, ri2;
struct net_t *np;
struct expr_t *idndp, *catxp;
ri1 = ri2 = -1;
switch ((byte) xp->optyp) {
case ID: case GLBREF:
if (xp->lu.sy->sytyp != SYM_N)
{
/* SJM 11/12/01 - must catch syntax error of using n... | 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.