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 |
|---|---|---|---|---|---|---|
fieldSize(const MYSQL_FIELD& field)
/// Convert field MySQL-type and field MySQL-length to actual field length
{
switch (field.type)
{
case MYSQL_TYPE_TINY: return sizeof(char);
case MYSQL_TYPE_SHORT: return sizeof(short);
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG: return sizeof(Poco::Int32)... | false | false | false | false | false | 0 |
store_hwe (vector hwtable, struct hwentry * dhwe)
{
struct hwentry * hwe;
if (find_hwe_strmatch(hwtable, dhwe))
return 0;
if (!(hwe = alloc_hwe()))
return 1;
if (!dhwe->vendor || !(hwe->vendor = set_param_str(dhwe->vendor)))
goto out;
if (!dhwe->product || !(hwe->product = set_param_str(dhwe->product)))
... | false | false | false | false | false | 0 |
bts_event_add(struct perf_event *event, int mode)
{
struct bts_buffer *buf;
struct bts_ctx *bts = this_cpu_ptr(&bts_ctx);
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
struct hw_perf_event *hwc = &event->hw;
int ret = -EBUSY;
event->hw.state = PERF_HES_STOPPED;
if (test_bit(INTEL_PMC_IDX_FIXED_BTS... | false | false | false | false | false | 0 |
ajListIterDoneBack(const AjIList iter)
{
AjPListNode node = NULL;
if(!iter)
return ajTrue;
node = iter->Here;
if(!node->Prev)
return ajTrue;
return ajFalse;
} | false | false | false | false | false | 0 |
ReleaseResultSet( OGRLayer * poResultsSet )
{
if (poResultsSet == NULL)
return;
std::map<OGRLayer*, OGRLayer*>::iterator oIter = oMap.find(poResultsSet);
if (oIter != oMap.end())
{
/* Destroy first the result layer, because it still references */
/* the poDupLayer (oIter->second... | false | false | false | false | false | 0 |
dev_mueslix_set_nio(struct mueslix_data *d,u_int channel_id,
netio_desc_t *nio)
{
struct mueslix_channel *channel;
if (channel_id >= MUESLIX_NR_CHANNELS)
return(-1);
channel = &d->channel[channel_id];
/* check that a NIO is not already bound */
if (channel->nio != NULL)
... | false | false | false | false | false | 0 |
snd_ali_codec_write(struct snd_ac97 *ac97,
unsigned short reg,
unsigned short val )
{
struct snd_ali *codec = ac97->private_data;
dev_dbg(codec->card->dev, "codec_write: reg=%xh data=%xh.\n", reg, val);
if (reg == AC97_GPIO_STATUS) {
outl((val << ALI_AC97_GPIO_DATA_SHIFT) | ALI_AC97_GPIO_ENABLE,
AL... | false | false | false | false | false | 0 |
listAdd(list_ *r, void *data, listAdd_ f)
{
listNode_ *newNode = NULL, *ptr;
ReturnErrIf(r == NULL);
ReturnErrIf(data == NULL);
ReturnErrIf(r->lock);
if(r->tail == NULL) {
ReturnErrIf(r->head != NULL);
newNode = listNodeNew(newNode, data);
ReturnErrIf(newNode == NULL);
r->head = newNode;
r->tail = newN... | false | false | false | false | false | 0 |
gst_tag_list_has_ifd_tags (const GstTagList * taglist,
const GstExifTagMatch * tag_map)
{
gint i;
for (i = 0; tag_map[i].exif_tag != 0; i++) {
if (tag_map[i].gst_tag == NULL) {
if (tag_map[i].exif_tag == EXIF_GPS_IFD_TAG &&
gst_tag_list_has_ifd_tags (taglist, tag_map_gps))
return TR... | false | false | false | false | false | 0 |
CreateGingleAudioContentElem(
const AudioContentDescription* audio,
bool crypto_required) {
buzz::XmlElement* elem =
new buzz::XmlElement(QN_GINGLE_AUDIO_CONTENT, true);
for (AudioCodecs::const_iterator codec = audio->codecs().begin();
codec != audio->codecs().end(); ++codec) {
elem->AddEl... | false | false | false | false | false | 0 |
mwifiex_fill_vht_cap_tlv(struct mwifiex_private *priv,
struct ieee80211_vht_cap *vht_cap, u8 bands)
{
struct mwifiex_adapter *adapter = priv->adapter;
u16 mcs_map_user, mcs_map_resp, mcs_map_result;
u16 mcs_user, mcs_resp, nss, tmp;
/* Fill VHT cap info */
mwifiex_fill_vht_cap_info(priv, vht_cap, bands);... | false | false | false | false | false | 0 |
make_rensetu_tbl2(int hinsi, int bunrui, int *cnt)
{
int i, j;
if (Cha_hinsi[hinsi].kt == 1) { /* with conjugation */
for (i = 0; kankei_tbl[i].hinsi != HINSI_ID_MAX; i++) {
if (kankei_tbl[i].hinsi == hinsi) {
for (j = 1; Cha_form[kankei_tbl[i].type][j].name != NULL;
j++) {
rensetu_tbl[*cn... | false | false | false | false | false | 0 |
strip ( void ) throw ( Exception )
{
source = 0;
if ( sinks ) {
unsigned int u;
for ( u = 0; u < numSinks; ++u ) {
sinks[u] = 0;
}
delete[] sinks;
}
} | false | false | false | false | false | 0 |
look_up(char* recv_buf, int len, char* lookup_buf)
{
int sock_fd;
int ret, i, serv_len;
struct sockaddr_in serv_addr;
sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
if(sock_fd < 0)
{
my_err("socket", __LINE__);
}
memset(&serv_addr, 0, sizeof(struct sockaddr_in));
serv_addr.sin_family = AF_INET;
serv_addr.sin_por... | false | false | false | false | false | 0 |
infinoted_directory_sync_session_save(InfinotedDirectorySync* dsync,
InfinotedDirectorySyncSession* session)
{
InfdDirectoryIter* iter;
GError* error;
InfBuffer* buffer;
InfTextChunk* chunk;
gchar* content;
gsize bytes;
iter = &session->iter;
error = NULL;
if(se... | false | false | false | false | false | 0 |
deliver_sms_to_queue(Msg *msg, Boxc *conn)
{
Msg *mack;
int rc;
/*
* save modifies ID and time, so if the smsbox uses it, save
* it FIRST for the reply message!!!
*/
mack = msg_create(ack);
gw_assert(mack != NULL);
uuid_copy(mack->ack.id, msg->sms.id);
mack->ack.time = msg->s... | false | false | false | false | false | 0 |
intersects (BoxObj& bo, Graphic* gs) {
return
SF_MultiLine::intersects(bo, gs) ||
Head() && ArrowheadIntersects(_head, bo, gs) ||
Tail() && ArrowheadIntersects(_tail, bo, gs);
} | false | false | false | false | false | 0 |
drm_dp_aux_dev_get_by_aux(struct drm_dp_aux *aux)
{
struct drm_dp_aux_dev *iter, *aux_dev = NULL;
int id;
/* don't increase kref count here because this function should only be
* used by drm_dp_aux_unregister_devnode. Thus, it will always have at
* least one reference - the one that drm_dp_aux_register_devnode
... | false | false | false | false | false | 0 |
_midgard_query_property_validable_iface_validate (MidgardValidable *iface, GError **error)
{
g_return_if_fail (iface != NULL);
MidgardQueryProperty *self = MIDGARD_QUERY_PROPERTY (iface);
self->priv->is_valid = FALSE;
MidgardQueryStorage *storage = self->priv->storage;
if (!G_IS_VALUE (&self->priv->value) || !G_... | false | false | false | false | false | 0 |
pki_pubkey_build_ecdsa(ssh_key key, int nid, ssh_string e)
{
EC_POINT *p;
const EC_GROUP *g;
int ok;
key->ecdsa_nid = nid;
key->type_c = pki_key_ecdsa_nid_to_name(nid);
key->ecdsa = EC_KEY_new_by_curve_name(key->ecdsa_nid);
if (key->ecdsa == NULL) {
return -1;
}
g = EC_KEY... | false | false | false | false | false | 0 |
ad5933_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad5933_state *st = iio_priv(indio_dev);
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
int ret = 0, len = 0;
mutex_lock(&indio_dev->mlock);
switch ((u32) this_att... | false | false | false | false | false | 0 |
bloom_filter_query(BloomFilter *bloomfilter, BloomFilterValue value)
{
unsigned int hash;
unsigned int subhash;
unsigned int index;
unsigned int i;
unsigned char b;
int bit;
/* Generate hash of the value to lookup */
hash = bloomfilter->hash_func(value);
/* Generate multiple unique hashes by XORing with val... | false | false | false | false | false | 0 |
evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag, void *data,
size_t len)
{
ev_uint32_t tag;
/* Initialize this event buffer so that we can read into it */
evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf));
/* Now unmarshal a tag and check that it matches the tag we want */
if (evtag_unmarshal(src,... | false | true | false | false | false | 1 |
btreeKeyidExists(AjPBtcache cache, const AjPStr key)
{
AjPBtpage page = NULL;
unsigned char *buf = NULL;
ajuint nkeys = 0U;
ajuint nodetype;
ajulong blockno = 0UL;
AjBool found = ajFalse;
/* ajDebug("In btreeKeyidExists %u\n",cache->count); */
if(!cache->countunique)
retur... | false | false | false | false | false | 0 |
Glance( eCoord const & in, eCoord const & glanceDir ) const
{
eCoord pos_diff=in-CenterPos();
if (mode != CAMERA_FREE)
{
pos_diff = pos_diff.Turn(glanceDir);
}
return pos_diff + CenterPos();
} | false | false | false | false | false | 0 |
childMoveNotify(void)
{ if (_owner!=0) _owner->childMove(this); } | false | false | false | false | false | 0 |
init_ccapi(krb5_context context)
{
const char *lib = NULL;
HEIMDAL_MUTEX_lock(&acc_mutex);
if (init_func) {
HEIMDAL_MUTEX_unlock(&acc_mutex);
if (context)
krb5_clear_error_message(context);
return 0;
}
if (context)
lib = krb5_config_get_string(context, NULL,
"libdefaults", "ccapi... | false | false | false | false | false | 0 |
write_bounding_box(void)
{
int llx, lly, urx, ury;
if (!rotate_plot) {
/*
llx = (int) 72.0 * PS.left_marg;
lly = (int) 72.0 * PS.bot_marg;
urx = (int) 72.0 * (PS.page_width - PS.right_marg);
ury = (int) 72.0 * (PS.page_height - PS.top_marg);
*/
/* BBox should be as above but then such box i... | false | false | false | false | false | 0 |
TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, const char* module, const char* tagname, int recover)
{
if (!recover) {
switch (err) {
case TIFFReadDirEntryErrCount:
TIFFErrorExt(tif->tif_clientdata, module,
"Incorrect count for \"%s\"",
tagname);
break;
case TIFF... | false | false | false | false | false | 0 |
isDockBackPossible() const
{
if( !(formerBrotherDockWidget) || !(formerBrotherDockWidget->dockSite() & formerDockPos))
return false;
else
return true;
} | false | false | false | false | false | 0 |
gog_child_button_build_additions (GogChildButton *child_button)
{
BuildAdditionData closure;
GogObject *start_object;
if (child_button->additions != NULL)
gog_child_button_free_additions (child_button);
if (child_button->object == NULL)
return;
closure.additions = g_hash_table_new_full (g_str_hash, g_str_equ... | false | false | false | false | false | 0 |
CreateIpmsgExtra(const char *extra, const char *encode)
{
char *pptr, *ptr;
pptr = buf + size;
if (encode && strcasecmp(encode, "utf-8") != 0
&& (ptr = convert_encode(extra, encode, "utf-8"))) {
snprintf(pptr, MAX_UDPLEN - size, "%s", ptr);
g_fre... | false | false | false | false | false | 0 |
vect_get_loop_niters (struct loop *loop, tree *number_of_iterations)
{
tree niters;
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "=== get_loop_niters ===");
niters = number_of_exit_cond_executions (loop);
if (niters != NULL_TREE
&& niters != chrec_dont_know)
{
*number_of... | false | false | false | false | false | 0 |
ai_ship_being_attacked(int attackerUnitRecno)
{
Unit* attackerUnit = unit_array[attackerUnitRecno];
if( attackerUnit->nation_recno == nation_recno ) // this can happen when the unit has just changed nation
return;
if( info.game_date%5 == sprite_recno%5 )
{
nation_array[nation_recno]->ai_sea_attack_target( at... | false | false | false | false | false | 0 |
rend_client_lookup_service_authorization(const char *onion_address)
{
tor_assert(onion_address);
if (!auth_hid_servs) return NULL;
return strmap_get(auth_hid_servs, onion_address);
} | false | false | false | false | false | 0 |
_decode_ics(PG_DISPLAY_SET *s, BITBUFFER *bb, PES_BUFFER *p)
{
ig_free_interactive(&s->ics);
s->ics = calloc(1, sizeof(*s->ics));
if (!ig_decode_interactive(bb, s->ics)) {
ig_free_interactive(&s->ics);
return 0;
}
s->ics->pts = p->pts;
s->valid_pts = p->pts;
_check_epoch_... | false | false | false | false | false | 0 |
isEdge(Agraph_t* g, Agnode_t * t, Agnode_t * h, char *key)
{
Agraph_t *root;
root = sameG(t, h, "isEdge", "tail and head node");
if (!root)
return 0;
if (g) {
if (root != agroot(g)) return 0;
}
else
g = root;
return agedge(g, t, h, key, 0);
} | false | false | false | false | false | 0 |
ganv_item_ungrab(GanvItem* item, guint32 etime)
{
g_return_if_fail(GANV_IS_ITEM(item));
if (item->canvas->grabbed_item != item) {
return;
}
item->canvas->grabbed_item = NULL;
gdk_pointer_ungrab(etime);
} | false | false | false | false | false | 0 |
db_journal_writer_start_transaction (JournalWriter *jwriter,
time_t time,
TransactionFormat kind)
{
guint size;
g_return_val_if_fail (jwriter->journal > 0, FALSE);
g_return_val_if_fail (current_transaction_format == TRANSACTION_... | false | false | false | false | false | 0 |
visitAShr(BinaryOperator &I) {
if (ConstantInt *CI =
dyn_cast<ConstantInt>(findValue(I.getOperand(1), /*OffsetOk=*/false)))
Assert1(CI->getValue().ult(cast<IntegerType>(I.getType())->getBitWidth()),
"Undefined result: Shift count out of range", &I);
} | false | false | false | false | false | 0 |
render_title_noise(float fade, int y, int h, int bank, int frame)
{
for(int ty = 0; ty < h; )
{
int xo = (int)(pubrand.get(16) * gengine->xscale()) / 256;
s_sprite_t *s = gengine->get_sprite(bank, pubrand.get(4));
if(!s || !s->surface)
continue;
SDL_Surface *fx = s->surface;
xo -= (int)(xo / fx->w) * fx-... | false | false | false | false | false | 0 |
findMatching(FXint pos,FXint beg,FXint end,FXwchar ch,FXint level) const {
FXASSERT(0<=level);
FXASSERT(0<=pos && pos<=length);
switch(ch){
case '{': return matchForward(pos+1,end,'{','}',level);
case '}': return matchBackward(pos-1,beg,'{','}',level);
case '[': return matchForward(pos+1,end,'[',']',l... | false | false | false | false | false | 0 |
hasFolder(const QString& f) {
#ifdef HAVE_KSECRETSSERVICE
if (walletLauncher->m_useKSecretsService) {
// FIXME: well, this is not the best implementation, but it's done quickly :)
// the best way would be to searchItems with the attribute label having the value f
// doing that would reduce D... | false | false | false | false | false | 0 |
base64_fancy_raw(const char* p, int len, /* input and its length */
char* r, /* Output buffer. Will not be NUL terminated. */
const char* basis_64, /* 64 character alphabet to be used, see above */
int line_len, /* Length of each line. 76 is customary. */
i... | false | false | false | false | false | 0 |
find_empty_slot_for_expand (htab_t htab, hashval_t hash)
{
hashval_t index = htab_mod (hash, htab);
size_t size = htab_size (htab);
PTR *slot = htab->entries + index;
hashval_t hash2;
if (*slot == HTAB_EMPTY_ENTRY)
return slot;
else if (*slot == HTAB_DELETED_ENTRY)
abort ();
hash2 = htab_mod_m2 ... | false | false | false | false | false | 0 |
TrioOutStreamStringMax(trio_class_t *self,
int output)
{
char **buffer;
assert(VALID(self));
buffer = (char **)self->location;
assert(VALID(buffer));
if (self->processed < self->max)
{
**buffer = (char)output;
(*buffer)++;
self->committed++;
}
self->processed++;
} | false | false | false | false | false | 0 |
S_hv_free_ent_ret(pTHX_ HV *hv, HE *entry)
{
dVAR;
SV *val;
PERL_ARGS_ASSERT_HV_FREE_ENT_RET;
val = HeVAL(entry);
if (HeKLEN(entry) == HEf_SVKEY) {
SvREFCNT_dec(HeKEY_sv(entry));
Safefree(HeKEY_hek(entry));
}
else if (HvSHAREKEYS(hv))
unshare_hek(HeKEY_hek(entry));
else
Safefree(He... | false | false | false | false | false | 0 |
dump_one_pkey_tbl_record(void *data)
{
ib_pkey_table_record_t *pktr = data;
ib_net16_t *p = pktr->pkey_tbl.pkey_entry;
int i;
printf("PKeyTableRecord dump:\n"
"\t\tLID........................%u\n"
"\t\tPort.......................%u\n"
"\t\tBlock......................%u\n"
"\t\tPKey T... | false | false | false | false | false | 0 |
lj_opt_narrow_mod(jit_State *J, TRef rb, TRef rc, TValue *vc)
{
TRef tmp;
if (tvisstr(vc) && !lj_strscan_num(strV(vc), vc))
lj_trace_err(J, LJ_TRERR_BADTYPE);
if ((LJ_DUALNUM || (J->flags & JIT_F_OPT_NARROW)) &&
tref_isinteger(rb) && tref_isinteger(rc) &&
(tvisint(vc) ? intV(vc) != 0 : !tviszero(v... | false | false | false | false | false | 0 |
sony_get_volume( struct wm_drive *d, int *left, int *right )
{
unsigned char mode[16];
/* Get the current audio parameters first. */
if (wm_scsi_mode_sense(d, PAGE_AUDIO, mode))
return (-1);
*left = unscale_volume(mode[9], 100);
*right = unscale_volume(mode[11], 100);
return (0);
} | false | false | false | false | false | 0 |
dump_safemode(char *file_name, lc_callback cb, void *cb_arg)
{
uint8_t * safe = 0;
uint32_t safe_size;
int err = 0;
if ((err = read_safemode_from_remote(&safe, &safe_size, cb,
cb_arg))) {
delete_blob(safe);
return err;
}
if ((err = write_safemode_to_file(safe, safe_size, file_name))) {
delete_blob(safe... | false | false | false | false | false | 0 |
backup_gtkrc(gchar *path_to_gtkrc)
{
FILE *gtkrc;
if(!(gtkrc = fopen(path_to_gtkrc, "r")))
return;
int c;
gchar *file_uri = g_strdup_printf("%s/.gtkrc.bak", getenv("HOME"));
FILE *gtkrc_backup = fopen(file_uri, "w");
while((c = fgetc(gtkrc)) != EOF){
fputc(c, gtkrc_backup);
}
fclose(gtkrc);
fclose(gtk... | false | false | false | false | false | 0 |
handle_uuid(const char *uuidstr, struct audio_device *device)
{
uuid_t uuid;
uint16_t uuid16;
if (bt_string2uuid(&uuid, uuidstr) < 0) {
error("%s not detected as an UUID-128", uuidstr);
return;
}
if (!sdp_uuid128_to_uuid(&uuid) && uuid.type != SDP_UUID16) {
error("Could not convert %s to a UUID-16", uuidst... | false | false | false | false | false | 0 |
restore_history( const std::string& url_history )
{
if( url_history == URL_HISTCLOSEVIEW && m_menu_close ) m_menu_close->restore_history();
if( url_history == URL_HISTCLOSEBOARDVIEW && m_menu_closeboard ) m_menu_closeboard->restore_history();
if( url_history == URL_HISTCLOSEIMGVIEW && m_menu_closeimg ) m_me... | false | false | false | false | false | 0 |
conf_printf2(char *name, int base, int irq, int dma, int dma2)
{
#ifndef CONFIG_SOUND_TRACEINIT
return;
#else
printk("<%s> at 0x%03x", name, base);
if (irq)
printk(" irq %d", (irq > 0) ? irq : -irq);
if (dma != -1 || dma2 != -1)
{
printk(" dma %d", dma);
if (dma2 != -1)
printk(",%d", dma2);
}
pr... | false | false | false | false | false | 0 |
send_trap(Port * port, int trapnum)
{
struct sim_request req;
Client *cl;
int ret, lid = port->lid;
char *data = req.mad + 64; /* data offset */
EncodeTrapfn *encode_trapfn = encodetrap[trapnum];
Port *destport;
if (!encode_trapfn) {
IBWARN("trap number %d not supported", trapnum);
return -1;
}
memset(re... | false | false | false | false | false | 0 |
string_gravity_all_lagrange(e_info,mode)
struct qinfo *e_info;
int mode; /* METHOD_VALUE, METHOD_GRADIENT, or METHOD_HESSIAN */
{
REAL gdensity;
REAL sum,y;
int m,i,k,kk;
REAL value = 0.0;
REAL val;
REAL tang;
REAL sign = (get_eattr(e_info->id) & NEGBOUNDARY) ? -1.0 : 1.0;
struct gauss_lag *gl = &gauss_... | false | false | false | false | false | 0 |
cui_dbus_foreach_dict_entry(DBusMessageIter *iter,
cui_dbus_foreach_callback_f callback,
void *user_data)
{
DBusMessageIter array, dict_entry;
int arg_type;
arg_type = dbus_message_iter_get_arg_type(iter);
if (arg_type != DBUS_TYPE_ARRAY)
return -EINVAL;
if (dbus_message_iter_get_element_type(iter) == ... | false | false | false | false | false | 0 |
CheckRequirements(vtkGraph* const graph) const
{
vtkPoints* points = graph->GetPoints();
if(!points)
{
return false;
}
return true;
} | false | false | false | false | false | 0 |
initStapel(int platz) {
CASSERT(mStapel);
mAmPlatzen = platz;
mAnz = 0;
} | false | false | false | false | false | 0 |
treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetItem *previouswidgetitem )
{
/* m_checkcurwidget checks to see if this is during a refresh, which will segfault */
if (m_checkcurwidget) {
/* The Previous item */
if (previouswidgetitem) { /* avoid a segfault if first time */
int ... | false | false | false | false | false | 0 |
append_dtu_kick_checkf_syncr(Dtp *dtp,
Dtu_mt *checkf,
DtScheInfo *dt_sche,
Transfer_model *model)
{
int target;
Block *bpt;
Module_table *mpt;
Cmp_localize *cl;
Dt_info *dt;
Dtu_parameter *param;
Dtu_mt *... | false | false | false | false | false | 0 |
write_buffer() const
{
static string retval;
char* ptr;
int len;
xmlDocPtr doc;
XMLNodeList children;
xmlKeepBlanksDefault(0);
doc = xmlNewDoc(xml_version);
xmlSetDocCompressMode(doc, _compression);
writenode(doc, _root, doc->children, 1);
xmlDocDumpMemory(doc, (xmlChar **) & ptr, &len);
xmlFreeDoc(doc);
... | false | false | false | false | false | 0 |
getBestMovementEstimation() const
{
CActionRobotMovement2DPtr bestEst;
double bestDet = 1e3;
// Find the best
for (const_iterator it=begin();it!=end();++it)
{
if ((*it)->GetRuntimeClass()->derivedFrom( CLASS_ID( CActionRobotMovement2D ) ) )
{
CActionRobotMovement2DPtr temp = CActionRobotMovement2DPtr(... | false | false | false | false | false | 0 |
ath5k_hw_init_core_clock(struct ath5k_hw *ah)
{
struct ieee80211_channel *channel = ah->ah_current_channel;
struct ath_common *common = ath5k_hw_common(ah);
u32 usec_reg, txlat, rxlat, usec, clock, sclock, txf2txs;
/*
* Set core clock frequency
*/
switch (channel->hw_value) {
case AR5K_MODE_11A:
clock = 40... | false | false | false | false | false | 0 |
vrp_var_may_overflow (tree var, gimple stmt)
{
struct loop *l;
tree chrec, init, step;
if (current_loops == NULL)
return true;
l = loop_containing_stmt (stmt);
if (l == NULL
|| !loop_outer (l))
return true;
chrec = instantiate_parameters (l, analyze_scalar_evolution (l, var));
if (TREE_CO... | false | false | false | false | false | 0 |
account_del(char *user)
{
struct account_entry *ac;
struct target *target;
ac = __account_lookup_user(user);
if (!ac)
return TGTADM_NO_USER;
list_for_each_entry(target, &target_list, target_siblings) {
account_ctl(target->tid, ACCOUNT_TYPE_INCOMING, ac->user, 0);
account_ctl(target->tid, ACCOUNT_TYPE_OUTGO... | false | false | false | false | false | 0 |
onPlayerMove(int row, int col)
{
if (!m_game)
return;
emit userMove(KReversiPos(row, col));
} | false | false | false | false | false | 0 |
pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops)
{
struct pci_ops *old_ops;
unsigned long flags;
raw_spin_lock_irqsave(&pci_lock, flags);
old_ops = bus->ops;
bus->ops = ops;
raw_spin_unlock_irqrestore(&pci_lock, flags);
return old_ops;
} | false | false | false | false | false | 0 |
zabs(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
switch (r_type(op)) {
default:
return_op_typecheck(op);
case t_real:
if (op->value.realval >= 0)
return 0;
break;
case t_integer:
if (op->value.intval >= 0)
return 0... | false | false | false | false | false | 0 |
VerifyFinal(char* key_pem, int key_pemLen, unsigned char* sig, int siglen) {
if (!initialised_) return 0;
EVP_PKEY* pkey = NULL;
BIO *bp = NULL;
X509 *x509 = NULL;
int r = 0;
bp = BIO_new(BIO_s_mem());
if (bp == NULL) {
ERR_print_errors_fp(stderr);
return 0;
}
if(!BIO_w... | false | false | false | false | false | 0 |
_midgard_query_constraint_instance_init (GTypeInstance *instance, gpointer g_class)
{
MidgardQueryConstraint *self = MIDGARD_QUERY_CONSTRAINT (instance);
self->priv = g_new (MidgardQueryConstraintPrivate, 1);
self->priv->property_value = NULL;
self->priv->op = NULL;
self->priv->storage = NULL;
self->priv->holder ... | false | false | false | false | false | 0 |
Scan_Dynamic_Pred_Alt_0(void)
{
WamWord *alt_info;
DynScan *scan;
DynCInf *clause;
Bool is_last;
WamWord *adr;
int i;
CodePtr scan_alt;
scan_alt = ALTB(B);
Update_Choice_Point(scan_alt, 0);
i = (sizeof(DynScan) + sizeof(WamWord) - 1) / sizeof(WamWord) - 1;
scan = (DynScan *) &AB(B, i);
adr = ... | false | false | false | false | false | 0 |
test_gnc_account_lookup_by_full_name (Fixture *fixture, gconstpointer pData)
{
Account *root, *target;
gchar *names1 = "income:taxable:int";
gchar *names2 = "income:exempt:int";
gchar *names3 = "expense:taxable:int";
gchar *code;
root = gnc_account_get_root (fixture->acct);
target = gnc_ac... | false | false | false | false | false | 0 |
avc_insert(u32 ssid, u32 tsid, u16 tclass,
struct av_decision *avd,
struct avc_xperms_node *xp_node)
{
struct avc_node *pos, *node = NULL;
int hvalue;
unsigned long flag;
if (avc_latest_notif_update(avd->seqno, 1))
goto out;
node = avc_alloc_node();
if (node) {
struct hlist_head *head;
spinlock_t ... | false | false | false | false | false | 0 |
status_close (struct status_output *so)
{
bool ret = true;
if (so)
{
if (so->errors)
ret = false;
if (so->fd >= 0)
{
if (close (so->fd) < 0)
ret = false;
}
if (so->filename)
free (so->filename);
if (buf_defined (&so->read_buf))
free_buf (&so->read_buf);
free (so);
... | false | false | false | false | false | 0 |
UniqueStatetype(int type)
{
switch (type) {
case DUMMY: return "DUMMY";
case ROOT_S: return "ROOT_S";
case ROOT_IL: return "ROOT_IL";
case ROOT_IR: return "ROOT_IR";
case BEGL_S : return "BEGL_S";
case BEGR_S : return "BEGR_S";
case BEGR_IL: return "BEGR_IL";
case MATP_MP: return "MATP_MP";
ca... | false | false | false | false | false | 0 |
notify(AV_View * pView, const AV_ChangeMask mask)
{
GR_Graphics *pG = static_cast<FV_View *>(pView)->getGraphics();
if (m_pFrame && (mask & (AV_CHG_INSERTMODE)))
{
AP_FrameData * pData = static_cast<AP_FrameData *>(m_pFrame->getFrameData());
if (pData)
{
pG->allCarets()->setInsertMode(p... | false | false | false | false | false | 0 |
hfsplus_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
switch (cmd) {
case HFSPLUS_IOC_EXT2_GETFLAGS:
return hfsplus_ioctl_getflags(file, argp);
case HFSPLUS_IOC_EXT2_SETFLAGS:
return hfsplus_ioctl_setflags(file, argp);
case HFSPLUS_IOC_BLESS:
return ... | false | false | false | false | false | 0 |
process (GeglOperation *operation,
GeglBuffer *input,
GeglBuffer *output,
const GeglRectangle *result,
gint level)
{
GeglRectangle compute;
if (gegl_cl_is_accelerated ())
if (cl_process (operation, input, output, result))
return ... | false | false | false | false | false | 0 |
gfire_server_browser_show_details_cb(gfire_server_browser *p_browser, GtkWidget *p_sender)
{
// Get selected server
GtkTreeSelection *selection = gtk_tree_view_get_selection(
GTK_TREE_VIEW(gtk_builder_get_object(p_browser->builder, "servers_tree_view")));
GtkTreeModel *model;
GtkTreeIter iter;
if(gtk_tree_sele... | false | false | false | false | false | 0 |
_PR_Fini(void)
{
void *thred;
int rv;
if (!_pr_initialized) {
/* Either NSPR was never successfully initialized or
* PR_Cleanup has been called already. */
if (pt_book.keyCreated)
{
rv = pthread_key_delete(pt_book.key);
PR_ASSERT(0 == rv);
... | false | false | false | false | false | 0 |
widget()
{
if ( w )
return 0;
w = new OptAppearanceMiscUI();
return w;
} | false | false | false | false | false | 0 |
fit2_read_block( PIA *pi, char * buf, int count )
{ int k, a, b, c, d;
w2(0xc); w0(0x10);
for (k=0;k<count/4;k++) {
w2(4); w2(5);
w0(0); a = r1(); w0(1); b = r1();
w0(3); c = r1(); w0(2); d = r1();
buf[4*k+0] = j44(a,b);
buf[4*k+1] = j44(d,c);
w2(4); w2(5);
a = ... | false | false | false | false | false | 0 |
operator=(const CoinIndexedVector & rhs)
{
if (this != &rhs) {
clear();
packedMode_=rhs.packedMode_;
if (!packedMode_)
gutsOfSetVector(rhs.capacity_,rhs.nElements_,
rhs.indices_, rhs.elements_);
else
gutsOfSetPackedVector(rhs.capacity_,rhs.nElements_,
rhs.indices_, rhs.el... | false | false | false | false | false | 0 |
Channel()
{
if (m_useDefault)
return m_itListCurrent->second.get() ? *m_itListCurrent->second.get() : m_channel;
else
return m_itMapCurrent->second.second;
} | false | false | false | false | false | 0 |
StripDebugInfo(Module &M) {
bool Changed = false;
// Remove all of the calls to the debugger intrinsics, and remove them from
// the module.
if (Function *Declare = M.getFunction("llvm.dbg.declare")) {
while (!Declare->use_empty()) {
CallInst *CI = cast<CallInst>(Declare->user_back());
CI->eras... | false | false | false | false | false | 0 |
vc1_decode_skip_blocks(VC1Context *v)
{
MpegEncContext *s = &v->s;
ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, (AC_END|DC_END|MV_END));
s->first_slice_line = 1;
for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) {
s->mb_x = 0;
ff_init_block_index(s);
ff_update_b... | false | false | false | false | false | 0 |
run_events(int short_burst)
{
struct timeval timeout;
if(!short_burst) {
timeout.tv_sec = 1;
timeout.tv_usec = 0;
} else {
timeout.tv_sec = 0;
timeout.tv_usec = 100000;
}
event_base_loopexit(client_event_base, &timeout);
event_base_dispatch(client_event_base);
} | false | false | false | false | false | 0 |
out( MifOutputByteStream &os ) {
os << '\n' << MifOutputByteStream::INDENT << "<Marker ";
os.indent();
CHECK_PROPERTY( MType );
if( setProperties & fMText )
MText.escapeSpecialChars();
CHECK_PROPERTY( MText );
os.undent();
os << '\n' << MifOutputByteStream::INDENT << ">";
} | false | false | false | false | false | 0 |
lookup_symbol_in_function_table (struct comp_unit *unit,
asymbol *sym,
bfd_vma addr,
const char **filename_ptr,
unsigned int *linenumber_ptr)
{
struct funcinfo* each_func;
struct funcinfo* best_fit = NULL;
struct arange *arange;
const char *name = bfd_asymbol_name (sym);
asection *sec = bf... | false | false | false | false | false | 0 |
Curl_ossl_set_engine(struct SessionHandle *data, const char *engine)
{
#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
ENGINE *e;
#if OPENSSL_VERSION_NUMBER >= 0x00909000L
e = ENGINE_by_id(engine);
#else
/* avoid memory leak */
for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) {
const char *... | true | true | false | false | false | 1 |
va1j5jf8007s_check_modulation(struct va1j5jf8007s_state *state, int *lock)
{
u8 addr;
u8 write_buf[1], read_buf[1];
struct i2c_msg msgs[2];
addr = state->config->demod_address;
write_buf[0] = 0xc3;
msgs[0].addr = addr;
msgs[0].flags = 0;
msgs[0].len = sizeof(write_buf);
msgs[0].buf = write_buf;
msgs[1].ad... | false | false | false | false | false | 0 |
slotDeleteEngine()
{
int row = ui.engineList->currentRow();
if(row >= 0)
{
// Looks like it should crash, but it first removes
// the item, then it updates it by slotSelectEngine (which is obsolete)
// and only then it deletes it and removes the data
QListWidgetItem *del = ui... | false | false | false | false | false | 0 |
cui_popup_right_menu(GtkStatusIcon *trayicon,
guint button,
guint activate_time,
gpointer user_data)
{
GList *tech_list, *list;
if (disabled == TRUE)
goto popup;
if (connman_manager_get_offlinemode()) {
gtk_widget_show(cui_item_mode_on);
gtk_widget_hide(cui_item_mode_off);
} else {
gtk_w... | false | false | false | false | false | 0 |
md5_update( struct md5_context *ctx, uint8 *input, uint32 length )
{
uint32 left, fill;
if( ! length ) return;
left = ( ctx->total[0] >> 3 ) & 0x3F;
fill = 64 - left;
ctx->total[0] += length << 3;
ctx->total[1] += length >> 29;
ctx->total[0] &= 0xFFFFFFFF;
ctx->total[1] += ctx->tota... | false | true | false | false | true | 1 |
widget_peripherals_general_draw( void *data GCC_UNUSED )
{
int error;
if( !widget_peripherals_general_running ) { /* we want to copy settings, only when start up */
highlight_line = 0;
/* Get a copy of the current settings */
settings_copy( &widget_options_settings, &settings_current );
widget_per... | false | false | false | false | false | 0 |
update_sensitivity(void)
{
gtk_widget_set_sensitive(personeditdlg.entry_name, !personeditdlg.read_only);
gtk_widget_set_sensitive(personeditdlg.entry_first, !personeditdlg.read_only);
gtk_widget_set_sensitive(personeditdlg.entry_last, !personeditdlg.read_only);
gtk_widget_set_sensitive(personeditdlg.entry_n... | false | false | false | false | false | 0 |
FunctionMin(TREE * tree, VALUE arg1, VALUE arg2)
{
VALUE value;
/*
* Make sure the arguments are numbers.
*/
if (((arg1.type != VALUE_BOOLEAN) && (arg1.type != VALUE_NUMBER)) ||
((arg2.type != VALUE_BOOLEAN) && (arg2.type != VALUE_NUMBER)))
{
return badValue;
}
value.type = VALUE_NUMBER;
value.intVal =... | false | false | false | false | false | 0 |
send_mission_items( net_player *pl )
{
ubyte data[MAX_PACKET_SIZE];
int packet_size, i;
ubyte stop, type;
// build the header
BUILD_HEADER(MISSION_ITEM);
// send the list of missions and campaigns avilable on the server. Stop when
// reaching a certain maximum
type = MISSION_LIST_ITEMS;
ADD_DATA( type );
... | 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.