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 |
|---|---|---|---|---|---|---|
nssTrust_GetCERTCertTrustForCert(NSSCertificate *c, CERTCertificate *cc)
{
CERTCertTrust *rvTrust = NULL;
NSSTrustDomain *td = STAN_GetDefaultTrustDomain();
NSSTrust *t;
t = nssTrustDomain_FindTrustForCertificate(td, c);
if (t) {
rvTrust = cert_trust_from_stan_trust(t, cc->arena);
if (!rvTrust) {
... | false | false | false | false | false | 0 |
gt_pch_nx (struct inline_summary& x_r ATTRIBUTE_UNUSED)
{
struct inline_summary * ATTRIBUTE_UNUSED x = &x_r;
gt_pch_n_20vec_condition_va_gc_ ((*x).conds);
gt_pch_n_26vec_size_time_entry_va_gc_ ((*x).entry);
} | false | false | false | false | false | 0 |
cx22702_get_tps(struct cx22702_state *state,
struct dtv_frontend_properties *p)
{
u8 val;
/* Make sure the TPS regs are valid */
if (!(cx22702_readreg(state, 0x0A) & 0x20))
return -EAGAIN;
val = cx22702_readreg(state, 0x01);
switch ((val & 0x18) >> 3) {
case 0:
p->modulation = QPSK;
break;
case 1:
... | false | false | false | false | false | 0 |
init_from_wkb(const char *wkb, uint len,
wkbByteOrder bo, String *res)
{
uint32 n_points, proper_length;
const char *wkb_end;
Gis_point p;
if (len < 4 ||
(n_points= wkb_get_uint(wkb, bo)) < 1 ||
n_points > max_n_points)
return 0;
proper_length= 4 + n_points... | false | false | false | false | false | 0 |
m68k_op_asr_32_r(void)
{
uint* r_dst = &DY;
uint shift = DX & 0x3f;
uint src = *r_dst;
uint res = src >> shift;
if(shift != 0)
{
USE_CYCLES(shift<<CYC_SHIFT);
if(shift < 32)
{
if(GET_MSB_32(src))
res |= m68ki_shift_32_table[shift];
*r_dst = res;
FLAG_C = FLAG_X = (src >> (shift - 1))<<8;
... | false | false | false | false | false | 0 |
evalsubshell(union node *n, int flags)
{
struct job *jp;
int backgnd = (n->type == NBACKGND);
int status;
errlinno = n->nredir.linno;
expredir(n->nredir.redirect);
if (!backgnd && flags & EV_EXIT && !have_traps())
goto nofork;
INTOFF;
jp = makejob(n, 1);
if (forkshell(jp, n, backgnd) == 0) {
INTON;
fla... | false | false | false | false | false | 0 |
moveToTicks(int joint, unsigned char pos)
{
if (!isGood())
return(NOT_INITED);
else if ((joint <= 0) || (joint > NumJoints))
return(INVALID_JOINT);
if (!comArmPos(joint, pos))
return(COMM_FAILED);
return(SUCCESS);
} | false | false | false | false | false | 0 |
Perl_sv_copypv_flags(pTHX_ SV *const dsv, SV *const ssv, const I32 flags)
{
STRLEN len;
const char *s;
PERL_ARGS_ASSERT_SV_COPYPV_FLAGS;
if ((flags & SV_GMAGIC) && SvGMAGICAL(ssv))
mg_get(ssv);
s = SvPV_nomg_const(ssv,len);
sv_setpvn(dsv,s,len);
if (SvUTF8(ssv))
SvUTF8_on(dsv);
else
... | false | false | false | false | false | 0 |
gnm_cell_get_text_for_editing (GnmCell const * cell, Sheet *sheet,
gboolean *quoted, int *cursor_pos)
{
GODateConventions const *date_conv;
gchar *text = NULL;
g_return_val_if_fail (cell != NULL, NULL);
g_return_val_if_fail (sheet != NULL, NULL);
if (quoted)
*quoted = FALSE;
date_conv = workbook_da... | false | false | false | false | false | 0 |
pfs_fgetxattr (int fd, const char *name, void *value, size_t size)
{
BEGIN
debug(D_LIBCALL,"fgetxattr %d %s",fd,name);
result = pfs_current->table->fgetxattr(fd,name,value,size);
END
} | false | false | false | false | false | 0 |
gistRedoPageSplitRecord(XLogRecPtr lsn, XLogRecord *record)
{
PageSplitRecord xlrec;
Relation reln;
Buffer buffer;
Page page;
int i;
int flags;
decodePageSplitRecord(&xlrec, record);
reln = XLogOpenRelation(xlrec.data->node);
flags = xlrec.data->origleaf ? F_LEAF : 0;
/* loop around all pages */
for ... | false | false | false | false | false | 0 |
ConstantFoldSelectInstruction(Constant *Cond,
Constant *V1, Constant *V2) {
// Check for i1 and vector true/false conditions.
if (Cond->isNullValue()) return V2;
if (Cond->isAllOnesValue()) return V1;
// If the condition is a vector constant, fold the result elemen... | false | false | false | false | false | 0 |
NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)
{
if ((qNetscapeFuncs->version & 0xFF) < NPVERS_HAS_NOTIFICATION)
return NPERR_INCOMPATIBLE_VERSION_ERROR;
NPN_Prolog(posturlnotify);
return FIND_FUNCTION_POINTER(NPN_Pos... | false | false | false | false | false | 0 |
channel_can_xon(PLCI *plci, byte ch) {
APPL *APPLptr;
DIVA_CAPI_ADAPTER *a;
word NCCIcode;
dword count;
word Num;
word i;
APPLptr = plci->appl;
a = plci->adapter;
if (!APPLptr)
return (0);
NCCIcode = a->ch_ncci[ch] | (((word) a->Id) << 8);
/* count all buffers within the Application pool */
/* belo... | false | false | false | false | false | 0 |
N_put_array_2d_value(N_array_2d * data, int col, int row, char *value)
{
G_debug(6, "N_put_array_2d_value: put value to array");
if (data->offset == 0) {
if (data->type == CELL_TYPE && data->cell_array != NULL) {
data->cell_array[row * data->cols_intern + col] =
*((CELL *) value);
}
else if (data->t... | false | false | false | false | false | 0 |
intel_gtt_init(void)
{
u32 gtt_map_size;
int ret, bar;
ret = intel_private.driver->setup();
if (ret != 0)
return ret;
intel_private.gtt_mappable_entries = intel_gtt_mappable_entries();
intel_private.gtt_total_entries = intel_gtt_total_entries();
/* save the PGETBL reg for resume */
intel_private.PGETBL_sav... | false | false | false | false | false | 0 |
__call_vlog_startup_procs(void)
{
register struct loadpli_t *ldp;
register struct dynboot_t *dnbp;
/* SJM 07/08/02 - unless user needs static PLI, this now always empty */
__vpi_vlog_start_done = FALSE;
#ifdef __STATIC_PLI__
{
register int32 i;
for (i = 0;; i++)
{
if (vlog_startup_routines[i] == NUL... | false | false | false | false | false | 0 |
check_log_destination(char **newval, void **extra, GucSource source)
{
char *rawstring;
List *elemlist;
ListCell *l;
int newlogdest = 0;
int *myextra;
/* Need a modifiable copy of string */
rawstring = pstrdup(*newval);
/* Parse string into list of identifiers */
if (!SplitIdentifierString(raws... | false | false | false | false | false | 0 |
e_xkb_layout_name_reduce(const char *name)
{
const char *s;
if (!name) return NULL;
s = strchr(name, '/');
if (s) s++;
else s = name;
return s;
} | false | false | false | false | false | 0 |
position(const ECA_AUDIO_TIME& v)
{
if (v.samples_per_second() == samples_per_second())
set_position_in_samples(v.samples());
else {
ECA_AUDIO_TIME modified (v);
modified.set_samples_per_second_keeptime(samples_per_second());
set_position_in_samples(modified.samples());
}
} | false | false | false | false | false | 0 |
input_pad_gtk_window_set_char_button_sensitive (InputPadGtkWindow *window,
gboolean sensitive)
{
g_return_if_fail (INPUT_PAD_IS_GTK_WINDOW (window));
if (window->priv->char_button_sensitive == sensitive) {
return;
}
g_signal_emit (window... | false | false | false | false | false | 0 |
get_meta_from_animation_property (ClutterActor *actor,
const gchar *name,
gchar **name_p)
{
ClutterActorPrivate *priv = actor->priv;
ClutterActorMeta *meta = NULL;
gchar **tokens;
/* if this is not a special property, fall through */... | false | false | false | false | false | 0 |
posToXML(XMLAttrs & xmlAttrs, const Pos & pos)
{
xmlAttrs["path"] = pos.file;
xmlAttrs["line"] = (format("%1%") % pos.line).str();
xmlAttrs["column"] = (format("%1%") % pos.column).str();
} | false | false | false | false | false | 0 |
bcmgenet_free_rx_buffers(struct bcmgenet_priv *priv)
{
struct device *kdev = &priv->pdev->dev;
struct enet_cb *cb;
int i;
for (i = 0; i < priv->num_rx_bds; i++) {
cb = &priv->rx_cbs[i];
if (dma_unmap_addr(cb, dma_addr)) {
dma_unmap_single(kdev,
dma_unmap_addr(cb, dma_addr),
priv->rx_buf_len, DM... | false | false | false | false | false | 0 |
MemHashConfigure(unqlite_kv_engine *pKvEngine,int iOp,va_list ap)
{
mem_hash_kv_engine *pEngine = (mem_hash_kv_engine *)pKvEngine;
int rc = UNQLITE_OK;
switch(iOp){
case UNQLITE_KV_CONFIG_HASH_FUNC:{
/* Use a default hash function */
if( pEngine->nRecord > 0 ){
rc = UNQLITE_LOCKED;
}else{
ProcHash xHash... | false | false | false | false | false | 0 |
coordinate_string2gdouble (const gchar * intext, gdouble * dec)
{
gint grad;
gdouble sec;
gint min;
// gdouble dec = -1002.0;
gchar s2=' ';
gdouble fmin;
gchar text[50];
g_strlcpy(text,intext,sizeof(text));
*dec = -1002.0;
setlocale(LC_NUMERIC, "C");
// HACK: Fix usage of , and . inside Flo... | false | false | false | false | false | 0 |
xioperf_next_write(
globus_i_xioperf_info_t * info)
{
size_t nbytes;
globus_result_t res;
globus_assert(!info->write_done);
res = globus_xio_register_write(
info->xio_handle,
info->next_write_buffer,
info->next_buf_s... | false | false | false | false | false | 0 |
submit (Ekiga::FormBuilder &builder)
{
builder.hidden (name, value);
} | false | false | false | false | false | 0 |
build_ycc_rgb_table (j_decompress_ptr cinfo)
/* Normal case, sYCC */
{
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
int i;
INT32 x;
SHIFT_TEMPS
cconvert->Cr_r_tab = (int *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(int));
cconvert->Cb_b_... | false | false | false | false | false | 0 |
firm_destroyed()
{
//---------------- Text Format -----------------//
//
// Your <firm type> near <town name> has been destroyed by <kingdom name>.
// Your <firm type> near <town name> has been destroyed by Rebels.
// Your <firm type> near <town name> has been destroyed by Fryhtans.
//
//------------------------... | false | false | false | false | false | 0 |
catTypesDirChanged(int state)
{
state = state; // Compiler warning
int row = catDirectories->currentRow();
if (row == -1)
return;
memDirs[row].indexDirs = catCheckDirs->isChecked();
needRescan = true;
} | false | false | false | false | false | 0 |
DrucIsRectanglesContact ( Rectangle1,
Rectangle2
)
rdsrec_list *Rectangle1;
rdsrec_list *Rectangle2;
{
long PositionX1;
long PositionX2;
long PositionY1;
long PositionY2;
long PositionDX1;
long PositionDX2;
long PositionDY1;
long PositionDY2;
... | false | false | false | false | false | 0 |
afr_sh_entry_expunge_lookup_cbk (call_frame_t *expunge_frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *buf, dict_t *x,
struct iatt *post... | false | false | false | false | false | 0 |
RemoveChild(Iterator loc)
{
if (loc == this->End())
return this->End();
Iterator temp = this->m_Tree.erase(loc);
this->Modified();
return temp;
} | false | false | false | false | false | 0 |
wrap_in_dummy_doc(const char *svg_snippet)
{
const char * dummy_doc_start = "<dummy xmlns:xlink=\"http://www.w3.org/1999/xlink\">";
const char * dummy_doc_stop = "</dummy>";
char *doc_str;
/* wrap snippet into dummy document */
size_t start_length = strlen(dummy_doc_start);
size_t snippet_length = strlen(svg_sn... | false | false | false | false | false | 0 |
column_display_prepare (column_display_t *disp)
{
gint availchars, totalchars;
gint i;
double ratio;
column_def_t *coldef;
availchars = disp->termwidth;
totalchars = 0;
/* Exclude fixed-size columns */
for (i = 0; i < disp->cols->len; ++i) {
coldef = g_array_index (disp->cols, column_def_t *, i);
if (cold... | false | false | false | false | false | 0 |
gst_tag_list_n_tags (const GstTagList * list)
{
g_return_val_if_fail (list != NULL, 0);
g_return_val_if_fail (GST_IS_TAG_LIST (list), 0);
return gst_structure_n_fields (GST_TAG_LIST_STRUCTURE (list));
} | false | false | false | false | false | 0 |
gcMemRealloc(void *addr, int size) {
if(addr == NULL)
return gcMemMalloc(size);
else {
uintptr_t *mem = addr;
uintptr_t old_size = *--mem;
uintptr_t new_size = size + sizeof(uintptr_t);
if(old_size/sys_page_size == new_size/sys_page_size) {
*mem = new_size;
... | false | false | false | false | true | 1 |
evline(GFilt g, int rno, int sno, int flag, int type,
double x, double y,
double x1, double y1, double x2, double y2)
{
/* avoid -W unused parameter warning */
if( 0 ){
type = type;
}
if( !g->shapes[sno].init ){
g->shapes[sno].init = 1;
g->shapes[sno].ystart = min(y1,y2);
g-... | false | false | false | false | false | 0 |
rfio_HsmIf_FirstWrite(int fd, void *buffer, int size) {
int rc = 0;
int flags, written_to;
int save_serrno;
#if defined(CNS_ROOT)
stage_hsm_t *hsmfile;
#endif /* CNS_ROOT */
if ( size == 0 )
return (0);
if ( size < 0 ) {
serrno = EINVAL;
return (-1);
}
#if defined(CN... | false | false | false | false | false | 0 |
color_rybhue_to_rgbhue_f(double hue){
if (hue>=4.0/6.0 && hue<=6.0/6.0){
return ((285.12*hue*hue)-(81.252*hue)+155.18)/360.0;
}else if (hue>=0.0/6.0 && hue<=1.0/6.0){
return ((-544.32*hue*hue)+(301.896*hue))/360.0;
}else if (hue>=1.0/6.0 && hue<=3.0/6.0){
return ((609.12*hue*hue)-(153.72*hue)+45.166)/360.0;
}... | false | false | false | false | false | 0 |
xlbd_release_minors(unsigned int minor, unsigned int nr)
{
unsigned int end = minor + nr;
BUG_ON(end > nr_minors);
spin_lock(&minor_lock);
bitmap_clear(minors, minor, nr);
spin_unlock(&minor_lock);
} | false | false | false | false | false | 0 |
m5mols_set_wdr(struct m5mols_info *info, int wdr)
{
int ret;
ret = m5mols_write(&info->sd, MON_TONE_CTL, wdr ? 9 : 5);
if (ret < 0)
return ret;
ret = m5mols_set_mode(info, REG_CAPTURE);
if (ret < 0)
return ret;
return m5mols_write(&info->sd, CAPP_WDR_EN, wdr);
} | false | false | false | false | false | 0 |
forward_propagate_into_comparison (gimple_stmt_iterator *gsi)
{
gimple stmt = gsi_stmt (*gsi);
tree tmp;
bool cfg_changed = false;
tree type = TREE_TYPE (gimple_assign_lhs (stmt));
tree rhs1 = gimple_assign_rhs1 (stmt);
tree rhs2 = gimple_assign_rhs2 (stmt);
/* Combine the comparison with defining statem... | false | false | false | false | false | 0 |
ptaGetInsideBox(PTA *ptas,
BOX *box)
{
PTA *ptad;
l_int32 n, i, contains;
l_float32 x, y;
PROCNAME("ptaGetInsideBox");
if (!ptas)
return (PTA *)ERROR_PTR("ptas not defined", procName, NULL);
if (!box)
return (PTA *)ERROR_PTR("box not defined", procName, NULL);
... | false | false | false | false | false | 0 |
uri_unencode(const std::string& str) {
std::string out = str;
int character;
if (str.empty())
return str;
int j = 0;
for (size_t i = 0; i < str.size(); i++) {
character = str[i];
if (str[i] == '%') {
i++;
if (str.size() - i < 2)
return "";
charact... | false | false | false | false | false | 0 |
normalize()
{
float f = norm();
if (f!=0)
{
x /= f;
y /= f;
z /= f;
}
} | false | false | false | false | false | 0 |
ap_note_auth_failure(request_rec *r)
{
const char *type = ap_auth_type(r);
if (type) {
ap_run_note_auth_failure(r, type);
}
else {
ap_log_rerror(APLOG_MARK, APLOG_ERR,
0, r, APLOGNO(00571) "need AuthType to note auth failure: %s", r->uri);
}
} | false | false | false | false | false | 0 |
update_live_status (rtx dest, rtx x, void *data ATTRIBUTE_UNUSED)
{
int first_regno, last_regno;
int i;
if (GET_CODE (dest) != REG
&& (GET_CODE (dest) != SUBREG || GET_CODE (SUBREG_REG (dest)) != REG))
return;
if (GET_CODE (dest) == SUBREG)
first_regno = subreg_regno (dest);
else
first_reg... | false | false | false | false | false | 0 |
_get_grouplist(uid_t my_uid, gid_t my_gid, int *ngroups, gid_t **groups)
{
char *user_name = uid_to_string(my_uid);
if (user_name == NULL) {
error("sbcast: Could not find uid %ld", (long)my_uid);
return -1;
}
*groups = (gid_t *) xmalloc(*ngroups * sizeof(gid_t));
if (getgrouplist(user_name, my_gid, *groups,... | false | false | false | false | false | 0 |
ext4_show_quota_options(struct seq_file *seq,
struct super_block *sb)
{
#if defined(CONFIG_QUOTA)
struct ext4_sb_info *sbi = EXT4_SB(sb);
if (sbi->s_jquota_fmt) {
char *fmtname = "";
switch (sbi->s_jquota_fmt) {
case QFMT_VFS_OLD:
fmtname = "vfsold";
break;
case QFMT_VFS_V0:
fmtname = "vfsv... | false | false | false | false | false | 0 |
test_win (GooCanvasItem **board)
{
int i;
#if 0
GtkWidget *dlg;
#endif
for (i = 0; i < 15; i++)
if (!board[i] || (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (board[i]), "piece_num")) != i))
return;
#if 0
dlg=gnome_ok_dialog ("You stud, you win!");
gtk_window_set_modal(GTK_WINDOW(dlg),TRUE);
gnome_dialog_... | true | true | false | false | false | 1 |
gee_tree_set_iterator_real_next (GeeIterator* base) {
GeeTreeSetIterator * self;
gboolean result = FALSE;
gint _tmp0_ = 0;
GeeTreeSet* _tmp1_ = NULL;
gint _tmp2_ = 0;
GeeTreeSetNode* _tmp3_ = NULL;
self = (GeeTreeSetIterator*) base;
_tmp0_ = self->priv->stamp;
_tmp1_ = self->priv->_set;
_tmp2_ = _tmp1_->priv-... | false | false | false | false | false | 0 |
asix_mdio_read(struct net_device *netdev, int phy_id, int loc)
{
struct usbnet *dev = netdev_priv(netdev);
__le16 res;
mutex_lock(&dev->phy_mutex);
asix_set_sw_mii(dev);
asix_read_cmd(dev, AX_CMD_READ_MII_REG, phy_id,
(__u16)loc, 2, &res);
asix_set_hw_mii(dev);
mutex_unlock(&dev->phy_mutex);
netdev_dbg(de... | false | false | false | false | false | 0 |
write_planar_code(FILE *f, int doflip)
/* Write in planar_code format. Always write in next direction,
and if doflip != 0 also write in prev direction. */
{
size_t length;
unsigned char code[MAXN+MAXE+1];
length=nv+ne+1;
compute_code(code);
if (fwrite(code,sizeof(unsigned char),length,f... | false | false | false | false | false | 0 |
qib_diag_read(struct file *fp, char __user *data,
size_t count, loff_t *off)
{
struct qib_diag_client *dc = fp->private_data;
struct qib_devdata *dd = dc->dd;
void __iomem *kreg_base;
ssize_t ret;
if (dc->pid != current->pid) {
ret = -EPERM;
goto bail;
}
kreg_base = dd->kregbase;
if (count == 0)
... | false | false | false | false | false | 0 |
gnc_customer_name_changed_cb (GtkWidget *widget, gpointer data)
{
CustomerWindow *cw = data;
char *fullname, *title;
const char *id, *name;
if (!cw)
return;
name = gtk_entry_get_text (GTK_ENTRY (cw->company_entry));
if (!name || *name == '\0')
name = _("<No name>");
id = ... | false | false | false | false | false | 0 |
do_restart_inner(int count, const char *descr, const char *args, int pass, int skip)
{
char *cmd;
int rc;
if (skip) {
printf("%03d restart %s w/ args='%s' SKIPPED due to LinuxThreads issues\n",
count, descr, args);
return;
}
cmd = crut_aprintf("exec %s %s --quiet %s", rstrt_cmd, args, filename... | false | false | false | false | true | 1 |
mwi_sub_event_cb(const struct ast_event *event, void *userdata)
{
struct mwi_sub_task *mwist;
if (ast_event_get_type(event) != AST_EVENT_SUB)
return;
if (ast_event_get_ie_uint(event, AST_EVENT_IE_EVENTTYPE) != AST_EVENT_MWI)
return;
if ((mwist = ast_calloc(1, (sizeof(*mwist)))) == NULL) {
ast_log(LOG_ERRO... | false | false | false | false | false | 0 |
ReadUntil(FILE *fl, char Sc, int Cnt) {
char bit;
int res, i;
res = fscanf(fl, "%c", &bit);
i = 0;
if (bit == Sc) i++;
while ((i < Cnt) && (res != EOF)) {
res = fscanf(fl, "%c", &bit);
if (bit == Sc) i++;
}
return res;
} | false | false | false | false | false | 0 |
udl_render_hline(struct drm_device *dev, int bpp, struct urb **urb_ptr,
const char *front, char **urb_buf_ptr,
u32 byte_offset, u32 device_byte_offset,
u32 byte_width,
int *ident_ptr, int *sent_ptr)
{
const u8 *line_start, *line_end, *next_pixel;
u32 base16 = 0 + (device_byte_offset / bpp)... | false | false | false | false | false | 0 |
NewDictionary()
{
int i;
_Dictionary *dict;
dict = (_Dictionary*)MALLOC(sizeof(_Dictionary));
if (!dict)
return NULL;
if (!(dict->harr = (DictItem**)MALLOC(HASH_SIZE*sizeof(DictItem*))))
return NULL;
dict->num_in_dict = 0;
dict->size = HASH_SIZE;
for (i=0 ; i<HASH_SIZE; i++)
dict->harr[i] = (... | false | false | false | false | false | 0 |
dyna_push_gen(struct parser_params *parser)
{
lvtbl->args = vtable_alloc(lvtbl->args);
lvtbl->vars = vtable_alloc(lvtbl->vars);
if (lvtbl->used) {
lvtbl->used = vtable_alloc(lvtbl->used);
}
return lvtbl->args;
} | false | false | false | false | false | 0 |
update_bbar(struct csa *csa)
{
#ifdef GLP_DEBUG
int m = csa->m;
int n = csa->n;
#endif
double *bbar = csa->bbar;
int q = csa->q;
int tcol_nnz = csa->tcol_nnz;
int *tcol_ind = csa->tcol_ind;
double *tcol_vec = csa->tcol_vec;
int p = csa->p;
double teta = csa->teta;
... | false | false | false | false | false | 0 |
startOutputChunk()
{
omniORB::logs(25, "Start writing value chunk.");
OMNIORB_ASSERT(!pd_reader);
OMNIORB_ASSERT(!pd_inChunk);
OMNIORB_ASSERT(pd_nestLevel > 0);
// We have to marshal the chunk length manually, so we can keep a
// record of its address in the buffer.
omni::ptr_arith_t p1, p2;
copyStat... | false | false | false | false | false | 0 |
until_short (const struct argp_option *opt, const struct argp_option *real,
const char *domain, void *cookie)
{
return oshort (opt) ? opt->key : 0;
} | false | false | false | false | false | 0 |
line(TraceFile* file, uint lineno,
bool createNew)
{
Q_ASSERT(file!=0);
TraceFunctionSource* sf = sourceFile(file, createNew);
if (!sf)
return 0;
else
return sf->line(lineno, createNew);
} | false | false | false | false | false | 0 |
eval_as_uint(struct eval_value_t val)
{
switch (val.type)
{
case et_double:
return (unsigned int)val.value.as_double;
case et_float:
return (unsigned int)val.value.as_float;
#ifdef HOST_HAS_QWORD
case et_qword:
return (unsigned int)val.value.as_qword;
case et_sqword:
return... | false | false | false | false | false | 0 |
STRcat(String *st, char *cp)
{
int len;
char *temp;
if (cp == NULL)
return(NULL);
if (STRlen(st) == 0) {
STRset(st, cp);
return(st);
}
len = strlen(cp) + STRlen(st);
temp = (char *) malloc(sizeof(char) * len);
strcpy(temp, STRget(st));
strcat(temp, cp);
... | false | true | false | false | false | 1 |
mouseReleaseEvent( QMouseEvent *me )
{
me->accept();
if ( m_isClick && rect().contains( me->pos() ) )
{
m_isClick = false;
emit clicked();
}
} | false | false | false | false | false | 0 |
getFreeBatch( const String &materialName )
{
InstanceBatchVec &batchVec = mInstanceBatches[materialName];
InstanceBatchVec::const_reverse_iterator itor = batchVec.rbegin();
InstanceBatchVec::const_reverse_iterator end = batchVec.rend();
while( itor != end )
{
i... | false | false | false | false | false | 0 |
print_aff(__isl_take isl_printer *p,
__isl_keep isl_aff *aff)
{
if (isl_space_is_params(aff->ls->dim))
;
else {
p = print_tuple(aff->ls->dim, p, isl_dim_set, 0, NULL, NULL);
p = isl_printer_print_str(p, " -> ");
}
p = isl_printer_print_str(p, "[");
p = print_aff_body(p, aff);
p = isl_printer_print_str(p, "... | false | false | false | false | false | 0 |
rcr_transdecode(GtUchar ref, GtBitsequence transcode,
GtAlphabet *alpha)
{
GtUchar code_a = gt_alphabet_encode(alpha, 'A'),
code_c = gt_alphabet_encode(alpha, 'C'),
code_g = gt_alphabet_encode(alpha, 'G'),
code_t = gt_alphabet_encode(alpha, 'T');
if (ref... | false | false | false | false | false | 0 |
set_caller_request(krb5_context context, krb5_tkt_creds_context ctx)
{
krb5_error_code code;
const krb5_data *req = &ctx->previous_request;
const krb5_data *realm = &ctx->cur_tgt->server->data[1];
krb5_data out_copy = empty_data(), realm_copy = empty_data();
code = krb5int_copy_data_contents(contex... | false | false | false | false | false | 0 |
reset_start_time_for_sp(THD *thd)
{
if (!thd->in_sub_stmt)
{
/*
First investigate if there is a cached time stamp
*/
if (thd->user_time)
{
thd->start_time= thd->user_time;
}
else
{
my_micro_time_and_time(&thd->start_time);
}
}
} | false | false | false | false | false | 0 |
gp_open_printer(const gs_memory_t *mem,
char fname[gp_file_name_sizeof],
int binary_mode)
{
const char *fmode = (binary_mode ? "wb" : "w");
return (strlen(fname) == 0 ? 0 : gp_fopen(fname, fmode));
} | false | false | false | false | false | 0 |
operator=(const DcmDirectoryRecord& obj)
{
if (this != &obj)
{
// copy parent's member variables
DcmItem::operator=(obj);
// copy DcmDirectoryRecords' member variables
recordsOriginFile = obj.recordsOriginFile;
lowerLevelList = new DcmSequenceOfItems(*obj.lowerLevelList);
DirRecordType = obj... | false | false | false | false | false | 0 |
iw_close(IndexWriter *iw)
{
mutex_lock(&iw->mutex);
iw_commit_i(iw);
if (iw->dw) {
dw_close(iw->dw);
}
a_deref(iw->analyzer);
sis_destroy(iw->sis);
fis_deref(iw->fis);
sim_destroy(iw->similarity);
iw->write_lock->release(iw->write_lock);
close_lock(iw->write_lock);
i... | false | false | false | false | false | 0 |
execute() {
BScreen *screen = Fluxbox::instance()->mouseScreen();
if (screen == 0)
return;
// iconify windows in focus order, so it gets restored properly
const std::list<Focusable *> wins =
screen->focusControl().focusedOrderWinList().clientList();
std::list<Focusable *>::const... | false | false | false | false | false | 0 |
dump_poll(struct pollfd *pfds, unsigned long nfds, int timeout)
{
unsigned int k;
fprintf(stderr, "POLL nfds: %ld, timeout: %d\n", nfds, timeout);
for (k = 0; k < nfds; ++k) {
fprintf(stderr, "fd=%d, events=%x, revents=%x\n",
pfds[k].fd, pfds[k].events, pfds[k].revents);
}
} | false | false | false | false | false | 0 |
dev_open_2 (TrapContext *context, int type)
{
uaecptr ioreq = m68k_areg (regs, 1);
uae_u32 unit = m68k_dreg (regs, 0);
uae_u32 flags = m68k_dreg (regs, 1);
struct devstruct *dev = getdevstruct (unit);
struct priv_devstruct *pdev = 0;
int i;
if (log_scsi)
write_log (_T("opening %s:%d ioreq=%08X\n"), getdevname... | false | false | false | false | false | 0 |
list_shopt_o_options (list, flags)
WORD_LIST *list;
int flags;
{
WORD_LIST *l;
int val, rval;
if (list == 0)
{
if ((flags & QFLAG) == 0)
list_minus_o_opts (-1, (flags & PFLAG));
return (sh_chkwrite (EXECUTION_SUCCESS));
}
for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next)
... | false | false | false | false | false | 0 |
f_fclose(int count, VALUE **vals)
{
VALUE result;
VALUE *vp;
int n, i=0;
/* initialize VALUE */
result.v_subtype = V_NOSUBTYPE;
errno = 0;
if (count == 0) {
i = closeall();
} else {
for (n = 0; n < count; n++) {
vp = vals[n];
if (vp->v_type != V_FILE)
return error_value(E_FCLOSE1);
}
for (n ... | false | false | false | false | false | 0 |
sigdelread_float(t_sigdelread *x, t_float f)
{
int samps;
t_sigdelwrite *delwriter =
(t_sigdelwrite *)pd_findbyclass(x->x_sym, sigdelwrite_class);
x->x_deltime = f;
if (delwriter)
{
int delsize = delwriter->x_cspace.c_n;
x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime)
... | false | false | false | false | false | 0 |
findPrev(ObjHandle g) const
{
if (!validHandle(g)) return findLast();
SLinkedListNode *ng = handleToNative(g);
if (ng == first) return invObjHandle;
ObjHandle h = findFirst();
while (h != invObjHandle) {
SLinkedListNode *nh = handleToNative(h);
if (nh->next == ng) return nativeToHandle(nh);
h = findNext(h);
... | false | false | false | false | false | 0 |
readConstants(double* gravity, double& boltz)
{
int i;
fstream& str = modelDataFileStream[CONSTANTS];
for(i = 0; i < 4; ++i)
{
str >> gravity[i];
}
str >> boltz;
return 0;
} | false | false | false | false | false | 0 |
static__J(Class *class, MethodBlock *mb, uintptr_t *ostack) {
if(!initJNILrefs())
return NULL;
*(int64_t*)ostack = (*(int64_t (*)(void*, void*))mb->code) (
&jni_env,
class);
return ostack + 2;
} | false | false | false | false | false | 0 |
mac80211_setchannel_cache(const char *interface, void *handle,
void *family, int channel,
unsigned int chmode, char *errstr) {
#ifndef HAVE_LINUX_NETLINK
snprintf(errstr, STATUS_MAX, "Kismet was not compiled with netlink/mac80211 "
"support, check the output of ./configure for why");
// Return t... | false | false | false | false | false | 0 |
kernel_fpu_enable(void)
{
WARN_ON_FPU(!this_cpu_read(in_kernel_fpu));
this_cpu_write(in_kernel_fpu, false);
} | false | false | false | false | false | 0 |
unix_history_back(zchar *str, int searchlen, int maxlen)
{
char **prev = history_view;
do {
RING_DEC( history_view, history_buffer, history_end);
if ((history_view == history_next)
|| (*history_view == NULL)) {
os_beep(BEEP_HIGH);
history_view = prev;
return 0;
}
} while (strlen( *hi... | false | false | false | false | false | 0 |
brasero_metadata_install_plugins_success (BraseroMetadataGstDownload *download)
{
GSList *iter;
for (iter = download->objects; iter; iter = iter->next) {
BraseroMetadataPrivate *priv;
priv = BRASERO_METADATA_PRIVATE (iter->data);
if (priv->error) {
/* free previously saved error message */
g_error_free... | false | false | false | false | false | 0 |
SV_FinalMessage (const char *message, qboolean reconnect)
{
int i;
client_t *cl;
SZ_Clear (&net_message);
MSG_WriteByte (&net_message, svc_print);
MSG_WriteByte (&net_message, PRINT_HIGH);
MSG_WriteString (&net_message, message);
if (reconnect)
MSG_WriteByte (&net_message, svc_reconnect);
else
MSG_Writ... | false | false | false | false | false | 0 |
sec_pkcs12_generate_mac(SECItem *key,
SECItem *msg,
PRBool old_method)
{
SECStatus res = SECFailure;
SECItem *mac = NULL;
PK11Context *pk11cx = NULL;
SECItem ignore = {0};
if((key == NULL) || (msg == NULL)) {
return NULL;
}
if(old_method == PR_TRUE) {
return sec_pkcs12_generat... | false | false | false | false | false | 0 |
InsChrCharset() {
int map = mapFromIndex(GGadgetGetFirstListSelectedItem(GWidgetGetControl(inschr.icw,INSCHR_CharSet)));
if ( map!=-1 )
InsChrSetCharset(map);
else {
int i;
for ( i=0; encodingnames[i].name!=NULL && encodingnames[i].map!=inschr.map; ++i );
if ( encodingnames[i].name!=NULL )
GGadgetS... | false | false | false | false | false | 0 |
iscsi_start_login ( struct iscsi_session *iscsi ) {
struct iscsi_bhs_login_request *request = &iscsi->tx_bhs.login_request;
int len;
/* Construct BHS and initiate transmission */
iscsi_start_tx ( iscsi );
request->opcode = ( ISCSI_OPCODE_LOGIN_REQUEST |
ISCSI_FLAG_IMMEDIATE );
request->flags = ( ( iscsi->... | false | false | false | false | false | 0 |
rtl92ee_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
enum io_type iotype;
if (!is_hal_stop(rtlhal)) {
switch (operation) {
case SCAN_OPT_BACKUP_BAND0:
iotype = IO_CMD_PAUSE_BAND0_DM_BY_SCAN;
rtl... | false | false | false | false | false | 0 |
selectItem(MenuItem *menuItem)
{
if (!strcmp(menuItem->label(), "Artists"))
m_app->go(new ArtistsMenu(m_app));
if (!strcmp(menuItem->label(), "Albums"))
m_app->go(new AlbumsMenu(m_app));
if (!strcmp(menuItem->label(), "Songs"))
m_app->go(new SongsMenu(m_app));
if (!strcmp(menuItem->label(), "Genres"... | false | false | false | false | false | 0 |
regulator_is_enabled(struct regulator *regulator)
{
int ret;
if (regulator->always_on)
return 1;
mutex_lock(®ulator->rdev->mutex);
ret = _regulator_is_enabled(regulator->rdev);
mutex_unlock(®ulator->rdev->mutex);
return ret;
} | false | false | false | false | false | 0 |
PointInPolygon(const IntPoint &pt, OutPt *pp, bool UseFullInt64Range)
{
OutPt *pp2 = pp;
bool result = false;
if (UseFullInt64Range) {
do
{
if ((((pp2->pt.Y <= pt.Y) && (pt.Y < pp2->prev->pt.Y)) ||
((pp2->prev->pt.Y <= pt.Y) && (pt.Y < pp2->pt.Y))) &&
Int128(pt.X - pp2->pt.X) < (... | false | false | false | false | false | 0 |
emulate_rename_group_remove_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
GSimpleAsyncResult *rename_result = user_data;
GError *error = NULL;
if (!tp_base_contact_list_remove_group_finish (self, result, &error))
{
g_... | 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.