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 |
|---|---|---|---|---|---|---|
HandleBuybackItem(WorldPacket& recv_data)
{
DEBUG_LOG("WORLD: Received opcode CMSG_BUYBACK_ITEM");
ObjectGuid vendorGuid;
uint32 slot;
recv_data >> vendorGuid >> slot;
Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
DE... | false | false | false | false | false | 0 |
monitor_poll_all_processes_once(struct itable *processes, struct process_info *acc)
{
uint64_t pid;
struct process_info *p;
bzero(acc, sizeof( struct process_info ));
itable_firstkey(processes);
while(itable_nextkey(processes, &pid, (void **) &p))
{
monitor_poll_process_once(p);
acc_mem_usage(&acc->mem, &p... | false | false | false | false | false | 0 |
pcre_nmatchsize(CTX ctx, kregex_t *reg)
{
PCRE_regex_t *preg = (PCRE_regex_t*)reg;
int capsize = 0;
if (_pcre_fullinfo(preg->re, NULL, PCRE_INFO_CAPTURECOUNT, &capsize) != 0) {
return KREGEX_MATCHSIZE;
}
return capsize + 1;
} | false | false | false | false | false | 0 |
in_from_reg(u8 index, u16 val)
{
/* 3VDD, 3VSB and VBAT: 6 mV/bit; other inputs: 2 mV/bit */
if (index >= 12 && index <= 14)
return val * 6;
else
return val * 2;
} | false | false | false | false | false | 0 |
rhk_sm4_read_spec_info(const RHKObject *obj,
const guchar *buffer,
gsize size,
guint nspec)
{
enum { SPEC_INFO_SIZE = 28 };
const guchar *p = buffer + obj->offset;
RHKSpecInfo *spec_infos = NULL;
guint i;
if (obj->size != SPEC_IN... | false | false | false | false | false | 0 |
pk_catalog_search_file_ready_cb (GObject *source_object, GAsyncResult *res, PkCatalogState *state)
{
PkClient *client = PK_CLIENT (source_object);
GError *error = NULL;
PkResults *results;
GPtrArray *array = NULL;
guint i;
PkPackage *package;
PkError *error_code = NULL;
/* get the results */
results = pk_clie... | false | false | false | false | false | 0 |
bnxt_register_dev(struct bnxt_en_dev *edev, int ulp_id,
struct bnxt_ulp_ops *ulp_ops, void *handle)
{
struct net_device *dev = edev->net;
struct bnxt *bp = netdev_priv(dev);
struct bnxt_ulp *ulp;
ASSERT_RTNL();
if (ulp_id >= BNXT_MAX_ULP)
return -EINVAL;
ulp = &edev->ulp_tbl[ulp_id];
if (rcu_access_p... | false | false | false | false | false | 0 |
guestfs_session_btrfs_device_delete(GuestfsSession *session, gchar *const *devices, const gchar *fs, GError **err)
{
guestfs_h *g = session->priv->g;
if (g == NULL) {
g_set_error(err, GUESTFS_ERROR, 0,
"attempt to call %s after the session has been closed",
"btrfs_device_delete")... | false | false | false | false | false | 0 |
rtsx_transfer_data(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
int use_sg, enum dma_data_direction dma_dir, int timeout)
{
int err = 0;
dev_dbg(rtsx_dev(chip), "use_sg = %d\n", use_sg);
/* don't transfer data during abort processing */
if (rtsx_chk_stat(chip, RTSX_STAT_ABORT))
return -EIO;
if (u... | false | false | false | false | false | 0 |
v4l_stk_open(struct file *fp)
{
struct stk_camera *dev = video_drvdata(fp);
int err;
if (dev == NULL || !is_present(dev))
return -ENXIO;
if (mutex_lock_interruptible(&dev->lock))
return -ERESTARTSYS;
if (!dev->first_init)
stk_camera_write_reg(dev, 0x0, 0x24);
else
dev->first_init = 0;
err = v4l2_fh_op... | false | false | false | false | false | 0 |
paste_patch_pixel_to_image(int width_i, int height_i, int width_p, int height_p,
int x_i, int y_i, int x_p, int y_p,
int channels,
guchar * image, guchar * patch) { //,
//guchar * coupe_h_here, guchar * coupe_v... | false | false | false | false | false | 0 |
img_table_button_get_use_mnemonics( ImgTableButton *button )
{
ImgTableButtonPrivate *priv;
g_return_val_if_fail( IMG_IS_TABLE_BUTTON( button ), FALSE );
priv = IMG_TABLE_BUTTON_GET_PRIVATE( button );
return( priv->use_mnemonics );
} | false | false | false | false | false | 0 |
endMove()
{
if( _ownData ) {
FakeSocket socket;
socket.sendFightUnitEndMove();
_engine->handleFakeSocket( &socket );
} else {
_socket->sendFightUnitEndMove();
}
/*
* caused by a weird behaviour when creature gain, this class is destroyed
* before this code, so _map is 0 and is useless clearPath
* ( ... | false | false | false | false | false | 0 |
print()
{
for(int i=0;i<m_xsize;i++){
for(int j=0;j<m_ysize;j++){
for(int k=0;k<m_zsize;k++){
int idx=i+m_xsize*j+k*m_xsize*m_ysize;
//cout << "-- " << i << " , " << j << " , " << " , " << j << " , " << idx << endl;
for(vector<SimpleParticle>::iterator iter=m_data[idx].begin();
... | false | false | false | false | false | 0 |
cursor_position(int x, int y) {
rfbClientIteratorPtr iter;
rfbClientPtr cl;
int cnt = 0, nonCursorPosUpdates_clients = 0;
int x_in = x, y_in = y;
/* x and y are current positions of X11 pointer on the X11 display */
if (!screen) {
return;
}
if (debug_pointer > 1) rfbLog("cursor_position(1): x: %d y: %d\n", ... | false | false | false | false | false | 0 |
VSinquire(int32 vkey, /* IN: vdata key */
int32 *nelt, /* OUT: number of elements in vdata */
int32 *interlace, /* OUT: interlace scheme of vdata */
char *fields, /* OUT: comma seperated string of field names */
int32 *eltsize, /* OUT: total size of all fields in... | false | false | false | false | false | 0 |
GetNaluType(Parse *parse, guint8 *pInputBuf, guint32 ulSize, NALU_t *pNalu)
{
gint b20sInSC, b30sInSC;
gint bStartCodeFound, Rewind;
gint nLeadingZero8BitsCount = 0, TrailingZero8Bits = 0;
guint32 Pos = 0;
while (Pos <= ulSize) {
if ((pInputBuf[Pos++]) == 0)
continue;
else
break;
}
if (pInputBuf[Pos ... | false | false | false | false | true | 1 |
set_temp_min(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
struct pc87360_data *data = dev_get_drvdata(dev);
long val;
int err;
err = kstrtol(buf, 10, &val);
if (err)
return err;
mutex_l... | false | false | false | false | false | 0 |
btree_transplant(btree *root, btree *u, btree *v, btree *up, btree *vp){
(void)vp;
if(!up){
return v;
} else if(u == up->left){
up->left = v;
} else { //u == up->right
up->right = v;
}
return root;
} | false | false | false | false | false | 0 |
_exsltDateParseTimeZone (exsltDateValDatePtr dt, const xmlChar **str)
{
const xmlChar *cur;
int ret = 0;
if (str == NULL)
return -1;
cur = *str;
switch (*cur) {
case 0:
dt->tz_flag = 0;
dt->tzo = 0;
break;
case 'Z':
dt->tz_flag = 1;
dt->tzo = 0;
cur++;
break;
case '+':
cas... | false | false | false | false | false | 0 |
snd_hda_lock_devices(struct hda_bus *bus)
{
struct snd_card *card = bus->card;
struct hda_codec *codec;
spin_lock(&card->files_lock);
if (card->shutdown)
goto err_unlock;
card->shutdown = 1;
if (!list_empty(&card->ctl_files))
goto err_clear;
list_for_each_codec(codec, bus) {
struct hda_pcm *cpcm;
list_... | false | false | false | false | false | 0 |
e_table_group_add (ETableGroup *table_group,
gint row)
{
g_return_if_fail (E_IS_TABLE_GROUP (table_group));
g_return_if_fail (ETG_CLASS (table_group)->add != NULL);
ETG_CLASS (table_group)->add (table_group, row);
} | false | false | false | false | false | 0 |
ecore_con_url_url_set(Ecore_Con_Url *url_con, const char *url)
{
#ifdef HAVE_CURL
if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
{
ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_url_set");
return EINA_FALSE;
}
if (url_con->dead) return EINA_FALSE;
eina_stringsha... | false | false | false | false | false | 0 |
CDB___db_delchk(dbp, key, flags, isrdonly)
const DB *dbp;
DBT *key;
u_int32_t flags;
int isrdonly;
{
/* Check for changes to a read-only tree. */
if (isrdonly)
return (CDB___db_rdonly(dbp->dbenv, "delete"));
/* Check for invalid function flags. */
switch (flags) {
case 0:
break;
default:
return (CDB___... | false | false | false | false | false | 0 |
util_ldap_set_retries(cmd_parms *cmd,
void *dummy,
const char *val)
{
util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_... | false | false | false | false | false | 0 |
check_two_addr_descriptors (const DBusString *addr_fd,
const char *extra_arg)
{
if (_dbus_string_get_length (addr_fd) > 0)
{
fprintf (stderr, "--%s specified but printing address to %s already requested\n",
extra_arg, _dbus_string_get_const_data (addr_fd));
... | false | false | false | false | false | 0 |
dib3000mc_setup_pwm_state(struct dib3000mc_state *state)
{
u16 reg_51, reg_52 = state->cfg->agc->setup & 0xfefb;
if (state->cfg->pwm3_inversion) {
reg_51 = (2 << 14) | (0 << 10) | (7 << 6) | (2 << 2) | (2 << 0);
reg_52 |= (1 << 2);
} else {
reg_51 = (2 << 14) | (4 << 10) | (7 << 6) | (2 << 2) | (2 << 0);
re... | false | false | false | false | false | 0 |
audit_launch_prune(void)
{
if (prune_thread)
return 0;
prune_thread = kthread_create(prune_tree_thread, NULL,
"audit_prune_tree");
if (IS_ERR(prune_thread)) {
pr_err("cannot start thread audit_prune_tree");
prune_thread = NULL;
return -ENOMEM;
} else {
wake_up_process(prune_thread);
return 0;
}
} | false | false | false | false | false | 0 |
find_or_make_acct(QifContext ctx, char *name, GList *types)
{
QifAccount res;
res = (QifAccount)qif_object_map_lookup(ctx, QIF_O_ACCOUNT, name);
if (res)
g_free(name);
else
{
res = qif_account_new();
res->name = name;
res->type_list = types;
qif_object_map_i... | false | false | false | false | false | 0 |
compute_trace(Matrix *a)
{
if(a->columns != a->lines) {
return NOT_SQUARE_MATRIX; //error
}
for(int i = 0; i < a->columns; i++) {
a->trace += a->value[i][i];
}
return NO_ERROR;
} | false | false | false | false | false | 0 |
isofs_check_rr(struct iso_directory_record *root_record) {
int extent = isonum_733(root_record->extent);
char *buf = (char *) malloc(context.data_size); // can we use "standard" 2048 there?
if(!buf) {
perror("Can`t malloc: ");
return -ENOMEM;
};
int rc = isofs_read_raw_block(ext... | false | false | false | false | false | 0 |
print_graph(unsigned int log_level, crm_graph_t * graph)
{
GListPtr lpc = NULL;
if (graph == NULL || graph->num_actions == 0) {
if (log_level > LOG_DEBUG) {
crm_debug("Empty transition graph");
}
return;
}
do_crm_log(log_level, "Graph %d with %d actions:"
... | false | false | false | false | false | 0 |
gnome_canvas_pixbuf_dispose (GnomeCanvasItem *object)
{
GnomeCanvasPixbuf *gcp;
GnomeCanvasPixbufPrivate *priv;
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_PIXBUF (object));
gcp = GNOME_CANVAS_PIXBUF (object);
priv = gcp->priv;
if (priv->pixbuf != NULL) {
g_object_unref (priv->pixbu... | false | false | false | false | false | 0 |
nearby_count(loc_t loc)
{
piece_info_t *obj;
int count;
count = 0;
for (obj = comp_obj[ARMY]; obj; obj = obj->piece_link.next) {
if (nearby_load (obj, loc)) count += 1;
}
return count;
} | false | false | false | false | false | 0 |
claws_spell_entry_finalize(GObject *object)
{
ClawsSpellEntry *entry = CLAWS_SPELL_ENTRY(object);
if (entry->priv->attr_list)
pango_attr_list_unref(entry->priv->attr_list);
if (entry->priv->words)
g_strfreev(entry->priv->words);
g_free(entry->priv->word_starts);
g_free(entry->priv->word_ends);
g_free(entry-... | false | false | false | false | false | 0 |
_aes_fill_buf(aes_cnt_cipher_t *cipher)
{
/* We don't currently use OpenSSL's counter mode implementation because:
* 1) some versions have known bugs
* 2) its attitude towards IVs is not our own
* 3) changing the counter position was not trivial, last time I looked.
* None of these issues are insurmoun... | false | false | false | false | false | 0 |
find_and_track_existing_processes(void)
{
DIR *dp;
struct dirent *entry;
struct stat statbuf;
int start_tracker = 0;
dp = opendir("/proc");
if (!dp) {
/* no proc directory to search through */
crm_notice("Can not read /proc directory to track existing components");
retur... | false | false | false | false | false | 0 |
key_release_timeout(void *d)
{
Fl_Widget_Tracker *wt = (Fl_Widget_Tracker*)d;
if (!wt)
return;
if (wt==key_release_tracker)
key_release_tracker = 0L;
Fl_Button *btn = (Fl_Button*)wt->widget();
if (btn) {
btn->value(0);
btn->redraw();
}
delete wt;
} | false | false | false | false | false | 0 |
mve_encode_0xac (GstMveEncoderData * enc, const guint8 * src,
GstMveApprox * apx)
{
/* 4-color encoding for each 4x4 quadrant (32 bytes) */
guint8 cols[4];
guint32 flags;
guint i, j, x, y, shifter;
guint8 *block;
guint8 *data = apx->data;
apx->error = 0;
for (i = 0; i < 4; ++i) {
apx->error +=... | false | false | false | false | false | 0 |
at91_read_mb(struct net_device *dev, unsigned int mb,
struct can_frame *cf)
{
const struct at91_priv *priv = netdev_priv(dev);
u32 reg_msr, reg_mid;
reg_mid = at91_read(priv, AT91_MID(mb));
if (reg_mid & AT91_MID_MIDE)
cf->can_id = ((reg_mid >> 0) & CAN_EFF_MASK) | CAN_EFF_FLAG;
else
cf->can_id = (reg_mid >... | false | false | false | false | false | 0 |
check_objects(void)
{
unsigned i, max;
max = get_max_object_index();
for (i = 0; i < max; i++)
check_object(get_indexed_object(i));
} | false | false | false | false | false | 0 |
file_find_in_env_generic(GtStr *path, const char *file,
const char *env, FileExistsFunc file_exists,
GtError *err)
{
char *pathvariable, *pathcomponent = NULL;
GtSplitter *splitter = NULL;
unsigned long i;
int had_err = 0;
gt_error_check... | false | false | false | false | true | 1 |
set_std_hw_rates(struct snd_ice1712 *ice)
{
if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
/* I2S */
/* VT1720 doesn't support more than 96kHz */
if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720)
ice->hw_rates = &hw_constraints_rates_192;
else
ice->hw_rates = &hw_constraints_rat... | false | false | false | false | false | 0 |
show_req_lim(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct srp_target_port *target = host_to_target(class_to_shost(dev));
struct srp_rdma_ch *ch;
int i, req_lim = INT_MAX;
for (i = 0; i < target->ch_count; i++) {
ch = &target->ch[i];
req_lim = min(req_lim, ch->req_lim);
}
retu... | false | true | false | false | false | 1 |
anySyncDone(AutoSyncTask *task, SyncMLStatus status)
{
// set "permanently failed" flag according to most recent result
task->m_permanentFailure = status != STATUS_OK && !ErrorIsTemporary(status);
SE_LOG_DEBUG(NULL, "auto sync: sync session %s done, result %d %s",
task->m_configName.c_str()... | false | false | false | false | false | 0 |
ajFeatNew(AjPFeattable thys,
const AjPStr source,
const AjPStr type,
ajint Start, ajint End,
float score,
char strand,
ajint frame)
{
ajuint flags = 0;
AjPFeature ret = NULL;
if(ajStrMatchC(thys->Type, "P"))
ret = ajFeatNewProtFlags(thys,source,type,Sta... | false | false | false | false | false | 0 |
rndis_filter_device_remove(struct hv_device *dev)
{
struct netvsc_device *net_dev = hv_device_to_netvsc_device(dev);
struct rndis_device *rndis_dev = net_dev->extension;
/* If not all subchannel offers are complete, wait for them until
* completion to avoid race.
*/
if (net_dev->num_sc_offered > 0)
wait_for_... | false | false | false | false | false | 0 |
link_stream_from_fd(struct link * link, int fd, INT64_T length, time_t stoptime)
{
char buffer[65536];
INT64_T total = 0;
INT64_T ractual, wactual;
while(length > 0) {
INT64_T chunk = MIN((int) sizeof(buffer), length);
ractual = full_read(fd, buffer, chunk);
if(ractual <= 0)
break;
wactual = link_writ... | false | false | false | false | false | 0 |
TXT_RaiseWindow(txt_window_t *window)
{
int i;
for (i = 0; i < num_windows - 1; ++i)
{
if (all_windows[i] == window)
{
all_windows[i] = all_windows[i + 1];
all_windows[i + 1] = window;
if (i == num_windows - 2)
{
TXT_SetWindow... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
QtSlot2Control *_t = static_cast<QtSlot2Control *>(_o);
switch (_id) {
case 0: _t->sendBooleanControl((*reinterpret_cast< bool(*... | false | false | false | false | false | 0 |
is3_0Alpha(char version[]) {
return version[3] == 3 && version[2] == 0 && version[0] == 'a';
} | false | false | false | false | false | 0 |
pluginRootGet(ExecState* exec, ScriptableExtension* ext, const KJS::Identifier& i, PropertySlot& slot)
{
ScriptableExtension::Object rootObj = grabRoot(ext);
if (!rootObj.owner)
return false;
QVariant v = rootObj.owner->get(0 /* ### we don't expect leaves to check credentials*/,
... | false | false | false | false | false | 0 |
SetIcon(const std::string& filenameup, const std::string& filenamedown, const std::string& filenameover, const PG_Color& colorkey) {
if(!SetIcon(filenameup, filenamedown, filenameover)) {
return false;
}
if((*_mid)[UNPRESSED].srf_icon != NULL) {
SDL_SetColorKey((*_mid)[UNPRESSED].srf_icon, SDL_SRCCOLORKEY, colo... | false | false | false | false | false | 0 |
SetColors(const Color* f, const Color* b) {
if (rep->x_or) {
End_xor();
}
/*
* Make sure to reference both new colors before unreferencing the old
* in case the call is swapping colors.
*/
if (foreground != f) {
Resource::ref(f);
}
if (background != b) {
Resource::ref(b);
... | false | false | false | false | false | 0 |
htmlfgets(hp)
htmlstat_t *hp;
{
char *cp, *buf, *top, *new, *url;
ALLOC_T len, size;
int n, dir, anchored;
buf = url = NULL;
size = (ALLOC_T)0;
anchored = 0;
while ((cp = fgetdir(hp))) {
if (!(hp -> flags & HTML_TAG)) {
top = cp;
cp = skipspace(cp);
len = hp -> len - (cp - top);
if (len) {
ne... | false | false | false | false | false | 0 |
lapm_link_down(lapm_state_t *s)
{
lapm_reset(s);
if (s->status_callback)
s->status_callback(s->status_callback_user_data, s->state);
/*endif*/
} | false | false | false | false | false | 0 |
logmask_to_str(const log_mask_t *mask, char *buf, int size)
{
int last_sev = -1;
bool is_range = false;
int sev;
int len = 0;
if ((mask == NULL) || (buf == NULL) || (size <= 0))
{
if ((buf != NULL) && (size > 0))
{
*buf = 0;
}
return(buf);
}
for (sev = 0; se... | false | false | false | false | false | 0 |
gst_a2dp_sink_class_init (GstA2dpSinkClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->set_property = GST_DEBUG_FUNCPTR (gst_a2dp_sink_set_property);
object_class->g... | false | false | false | false | false | 0 |
mc13783_ts_report_sample(struct mc13783_ts_priv *priv)
{
struct input_dev *idev = priv->idev;
int x0, x1, x2, y0, y1, y2;
int cr0, cr1;
/*
* the values are 10-bit wide only, but the two least significant
* bits are for future 12 bit use and reading yields 0
*/
x0 = priv->sample[0] & 0xfff;
x1 = priv->sampl... | false | false | false | false | false | 0 |
GetExtent( OGREnvelope *psExtent, int bForce )
{
CPLString osCommand;
const char* pszExtentFct;
if (poDS->sPostGISVersion.nMajor >= 2)
pszExtentFct = "ST_Extent";
else
pszExtentFct = "Extent";
if( (bHasPostGISGeometry || bHasPostGISGeography) && nSRSId == UNDETERMINED_SRID )
... | false | false | false | false | false | 0 |
warn_uninitialized_phi (gimple phi, VEC(gimple, heap) **worklist,
struct pointer_set_t *added_to_worklist)
{
unsigned uninit_opnds;
gimple uninit_use_stmt = 0;
tree uninit_op;
/* Don't look at memory tags. */
if (!is_gimple_reg (gimple_phi_result (phi)))
return;
uninit_opnds =... | false | false | false | false | false | 0 |
sftk_InitGeneric(SFTKSession *session,SFTKSessionContext **contextPtr,
SFTKContextType ctype,SFTKObject **keyPtr,
CK_OBJECT_HANDLE hKey, CK_KEY_TYPE *keyTypePtr,
CK_OBJECT_CLASS pubKeyType, CK_ATTRIBUTE_TYPE operation)
{
SFTKObject *key = NULL;
SFTKAttribute *att;
SFTKSessionContext *context;
... | false | false | false | false | false | 0 |
print_cert_info_compact(gnutls_session_t session)
{
if (gnutls_certificate_client_get_request_status(session) != 0)
printf("- Server has requested a certificate.\n");
switch (gnutls_certificate_type_get(session)) {
case GNUTLS_CRT_X509:
print_x509_info_compact(session);
break;
#ifdef ENABLE_OPENPGP
case GNU... | false | false | false | false | false | 0 |
matr_write_fp(Matrix *M, FILE *out) {
if (!M || !out) {
if (MATR_DEBUG_MODE) {
fprintf(stderr, "matr_write: null arguments.\n");
}
return;
}
if (M->type == NON_SPARSE) {
matr_write_ns(M, out);
} else {
matr_write_sp(M, out);
}
} | false | false | false | false | false | 0 |
parport_ax88796_init_state(struct pardevice *d, struct parport_state *s)
{
struct ax_drvdata *dd = pp_to_drv(d->port);
memset(s, 0, sizeof(struct parport_state));
dev_dbg(dd->dev, "init_state: %p: state=%p\n", d, s);
s->u.ax88796.cpr = readb(dd->spp_cpr);
} | false | false | false | false | false | 0 |
has_option (const gchar *options,
const gchar *option)
{
gboolean ret = FALSE;
gchar **tokens;
guint n;
tokens = g_strsplit (options, ",", -1);
for (n = 0; tokens != NULL && tokens[n] != NULL; n++)
{
if (g_strcmp0 (tokens[n], option) == 0)
{
ret = TRUE;
goto ... | false | false | false | false | false | 0 |
snd_dice_stream_init_duplex(struct snd_dice *dice)
{
int err;
dice->substreams_counter = 0;
err = init_stream(dice, &dice->tx_stream);
if (err < 0)
goto end;
err = init_stream(dice, &dice->rx_stream);
if (err < 0)
destroy_stream(dice, &dice->tx_stream);
end:
return err;
} | false | false | false | false | false | 0 |
krb5_prepend_config_files_default(const char *filelist, char ***pfilenames)
{
krb5_error_code ret;
char **defpp, **pp = NULL;
ret = krb5_get_default_config_files(&defpp);
if (ret)
return ret;
ret = krb5_prepend_config_files(filelist, defpp, &pp);
krb5_free_config_files(defpp);
if (ret) {
... | false | false | false | false | false | 0 |
zval_mark_grey(zval *pz TSRMLS_DC)
{
Bucket *p;
tail_call:
if (GC_ZVAL_GET_COLOR(pz) != GC_GREY) {
p = NULL;
GC_BENCH_INC(zval_marked_grey);
GC_ZVAL_SET_COLOR(pz, GC_GREY);
if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) {
struct _store_object *obj = &EG(objects_store).object_buckets[Z... | false | false | false | false | false | 0 |
eliminate_phi (e, reg_partition)
edge e;
partition reg_partition;
{
int n_nodes;
sbitmap *pred, *succ;
sbitmap visited;
rtx *nodes;
int *stack, *tstack;
rtx insn;
int i;
/* Collect an upper bound on the number of registers needing processing. */
insn = first_insn_after_basic_block_note (e... | false | false | false | false | false | 0 |
subagent_init_callback_session(void)
{
if (agentx_callback_sess == NULL) {
agentx_callback_sess = netsnmp_callback_open(callback_master_num,
handle_subagent_response,
NULL, NULL);
DEBUGMSGTL(("a... | false | false | false | false | false | 0 |
_gfxwop_container_free_contents(gfxw_container_t *container)
{
gfxw_widget_t *seeker = container->contents;
while (seeker) {
gfxw_widget_t *next = seeker->next;
seeker->widfree(seeker);
seeker = next;
}
return 0;
} | false | false | false | false | false | 0 |
setProberType(KEncodingProber::ProberType pType)
{
proberType = pType;
/* handle multi-byte encodings carefully , because they're hard to detect,
* and have to use some Stastics methods.
* for single-byte encodings (most western encodings), nsSBCSGroupProber is ok,
* beca... | false | false | false | false | false | 0 |
Tmp_c()
{
if (!IsValid(tmp_c_)) {
tmp_c_ = ip_data_->curr()->y_c()->MakeNew();
}
return *tmp_c_;
} | false | false | false | false | false | 0 |
printing_is_redirected (PRN *prn)
{
int ret = 0;
if (prn != NULL) {
if (prn->fpaux != NULL ||
(prn->fp != NULL && prn->buf != NULL)) {
ret = 1;
} else if (prn->fixed) {
ret = 1;
}
}
return ret;
} | false | false | false | false | false | 0 |
parseResetAndPosition(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return UCOL_DEFAULT; }
int32_t i = skipWhiteSpace(ruleIndex + 1);
int32_t j;
UChar c;
int32_t resetStrength;
if(rules->compare(i, BEFORE_LENGTH, BEFORE, 0, BEFORE_LENGTH) == 0 &&
(j = i + BEFORE_LENGTH) < rules... | false | false | false | false | false | 0 |
DescribeOn(ostream& os) const
{
os << this << endl;
for (PElems::const_iterator eit = _elems.begin();
eit != _elems.end(); eit++)
{
os << *eit << endl;
}
} | false | false | false | false | false | 0 |
rtsx_usb_ep0_read_register(struct rtsx_ucr *ucr, u16 addr, u8 *data)
{
u16 value;
u8 *buf;
int ret;
if (!data)
return -EINVAL;
buf = kzalloc(sizeof(u8), GFP_KERNEL);
if (!buf)
return -ENOMEM;
addr |= EP0_READ_REG_CMD << EP0_OP_SHIFT;
value = swab16(addr);
ret = usb_control_msg(ucr->pusb_dev,
usb_rcv... | false | false | false | false | false | 0 |
from_pack (fptype src, uae_u32 * wrd1, uae_u32 * wrd2, uae_u32 * wrd3)
{
int i;
int t;
char *cp;
char str[100];
sprintf (str, "%.16e", src);
cp = str;
*wrd1 = *wrd2 = *wrd3 = 0;
if (*cp == '-') {
cp++;
*wrd1 = 0x80000000;
}
if (*cp == '+')
cp++;
*wrd1 |= (*cp++ - '0');
if (*cp == '.')
cp++;
for (i... | false | false | false | false | false | 0 |
ffi_prep_go_closure (ffi_go_closure* closure, ffi_cif* cif,
void (*fun)(ffi_cif*, void*, void**, void*))
{
if (cif->abi != FFI_UNIX64)
return FFI_BAD_ABI;
closure->tramp = (cif->flags & UNIX64_FLAG_XMM_ARGS
? ffi_go_closure_unix64_sse
: ffi_go_closure_unix64);
closure->cif = cif;
closure... | false | false | false | false | false | 0 |
type_set_uninitialized (type *t, int npc)
{
if (t->key == reference_type)
t->key = uninitialized_reference_type;
else
verify_fail ("internal error in type::uninitialized");
t->pc = npc;
} | false | false | false | false | false | 0 |
OnBrowseCommand(cb_unused wxCommandEvent& event)
{
const wxFileName file(XRCCTRL(*this, "txtCommand", wxTextCtrl)->GetValue());
wxString filename = wxFileSelector(_("Select executable"), file.GetPath(wxPATH_GET_VOLUME), file.GetFullName());
if (!filename.IsEmpty())
XRCCTRL(*this, "txtCommand", wxTex... | false | false | false | false | false | 0 |
append(const spi::InternalLoggingEvent& event)
{
LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( getLogLog().mutex )
log4cplus::tostream& output = (logToStdErr ? ofConsole.lockCerr() : ofConsole.lockCout());
layout->formatAndAppend(output, event);
if(immediateFlush) {
output.flush();
... | false | false | false | false | false | 0 |
yy_get_next_buffer (void)
{
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = (yytext_ptr);
register int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of ... | false | false | false | false | false | 0 |
btdm_HoldForBtInqPage(struct rtw_adapter *padapter)
{
struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
u32 curTime = jiffies;
if (pHalData->bt_coexist.halCoex8723.bC2hBtInquiryPage) {
/* bt inquiry or page is started. */
if (pHalData->bt_coexist.halCoex8723.btInqPageStartTime == 0) {
pHalData->bt_c... | false | false | false | false | false | 0 |
OGR_F_SetFieldDateTime( OGRFeatureH hFeat, int iField,
int nYear, int nMonth, int nDay,
int nHour, int nMinute, int nSecond,
int nTZFlag )
{
VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldDateTime" );
((OGRFeature *)hFeat)->Se... | false | false | false | false | false | 0 |
get_abs_path(char *dir)
{
char *savedir, *dirp;
if(dir == NULL)
{
return NULL;
}
if((savedir = getcwd(NULL, 0)) == NULL)
{
msg("ERROR: getcwd() failed: %s", strerror(errno));
return NULL;
}
if(chdir(dir) < 0)
{
msg("ERROR: Can't change to directory:... | false | false | false | false | false | 0 |
FuncIS_SUB_BLIST (
Obj self,
Obj list1,
Obj list2 )
{
UInt * ptr1; /* pointer to the first argument */
UInt * ptr2; /* pointer to the second argument */
UInt i; /* loop va... | false | false | false | false | false | 0 |
mxuport_attach(struct usb_serial *serial)
{
struct usb_serial_port *port0 = serial->port[0];
struct usb_serial_port *port1 = serial->port[1];
struct usb_serial_port *port;
int err;
int i;
int j;
/*
* Throw away all but the first allocated write URBs so we can
* set them up again to fit the multiplexing sche... | false | false | false | false | false | 0 |
print_pf( std::ostream& s, int ind ){
if( d_col ){
s << "(cRR _ _ _ _ @a" << abs( d_var );
s << " ";
d_children[0]->print(s, ind+1);
s <<" ";
d_children[1]->print(s, ind+1);
s <<")";
}else{
s <<"(" << (d_var>0 ? "R" : "Q" ) << " _ _ ";
d_children[0]->print(s, ind+1);
s <<" ";
... | false | false | false | false | false | 0 |
gegl_operation_set_format (GeglOperation *self,
const gchar *pad_name,
const Babl *format)
{
GeglPad *pad;
g_return_if_fail (GEGL_IS_OPERATION (self));
g_return_if_fail (pad_name != NULL);
pad = gegl_node_get_pad (self->node, pad_name);
g_return_if... | false | false | false | false | false | 0 |
string(char * text)
{
struct token_t * tkn;
int len;
tkn = new_token(TKN_STRING);
len = strlen(text);
tkn->value.type = V_STR;
tkn->value.string = (char *) malloc(len+1);
if (tkn->value.string == NULL) {
fprintf(stderr, "id(): out of memory\n");
exit(1);
}
strcpy(tkn->value.string, text);... | false | true | false | false | false | 1 |
heap_attisnull(HeapTuple tup, int attnum)
{
if (attnum > (int) HeapTupleHeaderGetNatts(tup->t_data))
return true;
if (attnum > 0)
{
if (HeapTupleNoNulls(tup))
return false;
return att_isnull(attnum - 1, tup->t_data->t_bits);
}
switch (attnum)
{
case TableOidAttributeNumber:
case SelfItemPointerAttr... | false | false | false | true | false | 1 |
dialog_change_cylinder_cb(GtkWidget * widget, gpointer data) {
gdouble cylinder_factor;
AmitkObjectDialog * dialog=data;
cylinder_factor = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget));
/* make sure it's a valid number and avoid zero */
if (fabs(cylinder_factor) > EPSILON) {
cylinder_factor = ami... | false | false | false | false | false | 0 |
ggept_ct_extract(const extvec_t *exv, time_t *stamp_ptr)
{
uint64 v;
size_t len;
g_assert(exv->ext_type == EXT_GGEP);
g_assert(exv->ext_token == EXT_T_GGEP_CT);
len = ext_paylen(exv);
if (len > 8) {
return GGEP_INVALID;
}
v = vlint_decode(ext_payload(exv), len);
if (stamp_ptr) {
*stamp_ptr = MIN(v, TIME_... | false | false | false | false | false | 0 |
qp_list_remove_entry(struct qp_list *qp_list,
struct qp_entry *entry)
{
if (entry)
list_del(&entry->list_item);
} | false | false | false | false | false | 0 |
stringdump(const char *name, const char *member)
/* dump a string member with current indent */
{
indent('\0');
fprintf(stdout, "\"%s\":", name);
if (member)
fprintf(stdout, "\"%s\"", visbuf(member));
else
fputs("None", stdout);
fputs(",\n", stdout);
} | false | false | false | false | false | 0 |
xfs_trans_ichgtime(
struct xfs_trans *tp,
struct xfs_inode *ip,
int flags)
{
struct inode *inode = VFS_I(ip);
struct timespec tv;
ASSERT(tp);
ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
tv = current_fs_time(inode->i_sb);
if ((flags & XFS_ICHGTIME_MOD) &&
!timespec_equal(&inode->i_mtime, &tv)) {
in... | false | false | false | false | false | 0 |
mono_metadata_free_type (MonoType *type)
{
if (type >= builtin_types && type < builtin_types + NBUILTIN_TYPES ())
return;
switch (type->type){
case MONO_TYPE_OBJECT:
case MONO_TYPE_STRING:
if (!type->data.klass)
break;
/* fall through */
case MONO_TYPE_CLASS:
case MONO_TYPE_VALUETYPE:
if (type == &ty... | false | false | false | false | false | 0 |
do_replace (GtrSearchDialog * dialog, GtrWindow * window)
{
GtrView *view;
const gchar *search_entry_text;
const gchar *replace_entry_text;
gchar *unescaped_search_text;
gchar *unescaped_replace_text;
gchar *selected_text = NULL;
gboolean match_case;
view = gtr_window_get_active_view (window);
if (vi... | 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.