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 |
|---|---|---|---|---|---|---|
is_afr_lock_selfheal (afr_local_t *local)
{
afr_internal_lock_t *int_lock = NULL;
int ret = -1;
int_lock = &local->internal_lock;
switch (int_lock->selfheal_lk_type) {
case AFR_DATA_SELF_HEAL_LK:
case AFR_METADATA_SELF_HEAL_LK:
ret ... | false | false | false | false | false | 0 |
get_fg_tile_info(int tile_index)
{
int attr = colorram[tile_index];
int code = videoram[tile_index] + ((attr & 0x10) << 4);
int color = attr & 0x0f;
int flags = ((attr & 0x40) ? TILE_FLIPX : 0) | ((attr & 0x80) ? TILE_FLIPY : 0);
tile_info.priority = (attr & 0x20) ? 0 : 1;
SET_TILE_INFO(0, code, color,... | false | false | false | false | false | 0 |
jspeBlock() {
JSP_MATCH('{');
if (JSP_SHOULD_EXECUTE) {
while (execInfo.lex->tk && execInfo.lex->tk!='}') {
jsvUnLock(jspeStatement());
if (JSP_HAS_ERROR) {
if (execInfo.lex && !(execInfo.execute&EXEC_ERROR_LINE_REPORTED)) {
execInfo.execute = (JsExecFlags)(execInfo.execute | EXEC_... | false | false | false | true | false | 1 |
ltc3589_apply_fb_voltage_divider(struct ltc3589_regulator *rdesc)
{
struct regulator_desc *desc = &rdesc->desc;
if (!rdesc->r1 || !rdesc->r2)
return;
desc->min_uV = ltc3589_scale(desc->min_uV, rdesc->r1, rdesc->r2);
desc->uV_step = ltc3589_scale(desc->uV_step, rdesc->r1, rdesc->r2);
desc->fixed_uV = ltc3589_sc... | false | false | false | false | false | 0 |
gdb_var_list_children (const GList *children, gpointer user_data, GError *err)
{
DmaVariablePacket *pack = (DmaVariablePacket *) user_data;
GtkTreeIter iter;
g_return_if_fail (pack != NULL);
if ((err != NULL)
|| (pack->data == NULL)
|| !dma_variable_packet_get_iter (pack, &iter))
{
/* Command failed or it... | false | false | false | false | false | 0 |
SWIG_Tcl_ObjectDelete(ClientData clientData) {
swig_instance *si = (swig_instance *) clientData;
if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
if (si->classptr->destructor) {
(si->classptr->destructor)(si->thisvalue);
}
}
Tcl_DecrRefCount(si->thisptr);
free(si);
} | false | false | false | false | false | 0 |
address_of_int_loc_descriptor (int size, HOST_WIDE_INT i)
{
int litsize;
dw_loc_descr_ref loc_result = NULL;
if (!(dwarf_version >= 4 || !dwarf_strict))
return NULL;
if (i >= 0)
{
if (i <= 31)
litsize = 1;
else if (i <= 0xff)
litsize = 2;
else if (i <= 0xffff)
litsize = 3;
e... | false | false | false | false | false | 0 |
_write_update_pos(ios_t *s)
{
if (s->bpos > s->ndirty) s->ndirty = s->bpos;
if (s->bpos > s->size) s->size = s->bpos;
} | false | false | false | false | false | 0 |
extract_startdat(FILE *psar, bool isMultidisc)
{
if (psar == NULL)
{
printf("ERROR: Can't open input file for STARTDAT!\n");
return -1;
}
// Get the STARTDAT offset (0xC for single disc and 0x10 for multidisc due to header magic length).
int startdat_offset;
if (isMultidisc)
fseek(psar, 0x10, SE... | false | false | false | false | true | 1 |
tth_cache_pathname(const struct tth *tth)
{
const char *hash;
g_assert(tth);
hash = tth_base32(tth);
return h_strdup_printf("%s%c%2.2s%c%s",
tth_cache_directory(), G_DIR_SEPARATOR,
&hash[0], G_DIR_SEPARATOR, &hash[2]);
} | false | false | false | false | false | 0 |
doPatternFillFallback(GBool eoFill) {
GfxPattern *pattern;
if (!(pattern = state->getFillPattern())) {
return;
}
switch (pattern->getType()) {
case 1:
break;
case 2:
doShadingPatternFillFallback((GfxShadingPattern *)pattern, gFalse, eoFill);
break;
default:
#ifdef POPPLER_NEW_ERRORAPI
... | false | false | false | false | false | 0 |
input_mt_set_slots(struct input_mt *mt,
int *slots, int num_pos)
{
struct input_mt_slot *s;
int *w = mt->red, j;
for (j = 0; j != num_pos; j++)
slots[j] = -1;
for (s = mt->slots; s != mt->slots + mt->num_slots; s++) {
if (!input_mt_is_active(s))
continue;
for (j = 0; j != num_pos; j++) {
if... | false | false | false | false | false | 0 |
do_receive_packet(struct ipw_hardware *hw)
{
unsigned len;
unsigned i;
unsigned char pkt[LL_MTU_MAX];
start_timing();
if (hw->hw_version == HW_VERSION_1) {
len = inw(hw->base_port + IODRR);
if (len > hw->ll_mtu) {
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": received a packet of %u bytes - longer ... | true | true | false | false | false | 1 |
DoLongPass(player_t *g, uint32_t joystate)
{
LongPass(g,joystate);
if( abs(CambioDirezione[g->dir][(pl->dir>>5)])<2 )
Tira(g);
else
SetComando(g,ESEGUI_ROTAZIONE,ESEGUI_TIRO,pl->dir>>5);
} | false | false | false | false | false | 0 |
hw_ostc_device_reset (dc_device_t *abstract)
{
hw_ostc_device_t *device = (hw_ostc_device_t *) abstract;
if (!ISINSTANCE (abstract))
return DC_STATUS_INVALIDARGS;
// Send the command.
dc_status_t rc = hw_ostc_send (device, 'h', 1);
if (rc != DC_STATUS_SUCCESS)
return rc;
return DC_STATUS_SUCCESS;
} | false | false | false | false | false | 0 |
redrawTitlebar() {
if (!m_use_titlebar || m_tab_container.empty())
return;
if (isVisible()) {
m_tab_container.clear();
m_label.clear();
m_titlebar.clear();
}
} | false | false | false | false | false | 0 |
mdb_txn_renew0(MDB_txn *txn)
{
MDB_env *env = txn->mt_env;
char mt_dbflag = 0;
if (txn->mt_flags & MDB_TXN_RDONLY) {
MDB_reader *r = pthread_getspecific(env->me_txkey);
if (!r) {
unsigned int i;
pid_t pid = getpid();
pthread_t tid = pthread_self();
LOCK_MUTEX_R(env);
for (i=0; i<env->me_txns->mt... | false | true | false | false | false | 1 |
Fstkpush()
{
struct stack *sptr;
struct stackpage *spage;
truc currpage, sheet;
truc obj;
int line;
if(*FLAGPTR(argStkPtr-1) != fSTACK) {
error(pushsym,err_stkv,voidsym);
return(brkerr());
}
if(*argStkPtr == breaksym)
return(brkerr());
obj = mkcopy(argStkPtr)... | false | false | false | false | false | 0 |
evd_tls_cipher_do (EvdTlsCipher *self,
const gchar *data,
gsize data_size,
const gchar *key,
gsize key_size,
GCancellable *cancellable,
GAsyncRead... | false | false | false | false | false | 0 |
bcm_sf2_sw_indir_rw(struct dsa_switch *ds, int op, int addr,
int regnum, u16 val)
{
struct bcm_sf2_priv *priv = ds_to_priv(ds);
int ret = 0;
u32 reg;
reg = reg_readl(priv, REG_SWITCH_CNTRL);
reg |= MDIO_MASTER_SEL;
reg_writel(priv, reg, REG_SWITCH_CNTRL);
/* Page << 8 | offset */
reg = 0x70;
reg <<... | false | false | false | false | false | 0 |
nearestSizeRow (qreal val, bool customize)
{
qreal diff = 1000;
int row = 0;
for (int r = 0; r < sizeListBox->count(); ++r) {
qreal cval = KGlobal::locale()->readNumber(sizeListBox->item(r)->text());
if (qAbs(cval - val) < diff) {
diff = qAbs(cval - val);
row = r;
... | false | false | false | false | false | 0 |
ve_strftime (struct tm *the_tm, const char *format)
{
char str[1024];
char *loc_format = ve_locale_from_utf8 (format);
if (strftime (str, sizeof (str)-1, loc_format, the_tm) == 0) {
/* according to docs, if the string does not fit, the
* contents of str are undefined, thus just use
* ??? */
strcpy (str, "... | false | false | false | false | false | 0 |
Filter6(int16 *In,int16 *Out,int Samples,int *Temp,int *Coef,int Shift)
{
int i;
int16 tmp;
int Wn;
int Yn;
for(i = 0; i < Samples; i++) {
BIQUAD(In[i],Coef,Temp,tmp,Shift);
BIQUAD(tmp,&Coef[5],&Temp[2],tmp,Shift);
BIQUAD(tmp,&Coef[10],&Temp[4],Out[i],Shift);
}
} | false | false | false | false | false | 0 |
cli_check(const struct cli *cli)
{
if (cli->result == CLIS_OK) {
VSB_clear(cli->sb);
return;
}
AZ(VSB_finish(cli->sb));
fprintf(stderr, "Error:\n%s\n", VSB_data(cli->sb));
exit (2);
} | false | false | false | false | false | 0 |
ExtractTopic(const char * pszLayerName)
{
const char *table = strchr(pszLayerName, '_');
while (table && table[1] != '_') table = strchr(table+1, '_');
return (table) ? CPLScanString(pszLayerName, table-pszLayerName, FALSE, FALSE) : NULL;
} | false | false | false | false | false | 0 |
dbcs_allow_break(cc, ncc)
int cc;
int ncc;
{
return dbcs_allow_break_after(cc) && dbcs_allow_break_before(ncc);
} | false | false | false | false | false | 0 |
strcmpi (char *a, char *b) {
int equal = 1;
char c,d;
while (equal && *a) {
c = *a++;
d = *b++;
if ('a'<=c && c<='z') c += 'A' - 'a';
if ('a'<=d && d<='z') d += 'A' - 'a';
equal = (c==d);
}
if (equal) return 0;
if (c<d) return -1;
return 1;
} | false | false | false | false | false | 0 |
RunStartupScripts()
{
ConfigManager* mgr = Manager::Get()->GetConfigManager(_T("scripting"));
wxArrayString keys = mgr->EnumerateKeys(_T("/startup_scripts"));
for (size_t i = 0; i < keys.GetCount(); ++i)
{
ScriptEntry se;
wxString ser;
if (mgr->Read(_T("/startup_scripts/") + key... | false | false | false | false | false | 0 |
rfftwnd_real2c_aux_howmany_threads(fftwnd_plan p, int cur_dim,
int howmany,
fftw_real *in, int istride, int idist,
fftw_complex *out,
int ostride, int odist,
fftw_complex *work, int nwork,
int nthreads)
{
int n_after = p->n_after[cur_dim], n = p->n[cur_dim];
if (cur_dim == p->ra... | false | false | false | false | false | 0 |
FDKaacEnc_fuzzyIsSmaller( FIXP_DBL testVal,
FIXP_DBL refVal,
FIXP_DBL loLim,
FIXP_DBL hiLim )
{
if (refVal <= FL2FXCONST_DBL(0.0))
return( FL2FXCONST_SGL(0.0f) );
else if (testVal >= fMult((hiLim>>1)+(loLim>>1), ... | false | false | false | false | false | 0 |
tpg_fill_plane_buffer(struct tpg_data *tpg, v4l2_std_id std,
unsigned p, u8 *vbuf)
{
struct tpg_draw_params params;
unsigned factor = V4L2_FIELD_HAS_T_OR_B(tpg->field) ? 2 : 1;
/* Coarse scaling with Bresenham */
unsigned int_part = (tpg->crop.height / factor) / tpg->compose.height;
unsigned fract_part = (t... | false | false | false | false | false | 0 |
autofs4_ask_umount(struct vfsmount *mnt, int __user *p)
{
int status = 0;
if (may_umount(mnt))
status = 1;
DPRINTK("returning %d", status);
status = put_user(status, p);
return status;
} | false | false | false | false | false | 0 |
accept()
{
QString name = m_ui.lineEdit->text();
if ( m_names.contains( name ) ) {
QString message;
switch ( m_mode ) {
case PresetMode:
message = tr( "<qt>Are you sure you want to overwrite the existing preset<br>named <b>%1</b>?</qt>" ).arg( name );
... | false | false | false | false | false | 0 |
xFlush(conn)
IMConnection *conn;
{
IMBuffer *ibp = IM_OUTBUF(conn);
XClientMessageEvent repl;
Widget w = conn->proto_widget;
Window client_win = conn->transport.priv.x.client;
Display *dpy = XtDisplay(w);
int length;
XAEHandle handle;
if ((length = IMBUFLEN(ibp)) == 0) return TRANSPORT_... | false | false | false | false | false | 0 |
_e_grabinput_focus_do(Ecore_X_Window win, E_Focus_Method method)
{
/* fprintf(stderr, "focus to %x method %i\n", win, method); */
switch (method)
{
case E_FOCUS_METHOD_NO_INPUT:
break;
case E_FOCUS_METHOD_LOCALLY_ACTIVE:
ecore_x_window_focus_at_time(win, ecore_x_current_time_get()... | false | false | false | false | false | 0 |
meta_draw_op_list_append (MetaDrawOpList *op_list,
MetaDrawOp *op)
{
if (op_list->n_ops == op_list->n_allocated)
{
op_list->n_allocated *= 2;
op_list->ops = g_renew (MetaDrawOp*, op_list->ops, op_list->n_allocated);
}
op_list->ops[op_list->n_ops] = op;
... | false | false | false | false | false | 0 |
GenerateObjectEquals(CallRuntime* call) {
ASSERT(call->arguments()->length() == 2);
VISIT_FOR_VALUE(call->arguments()->at(0));
VISIT_FOR_VALUE(call->arguments()->at(1));
HValue* right = Pop();
HValue* left = Pop();
HCompareJSObjectEq* result = new HCompareJSObjectEq(left, right);
ast_context()->ReturnInst... | false | false | false | false | false | 0 |
mpwl_round(MpwRealNum *rop)
{
if(rop->type > MPW_INTEGER) {
if(rop->type == MPW_FLOAT) {
mpz_t ival;
GET_INIT_MPZ (ival);
mpz_set_fr (ival, rop->data.fval, GMP_RNDN);
CLEAR_FREE_MPF (rop->data.fval);
memcpy (rop->data.ival, ival,
sizeof (__mpz_struct));
rop->type = MPW_INTEGER;
} else /*MPW_R... | false | true | false | false | false | 1 |
_pack_accounting_update_msg(accounting_update_msg_t *msg,
Buf buffer,
uint16_t protocol_version)
{
uint32_t count = 0;
ListIterator itr = NULL;
slurmdb_update_object_t *rec = NULL;
/* We need to work off the version sent in the message since
we might not know what the protocol_version is at this
... | false | false | false | false | false | 0 |
tse_open(struct net_device *dev)
{
struct altera_tse_private *priv = netdev_priv(dev);
int ret = 0;
int i;
unsigned long int flags;
/* Reset and configure TSE MAC and probe associated PHY */
ret = priv->dmaops->init_dma(priv);
if (ret != 0) {
netdev_err(dev, "Cannot initialize DMA\n");
goto phy_error;
}
... | false | false | false | false | false | 0 |
XBM_identify( FILE * fp )
{
int n = 3;
char buf[ 128 ];
while ( --n >= 0 && fgets( buf, sizeof buf - 1, fp ) )
{
if ( strstr( buf, "#define" ) && strstr( buf, "_width " ) )
{
rewind( fp );
return 1;
}
}
return -1;
} | false | false | false | false | false | 0 |
webauthldap_exportattrib(void* lcp, const char *key, const char *val)
{
char *newkey, *p;
MWAL_LDAP_CTXT* lc = (MWAL_LDAP_CTXT*) lcp;
if ((key == NULL) || (val == NULL))
return 1;
/* conf directive could have been in different capitalization,
simpler to just uppercase for the comparison... | false | false | false | false | false | 0 |
gfx_v8_0_eop_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{
int i;
u8 me_id, pipe_id, queue_id;
struct amdgpu_ring *ring;
DRM_DEBUG("IH: CP EOP\n");
me_id = (entry->ring_id & 0x0c) >> 2;
pipe_id = (entry->ring_id & 0x03) >> 0;
queue_id = (entry->rin... | false | false | false | false | false | 0 |
png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "pHYs");
if (res_... | false | false | false | false | false | 0 |
recalculateFields(UT_uint32 iUpdateCount)
{
bool bResult = false;
UT_sint32 iNumRuns = m_vecRuns.getItemCount();
for (UT_sint32 i = 0; i < iNumRuns; i++)
{
fp_Run* pRun = m_vecRuns.getNthItem(i);
if (pRun->getType() == FPRUN_FIELD)
{
fp_FieldRun* pFieldRun = static_cast<fp_FieldRun*>(pRun);
if(iUpdate... | false | false | false | false | false | 0 |
cz_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,
struct pp_power_state *prequest_ps,
const struct pp_power_state *pcurrent_ps)
{
struct cz_power_state *cz_ps =
cast_PhwCzPowerState(&prequest_ps->hardware);
const struct cz_power_state *cz_current_ps =
cast_const_PhwCzPowerState(&pcurrent_ps->hardwa... | false | false | false | false | false | 0 |
gen_close(struct irs_acc *this) {
struct gen_p *irs = (struct gen_p *)this->private;
int n;
/* Search rules. */
for (n = 0; n < irs_nmap; n++)
while (irs->map_rules[n] != NULL)
irs->map_rules[n] = release_rule(irs->map_rules[n]);
/* Access methods. */
for (n = 0; n < irs_nacc; n++) {
/* Map objects. */
... | false | false | false | false | false | 0 |
unicode_zfill(PyUnicodeObject *self, PyObject *args)
{
Py_ssize_t fill;
PyUnicodeObject *u;
Py_ssize_t width;
if (!PyArg_ParseTuple(args, "n:zfill", &width))
return NULL;
if (self->length >= width) {
if (PyUnicode_CheckExact(self)) {
Py_INCREF(self);
return ... | false | false | false | false | false | 0 |
SetNumberOfThreads( ThreadIdType number )
{
if( number < 1 )
{
itkExceptionMacro("Number of threads must be > 0");
}
if( number != this->m_NumberOfThreads )
{
this->m_NumberOfThreads = number;
this->Modified();
}
} | false | false | false | false | false | 0 |
lwgeom_getsrid(uchar *serialized)
{
uchar type = serialized[0];
uchar *loc = serialized+1;
if ( ! lwgeom_hasSRID(type)) return -1;
if (lwgeom_hasBBOX(type))
{
loc += sizeof(BOX2DFLOAT4);
}
return lw_get_int32(loc);
} | false | false | false | false | false | 0 |
hpt3xx_maskproc(ide_drive_t *drive, int mask)
{
ide_hwif_t *hwif = drive->hwif;
struct pci_dev *dev = to_pci_dev(hwif->dev);
struct hpt_info *info = hpt3xx_get_info(hwif->dev);
if ((drive->dev_flags & IDE_DFLAG_NIEN_QUIRK) == 0)
return;
if (info->chip_type >= HPT370) {
u8 scr1 = 0;
pci_read_config_byte(de... | false | false | false | false | false | 0 |
fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
ino_t par, const char *name)
{
inode_t *inode = NULL;
inode_t *parent = NULL;
int32_t ret = -1;
char *path = NULL;
uuid_t null_gfid = {0,};
/* resistance against multiple invocation of l... | false | false | false | false | false | 0 |
static_faces_mark (int v_new, static_polytope *polytope)
{
static_face *face_visible;
static_vertex *vertex_new;
int *conflicts;
int f_visible;
int i;
/*******************************************
* signal all faces that should be removed *
*******************************************/
vertex_new = polytope->vertices... | false | false | false | false | false | 0 |
ScriptTokenListFree(ParseTokenList *tokenlist)
{
if (tokenlist->list != tokenlist->static_list) {
Jim_Free(tokenlist->list);
}
} | false | false | false | false | false | 0 |
FnMeanSigma_float
(float *array, /* 2 dimensional array of image pixels */
long npix, /* number of pixels in the image */
int nullcheck, /* check for null values, if true */
float nullvalue, /* value of null pixels, if nullcheck is true */
/* returned parameters */
long... | false | false | false | false | false | 0 |
v_mexplist(void)
#else
v_mexplist()
#endif
{
#line 2069 "./verilog.g"
zzRULE;
zzBLOCK(zztasp1);
zzMake0;
{
#line 2069 "./verilog.g"
struct i_explist *lroot=NULL, *lcurrent=NULL;
#line 2070 "./verilog.g"
v_mfn_expression();
#line 2071 "./verilog.g"
lroot=lcurrent=(struct i_explist *)calloc(1,sizeof(struct ... | false | false | false | false | false | 0 |
mpu_timer_event(int dev, unsigned char *event)
{
unsigned char command = event[1];
unsigned long parm = *(unsigned int *) &event[4];
int midi_dev = sound_timer_devs[dev]->devlink;
switch (command)
{
case TMR_WAIT_REL:
parm += prev_event_time;
case TMR_WAIT_ABS:
if (parm > 0)
{
long time;
if ... | false | false | false | false | false | 0 |
filterfree(LFilter * *x)
{
if (*x) {
if ((*x)->value) LFree((*x)->value);
OOGLFree(*x);
}
} | false | false | false | false | false | 0 |
maybe_deadlock( DOTLOCK h )
{
DOTLOCK r;
for ( r=all_lockfiles; r; r = r->next )
{
if ( r != h && r->locked )
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
GroupTracts(vtkPolyData* input, vtkPolyData* centerlineTracts)
{
switch (this->GroupingMode)
{
case FIRSTPOINT:
this->CoincidentExtremePointGroupTracts(input,centerlineTracts,true);
break;
case LASTPOINT:
this->CoincidentExtremePointGroupTracts(input,centerlineTracts,false);
break;... | false | false | false | false | false | 0 |
sil24_config_port(struct ata_port *ap)
{
void __iomem *port = sil24_port_base(ap);
/* configure IRQ WoC */
if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC)
writel(PORT_CS_IRQ_WOC, port + PORT_CTRL_STAT);
else
writel(PORT_CS_IRQ_WOC, port + PORT_CTRL_CLR);
/* zero error counters. */
writew(0x8000, port + PORT_DECODE... | false | false | false | false | false | 0 |
adv7511_hpd_work(struct work_struct *work)
{
struct adv7511 *adv7511 = container_of(work, struct adv7511, hpd_work);
enum drm_connector_status status;
unsigned int val;
int ret;
ret = regmap_read(adv7511->regmap, ADV7511_REG_STATUS, &val);
if (ret < 0)
status = connector_status_disconnected;
else if (val & ADV... | false | false | false | false | false | 0 |
_ds_shadow_obj_init(Shadow *sh)
{
E_Container *con;
int i;
if (sh->initted) return;
sh->initted = 1;
con = e_container_shape_container_get(sh->shape);
for (i = 0; i < 4; i++)
{
sh->object[i] = evas_object_image_add(con->bg_evas);
evas_object_image_alpha_set(sh->object[i], 1);
... | false | false | false | false | false | 0 |
i915_gem_object_list_info(struct seq_file *m, void *data)
{
struct drm_info_node *node = m->private;
uintptr_t list = (uintptr_t) node->info_ent->data;
struct list_head *head;
struct drm_device *dev = node->minor->dev;
struct drm_i915_private *dev_priv = to_i915(dev);
struct i915_ggtt *ggtt = &dev_priv->ggtt;
st... | false | false | false | false | false | 0 |
gth_image_rotator_set_crop_region (GthImageRotator *self,
cairo_rectangle_int_t *region)
{
self->priv->enable_crop = (region != NULL);
if (region != NULL)
self->priv->crop_region = *region;
if (self->priv->viewer != NULL)
gtk_widget_queue_draw (GTK_WIDGET (self->priv->viewer));
g_signal_emit (sel... | false | false | false | false | false | 0 |
free_string(sstring str) {
shared_string *ss;
GATHER(free_stats.calls);
ss = SS(str);
if ((--ss->refcount&~TOPBIT) == 0) {
/* Remove this entry. */
if (ss->refcount&TOPBIT) {
/* We must put a new value into the hash_table[].
*/
if (ss->next) {
... | false | false | false | false | false | 0 |
GetMenuItem(XmtMenuWidget mw, XrmName quark)
#else
static XmtMenuItem *GetMenuItem(mw, quark)
XmtMenuWidget mw;
XrmName quark;
#endif
{
int i;
XmtMenuItem *item, *subitem;
/*
* check each of the items in the menu.
* Note that we use the widget name rather than item->name, because
* comparing... | false | false | false | false | false | 0 |
gedit_spell_checker_language_from_key (const gchar *key)
{
const GSList *langs;
g_return_val_if_fail (key != NULL, NULL);
langs = gedit_spell_checker_get_available_languages ();
while (langs != NULL)
{
const GeditSpellCheckerLanguage *l = (const GeditSpellCheckerLanguage *)langs->data;
if (g_ascii_strcasec... | false | false | false | false | false | 0 |
exposeCursor(ocw, w, region)
OverTheSpotConversionWidget ocw;
Widget w;
XRectangle *region;
{
XRectangle bounds;
if (!ocw->overthespot.cursorvisible ||
w != ocw->overthespot.cursorlocation.canvas->canvas) return False;
TRACE(("exposeCursor(region=%d,%d-%d,%d)\n",
region->x, region->y, region->width,... | false | false | false | false | false | 0 |
comparePartialLocationKey(const UHashTok key1, const UHashTok key2) {
PartialLocationKey *p1 = (PartialLocationKey *)key1.pointer;
PartialLocationKey *p2 = (PartialLocationKey *)key2.pointer;
if (p1 == p2) {
return TRUE;
}
if (p1 == NULL || p2 == NULL) {
return FALSE;
}
// W... | false | false | false | false | false | 0 |
entityDefaulted(EntityDefaultedEvent *event)
{
grove_->addDefaultedEntity(event->entityPointer());
delete event;
} | false | false | false | false | false | 0 |
gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
struct gfs2_trans *tr)
{
struct gfs2_bufdata *bd = bh->b_private;
BUG_ON(!buffer_uptodate(bh));
BUG_ON(!buffer_pinned(bh));
lock_buffer(bh);
mark_buffer_dirty(bh);
clear_buffer_pinned(bh);
if (buffer_is_rgrp(bd))
maybe_release_space(bd);
sp... | false | false | false | false | false | 0 |
main_page_set_encoding (StfDialogData *pagedata, const char *enc)
{
char *utf8_data;
gsize bytes_read = -1;
gsize bytes_written = -1;
GError *error = NULL;
if (!enc) return FALSE;
utf8_data = g_convert (pagedata->raw_data, pagedata->raw_data_len,
"UTF-8", enc,
&bytes_read, &bytes_written, &e... | false | false | false | false | false | 0 |
framerender_iconify(ObFrame *self, RrAppearance *a)
{
if (!self->iconify_on) return;
RrPaint(a, self->iconify,
ob_rr_theme->button_size, ob_rr_theme->button_size);
} | false | false | false | false | false | 0 |
sec_asn1e_which_choice
(
void *src,
const SEC_ASN1Template *theTemplate
)
{
int rv;
unsigned int which = *(unsigned int *)src;
for( rv = 1, theTemplate++; theTemplate->kind != 0; rv++, theTemplate++ ) {
if( which == theTemplate->size ) {
return rv;
}
}
return 0;
} | false | false | false | false | false | 0 |
fs_hash_table_foreach(fs_hash_table *hash_table, fs_h_func func,
void *user_data) {
int i;
#ifndef G_DISABLE_ASSERT
int version;
#endif
g_return_if_fail(hash_table != NULL);
g_return_if_fail(func != NULL);
#ifndef G_DISABLE_ASSERT
version = hash_table->version;
#endif
for (i = 0; i < ... | false | false | false | false | false | 0 |
RTCP_FormatSDES(GF_RTPChannel *ch, GF_BitStream *bs)
{
u32 length, padd;
//one item (type, len, data) + \0 marker at the end of the item
length = 2+strlen(ch->CName) + 1;
// length = 2+strlen(ch->CName);
padd = length % 4;
if (padd*4 != length) {
//padding octets
padd = 4 - padd;
//header length
length = ... | false | false | false | false | false | 0 |
nxt_file_write_low(nxt_t *nxt,int handle,void *src,size_t count) {
nxt_pack_start(nxt,0x83);
nxt_pack_byte(nxt,handle);
nxt_pack_mem(nxt,src,count);
test(nxt_con_send(nxt));
test(nxt_con_recv(nxt,6));
test(nxt_unpack_start(nxt,0x83));
if (nxt_unpack_error(nxt)==0) {
nxt_unpack_byte(nxt);
return nx... | false | false | false | false | false | 0 |
BSAM_build_HSPset(BSAM *bsam, Comparison *comparison,
HSPset *hspset){
register DejaVu *dejavu;
register GString *bigseq;
register BSAM_SeedSet *seedset = BSAM_SeedSet_create(bsam,
comparison, hspset);
register guchar *filter = A... | false | false | false | false | false | 0 |
nfs4_open_done(struct rpc_task *task, void *calldata)
{
struct nfs4_opendata *data = calldata;
data->rpc_status = task->tk_status;
if (!nfs4_sequence_done(task, &data->o_res.seq_res))
return;
if (task->tk_status == 0) {
if (data->o_res.f_attr->valid & NFS_ATTR_FATTR_TYPE) {
switch (data->o_res.f_attr->mod... | false | false | false | false | false | 0 |
setup_name_count(FvwmWindow *fw, Bool is_icon)
{
FvwmWindow *t;
int count = 0;
int win_count;
int win_count_counterpart;
Bool done = False;
FlocaleNameString *titlename, *title_counterpart;
FlocaleNameString *t_titlename, *t_title_counterpart;
titlename = (is_icon) ?
&(fw->icon_name) : &(fw->name);
title_co... | false | false | false | false | false | 0 |
options_accept()
{
// apply the selected multiplayer options
if ( Options_multi_inited ) {
// if we've failed to provide a PXO password or username but have turned on PXO, we don't want to quit
if (!options_multi_accept()) {
gamesnd_play_iface(SND_COMMIT_PRESSED);
popup(PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK,... | false | false | false | false | false | 0 |
EscapeSpecialChars( GooString* s )
{
GooString* tmp = NULL;
for( int i = 0, j = 0; i < s->getLength(); i++, j++ ){
const char *replace = NULL;
switch ( s->getChar(i) ){
case '"': replace = """; break;
case '&': replace = "&"; break;
case '<': replace = "<... | false | false | false | false | false | 0 |
EndCommand(const char *commandTag, CommandDest dest)
{
switch (dest)
{
case DestRemote:
case DestRemoteExecute:
/*
* We assume the commandTag is plain ASCII and therefore
* requires no encoding conversion.
*/
pq_putmessage('C', commandTag, strlen(commandTag) + 1);
break;
case DestNone:
c... | false | false | false | false | false | 0 |
setup()
{
getxy_building ( &position.x, &position.y );
damage = editInt("new building damage", damage, 0, 100);
} | false | false | false | false | false | 0 |
remove_unpaid_objects(object *op, object *env, int free_items) {
FOR_OB_AND_BELOW_PREPARE(op) {
if (QUERY_FLAG(op, FLAG_UNPAID)) {
object_remove(op);
if (free_items)
object_free_drop_inventory(op);
else
object_insert_in_map_at(op, env->map,... | false | false | false | false | false | 0 |
rescue_draw_background(struct mame_bitmap *bitmap)
{
if (background_enable)
{
int x;
for (x = 0; x < 128; x++)
{
plot_box(bitmap, x, 0, 1, 256, Machine->pens[BACKGROUND_COLOR_BASE + x]);
}
for (x = 0; x < 120; x++)
{
plot_box(bitmap, x + 128, 0, 1, 256, Machine->pens[BACKGROUN... | false | false | false | false | false | 0 |
led_filter_audio (void)
{
led_filter_on = 0;
if (led_filter_forced > 0 || (gui_data.powerled && led_filter_forced >= 0))
led_filter_on = 1;
} | false | false | false | false | false | 0 |
xmlSecOpenSSLKeyDataRsaGetType(xmlSecKeyDataPtr data) {
RSA* rsa;
xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecOpenSSLKeyDataRsaId), xmlSecKeyDataTypeUnknown);
rsa = xmlSecOpenSSLKeyDataRsaGetRsa(data);
if((rsa != NULL) && (rsa->n != NULL) && (rsa->e != NULL)) {
if(rsa->d != NULL) {
... | false | false | false | false | false | 0 |
winbind_allowed_address(u_int32_t addr)
{
ipcp_options *wo = &ipcp_wantoptions[0];
if (wo->hisaddr !=0 && wo->hisaddr == addr) {
return 1;
}
return -1;
} | false | false | false | false | false | 0 |
brcms_c_channel_min_txpower_limits_with_local_constraint(
struct brcms_cm_info *wlc_cm, struct txpwr_limits *txpwr,
u8 local_constraint_qdbm)
{
int j;
/* CCK Rates */
for (j = 0; j < WL_TX_POWER_CCK_NUM; j++)
txpwr->cck[j] = min(txpwr->cck[j], local_constraint_qdbm);
/* 20 MHz Legacy OFDM SISO */
for (j = ... | false | false | false | false | false | 0 |
direct_stream_wait( DirectStream *stream,
unsigned int length,
struct timeval *tv )
{
D_ASSERT( stream != NULL );
D_MAGIC_ASSERT( stream, DirectStream );
if (length && stream->wait)
return stream->wait( stream, length, tv );
return DR_OK;
} | false | false | false | false | false | 0 |
intel_dpio_reg_read(uint32_t reg)
{
/* Check whether the side band fabric is ready to accept commands */
do {
usleep(1);
} while (intel_display_reg_read(DPIO_PKT) & DPIO_BUSY);
intel_display_reg_write(DPIO_REG, reg);
intel_display_reg_write(DPIO_PKT, DPIO_RID |
DPIO_OP_READ | DPIO_PORTID | DPIO_BYTE);
do... | false | false | false | false | false | 0 |
match_real_name_hrfunc (gpointer key,
gpointer value,
gpointer user)
{
return (value != user && g_strcmp0 (um_user_get_real_name (user), um_user_get_real_name (value)) == 0);
} | false | false | false | false | false | 0 |
Scm_MTGenrandU32(ScmMersenneTwister *mt)
{
unsigned long y;
int mti = mt->mti;
static unsigned long mag01[2]={0x0UL, MATRIX_A};
/* mag01[x] = x * MATRIX_A for x=0,1 */
if (mti >= N) { /* generate N words at one time */
int kk;
if (mti == N+1) /* if Scm_MTInitByUI() has not been ... | false | false | false | false | false | 0 |
ar9287_dump_modal_eeprom(char *buf, u32 len, u32 size,
struct modal_eep_ar9287_header *modal_hdr)
{
PR_EEP("Chain0 Ant. Control", modal_hdr->antCtrlChain[0]);
PR_EEP("Chain1 Ant. Control", modal_hdr->antCtrlChain[1]);
PR_EEP("Ant. Common Control", modal_hdr->antCtrlCommon);
PR_EEP("Chain0 Ant. Gain", modal_... | false | false | false | false | false | 0 |
__cw1200_queue_lock(struct cw1200_queue *queue)
{
struct cw1200_queue_stats *stats = queue->stats;
if (queue->tx_locked_cnt++ == 0) {
pr_debug("[TX] Queue %d is locked.\n",
queue->queue_id);
ieee80211_stop_queue(stats->priv->hw, queue->queue_id);
}
} | false | false | false | false | false | 0 |
unmount_reply (GVfsDBusMount *proxy,
GAsyncResult *res,
gpointer user_data)
{
AsyncProxyCreate *data = user_data;
GError *error = NULL;
if (! gvfs_dbus_mount_call_unmount_finish (proxy, res, &error))
{
_g_simple_async_result_take_error_stripped (data->result, error);
}... | false | false | false | false | false | 0 |
writedists()
{
/* write out distances */
long i, j, k;
if (!printdata)
fprintf(outfile, "%5ld\n", spp);
for (i = 0; i < spp; i++) {
for (j = 0; j < nmlngth; j++)
putc(nayme[i][j], outfile);
if (lower)
k = i;
else
k = spp;
for (j = 1; j <= k; j++) {
if (d[i][j-1] < 10... | false | false | false | false | false | 0 |
qmonCreateClusterConfig(
Widget parent
) {
Widget cluster_layout, cluster_change, cluster_change_global,
cluster_delete, cluster_done, shell, cluster_main_link;
DENTER(TOP_LAYER, "qmonCreateClusterConfig");
cluster_layout = XmtBuildQueryDialog( parent, "qmon_cluster",
... | 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.