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 |
|---|---|---|---|---|---|---|
gedit_show_preferences_dialog (GeditWindow *parent)
{
gedit_debug (DEBUG_PREFS);
g_return_if_fail (GEDIT_IS_WINDOW (parent));
if (preferences_dialog == NULL)
{
preferences_dialog = GTK_WIDGET (g_object_new (GEDIT_TYPE_PREFERENCES_DIALOG, NULL));
g_signal_connect (preferences_dialog,
"destroy",
G_C... | false | false | false | false | false | 0 |
query_and_dump(char *buf, size_t size, ib_portid_t * portid,
ibnd_node_t * node, char *node_name, int portnum,
const char *attr_name, uint16_t attr_id,
int start_field, int end_field)
{
uint8_t pc[1024];
uint32_t val = 0;
int i, n;
memset(pc, 0, sizeof(pc));
if (!pma_query_via(pc, portid, portnum,... | false | false | false | false | false | 0 |
aureon_cs8415_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
struct aureon_spec *spec = ice->spec;
unsigned short oval, nval;
int change;
snd_ice1712_save_gpio_status(ice);
oval = aureon_cs8415_get(ice, CS8415_CTRL2);
nval = o... | false | false | false | false | false | 0 |
imported(const char *tag)
{ if (!tag || *tag != '"')
return false;
for (SetOfString::const_iterator u = exturis.begin(); u != exturis.end(); ++u)
{ size_t n = strlen(*u);
if (!strncmp(*u, tag + 1, n) && tag[n+1] == '"')
return true;
}
return false;
} | false | false | false | false | false | 0 |
uint4_reverse (UINT4 forward) {
UINT4 reverse = 0U;
int c;
int i;
for (i = 0; i < 16; i++) {
c = forward & 0x03;
reverse <<= 2;
reverse |= c;
forward >>= 2;
}
return reverse;
} | false | false | false | false | false | 0 |
InitializeFromCommand(cmCTestStartCommand* command)
{
std::string src_dir
= this->GetCTestConfiguration("SourceDirectory").c_str();
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory").c_str();
this->DartVersion = 1;
for(Part p = PartStart; p != PartCount; p = Part(p+1))
{
this->Parts... | false | false | false | false | false | 0 |
gth_tags_file_add (GthTagsFile *tags,
const char *tag)
{
GList *link;
link = g_list_find_custom (tags->items, tag, (GCompareFunc) strcmp);
if (link == NULL) {
tags->items = g_list_append (tags->items, g_strdup (tag));
return TRUE;
}
return FALSE;
} | false | false | false | false | false | 0 |
SetInitCallback(JackThreadInitCallback callback, void *arg)
{
if (IsActive()) {
jack_error("You cannot set callbacks on an active client");
return -1;
} else {
fInitArg = arg;
fInit = callback;
/* make sure that the message buffer thread is initialized too */
retu... | false | false | false | false | false | 0 |
numbered_backup (char **buffer, size_t buffer_size, size_t filelen)
{
enum numbered_backup_result result = BACKUP_IS_NEW;
DIR *dirp;
struct dirent *dp;
char *buf = *buffer;
size_t versionlenmax = 1;
char *base = last_component (buf);
size_t base_offset = base - buf;
size_t baselen = base_len (base);
... | false | false | false | false | false | 0 |
bnx2_write_phy(struct bnx2 *bp, u32 reg, u32 val)
{
u32 val1;
int i, ret;
if (bp->phy_flags & PHY_INT_MODE_AUTO_POLLING_FLAG) {
val1 = REG_RD(bp, BNX2_EMAC_MDIO_MODE);
val1 &= ~BNX2_EMAC_MDIO_MODE_AUTO_POLL;
REG_WR(bp, BNX2_EMAC_MDIO_MODE, val1);
REG_RD(bp, BNX2_EMAC_MDIO_MODE);
udelay(40);
}
val1 = ... | false | false | false | false | false | 0 |
stat_cache_lstat(server *srv, buffer *dname, struct stat *lst) {
if (lstat(dname->ptr, lst) == 0) {
return S_ISLNK(lst->st_mode) ? 0 : 1;
}
else {
log_error_write(srv, __FILE__, __LINE__, "sbs",
"lstat failed for:",
dname, strerror(errno));
};
return -1;
} | false | false | false | false | false | 0 |
_rtl88e_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &rtlpriv->phy;
u32 u4_regvalue = 0;
u8 rfpath;
bool rtstatus = true;
struct bb_reg_def *pphyreg;
for (rfpath = 0; rfpath < rtlphy->num_total_rfpath; rfpath++) {
pphyreg = &rtlphy->ph... | false | false | false | false | false | 0 |
main(int argc,char *argv[])
{
// turn off slow sync with C-style output (we don't use it anyway).
std::ios::sync_with_stdio(false);
// Define location of file formats for testing
#ifdef FORMATDIR
char env[BUFF_SIZE];
snprintf(env, BUFF_SIZE, "BABEL_LIBDIR=%s", FORMATDIR);
putenv(env);
#endif
i... | false | false | false | false | false | 0 |
CanCauseHighRegPressure(const DenseMap<unsigned, int>& Cost,
bool CheapInstr) {
for (const auto &RPIdAndCost : Cost) {
if (RPIdAndCost.second <= 0)
continue;
unsigned Class = RPIdAndCost.first;
int Limit = RegLimit[Class];
// Don't hoist cheap instruct... | false | false | false | false | false | 0 |
toolbar_drag_drop_cb (GtkToolbar *toolbar,
GdkDragContext *context,
gint x,
gint y,
guint time,
EggEditableToolbar *etoolbar)
{
GdkAtom target;
target = gtk_drag_dest_find_target (GTK_WIDGET (toolbar), context, NULL);
... | false | false | false | false | false | 0 |
sssvlv_connection_destroy( BackendDB *be, Connection *conn )
{
slap_overinst *on = (slap_overinst *)be->bd_info;
sssvlv_info *si = on->on_bi.bi_private;
if ( sort_conns[conn->c_conn_idx] ) {
free_sort_ops( conn, sort_conns[conn->c_conn_idx], si->svi_max_percon );
}
return LDAP_SUCCESS;
} | false | false | false | false | false | 0 |
PR_insert(CORBA::TypeCode_ptr newtc, pr_marshal_fn marshal, void* data)
{
PR_clearData();
pd_tc = CORBA::TypeCode::_duplicate(newtc);
pd_mbuf = new cdrAnyMemoryStream();
marshal(*pd_mbuf, data);
} | false | false | false | false | false | 0 |
getName( int weaponID )
{
return _vehicle->getWeapon( weaponID )->getName();
} | false | false | false | false | false | 0 |
sci_phy_frame_handler(struct isci_phy *iphy, u32 frame_index)
{
enum sci_phy_states state = iphy->sm.current_state_id;
struct isci_host *ihost = iphy->owning_port->owning_controller;
enum sci_status result;
unsigned long flags;
switch (state) {
case SCI_PHY_SUB_AWAIT_IAF_UF: {
u32 *frame_words;
struct sas_id... | false | false | false | false | false | 0 |
mtdswap_eblk_passes(struct mtdswap_dev *d,
struct swap_eb *eb)
{
struct mtd_info *mtd = d->mtd;
unsigned int test, i, j, patt, mtd_pages;
loff_t base, pos;
unsigned int *p1 = (unsigned int *)d->page_buf;
unsigned char *p2 = (unsigned char *)d->oob_buf;
struct mtd_oob_ops ops;
int ret;
ops.mode = MTD_OPS_A... | false | false | false | false | false | 0 |
edit_int64(int64_t val, char *buf)
{
/*
* Replacement for sprintf(buf, "%" llu, val)
*/
char mbuf[50];
bool negative = false;
mbuf[sizeof(mbuf)-1] = 0;
int i = sizeof(mbuf)-2; /* edit backward */
if (val == 0) {
mbuf[i--] = '0';
} else {
if (val < 0) {
n... | false | false | false | false | false | 0 |
rb_audioscrobbler_user_data_free (RBAudioscrobblerUserData *data)
{
if (data->image != NULL) {
g_object_unref (data->image);
}
g_free (data->url);
switch (data->type) {
case RB_AUDIOSCROBBLER_USER_DATA_TYPE_USER_INFO:
g_free (data->user_info.username);
g_free (data->user_info.playcount);
break;
case RB_A... | false | false | false | false | false | 0 |
setImage( const QImage &image )
{
DEBUG_BLOCK
m_image = image;
} | false | false | false | false | false | 0 |
multi_oo_process()
{
int idx;
// process each player
for(idx=0; idx<MAX_PLAYERS; idx++){
if(MULTI_CONNECTED(Net_players[idx]) && !MULTI_STANDALONE(Net_players[idx]) && (Net_player != &Net_players[idx]) /*&& !MULTI_OBSERVER(Net_players[idx])*/ ){
// now process the rest of the objects
multi_oo_process_all(... | false | false | false | false | false | 0 |
interpretForm( const QString &value, bool *ok )
{
if ( ok != 0 )
*ok = true;
if ( value == "prefix" )
return QwtMml::PrefixForm;
if ( value == "infix" )
return QwtMml::InfixForm;
if ( value == "postfix" )
return QwtMml::PostfixForm;
if ( ok != 0 )
*ok = fals... | false | false | false | false | false | 0 |
qunif(double p, double a, double b, int lower_tail, int log_p)
{
#ifdef IEEE_754
if (ISNAN(p) || ISNAN(a) || ISNAN(b))
return p + a + b;
#endif
R_Q_P01_check(p);
if (!R_FINITE(a) || !R_FINITE(b)) ML_ERR_return_NAN;
if (b < a) ML_ERR_return_NAN;
if (b == a) return a;
return a + R_DT_qIv(p) * (b... | false | false | false | false | false | 0 |
isBaseClassFunc(const Token *tok, const Scope *scope)
{
// Iterate through each base class...
for (std::size_t i = 0; i < scope->definedType->derivedFrom.size(); ++i) {
const Type *derivedFrom = scope->definedType->derivedFrom[i].type;
// Check if base class exists in database
if (deriv... | false | false | false | false | false | 0 |
pop(void)
{
if (stackp == stack)
execerror("stack underflow", 0);
return *--stackp;
} | false | false | false | false | false | 0 |
set_dectree()
{
dbst = learn_dectree(training_set,training_set, attributes);
} | false | false | false | false | false | 0 |
show_fb_bitfield(struct fb_bitfield *field, const char *msg)
{
print_sep(60);
if (msg)
{
print_string(msg);
}
println("field->offset = %d", field->offset);
println("field->length = %d", field->length);
println("field->msb_right = %d", field->msb_right);
} | false | false | false | false | false | 0 |
server_cleanup(void *arg)
{
context_http *pcontext = arg;
int i;
OPRINT("cleaning up ressources allocated by server thread #%02d\n", pcontext->id);
for(i = 0; i < MAX_SD_LEN; i++)
close(pcontext->sd[i]);
} | true | true | false | false | false | 1 |
z_set_true_colour (void)
{
int zfore = zargs[0];
int zback = zargs[1];
if (!(zfore < 0))
zfore = zRGB(zargs[0]);
if (!(zback < 0))
zback = zRGB(zargs[1]);
#ifdef GARGLK
garglk_set_zcolors(zfore, zback);
#endif /* GARGLK */
curr_fg = zfore;
curr_bg = zback;
} | false | false | false | false | false | 0 |
start_board (GcomprisBoard *agcomprisBoard)
{
if(agcomprisBoard!=NULL)
{
gcomprisBoard=agcomprisBoard;
gcomprisBoard->level=1;
gcomprisBoard->maxlevel=2;
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=1; /* Go to next level after this number of 'play' */
gc_bar_s... | false | false | false | false | false | 0 |
vmw_fb_create_bo(struct vmw_private *vmw_priv,
size_t size, struct vmw_dma_buffer **out)
{
struct vmw_dma_buffer *vmw_bo;
int ret;
(void) ttm_write_lock(&vmw_priv->reservation_sem, false);
vmw_bo = kmalloc(sizeof(*vmw_bo), GFP_KERNEL);
if (!vmw_bo) {
ret = -ENOMEM;
goto err_unlock;
}
ret = vmw_dmab... | false | false | false | false | false | 0 |
icxCubeInterp(
double *v, /* Pointer to first parameter */
int fdi, /* Number of output channels */
int di, /* Number of input channels */
double *out, /* Resulting fdi values */
double *in /* Input di values */
) {
int e, f, g;
double gw[1 << MXDI]; /* weight for each matrix grid cube corner */
/* ... | false | false | false | false | false | 0 |
main(int argc, char ** argv)
{
struct mailimf_fields * fields;
char * text;
char * filename;
struct mailmime * message;
struct mailmime * text_part;
struct mailmime * file_part;
int r;
int col;
if (argc < 3) {
printf("syntax: compose-msg \"text\" filename\n");
return 1;
}
fields = build_... | false | false | false | false | false | 0 |
rtl8xxxu_write32(struct rtl8xxxu_priv *priv, u16 addr, u32 val)
{
struct usb_device *udev = priv->udev;
int ret;
mutex_lock(&priv->usb_buf_mutex);
priv->usb_buf.val32 = cpu_to_le32(val);
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
REALTEK_USB_CMD_REQ, REALTEK_USB_WRITE,
addr, 0, &priv-... | false | false | false | false | false | 0 |
ReplaceSequenceExpansionOps(
void *theEnv,
EXPRESSION *actions,
EXPRESSION *fcallexp,
void *expcall,
void *expmult)
{
EXPRESSION *theExp;
while (actions != NULL)
{
if ((ExpressionData(theEnv)->SequenceOpMode == FALSE) && (actions->type == MF_VARIABLE))
actions->type = SF_VARIABLE;
... | false | false | false | true | false | 1 |
RebindLets(JSParseNode *pn, JSTreeContext *tc)
{
if (!pn)
return true;
switch (pn->pn_arity) {
case PN_LIST:
for (JSParseNode *pn2 = pn->pn_head; pn2; pn2 = pn2->pn_next)
RebindLets(pn2, tc);
break;
case PN_TERNARY:
RebindLets(pn->pn_kid1, tc);
R... | false | false | false | false | false | 0 |
get_typedef (MonoImage *m, int idx)
{
guint32 cols [MONO_TYPEDEF_SIZE];
const char *ns;
char *tstring, *result;
guint32 token;
if (idx == 1)
/* <Module> */
return NULL;
mono_metadata_decode_row (&m->tables [MONO_TABLE_TYPEDEF], idx - 1, cols, MONO_TYPEDEF_SIZE);
ns = mono_metadata_st... | false | false | false | false | false | 0 |
ggv_log_rd_init(const char* fname)
{
static char magic[32];
int len = 0;
fin = gbfopen(fname, "rb", MYNAME);
for (;;) {
int cin;
cin = gbfgetc(fin);
if (cin < 0) {
break;
}
magic[len++] = cin;
if (cin == '\0') {
double ver = 0;
char* sver;
if (strncmp(magic, ... | false | false | false | false | false | 0 |
add_special_device(u8 type, u8 id, u16 *devid, bool cmd_line)
{
struct devid_map *entry;
struct list_head *list;
if (type == IVHD_SPECIAL_IOAPIC)
list = &ioapic_map;
else if (type == IVHD_SPECIAL_HPET)
list = &hpet_map;
else
return -EINVAL;
list_for_each_entry(entry, list, list) {
if (!(entry->id == id ... | false | false | false | false | false | 0 |
ExportedSymbols (export_table_t *tbl, int *numSymbs, export_item_t **symbs)
{
int i, n = tbl->numItems;
item_t **p;
export_item_t *ep;
*numSymbs = n;
*symbs = ep = NEW_VEC(export_item_t, n);
for (p = tbl->itemMap, i = 0; i < n; i++) {
*ep = (*p)->name;
p++; ep++;
}
} | false | true | false | false | false | 1 |
online2(x0, y0, x1, y1) /* are two points lined up (on a straight line)? */
int x0, y0, x1, y1;
{
int dx = x0 - x1, dy = y0 - y1;
/* If either delta is zero then they're on an orthogonal line,
* else if the deltas are equal (signs ignored) they're on a diagonal.
*/
return((boolean)(!dy || !d... | false | false | false | false | false | 0 |
command_trie_action_set (command_trie_t* node, command_action_t *action)
{
/* There is already an action registered for that node! */
if (command_trie_valid_match (node)) {
return FALSE;
} else {
node->match.type = COMMAND_TRIE_MATCH_ACTION;
node->match.action = action;
return TRUE;
}
} | false | false | false | false | false | 0 |
radius_attr_dump(RADIUS_PDU *pdu)
{
#define UNASSIGNED(attr)
#define ATTR(atype, type, string, pmin, pmax) \
id = atype; \
key = octstr_create(string); \
val = dict_get(pdu->attr, key); \
if (val != NULL) \
octstr_dump_short(val, 2, #atype); \
octstr_destroy(... | false | false | false | false | false | 0 |
udf_add_nondir(struct dentry *dentry, struct inode *inode)
{
struct udf_inode_info *iinfo = UDF_I(inode);
struct inode *dir = d_inode(dentry->d_parent);
struct udf_fileident_bh fibh;
struct fileIdentDesc cfi, *fi;
int err;
fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err);
if (unlikely(!fi)) {
inode_dec_link... | false | false | false | false | false | 0 |
my_get_hats (ExampleSvcConnectionInterfaceHats *iface,
const GArray *contacts,
DBusGMethodInvocation *context)
{
ExampleExtendedConnection *self = EXAMPLE_EXTENDED_CONNECTION (iface);
TpBaseConnection *base = (TpBaseConnection *) self;
TpHandleRepoIface *contact_repo = tp_base_connection... | false | false | false | false | false | 0 |
onCmdDrop(FXObject*sender,FXSelector,void*){
FXWindow * window=(FXWindow*)sender;
FXString files;
FXStringList filelist;
FXIntList tracks;
// FXbool from_kde=false;
FXbool from_uri=false;
FXbool from_db_all=false;
FXbool from_db=false;
FXDragType * types;
FXuint ntypes;
if (window->in... | false | false | false | false | false | 0 |
strstrwrapper(const char *haystack, const char *needle,
const char *start)
{
/* start can be 1 character before the start or after the end of the
* line. In either case, we just say no match was found. */
if ((start > haystack && *(start - 1) == '\0') || start < haystack)
return NULL;
assert(haysta... | false | false | false | false | false | 0 |
stPinchThreadSet_getLabelIntervalsP2(stPinchThread *thread, stSortedSet *pinchIntervals, int64_t start, void *label) {
int64_t end = stPinchThread_getLength(thread) + stPinchThread_getStart(thread);
if (start < end) {
stSortedSet_insert(pinchIntervals, stPinchInterval_construct(stPinchThread_getName(thr... | false | false | false | false | false | 0 |
setBusyState(MSBoolean state_)
{
if (state_==MSTrue)
{
if (busyCount()==0) XDefineCursor(display(),_window,_server->watchCursor());
_busyCount++;
}
else
{
if (busyCount()==1) XUndefineCursor(display(),_window);
if (busyCount()>0) _busyCount--;
}
} | false | false | false | false | false | 0 |
run_dict_tests (EnchantDict * dict)
{
char **suggs;
size_t n_suggs;
size_t i, j;
const char *check_checks[] = { "hello", "helllo" };
const char *sugg_checks[] = { "helllo", "taag" };
for (i = 0; i < (sizeof (check_checks) / sizeof (check_checks[0])); i++)
{
printf ("enchant_dict_check (%s): %s\n", check_... | false | false | false | false | false | 0 |
lpfc_sli_next_hbq_slot(struct lpfc_hba *phba, uint32_t hbqno)
{
struct hbq_s *hbqp = &phba->hbqs[hbqno];
if (hbqp->next_hbqPutIdx == hbqp->hbqPutIdx &&
++hbqp->next_hbqPutIdx >= hbqp->entry_count)
hbqp->next_hbqPutIdx = 0;
if (unlikely(hbqp->local_hbqGetIdx == hbqp->next_hbqPutIdx)) {
uint32_t raw_index =... | false | false | false | false | false | 0 |
call_if_root(struct redblack_tree* t, struct rb_node *(*f)(struct rb_node*))
{
if (t->root != nil)
return f(t->root);
return nil;
} | false | false | false | false | false | 0 |
broadcast_shutdown_local(struct clock_event_device *bc,
struct clock_event_device *dev)
{
/*
* For hrtimer based broadcasting we cannot shutdown the cpu
* local device if our own event is the first one to expire or
* if we own the broadcast timer.
*/
if (bc->features & CLOCK_EVT_FEAT_HRTIMER) {
if ... | false | false | false | false | false | 0 |
dcc_send_one_file(int queue, const char *target, const char *fname,
IRC_SERVER_REC *server, CHAT_DCC_REC *chat,
int passive)
{
struct stat st;
char *str;
char host[MAX_IP_LEN];
int hfile, port = 0;
SEND_DCC_REC *dcc;
IPADDR own_ip;
GIOChannel *handle;
if (dcc_find_request(DCC_SEND_TYPE, ... | true | true | false | false | true | 1 |
exh_completer(prefix, command, line, context)
char *prefix;
char *command;
char *line; /* unused */
int context;
/* we're looking for completions of `prefix'; `command' is the
* command-string that `prefix' is the argument of; `line' is the
* complete line before the cursor.
*/
/* ARGSUSED */
{
i... | false | false | false | false | false | 0 |
on_mem_list_start_changed (GtkEntry *entry, gpointer user_data)
{
gint start_addr;
gchar *text;
g_assert (entry);
if (!asm_util_parse_number (text = (gchar *)gtk_entry_get_text (GTK_ENTRY (entry)),&start_addr))
{
gui_app_show_msg (GTK_MESSAGE_INFO, _("Enter a valid number within range (0-65535 or 0h-FFF... | false | false | false | false | false | 0 |
handle_referencing_names (GnmDepContainer *deps, Sheet *sheet)
{
GSList *ptr;
GHashTable *names = deps->referencing_names;
struct cb_collect_deps_of_names accum;
gboolean destroy = (sheet->revive == NULL);
if (!names)
return;
if (destroy)
deps->referencing_names = NULL;
accum.deps = NULL;
accum.names = N... | false | false | false | false | false | 0 |
LogPolygonInfo(const PolygonInfo *polygon_info)
{
register EdgeInfo
*p;
register ssize_t
i,
j;
(void) LogMagickEvent(DrawEvent,GetMagickModule()," begin active-edge");
p=polygon_info->edges;
for (i=0; i < (ssize_t) polygon_info->number_edges; i++)
{
(void) LogMagickEvent(DrawEvent,GetMa... | false | false | false | false | false | 0 |
setSpecialOptions(unsigned int value)
{
if ((value&131072)!=0&&(specialOptions_&131072)==0) {
// Try and keep scaling factors around
delete baseModel_;
baseModel_ = new ClpSimplex(*modelPtr_);
ClpPackedMatrix * clpMatrix =
dynamic_cast< ClpPackedMatrix*>(baseModel_->matrix_);
if (!clpMatri... | false | false | false | false | false | 0 |
ft_stroke_border_get_counts(FT_StrokeBorder border,
u32 *anum_points,
u32 *anum_contours )
{
s32 error = 0;
u32 num_points = 0;
u32 num_contours = 0;
u32 count = border->num_points;
GF_Point2D *point = border->points;
u8 *tags ... | false | false | false | false | false | 0 |
tracing_sched_register(void)
{
int ret;
ret = register_trace_sched_wakeup(probe_sched_wakeup, NULL);
if (ret) {
pr_info("wakeup trace: Couldn't activate tracepoint"
" probe to kernel_sched_wakeup\n");
return ret;
}
ret = register_trace_sched_wakeup_new(probe_sched_wakeup, NULL);
if (ret) {
pr_info("wak... | false | false | false | false | false | 0 |
salsa20_init_key(salsa20_master_state *state, salsa20_variant variant,
const uint8_t *key, salsa20_key_size key_size)
{
int i;
#ifdef LITTLE_ENDIAN
const uint32_t *k32 = (uint32_t*)key;
#else
uint32_t k32[8];
const size_t key_words = 4 + key_size * 4; /* 4 or 8 */
for(i = 0; i < key_words; ++i)
k32[i] ... | false | false | false | false | true | 1 |
validate_token_list (CtplInputStream *stream,
GSList *tokens,
GError **error)
{
CtplTokenExpr *expr = NULL;
CtplTokenExpr *operands[2] = {NULL, NULL};
CtplTokenExpr *operators[2] = {NULL, NULL};
gint opt = 0;
gint opd = 0;
g... | false | false | false | false | false | 0 |
PickBestIntra16(VP8EncIterator* const it, VP8ModeScore* const rd) {
const int kNumBlocks = 16;
VP8Encoder* const enc = it->enc_;
VP8SegmentInfo* const dqm = &enc->dqm_[it->mb_->segment_];
const int lambda = dqm->lambda_i16_;
const int tlambda = dqm->tlambda_;
const uint8_t* const src = it->yuv_in_ + Y_OFF;
... | false | false | false | false | false | 0 |
gt_alignment_show(const GtAlignment *a, FILE *fp)
{
unsigned long i, j, uctr, vctr;
Multieop meop;
gt_assert(a && gt_alignment_is_valid(a));
/* output first line */
uctr = 0;
for (i = gt_array_size(a->eops); i > 0; i--) {
meop = *(Multieop*) gt_array_get(a->eops, i-1);
switch (meop.type) {
cas... | false | false | false | false | false | 0 |
attach_data(CL_OpenGLStateData *data, bool delete_data)
{
if (impl) impl->data_objects.push_back(std::pair<CL_OpenGLStateData *, bool>(data, delete_data));
} | false | false | false | false | false | 0 |
gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *factory,
char **id,
GError **error)
{
gboolean ret;
GdmDisplay *display;
... | false | false | false | false | false | 0 |
blocked_boulder(dx,dy)
int dx,dy;
{
register struct obj *otmp;
long count = 0L;
for(otmp = level.objects[u.ux+dx][u.uy+dy]; otmp; otmp = otmp->nexthere) {
if(otmp->otyp == BOULDER)
count += otmp->quan;
}
switch(count) {
case 0: return FALSE; /* no boulders--not blocked */
case 1: break; /*... | false | false | false | false | false | 0 |
lrm_shutdown(void)
{
lrmd_log(LOG_INFO,"lrmd is shutting down");
if (mainloop != NULL && g_main_is_running(mainloop)) {
g_hash_table_foreach(resources, warning_on_active_rsc, NULL);
g_main_quit(mainloop);
}else {
exit(LSB_EXIT_OK);
}
return FALSE;
} | false | false | false | false | false | 0 |
gsi_commit_one_edge_insert (edge e, basic_block *new_bb)
{
if (new_bb)
*new_bb = NULL;
if (PENDING_STMT (e))
{
gimple_stmt_iterator gsi;
gimple_seq seq = PENDING_STMT (e);
bool ins_after;
PENDING_STMT (e) = NULL;
ins_after = gimple_find_edge_insert_loc (e, &gsi, new_bb);
... | false | false | false | false | false | 0 |
_item_content_set_hook(Elm_Object_Item *it,
const char *part,
Evas_Object *content)
{
Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
_part_aliasing_eval(&part);
//specified parts
if (!part || !strcmp(CONTENT_PART, part))
_item_content_set(nit, conten... | true | true | false | false | false | 1 |
createMachineScheduler() {
// Select the scheduler, or set the default.
MachineSchedRegistry::ScheduleDAGCtor Ctor = MachineSchedOpt;
if (Ctor != useDefaultMachineSched)
return Ctor(this);
// Get the default scheduler set by the target for this function.
ScheduleDAGInstrs *Scheduler = PassConfig->createM... | false | false | false | false | false | 0 |
tun_net_change_mtu(struct net_device *dev, int new_mtu)
{
if (new_mtu < MIN_MTU || new_mtu + dev->hard_header_len > MAX_MTU)
return -EINVAL;
dev->mtu = new_mtu;
return 0;
} | false | false | false | false | false | 0 |
IoCollector_dirtyObjects(IoCollector *self, IoObject *locals, IoMessage *m)
{
/*doc Collector dirtyObjects
Returns a List containing all dirty objects known to the collector.
*/
IoList *results = IoList_new(IOSTATE);
Collector *collector = IOSTATE->collector;
COLLECTOR_FOREACH(collector, v,
if(IoObject_isDirt... | false | false | false | false | false | 0 |
send_lightning_packet(int bolt_type, vec3d *start, vec3d *strike)
{
ubyte data[MAX_PACKET_SIZE];
char val;
int packet_size = 0;
// build the header and add the data
BUILD_HEADER(LIGHTNING_PACKET);
val = (char)bolt_type;
ADD_DATA(val);
ADD_VECTOR((*start));
ADD_VECTOR((*strike));
// send to everyone unreliab... | false | false | false | false | false | 0 |
init_object_sizes (void)
{
int object_size_type;
if (object_sizes[0])
return;
for (object_size_type = 0; object_size_type <= 3; object_size_type++)
{
object_sizes[object_size_type] = XNEWVEC (unsigned HOST_WIDE_INT, num_ssa_names);
computed[object_size_type] = BITMAP_ALLOC (NULL);
}
i... | false | false | false | false | false | 0 |
tp_la_open(struct inode *inode, struct file *file)
{
struct seq_tab *p;
struct adapter *adap = inode->i_private;
switch (DBGLAMODE_G(t4_read_reg(adap, TP_DBG_LA_CONFIG_A))) {
case 2:
p = seq_open_tab(file, TPLA_SIZE / 2, 2 * sizeof(u64), 0,
tp_la_show2);
break;
case 3:
p = seq_open_tab(file, TPLA_SIZE ... | false | false | false | false | false | 0 |
npw_file_new_file (const gchar *destination, const gchar *source)
{
NPWFile *file;
g_return_val_if_fail (destination && source, NULL);
file = g_slice_new(NPWFile);
file->type = NPW_FILE;
file->destination = g_strdup (destination);
file->source = g_strdup (source);
file->attribute = 0;
return file;
} | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
int i, n = 1;
int fd;
char *fn;
struct stat st;
if(argc == 4 && !strcmp("-n", argv[1])) {
n = atoi(argv[2]);
fn = argv[3];
} else if(argc != 2) {
fprintf(stderr, "usage: %s [-n <n>] <file> "
"-- call fadvise(DONTNEED) <n... | false | false | false | false | true | 1 |
igbvf_process_tx_packets ( struct net_device *netdev )
{
struct igbvf_adapter *adapter = netdev_priv ( netdev );
uint32_t i;
uint32_t tx_status;
union e1000_adv_tx_desc *tx_curr_desc;
/* Check status of transmitted packets
*/
DBGP ( "process_tx_packets: tx_head = %d, tx_tail = %d\n", adapter->tx_head,
a... | false | false | false | false | false | 0 |
intermediate_cb(Index alg_mod, Index iter_count, Number obj_value,
Number inf_pr, Number inf_du, Number mu,
Number d_norm, Number regularization_size,
Number alpha_du, Number alpha_pr, Index ls_trials,
UserDataPtr user_data)
{
FUserData* fuser_data = (FUserData*)user_data;
fint ALG_MODE ... | false | false | false | false | false | 0 |
PrintDataTo(StringStream* stream) {
stream->Add("id=%d ", ast_id());
if (pop_count_ > 0) stream->Add("pop %d", pop_count_);
if (values_.length() > 0) {
if (pop_count_ > 0) stream->Add(" /");
for (int i = 0; i < values_.length(); ++i) {
if (!HasAssignedIndexAt(i)) {
stream->Add(" push ");
... | false | false | false | false | false | 0 |
regulator_bulk_enable(int num_consumers,
struct regulator_bulk_data *consumers)
{
ASYNC_DOMAIN_EXCLUSIVE(async_domain);
int i;
int ret = 0;
for (i = 0; i < num_consumers; i++) {
if (consumers[i].consumer->always_on)
consumers[i].ret = 0;
else
async_schedule_domain(regulator_bulk_enable_async,
... | false | false | false | false | false | 0 |
callback()
{
if (!m_sspmod)
return;
if (verbose)
cout << "SPI callback m_state=" << m_state << endl;
switch( m_state ) {
case eIDLE:
break;
case eACTIVE:
m_sspmod->Sck_toggle();
clock( m_sspmod->get_SCL_State() );
break;
case eWAITING_FOR_LAST_SMP:
if( m_sspstat && m_sspstat->v... | false | false | false | false | false | 0 |
timestamptz_timestamp(PG_FUNCTION_ARGS)
{
TimestampTz timestamp = PG_GETARG_TIMESTAMPTZ(0);
Timestamp result;
struct pg_tm tt,
*tm = &tt;
fsec_t fsec;
char *tzn;
int tz;
if (TIMESTAMP_NOT_FINITE(timestamp))
result = timestamp;
else
{
if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0... | false | false | false | false | false | 0 |
remove_session_cb(SSL_CTX *ctx __attribute__((unused)),
SSL_SESSION *sess)
{
assert(sess);
remove_session(sess->session_id, sess->session_id_length);
} | true | true | false | false | false | 1 |
cxx_init (void)
{
static const enum tree_code stmt_codes[] = {
c_common_stmt_codes,
cp_stmt_codes
};
INIT_STATEMENT_CODES (stmt_codes);
/* We cannot just assign to input_filename because it has already
been initialized and will be used later as an N_BINCL for stabs+
debugging. */
push_src... | false | false | false | false | false | 0 |
grp_getgrgid(PyObject *self, PyObject *pyo_id)
{
PyObject *py_int_id;
gid_t gid;
struct group *p;
py_int_id = PyNumber_Long(pyo_id);
if (!py_int_id)
return NULL;
if (!_Py_Gid_Converter(py_int_id, &gid)) {
Py_DECREF(py_int_id);
return NULL;
}
Py_DECREF(py_int_... | false | false | false | false | false | 0 |
gtktextbuffer_gtk_text_buffer_insert(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj buffer_scm;
GtkTextBuffer* buffer;
ScmObj iter_scm;
GtkTextIter* iter;
ScmObj text_scm;
const gchar * text;
ScmObj len_scm;
int len;
ScmObj SCM_SUBRARGS[4];
int SCM_i;
SCM_ENTER_SUBR("gtk-text-buffer-insert"... | false | false | false | false | false | 0 |
compute(const RideFile *ride, const Zones *, int,
const HrZones *, int,
const QHash<QString,RideMetric*> &,
const MainWindow *) {
if (ride->areDataPresent()->temp) {
total = count = 0;
foreach (const RideFilePoint *point, ride->dataPoin... | false | false | false | false | false | 0 |
zd1201_enable(struct zd1201 *zd)
{
int err;
if (zd->mac_enabled)
return 0;
err = zd1201_docmd(zd, ZD1201_CMDCODE_ENABLE, 0, 0, 0);
if (!err)
zd->mac_enabled = 1;
if (zd->monitor)
err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 1);
return err;
} | false | false | false | false | false | 0 |
Isleep (int argc, lvar_t *argv) {
#ifndef FEATURE_MS
struct timeval tz;
float f;
Gsync ();
f = Tgetnumber (argv[0].o);
tz.tv_sec = f;
tz.tv_usec = (f - tz.tv_sec) * 1000000;
if (select (0, NULL, NULL, NULL, &tz) == -1)
return L_FAILURE;
#endif
return L_SUCCESS;
} | false | false | false | false | false | 0 |
bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
{
struct bfa_bsg_fcpim_lunmask_s *iocmd =
(struct bfa_bsg_fcpim_lunmask_s *)cmd;
unsigned long flags;
spin_lock_irqsave(&bfad->bfad_lock, flags);
if (v_cmd == IOCMD_FCPIM_LUNMASK_ADD)
iocmd->status = bfa_fcpim_lunmask_add(&bfad-... | false | false | false | false | false | 0 |
sig_complete_word(GList **list, WINDOW_REC *window,
const char *word, const char *linestart,
int *want_space)
{
const char *newword, *cmdchars;
char *signal, *cmd, *args, *line;
g_return_if_fail(list != NULL);
g_return_if_fail(word != NULL);
g_return_if_fail(linestart != NULL);
/* check agains... | false | false | false | false | false | 0 |
chain_rewrite_metadata_in_place_(FLAC__Metadata_Chain *chain)
{
FILE *file;
FLAC__bool ret;
FLAC__ASSERT(0 != chain->filename);
if(0 == (file = flac_fopen(chain->filename, "r+b"))) {
chain->status = FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE;
return false;
}
/* chain_rewrite_metadata_in_place_cb_() set... | false | false | false | false | false | 0 |
users_table_text_cell_data_func (GtkTreeViewColumn *column,
GtkCellRenderer *renderer,
GtkTreeModel *model,
GtkTreeIter *iter,
gpointer user_data)
{
OobsUser *user;
const gchar *name;
gtk_tree_model_get (model, iter,
COL_USER, &user,
-1);
name = oobs_user_g... | false | false | false | false | false | 0 |
gst_asf_demux_activate_stream (GstASFDemux * demux, AsfStream * stream)
{
if (!stream->active) {
GstEvent *event;
gchar *stream_id;
GST_INFO_OBJECT (demux, "Activating stream %2u, pad %s, caps %"
GST_PTR_FORMAT, stream->id, GST_PAD_NAME (stream->pad), stream->caps);
gst_pad_set_active (stream... | 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.