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 |
|---|---|---|---|---|---|---|
gnc_search_core_type_get_type (void)
{
static GType type = 0;
if (type == 0)
{
GTypeInfo type_info =
{
sizeof (GNCSearchCoreTypeClass),
NULL,
NULL,
(GClassInitFunc)gnc_search_core_type_class_init,
NULL,
NULL,
... | false | false | false | false | false | 0 |
free_slab(struct kmem_cache *s, struct page *page)
{
if (unlikely(s->flags & SLAB_DESTROY_BY_RCU)) {
struct rcu_head *head;
if (need_reserve_slab_rcu) {
int order = compound_order(page);
int offset = (PAGE_SIZE << order) - s->reserved;
VM_BUG_ON(s->reserved != sizeof(*head));
head = page_address(page... | false | false | false | false | false | 0 |
tpaw_live_search_new (GtkWidget *hook)
{
g_return_val_if_fail (hook == NULL || GTK_IS_WIDGET (hook), NULL);
return g_object_new (TPAW_TYPE_LIVE_SEARCH,
"hook-widget", hook,
NULL);
} | false | false | false | false | false | 0 |
mail_label_manager_selection_changed_cb (EMailLabelManager *manager,
GtkTreeSelection *selection)
{
GtkWidget *edit_button;
GtkWidget *remove_button;
GtkTreeModel *model;
GtkTreeIter iter;
edit_button = manager->priv->edit_button;
remove_button = manager->priv->remove_but... | false | false | false | false | false | 0 |
PK11_MapSignKeyType(KeyType keyType)
{
switch (keyType) {
case rsaKey:
return CKM_RSA_PKCS;
case fortezzaKey:
case dsaKey:
return CKM_DSA;
case ecKey:
return CKM_ECDSA;
case dhKey:
default:
break;
}
return CKM_INVALID_MECHANISM;
} | false | false | false | false | false | 0 |
kDeleteKey(state_t *s, int funct_nr, int argc, reg_t *argv)
{
reg_t node_pos = kFindKey(s, funct_nr, 2, argv);
node_t *n;
list_t *l = LOOKUP_LIST(argv[0]);
if (IS_NULL_REG(node_pos))
return NULL_REG; /* Signal falure */
n = LOOKUP_NODE(node_pos);
if (REG_EQ(l->first, node_pos))
l->first = n->succ;
if (REG_... | false | false | false | false | false | 0 |
A_BrainSpit (mobj_t* mo)
{
mobj_t* targ;
mobj_t* newmobj;
static int easy = 0;
easy ^= 1;
if (gameskill <= sk_easy && (!easy))
return;
// shoot a cube at current target
targ = braintargets[braintargeton];
braintargeton = (braintargeton+1)%numbraintargets;
// spawn brain m... | false | false | false | false | false | 0 |
IoDynLib_open(IoDynLib *self, IoObject *locals, IoMessage *m)
{
/*doc DynLib open
Opens the dynamic library and returns self or raises a DynLoad.open Error if there is an error.
*/
if (IoMessage_argCount(m))
{
IoDynLib_setPath(self, locals, m);
}
DynLib_open(DATA(self));
if (DynLib_error(DATA(self)))
{
... | false | false | false | false | false | 0 |
mgmt_set_dev_class(int index, uint8_t major, uint8_t minor)
{
char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_set_dev_class)];
struct mgmt_hdr *hdr = (void *) buf;
struct mgmt_cp_set_dev_class *cp = (void *) &buf[sizeof(*hdr)];
struct controller_info *info = &controllers[index];
DBG("index %d major %u minor %u", i... | false | false | false | false | false | 0 |
boxes_query_get (BoxesQuery* self, const gchar* key) {
gchar* result = NULL;
GHashTable* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gconstpointer _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
#line 295 "/extra-data/checkout/gnome/gnome-boxes/src/util.vala"
g_return_val_if_fail (self != NULL, NULL);
#line 295 "/extra-data/... | false | false | false | false | false | 0 |
IsOnlyUsedInEqualityComparison(Value *V, Value *With) {
for (Value::use_iterator UI = V->use_begin(), E = V->use_end();
UI != E; ++UI) {
if (ICmpInst *IC = dyn_cast<ICmpInst>(*UI))
if (IC->isEquality() && IC->getOperand(1) == With)
continue;
// Unknown instruction.
return false;
}
... | false | false | false | false | false | 0 |
video_update_event_line(int line)
{
int new_line;
video_update_through_line(line);
new_line = line + g_line_ref_amt;
if(new_line < 200) {
if(!g_config_control_panel) {
add_event_vid_upd(new_line);
}
} else if(line >= 262) {
video_update_through_line(0);
if(!g_config_control_panel) {
add_event_vid_u... | false | false | false | false | false | 0 |
rb_thread_signal_exit()
{
VALUE args[2];
rb_thread_critical = 0;
if (curr_thread == main_thread) {
rb_thread_ready(curr_thread);
rb_exit(EXIT_SUCCESS);
}
args[0] = INT2NUM(EXIT_SUCCESS);
args[1] = rb_str_new2("exit");
rb_thread_ready(main_thread);
if (!rb_thread_dead(curr_thread)) {
... | false | false | false | false | false | 0 |
_e_fm2_file_delete(Evas_Object *obj)
{
E_Dialog *dialog;
E_Fm2_Icon *ic;
char text[4096 + 256];
Eina_List *sel;
int n = 0, folder_count = 0;
ic = _e_fm2_icon_first_selected_find(obj);
if (!ic) return;
if (ic->dialog) return;
dialog = e_dialog_new(NULL, "E", "_fm_file_delete_dialog");
ic->... | true | true | false | false | true | 1 |
gck_object_set_template_async (GckObject *self, gulong attr_type, GckAttributes *attrs,
GCancellable *cancellable, GAsyncReadyCallback callback,
gpointer user_data)
{
set_template_args *args;
g_return_if_fail (GCK_IS_OBJECT (self));
g_return_if_fail (a... | false | false | false | false | false | 0 |
simple_fill_buf(struct urb *urb)
{
unsigned i;
u8 *buf = urb->transfer_buffer;
unsigned len = urb->transfer_buffer_length;
unsigned maxpacket;
switch (pattern) {
default:
/* FALLTHROUGH */
case 0:
memset(buf, 0, len);
break;
case 1: /* mod63 */
maxpacket = get_maxpacket(urb->dev, urb->pipe);
for (... | false | false | false | false | false | 0 |
exclude_find_exclude_reason(
char type,
int id,
func_unit* funit
) { PROFILE(EXCLUDE_FIND_EXCLUDE_REASON);
exclude_reason* er; /* Pointer to current exclude reason structure */
er = funit->er_head;
while( (er != NULL) && ((er->type != type) || (er->id != id)) ) {
er = er->next;
}
PR... | false | false | false | false | false | 0 |
OnFileOptions(wxCommandEvent &event)
{
std::set<cbProject*> modified;
if (event.GetId() == idMenuTreeOptionsCompile)
{
wxArrayTreeItemIds selected;
size_t count = m_pTree->GetSelections(selected);
for (size_t ii = 0; ii < count; ++ii)
{
wxTreeItemId id = selected[... | false | false | false | false | false | 0 |
write(DcmItem &dset)
{
OFCondition result = EC_Normal;
DcmElement *delem=NULL;
ADD_TO_DATASET(DcmShortText, unformattedTextValue)
if (anchorPoint.getLength() > 0)
{
ADD_TO_DATASET(DcmFloatingPointSingle, anchorPoint)
ADD_TO_DATASET(DcmCodeString, anchorPointAnnotationUnits)
ADD_TO_DATASET(DcmCo... | false | false | false | false | false | 0 |
print_statement (lang_statement_union_type *s,
lang_output_section_statement_type *os)
{
switch (s->header.type)
{
default:
fprintf (config.map_file, _("Fail with %d\n"), s->header.type);
FAIL ();
break;
case lang_constructors_statement_enum:
if (constructor_list.head != NULL)
... | false | false | false | false | false | 0 |
fromString(char *str)
{
char *lstr;
int key;
if (!str || !*str)
return 0;
lstr = g_ascii_strup(str, -1);
key = gdk_keyval_from_name(lstr);
g_free(lstr);
if (key) return key;
lstr = g_ascii_strdown(str, -1);
key = gdk_keyval_from_name(lstr);
g_free(lstr);
if (key) return key;
key = gdk_keyval_from_n... | false | false | false | false | false | 0 |
cgid_start(apr_pool_t *p, server_rec *main_server,
apr_proc_t *procnew)
{
daemon_should_exit = 0; /* clear setting from previous generation */
if ((daemon_pid = fork()) < 0) {
ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, APLOGNO(01253)
"mod_cgid: Co... | false | false | false | false | false | 0 |
opal_dss_print_value(char **output, char *prefix, opal_value_t *src, opal_data_type_t type)
{
char *prefx;
char *scope;
/* deal with NULL prefix */
if (NULL == prefix) asprintf(&prefx, " ");
else prefx = strdup(prefix);
/* if src is NULL, just print data type and return */
if (NULL == ... | false | false | false | false | false | 0 |
EquivalentBondExpr( BondExpr *expr1, BondExpr *expr2 )
{
if (expr1 == NULL && expr2 == NULL)
return true;
else if (expr1 == NULL && expr2 != NULL)
return false;
else if (expr1 != NULL && expr2 == NULL)
return false;
if (expr1->type != expr2->type)
return false;
bool resul... | false | false | false | false | false | 0 |
get_map_id(mapstruct *map) {
char **line;
char *sql;
int nrow, ncolumn, id, reg_id;
const char *path = map->path;
if (strncmp(path, "/random/", 7) == 0)
path = "/random/";
reg_id = get_region_id(map->region);
sql = sqlite3_mprintf("select map_id from map where map_path='%q' and map... | false | false | false | false | true | 1 |
read_nav(bgav_input_context_t * ctx, int sector, int *next)
{
uint8_t buf[DVD_VIDEO_LB_LEN];
dsi_t dsi_pack;
pci_t pci_pack;
int blocks;
dvd_t * d;
d = ctx->priv;
if(DVDReadBlocks(d->dvd_file, sector, 1, buf) != 1)
{
bgav_log(ctx->opt, BGAV_LOG_ERROR, LOG_DOMAIN,
"Reading NAV pa... | false | false | false | false | false | 0 |
read(std::valarray<std::complex<double> >& vals, long row)
{
if ( ColumnVectorData<std::complex<double> >* col
= dynamic_cast<ColumnVectorData<std::complex<double> >*>(this))
{
// fails if user requested outputType different from input type.
... | false | false | false | false | false | 0 |
favorite_string_to_type (const gchar *str)
{
if (*str == 'T')
return GDA_TOOLS_FAVORITES_TABLES;
else if (*str == 'D') {
if (str[1] == 'I')
return GDA_TOOLS_FAVORITES_DIAGRAMS;
else
return GDA_TOOLS_FAVORITES_DATA_MANAGERS;
}
else if (*str == 'Q')
return GDA_TOOLS_FAVORITES_QUERIES;
else if (*str == ... | false | false | false | false | false | 0 |
sti_dwmac_init(struct platform_device *pdev, void *priv)
{
struct sti_dwmac *dwmac = priv;
struct regmap *regmap = dwmac->regmap;
int iface = dwmac->interface;
struct device *dev = dwmac->dev;
struct device_node *np = dev->of_node;
u32 reg = dwmac->ctrl_reg;
u32 val;
if (dwmac->clk)
clk_prepare_enable(dwmac-... | false | false | false | false | false | 0 |
days_last_year (void)
/* How many days this last year have? */
{
struct tm time_record;
time_t current_time;
time (¤t_time);
localtime_r (¤t_time, &time_record);
if (leap(time_record.tm_year - 1 + 1900)) {
return 366;
}
return 365;
} | false | false | false | false | false | 0 |
PyvtkOrderedTriangulator_InsertPoint_s2(PyObject *self, PyObject *args)
{
vtkPythonArgs ap(self, args, "InsertPoint");
vtkObjectBase *vp = ap.GetSelfPointer(self, args);
vtkOrderedTriangulator *op = static_cast<vtkOrderedTriangulator *>(vp);
vtkIdType temp0;
vtkIdType temp1;
double temp2[3];
double save2... | false | false | false | false | false | 0 |
OpPut()
{
tsh_put_it out ;
tsh_put_ot in ;
int tmp ;
char *buff,*st ;
status=system("clear") ;
printf("TSH_OP_PUT") ;
printf("\n----------\n") ;
/* obtain tuple name, priority, length, */
printf("\nEnter tuple name : ") ; /* and the tuple */
status=scanf("%s", out.name) ;
printf("Ente... | false | true | false | false | true | 1 |
test_network_remoterename__renaming_a_remote_updates_branch_related_configuration_entries(void)
{
assert_config_entry_value(_repo, "branch.master.remote", "test");
cl_git_pass(git_remote_rename(_remote, "just/renamed", dont_call_me_cb, NULL));
assert_config_entry_value(_repo, "branch.master.remote", "just/renamed"... | false | false | false | false | false | 0 |
mlx4_mr_hw_change_pd(struct mlx4_dev *dev, struct mlx4_mpt_entry *mpt_entry,
u32 pdn)
{
u32 pd_flags = be32_to_cpu(mpt_entry->pd_flags) & ~MLX4_MPT_PD_MASK;
/* The wrapper function will put the slave's id here */
if (mlx4_is_mfunc(dev))
pd_flags &= ~MLX4_MPT_PD_VF_MASK;
mpt_entry->pd_flags = cpu_to_be32(pd_f... | false | false | false | false | true | 1 |
Write_Pl_State_File(WamWord file_word)
{
char *file;
FILE *f;
int i;
HashScan scan;
OperInf *oper;
SFOp sf_op;
int c;
/* 'static' is because gcc allocates a frame even with -fomit-frame-pointer.
* This corrupts ebp on ix86 */
static char cv[2];
file = atom_tbl[Rd_Atom_Check(file_word)].name;
file... | false | false | false | false | false | 0 |
err(const char *str,...)
{
char msg[1024];
bool several = false;
int len;
char * p;
va_list ap;
if (!_error_in_cmd && _gri_beep)
gr_textput("\007");
if (str != NULL) {
va_start(ap, str);
strcpy(msg, str);
len = strlen(msg);
if (msg[len - 1] == '\\') ... | false | false | false | false | false | 0 |
create_pathname(const char *name, char *buf, size_t size) {
/* Why? having extra / doesn't confuse unix anyplace? Dependancies
* someplace else in the code? msw 2-17-97
*/
if (*name == '/')
snprintf(buf, size, "%s/%s%s", settings.datadir, settings.mapdir, name);
else
snprintf(buf... | false | false | false | false | false | 0 |
swig_varlink_getattr(swig_varlinkobject *v, char *n) {
PyObject *res = NULL;
swig_globalvar *var = v->vars;
while (var) {
if (strcmp(var->name,n) == 0) {
res = (*var->get_attr)();
break;
}
var = var->next;
}
if (res == NULL && !PyErr_Occurred()) {
PyErr_SetStr... | false | false | false | false | false | 0 |
_err_free (NEOERR *err)
{
if (err == NULL || err == INTERNAL_ERR)
return 0;
if (err->next != NULL)
_err_free(err->next);
if (UseFreeList)
{
err->next = FreeList;
FreeList = err;
err->flags = 0;
err->desc[0] = '\0';
}
else
{
free(err);
}
return 0;
} | false | false | false | false | false | 0 |
gst_value_collect_list_or_array (GValue * value, guint n_collect_values,
GTypeCValue * collect_values, guint collect_flags)
{
if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
value->data[0].v_pointer = collect_values[0].v_pointer;
value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
} else {
value->data[0... | false | false | false | false | false | 0 |
gabswp2 (void *r, gaint cnt) {
gaint i;
char *ch1,*ch2,cc1,cc2;
ch1 = (char *)r;
ch2 = ch1+1;
for (i=0; i<cnt; i++) {
cc1 = *ch1;
cc2 = *ch2;
*ch1 = cc2;
*ch2 = cc1;
ch1+=2; ch2+=2;
}
} | false | false | false | false | false | 0 |
switchToForward() {
U_ASSERT(state == CHECK_BWD ||
(state == IN_FCD_SEGMENT && pos == limit) ||
(state == IN_NORMALIZED && pos == normalized.length()));
if(state == CHECK_BWD) {
// Turn around from backward checking.
start = pos;
if(pos == limit) {
s... | false | false | false | false | false | 0 |
move_type_from_base(struct base_type *pbase,
struct unit_class *puc)
{
bool land_allowed = TRUE;
bool sea_allowed = TRUE;
if (!base_has_flag(pbase, BF_NATIVE_TILE)) {
return unit_move_type_invalid();
}
if (!is_native_base_to_uclass(pbase, puc)) {
return ... | false | false | false | false | false | 0 |
completed_messagedialog_response_cb (GtkDialog *dialog,
int response_id,
gpointer user_data)
{
DialogData *data = user_data;
switch (response_id) {
case GTK_RESPONSE_DELETE_EVENT:
case GTK_RESPONSE_CLOSE:
gtk_widget_destroy (GTK_WIDGET (dialog));
gtk_dialog_response (GTK_DIALOG (data... | false | false | false | false | false | 0 |
write_setup_file( gzFile exp_setup_file ) const
{
// --------------------------------------------------------------- Transfer
int8_t tmp_with_HT = _with_HT;
gzwrite( exp_setup_file, &tmp_with_HT, sizeof(tmp_with_HT) );
if ( _with_HT )
{
gzwrite( exp_setup_file, &_HT_ins_rate, sizeof(_HT_ins_rate) );
... | false | false | false | false | false | 0 |
snd_config_walk(snd_config_t *src,
snd_config_t *root,
snd_config_t **dst,
snd_config_walk_callback_t callback,
snd_config_t *private_data)
{
int err;
snd_config_iterator_t i, next;
switch (snd_config_get_type(src)) {
case SND_CONFIG_TYPE_COMPOUND:
err = callback(src, root, dst, SND_CONF... | false | false | false | false | false | 0 |
_transit_effect_resizable_flip_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
EINA_SAFETY_ON_NULL_RETURN(effect);
Elm_Transit_Effect_ResizableFlip *resizable_flip = effect;
Eina_List *elist, *elist_next;
Elm_Transit_Effect_ResizableFlip_Node *resizable_flip_node;
EINA_LIST_... | false | false | false | false | false | 0 |
addr_pton(const char *src, struct addr *dst)
{
struct hostent *hp;
char *ep, tmp[300];
long bits = -1;
int i;
for (i = 0; i < (int)sizeof(tmp) - 1; i++) {
if (src[i] == '/') {
tmp[i] = '\0';
if (strchr(&src[i + 1], '.')) {
uint32_t m;
uint16_t b;
/* XXX - mask is specified like /255.0.0.0 */
... | true | true | false | false | false | 1 |
FCEU_MakePath(int type, const char* filebase)
{
char ret[FILENAME_MAX];
switch(type)
{
case FCEUMKF_MOVIE:
if(odirs[FCEUIOD_MOVIES])
return (string)odirs[FCEUIOD_MOVIES] + PSS + filebase;
else
return BaseDirectory + PSS + "movies" + PSS + filebase;
break;
case FCEUMKF_STATE:
if(... | false | false | false | false | true | 1 |
err_print (int errnoflag, int level, const char *fmt, va_list ap) {
int errno_save;
size_t n;
char buf[MAXLINE];
errno_save=errno;
vsnprintf(buf, MAXLINE, fmt, ap);
n=strlen(buf);
if (errnoflag)
snprintf(buf+n, MAXLINE-n, ": %s", strerror(errno_save));
strcat(buf, "\n");
if (level != ... | false | false | false | false | false | 0 |
ModifyTerrainWMons(int t, int freq, int smon, int bigmon, int hum)
{
if(t < 0 || t > (R_NUM -1)) return;
if(freq < 0) freq = 0;
if(smon < -1 || smon > NITEMS-1) smon = -1;
if(bigmon < -1 || bigmon > NITEMS-1) bigmon = -1;
if(hum < -1 || hum > NITEMS-1) hum = -1;
TerrainDefs[t].wmonfreq = freq;
TerrainDefs[t].sma... | false | false | false | false | false | 0 |
do_ext_keytab(krb5_principal principal, void *data)
{
krb5_error_code ret;
kadm5_principal_ent_rec princ;
struct ext_keytab_data *e = data;
krb5_keytab_entry *keys = NULL;
krb5_keyblock *k = NULL;
int i, n_k;
ret = kadm5_get_principal(kadm_handle, principal, &princ,
KADM5_PRINCIPAL... | false | false | false | false | false | 0 |
qos_encode64_binary(char *encoded,
const char *string, int len) {
int i;
char *p;
p = encoded;
for (i = 0; i < len - 2; i += 3) {
*p++ = qos_basis_64[(string[i] >> 2) & 0x3F];
*p++ = qos_basis_64[((string[i] & 0x3) << 4) |
((int) (string[i + 1] &... | false | false | false | false | false | 0 |
ide_put_data (uae_u16 v)
{
int irq = 0;
if (IDE_LOG > 4)
write_log (_T("IDE%d DATA write %04x %d/%d\n"), ide->num, v, ide->data_offset, ide->data_size);
if (ide->data_size == 0) {
if (IDE_LOG > 0)
write_log (_T("IDE%d DATA write without DRQ!?\n"), ide->num);
return;
}
ide->secbuf[ide->data_offset + 1] = ... | false | false | false | false | false | 0 |
openid(char *name, char *mode)
{
FILEIO *fiop; /* file structure */
FILEID id; /* new file id */
FILE *fp;
struct stat sbuf; /* file status */
int i;
/* find the next open slot in the files array */
if (idnum >= MAXFILES)
return -E_MANYOPEN;
fiop = &files[3];
for (i = 3; i < MAXFILES; fiop++,i++) {
if (... | false | false | false | false | false | 0 |
tpm_seal_trusted(u32 chip_num, struct trusted_key_payload *payload,
struct trusted_key_options *options)
{
struct tpm_chip *chip;
int rc;
chip = tpm_chip_find_get(chip_num);
if (chip == NULL || !(chip->flags & TPM_CHIP_FLAG_TPM2))
return -ENODEV;
rc = tpm2_seal_trusted(chip, payload, options);
tpm_put... | false | false | false | false | false | 0 |
ar9002_hw_configpcipowersave(struct ath_hw *ah,
bool power_off)
{
u8 i;
u32 val;
/* Nothing to do on restore for 11N */
if (!power_off /* !restore */) {
if (AR_SREV_9280_20_OR_LATER(ah)) {
/*
* AR9280 2.0 or later chips use SerDes values from the
* initvals.h initialized depending on chipset dur... | false | false | false | false | false | 0 |
conn_readcb(struct bufferevent *bev, void *user_data) {
struct evbuffer *input = bufferevent_get_input(bev);
size_t len = evbuffer_get_length(input);
if (len >= 2 * sizeof(int)) {
int a, b, c;
bufferevent_read(bev, &a, sizeof(int));
a = ntohl(a);
bufferevent_read(bev, &b, sizeof(int));
b = nto... | false | false | false | false | false | 0 |
solid() {
FbTk::Color c(fore, screen);
if (! c.isAllocated())
c.setPixel(BlackPixel(display(), screen));
FbRootWindow root(screen);
FbTk::GContext gc(root);
gc.setForeground(c);
pixmap = new Pixmap(XCreatePixmap(display(),
root.window(),
... | false | false | false | false | false | 0 |
meas_find_max(lt_op_type lt, const struct sample *s,
const struct bitset *qual)
{
const struct sample *max = NULL;
while (s) {
if (!qual || bitset_ge(s->frame_set, qual))
if (!max || lt(max->pos, s->pos) ||
(!lt(s->pos, max->pos) && lt_xy(max->pos, s->pos)))
max = s;
s = s->next;
}
return max... | false | false | false | false | false | 0 |
setFilter(const QString &searchLabel)
{
d->m_LastFilterRequiered = searchLabel;
QHash<int, QString> where;
QString req;
if (d->m_SearchMode==SearchByLabel) {
where.insert(d->m_LangField, QString("like '%1%'").arg(searchLabel));
req = d->searchQuery() + " WHERE " + icdBase()->getWhereClau... | false | false | false | false | false | 0 |
SendRevConnectToMe( CString sNick, CString sDstNick )
{
DCProtoMutex.Lock();
CString t = "$RevConnectToMe ";
t += m_pLocalToRemote->encode(sNick);
t += ' ';
t += m_pLocalToRemote->encode(sDstNick);
t += '|';
const int err = Write((const unsigned char*)t.Data(),t.Length());
DCProtoMutex.UnLock();
return err... | false | false | false | false | false | 0 |
get(ExecState *exec, const Identifier &propertyName) const
{
PropertySlot slot;
if (const_cast<JSObject *>(this)->getPropertySlot(exec, propertyName, slot)) {
JSValue* val = slot.getValue(exec, const_cast<JSObject *>(this), propertyName);
assert(val);
return val;
}
return jsUndefined();
} | false | false | false | false | false | 0 |
build_array_conv (tree type, tree ctor, int flags, tsubst_flags_t complain)
{
conversion *c;
unsigned HOST_WIDE_INT len = CONSTRUCTOR_NELTS (ctor);
tree elttype = TREE_TYPE (type);
unsigned i;
tree val;
bool bad = false;
bool user = false;
enum conversion_rank rank = cr_exact;
/* We might need to pro... | false | false | false | false | false | 0 |
gegl_tile_handler_cache_equalfunc (gconstpointer a,
gconstpointer b)
{
const CacheItem *ea = a;
const CacheItem *eb = b;
if (ea->x == eb->x &&
ea->y == eb->y &&
ea->z == eb->z &&
ea->handler == eb->handler)
return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
fill_super_block(struct gfs2_sbd *sdp)
{
int ret;
sync();
/********************************************************************
***************** First, initialize all lists **********************
********************************************************************/
log_info( _("Initializing lists...\n"));
s... | false | false | false | false | false | 0 |
expand_goto_internal (tree body, rtx label, rtx last_insn)
{
struct nesting *block;
rtx stack_level = 0;
if (GET_CODE (label) != CODE_LABEL)
abort ();
/* If label has already been defined, we can tell now
whether and how we must alter the stack level. */
if (PREV_INSN (label) != 0)
{
/*... | false | false | false | false | false | 0 |
dump_buffer(char *buf, int length)
{
struct httpddata *hd;
char buf1[300];
hd = current_cptr->userdata;
snprintf(buf1, sizeof buf1, "HTTP/1.1 200 OK\r\n"
"%s"
"Server: Atheme/%s\r\n"
"Content-Type: text/xml\r\n"
"Content-Length: %d\r\n\r\n",
hd->connection_close ? "Connection: close\r\n" : "",
PA... | false | false | false | false | false | 0 |
quickfindCompletition(const char *s)
{
if (analy->getSymbolByName(s)) {
return ht_strdup(s);
}
Symbol *tmp = analy->enumSymbolsByName(s);
if (!tmp) {
return ht_strdup(s);
}
Symbol *tmp2 = analy->enumSymbols(tmp);
if (!tmp2) {
return ht_strdup(tmp->name);
}
int slen = strlen(s);
if (!ht_strncmp(tmp->name... | false | false | false | false | false | 0 |
intif_send_guild_storage(int account_id,struct guild_storage *gstor)
{
if (inter_fd < 0)
return -1;
WFIFORESERVE( inter_fd, sizeof(struct guild_storage)+12 );
WFIFOW(inter_fd,0) = 0x3019;
WFIFOW(inter_fd,2) = sizeof(struct guild_storage)+12;
WFIFOL(inter_fd,4) = account_id;
WFIFOL(inter_fd,8) = gstor->guild_id... | false | false | false | false | false | 0 |
resolve_triples(fsp_link *link, fs_rid_vector **rids)
{
int quads = rids[0]->length;
fs_rid_vector *todo[segments];
fs_segment segment;
for (segment = 0; segment < segments; ++segment) {
todo[segment] = fs_rid_vector_new(0);
}
for (int c = 0; c < 3; ++c) {
for (int k = 0; k < quads; ++k) {
co... | false | true | false | false | false | 1 |
setRowNames (OsiNameVec &srcNames,
int srcStart, int len, int tgtStart)
{ int nameDiscipline ;
/*
Determine how we're handling names. It's possible that the underlying solver
has overridden getIntParam, but doesn't recognise OsiNameDiscipline. In that
case, we want to default to auto names
*/
bool re... | false | false | false | false | false | 0 |
generate_thumbnail (GInputStream *istream,
GthFileData *file_data,
int requested_size,
int *original_width,
int *original_height,
gpointer user_data,
GCancellable *cancellable,
GError **error)
{
GthThumbLoader *self = user_data;
... | false | false | false | false | false | 0 |
GatherValueComparisons(Instruction *Cond, Value *&CompVal,
std::vector<ConstantInt*> &Values) {
if (Cond->getOpcode() == Instruction::Or) {
CompVal = GatherConstantSetEQs(Cond, Values);
// Return true to indicate that the condition is true if the CompVal is
// ... | false | false | false | false | false | 0 |
verifyXML(DOMNode* root,CACertStore* trustedCerts)
{
DOMNode* elemSignature;
getDOMChildByName(root,"Signature",elemSignature);
if(elemSignature==NULL)
return E_UNKNOWN;
DOMNode* elemSigValue;
getDOMChildByName(elemSignature,"SignatureValue",elemSigValue);
if(elemSigValue==NULL)
return E_UNKNOWN;
D... | false | false | false | false | false | 0 |
PushTransaction(void)
{
TransactionState p = CurrentTransactionState;
TransactionState s;
/*
* We keep subtransaction state nodes in TopTransactionContext.
*/
s = (TransactionState)
MemoryContextAllocZero(TopTransactionContext,
sizeof(TransactionStateData));
/*
* Assign a subtransaction ID, wat... | false | false | false | false | false | 0 |
libmail_u_convert_tou_init(const char *src_chset,
unicode_char **ucptr_ret,
size_t *ucsize_ret,
int nullterminate
)
{
struct libmail_u_convert_tou *p=
malloc(sizeof(struct libmail_u_convert_tou));
libmail_u_convert_handle_t h;
if (!p)
return NULL;
memset(p, 0, sizeof(*p));
h=libmail_... | false | false | false | false | false | 0 |
NC_initialize(void)
{
int stat = NC_NOERR;
if((stat = NC3_initialize())) return stat;
#ifdef USE_NETCDF4
if((stat = NC4_initialize())) return stat;
#endif
#ifdef USE_DAP
if((stat = NCD3_initialize())) return stat;
#endif
#if defined(USE_DAP) && defined(USE_NETCDF4)
if((stat = NCD4_initialize()))... | false | false | false | false | false | 0 |
add_cast(
class_id src_t, class_id dst_t, cast_function cast, bool is_downcast)
{
// adding an edge will invalidate any record of unreachability in
// the cache.
static std::size_t expected_cache_len = 0;
cache_t& c = cache();
if (c.size() > expected_cache_len)
{
c.erase(std::remove_... | false | false | false | false | false | 0 |
randomize_password(struct w *widgets)
{
char *rnd_string;
int len;
gchar *info;
gchar *utf8=NULL;
char *default_password_length;
// G_CONST_RETURN gchar *default_password_length;
// default_password_length = gtk_entry_get_text(GTK_ENTRY(widgets->server_set_spinbutton[8]));
// Should be us... | false | false | false | false | false | 0 |
mono_string_builder_to_utf8 (MonoStringBuilder *sb)
{
GError *error = NULL;
if (!sb)
return NULL;
gunichar2 *str_utf16 = mono_string_builder_to_utf16 (sb);
guint str_len = mono_string_builder_string_length (sb);
gchar *tmp = g_utf16_to_utf8 (str_utf16, str_len, NULL, NULL, &error);
if (error) {
g_error_... | false | false | false | false | false | 0 |
orte_iof_base_select(void)
{
orte_iof_base_component_t *best_component = NULL;
orte_iof_base_module_t *best_module = NULL;
int rc;
/*
* Select the best component
*/
if( OPAL_SUCCESS != mca_base_select("iof", orte_iof_base_framework.framework_output,
... | false | false | false | false | false | 0 |
MakeButton(button_info *b)
{
/* This is resposible for drawing the contents of a button, placing the
* icon and/or swallowed item in the correct position inside potential
* padding or frame.
*/
int ih,iw,ix,iy;
FlocaleFont *Ffont;
if(!b)
{
fprintf(stderr,"%s: BUG: MakeButton called with NULL poi... | false | false | false | false | false | 0 |
b43legacy_attr_interfmode_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct b43legacy_wldev *wldev = dev_to_b43legacy_wldev(dev);
ssize_t count = 0;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
mutex_lock(&wldev->wl->mutex);
switch (wldev->phy.interfmode) {
case... | false | false | false | false | false | 0 |
is_cmd_ambiguous(char *command, vector_t *v, int index, match_type_t type)
{
unsigned int i, j;
const char *str = NULL;
cmd_element_t *cmd_element;
const char *matched = NULL;
vector_t *descvec;
desc_t *desc;
for (i = 0; i < vector_active(v); i++) {
if ((cmd_element = vector_slot(v, i)) != NULL) {
int matc... | false | false | false | false | false | 0 |
circulate_cmd(
F_CMD_ARGS, int new_context, int circ_dir, Bool do_use_found,
Bool do_exec_on_match)
{
FvwmWindow *found;
char *restofline;
found = Circulate(exc->w.fw, action, circ_dir, &restofline);
if (cond_rc != NULL)
{
cond_rc->rc = (found == NULL) ? COND_RC_NO_MATCH : COND_RC_OK;
}
if ((!found == !do_e... | false | false | false | false | false | 0 |
elf_rand(Elf *elf, size_t offset) {
if (!elf) {
return 0;
}
elf_assert(elf->e_magic == ELF_MAGIC);
if (elf->e_kind != ELF_K_AR) {
seterr(ERROR_NOTARCHIVE);
}
else if (offset <= 0 || offset > elf->e_size) {
seterr(ERROR_BADOFF);
}
else {
elf->e_off = offset;
return offset;
}
... | false | false | false | false | false | 0 |
operator<<(ostream &out, TRelCfgMgr &x) {
out << "<RelCfgMgr>" << std::endl;
out << " <workdir>" << x.getWorkDir() << "</workdir>" << endl;
out << " <LogName>" << x.getLogName() << "</LogName>" << endl;
out << " <LogLevel>" << x.getLogLevel() << "</LogLevel>" << endl;
out << " <InterfaceIDOrde... | false | false | false | false | false | 0 |
gsskrb5_extract_authtime_from_sec_context(OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
krb5_timestamp *authtime)
{
static const gss_OID_desc req_oid = {
GSS_KRB5_EXTRACT_AUTHTIME_FROM_SEC_CONTEXT_OID_LENGTH,
... | false | false | false | false | false | 0 |
getParamString() const {
return QString("SetDropOffsetCommand ")
+ BaseCommand::getParamString()
+ QString(" id:%1 %2,%3")
.arg(m_itemID).arg(m_dropOffset.x()).arg(m_dropOffset.y());
} | false | false | false | false | false | 0 |
getDependentNameTypeString(
const DependentNameType *DNT, std::string &Str, bool &Typename)
{
const IdentifierInfo *IdInfo = DNT->getIdentifier();
if (!IdInfo)
return false;
const NestedNameSpecifier *Specifier = DNT->getQualifier();
if (!Specifier)
return false;
const Type *Ty = Specifier->get... | false | false | false | false | false | 0 |
get_integrate_pass_date(change::pointer cp, const wstring_list &arg)
{
cstate_ty *cstate_data = cp->cstate_get();
if (cstate_data->state != cstate_state_completed)
return "";
time_t when = change_completion_timestamp(cp);
return calc_date_string(when, arg);
} | false | false | false | false | false | 0 |
getCopyActions( const QModelIndexList &indices )
{
QHash<QAction *, Collection *> currentCopyDestination;
if( onlyOneCollection( indices ) )
{
Collection *collection = getCollection( indices.first() );
QList<Collection *> writableCollections;
QHash<Collection *, CollectionManager::C... | false | false | false | false | false | 0 |
extract_data(PROGRAMMER * pgm, unsigned char *buf, int offset) {
int j;
unsigned char bit = 0x80;
unsigned char r = 0;
buf += offset * 16; // 2 bytes per bit, 8 bits
for (j=0; j<8; j++) {
uint16_t in = buf[0] | (buf[1] << 8);
if (GET_BITS_0(in,pgm,PIN_AVR_MISO)) {
r |= bit;
}
buf += 2; // 2 bytes per i... | false | false | false | false | false | 0 |
maki_channel_set_defaults (makiChannel* chan)
{
if (!maki_server_config_exists(chan->server, chan->name, "autojoin"))
{
maki_server_config_set_boolean(chan->server, chan->name, "autojoin", FALSE);
}
} | false | false | false | false | false | 0 |
flipNx1to8(byte * buffer, const byte ** planes, int offset, int nbytes,
int num_planes, int bits_per_sample)
{
/* This is only needed for DeviceN colors, so it can be slow. */
uint mask = (1 << bits_per_sample) - 1;
int bi, pi;
sample_store_declare_setup(dptr, dbit, dbbyte, buffer, 0, bits_pe... | false | false | false | false | false | 0 |
replace(GlyphIndex index, Glyph* glyph) {
Requisition oldr, newr;
if (glyph != nil) {
glyph->request(newr);
glyph->ref();
}
CompositionComponent& component = component_->item_ref(index);
if (component.glyph_ != nil) {
component.glyph_->request(oldr);
component.glyph_-... | false | false | false | false | false | 0 |
vmnc_handle_wmvj_rectangle (GstVMncDec * dec, struct RfbRectangle *rect,
const guint8 * data, int len, gboolean decode)
{
/* VM state info, not interesting for playback */
if (len < 2) {
GST_DEBUG_OBJECT (dec, "VM state data too short");
return ERROR_INSUFFICIENT_DATA;
}
return 2;
} | false | false | false | false | false | 0 |
QCC_FileSize (char *fname)
{
long length;
FILE *f;
f = fopen(fname, "rb");
if (!f)
return -1;
fseek(f, 0, SEEK_END);
length = ftell(f);
fclose(f);
return length;
} | false | false | false | false | false | 0 |
atbus_open(int mode, char *device, struct gn_statemachine *sm)
{
int result = device_open(device, false, false, mode, sm->config.connection_type, sm);
if (!result) {
perror(_("Couldn't open ATBUS device"));
return false;
}
if (mode) {
/*
* make 7110 with dlr-3 happy. the nokia dlr-3 cable provides
* h... | 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.