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 |
|---|---|---|---|---|---|---|
XagQueryApplicationGroup(
Display* dpy,
XID resource,
XAppGroup* app_group_return)
{
XExtDisplayInfo *info = find_display (dpy);
xXagQueryReq *req;
xXagQueryReply rep;
XagCheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XagQuery, req);
req->reqType = info->codes->maj... | false | false | false | false | false | 0 |
gst_goom_src_negotiate (GstGoom * goom)
{
GstCaps *othercaps, *target;
GstStructure *structure;
const GstCaps *templ;
templ = gst_pad_get_pad_template_caps (goom->srcpad);
GST_DEBUG_OBJECT (goom, "performing negotiation");
/* see what the peer can do */
othercaps = gst_pad_peer_get_caps (goom->srcpad);... | false | false | false | false | false | 0 |
e_source_authentication_required (ESourceAuthentication *extension)
{
const gchar *method;
g_return_val_if_fail (E_IS_SOURCE_AUTHENTICATION (extension), FALSE);
method = e_source_authentication_get_method (extension);
g_return_val_if_fail (method != NULL && *method != '\0', FALSE);
return (g_strcmp0 (method, "n... | false | false | false | false | false | 0 |
_snd_pcm_share_update(snd_pcm_t *pcm)
{
snd_pcm_share_t *share = pcm->private_data;
snd_pcm_share_slave_t *slave = share->slave;
snd_pcm_t *spcm = slave->pcm;
snd_pcm_uframes_t missing;
/* snd_pcm_sframes_t avail = */ snd_pcm_avail_update(spcm);
slave->hw_ptr = *slave->pcm->hw.ptr;
missing = _snd_pcm_share_missi... | false | false | false | false | false | 0 |
reopen()
{
// When append never failed and the file re-open attempt must
// be delayed, set the time when reopen should take place.
if (reopen_time == log4cplus::helpers::Time () && reopenDelay != 0)
reopen_time = log4cplus::helpers::Time::gettimeofday()
+ log4cplus::helpers::Time(reopenDelay);
... | false | false | false | false | false | 0 |
udhcp_sp_read(const fd_set *rfds)
{
unsigned char sig;
if (!FD_ISSET(signal_pipe.rd, rfds))
return 0;
if (safe_read(signal_pipe.rd, &sig, 1) != 1)
return -1;
return sig;
} | false | false | false | false | false | 0 |
rb_hash_set_default(hash, ifnone)
VALUE hash, ifnone;
{
rb_hash_modify(hash);
RHASH(hash)->ifnone = ifnone;
FL_UNSET(hash, HASH_PROC_DEFAULT);
return ifnone;
} | false | false | false | false | false | 0 |
lzo1x_999_compress_level ( const lzo_bytep in , lzo_uint in_len,
lzo_bytep out, lzo_uintp out_len,
lzo_voidp wrkmem,
const lzo_bytep dict, lzo_uint dict_len,
lzo_callback_p cb,
... | false | false | false | false | false | 0 |
getChildNode(XMLCSTR name, int *j) const
{
if (!d) return emptyXMLNode;
int i=0,n=d->nChild;
if (j) i=*j;
XMLNode *pc=d->pChild+i;
for (; i<n; i++)
{
if (!xstricmp(pc->d->lpszName, name))
{
if (j) *j=i+1;
return *pc;
}
pc++;
}
retur... | false | false | false | false | false | 0 |
setButton(IGUIButton*& button, bool isAvailable, const core::rect<s32> & btnRect, const wchar_t * text, IGUIElement*& focusMe)
{
// add/remove ok button
if (isAvailable)
{
if (!button)
{
button = Environment->addButton(btnRect, this);
button->setSubElement(true);
button->grab();
}
else
... | false | false | false | false | false | 0 |
handle_bitmap( FL_OBJECT * obj,
int event,
FL_Coord mx FL_UNUSED_ARG,
FL_Coord my FL_UNUSED_ARG,
int key FL_UNUSED_ARG,
void * ev FL_UNUSED_ARG )
{
switch ( event )
{
case FL_DRAW:
dr... | false | false | false | false | false | 0 |
vsp1_parse_dt(struct vsp1_device *vsp1)
{
struct device_node *np = vsp1->dev->of_node;
struct vsp1_platform_data *pdata = &vsp1->pdata;
if (of_property_read_bool(np, "renesas,has-lif"))
pdata->features |= VSP1_HAS_LIF;
if (of_property_read_bool(np, "renesas,has-lut"))
pdata->features |= VSP1_HAS_LUT;
if (of_p... | false | false | false | false | false | 0 |
sendMessage( const utils::CMessage &msg)
{
MRPT_START
unsigned char buf[1024];
unsigned int nBytesTx = 0;
ASSERT_(msg.content.size()<256);
// Build frame -------------------------------------
buf[nBytesTx++] = 0x69;
buf[nBytesTx++] = (unsigned char)(msg.type);
buf[nBytesTx++] = (unsigned char)msg.content.siz... | false | false | false | false | false | 0 |
add_procedure_to_onecell_colorlegend(SSPostscript_t *ps, OneCellColorLegend_t *occl, char *procname, float *procstack, int nprocstack, char *errbuf)
{
int status;
int i;
if(occl->celltext != NULL) esl_fatal("add_procedure_to_onecell_colorlegend(), cell text already exists!\n");
if(occl->procname != NULL) es... | false | false | false | false | false | 0 |
DequeueStairSector(int *type, int *height)
{
sector_t *sec;
if (QueueHead == QueueTail)
{ // queue is empty
return NULL;
}
*type = StairQueue[QueueHead].type;
*height = StairQueue[QueueHead].height;
sec = StairQueue[QueueHead].sector;
QueueHead = (Queue... | false | false | false | false | false | 0 |
isInUse ( int fd ) const
{
if ( _fdToCon.find ( fd ) != _fdToCon.end() )
return true;
//double check with the filesystem
dmtcp::string device = _resolveSymlink(_procFDPath(fd));
return device != "";
} | false | false | false | false | false | 0 |
gutsOfInitialize(bool zapFact)
{
pivotTolerance_ = 1.0e-1;
zeroTolerance_ = 1.0e-13;
#ifndef COIN_FAST_CODE
slackValue_ = -1.0;
#endif
maximumPivots_=200;
relaxCheck_=1.0;
numberRows_ = 0;
numberColumns_ = 0;
numberGoodU_ = 0;
status_ = -1;
numberPivots_ = 0;
maximumRows_=0;
maximumSpace_=0;
e... | false | false | false | false | false | 0 |
str_vrepeat_with_locker(Locker *locker, size_t count, const char *format, va_list args)
{
String *tmp, *ret;
ssize_t length;
size_t i;
if (!(tmp = str_vcreate(format, args)))
return NULL;
if ((length = str_length(tmp)) == -1)
return NULL;
if (!(ret = str_create_with_locker_sized(locker, length * count + 1,... | false | false | false | false | false | 0 |
shrink_dentry_list(struct list_head *list)
{
struct dentry *dentry, *parent;
while (!list_empty(list)) {
struct inode *inode;
dentry = list_entry(list->prev, struct dentry, d_lru);
spin_lock(&dentry->d_lock);
parent = lock_parent(dentry);
/*
* The dispose list is isolated and dentries are not accounted... | false | false | false | false | false | 0 |
check_charset(sys_var *self, THD *thd, set_var *var)
{
if (!var->value)
return false;
char buff[STRING_BUFFER_USUAL_SIZE];
if (var->value->result_type() == STRING_RESULT)
{
String str(buff, sizeof(buff), system_charset_info), *res;
if (!(res=var->value->val_str(&str)))
var->save_result.ptr= N... | false | false | false | false | false | 0 |
se_create_object (se_t *se, se_o_t *parent /* may be NULL */,
const gchar *name, void *user_data,
se_group_t group, const gchar *help)
{
se_o_t *o;
logprintf ("script_engine: creating object %s parent: %s\n",
name, se_id (se, parent, NULL));
o = (se_o_t *) malloc (sizeof (se_o_t));
if (!paren... | false | false | false | false | false | 0 |
add_entry (ESoapMessage *msg,
EContact *contact,
EContactField field,
const gchar *entry_name,
const gchar *include_hdr)
{
gchar *entry_val;
entry_val = e_contact_get (contact, field);
if (entry_val && *entry_val) {
if (include_hdr)
e_soap_message_start_element (msg... | false | false | false | false | false | 0 |
update(void)
{
STATIC_STRBUF(command);
strbuf_clear(command);
strbuf_sprintf(command, "%s -u", global_path);
if (vflag) {
strbuf_putc(command, 'v');
fprintf(stderr, "gscope: %s\n", strbuf_value(command));
}
system(strbuf_value(command));
} | false | false | false | false | false | 0 |
xmsg_timer_change(session_t *s, const char *varname)
{
int n = (varname ? session_int_get(s, varname) : 0);
xdebug("n = %d", n);
if (!varname || session_connected_get(s)) {
if (!timer_remove_session(s, "w"))
xdebug("old timer removed");
if (n > 0) {
if (timer_add_session(s, "w", n, 1, xmsg_iterate_dir))
... | false | false | false | false | false | 0 |
asHTMLLength() const
{
string result;
switch (kind_) {
case DEFAULT:
// 30pt are LaTeX's default
result = "30pt";
break;
case LENGTH: {
Length tmp = len_.len();
if (tmp.value() > 0)
result = tmp.asHTMLString();
break;
}
}
return result;
} | false | false | false | false | false | 0 |
sRGBToLHS (
PBYTE psRGB, // in: sRGB pixel (3 unsigned bytes)
PBYTE pLHS) // out: LHS pixel (3 unsigned bytes)
{
int R, G, B;
int L, H, S; // these are in 0..255
int maxVal, minVal, diff, sum, numerator;
R = (unsigned)psRGB[0];
G = (unsigned)psRGB[1];
B = (unsigned)psRGB[2];... | false | false | false | false | false | 0 |
sepsChanged()
{
seps.clear();
cells.clear();
sourceHeadings.clear();
if (tab->isChecked()) seps << "\t";
if (comma->isChecked()) seps << ",";
if (semi->isChecked()) seps << ";";
if (space->isChecked()) seps << " ";
if (other->isChecked()) seps << otherText->text();
rideEditor->getP... | false | false | false | false | false | 0 |
eaton_check_pegasus_fun(double value)
{
switch (mge_type & 0xFF00) /* Ignore model byte */
{
case MGE_PEGASUS:
break;
case MGE_3S:
/* Only consider non European models */
if (country_code != COUNTRY_EUROPE)
break;
default:
return NULL;
}
snprintf(mge_scratch_buf, sizeof(mge_scratch_buf), "%.0f", valu... | false | false | false | false | false | 0 |
removeSource(XmlRpcSource* source)
{
for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it)
if (it->getSource() == source)
{
_sources.erase(it);
break;
}
} | false | false | false | false | false | 0 |
_HandleTelePortAckOpcode(WorldPacket& recvPacket)
{
uint32 unk32;
uint64 guid;
MovementInfo mi;
guid = recvPacket.readPackGUID();
recvPacket >> unk32 >> mi;
logdetail("Got teleported, data: x: %f, y: %f, z: %f, o: %f, guid: "I64FMT, mi.pos.x, mi.pos.y, mi.pos.z, mi.pos.o, guid);
_world->Up... | false | false | false | false | false | 0 |
kvu_string_to_tokens(const string& s)
{
vector<string> vec;
string stmp = "";
for(string::const_iterator p = s.begin(); p != s.end(); p++) {
if (isspace(*p) == 0)
stmp += *p;
else {
if (stmp == "") continue;
vec.push_back(stmp);
stmp = "";
}
}
if (stmp.size() > 0)
vec.... | false | false | false | false | false | 0 |
moveBy(QPointF offset)
{
pointHash.clear();
// Moves relative to storedPointHash
QPointF pt = getQtPoint(StartPoint, true);
setPoint(StartPoint, pt + offset, false);
pt = getQtPoint(EndPoint, true);
setPoint(EndPoint, pt + offset, false);
pt = getQtPoint(CentrePoint, true);
setPoint(CentrePoint, pt + offset, ... | false | false | false | false | false | 0 |
test_path (void)
{
TestState state;
cogl_framebuffer_orthographic (test_fb,
0, 0,
cogl_framebuffer_get_width (test_fb),
cogl_framebuffer_get_height (test_fb),
-1,
... | false | false | false | false | false | 0 |
index_iterator__reset(
git_iterator *self, const char *start, const char *end)
{
index_iterator *ii = (index_iterator *)self;
const git_index_entry *ie;
if (iterator__reset_range(self, start, end) < 0)
return -1;
ii->current = ii->base.start ?
git_index__prefix_position(ii->index, ii->base.start) : 0;
if (... | false | false | false | false | false | 0 |
getAs3DObject( mrpt::opengl::CSetOfObjectsPtr &outObj ) const
{
if (!genericMapParams.enableSaveAs3DObject) return;
//Returns only the mean map
mrpt::opengl::CSetOfObjectsPtr other_obj = mrpt::opengl::CSetOfObjects::Create();
getAs3DObject(outObj, other_obj);
} | false | false | false | false | false | 0 |
disown()
{
QLuaIde *ide = QLuaIde::instance();
if (widget && widget->parentWidget())
{
bool visible = widget->isVisibleTo(widget->parentWidget());
if (subWindow)
ide->saveWindowGeometry(widget);
widget->hide();
widget->setParent(0);
d->table.remove(subWindow);
d->tabl... | false | false | false | false | false | 0 |
file_skip(struct archive *a, void *client_data, off_t request)
#endif
{
struct read_fd_data *mine = (struct read_fd_data *)client_data;
off_t old_offset, new_offset;
if (!mine->can_skip)
return (0);
/* Reduce request to the next smallest multiple of block_size */
request = (request / mine-... | false | false | false | false | false | 0 |
_gss_spnego_set_cred_option (OM_uint32 *minor_status,
gss_cred_id_t *cred_handle,
const gss_OID object,
const gss_buffer_t value)
{
if (cred_handle == NULL || *cred_handle == GSS_C_NO_CREDENTIAL) {
*minor_status = 0;
return GSS_S_NO_CRED;
}
return gss_set_cred_option(minor_status,... | false | false | false | false | false | 0 |
AddECValues(CECTag *tag) const
{
wxString result;
if (m_count) {
result = CFormat(wxT("%i : %s %s")) % m_count % m_time.FormatISODate() % m_time.FormatISOTime();
} else {
result = wxTRANSLATE("Never");
}
CECTag value(EC_TAG_STAT_NODE_VALUE, result);
value.AddTag(CECTag(EC_TAG_STAT_VALUE_TYPE, (uint8)EC_VALUE_... | false | false | false | false | false | 0 |
is_empty(uint32_t index)
{
return
bookpos[index].key == 0 &&
bookpos[index].wins == 0 &&
bookpos[index].draws == 0 &&
bookpos[index].losses == 0;
} | false | false | false | false | false | 0 |
game_position_solve_impl (ExactSolution* const result,
GameTreeStack* const stack,
const int sub_run_id)
{
result->node_count++;
const int current_fill_index = stack->fill_index;
const int next_fill_index = current_fill_index + 1;
const int previous_fill_inde... | false | false | false | false | false | 0 |
get_corr_account_split(const Split *sa, const Split **retval)
{
const Split *current_split;
GList *node;
gnc_numeric sa_value, current_value;
gboolean sa_value_positive, current_value_positive, seen_one = FALSE;
*retval = NULL;
g_return_val_if_fail(sa, FALSE);
sa_value = xaccSplitGetValue... | false | false | false | false | false | 0 |
glob_ophook(pTHX_ OP *o)
{
if (PL_dirty) return;
{
dMY_CXT;
if (MY_CXT.x_GLOB_ENTRIES
&& (o->op_type == OP_GLOB || o->op_type == OP_ENTERSUB))
hv_delete(MY_CXT.x_GLOB_ENTRIES, (char *)&o, sizeof(OP *),
G_DISCARD);
if (MY_CXT.x_GLOB_OLD_OPHOOK) MY_CXT.x_GLOB_OLD_OPHOOK(aTHX_ o);
}
} | false | false | false | false | false | 0 |
xml_element_children (xml_element *elem)
{
XMLRPC_ASSERT_ELEM_OK(elem);
return XMLRPC_TYPED_MEM_BLOCK_CONTENTS(xml_element*, &elem->_children);
} | false | false | false | false | false | 0 |
encode_KDCDHKeyInfo(unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE, const KDCDHKeyInfo *data, size_t *size)
{
size_t ret HEIMDAL_UNUSED_ATTRIBUTE = 0;
size_t l HEIMDAL_UNUSED_ATTRIBUTE;
int i HEIMDAL_UNUSED_ATTRIBUTE, e HEIMDAL_UNUSED_ATTRIBUTE;
/* dhKeyExpiration */
if((data)->dhKeyExp... | false | false | false | false | false | 0 |
ethtool_to_mcdi_cap(u32 cap)
{
u32 result = 0;
if (cap & SUPPORTED_10baseT_Half)
result |= (1 << MC_CMD_PHY_CAP_10HDX_LBN);
if (cap & SUPPORTED_10baseT_Full)
result |= (1 << MC_CMD_PHY_CAP_10FDX_LBN);
if (cap & SUPPORTED_100baseT_Half)
result |= (1 << MC_CMD_PHY_CAP_100HDX_LBN);
if (cap & SUPPORTED_100baseT... | false | false | false | false | false | 0 |
ltr_group_compatible(GtArray *candidates, GtGenomeNode *candidate1,
GtBittab *group, GtHashmap *features,
GtError *err)
{
GtArray *group_member;
GtGenomeNode *candidate2;
bool compatible = true;
unsigned long i, index;
gt_assert(candidates && ... | false | false | false | false | false | 0 |
Pickler_get_pers_func(Picklerobject *p)
{
if (p->pers_func == NULL)
PyErr_SetString(PyExc_AttributeError, "persistent_id");
else
Py_INCREF(p->pers_func);
return p->pers_func;
} | false | false | false | false | false | 0 |
kvm_iommu_map_guest(struct kvm *kvm)
{
int r;
if (!iommu_present(&pci_bus_type)) {
printk(KERN_ERR "%s: iommu not found\n", __func__);
return -ENODEV;
}
mutex_lock(&kvm->slots_lock);
kvm->arch.iommu_domain = iommu_domain_alloc(&pci_bus_type);
if (!kvm->arch.iommu_domain) {
r = -ENOMEM;
goto out_unlock;... | false | false | false | false | false | 0 |
scripting()
{
if (script_stream) {
write_text(cstring_resolve("SCRIPTING_ALREADY_ON")->value);
return;
}
/* IF WE'VE TURNED ON SCRIPTING BEFORE, USE THE SAME FILE REFERENCE;
* OTHERWISE, PROMPT THE PLAYER FOR A FILE. */
if (!script_fref) {
script_fref = glk_fileref_create_by_prompt(
... | false | false | false | false | false | 0 |
IQM_LoadVertexArrays(model_t *iqmmodel, float *vposition, float *vnormal, float *vtangent)
{
int i;
if(iqmmodel->numvertexes > 16384)
return;
iqmmodel->vertexes = (mvertex_t*)Hunk_Alloc(iqmmodel->numvertexes * sizeof(mvertex_t));
iqmmodel->normal = (mnormal_t*)Hunk_Alloc(iqmmodel->numvertexes * sizeof(m... | false | false | false | false | false | 0 |
configure(void)
{
placement();
unsigned offset=panner()->highlightThickness()+panner()->shadowThickness();
int th=panner()->height()-2*offset;
int tw=panner()->width()-2*offset;
XRectangle clipRect[1];
clipRect[0].x=0;
clipRect[0].y=0;
clipRect[0].width=tw;
clipRect[0].height=th;
XSetClipRectangles... | false | false | false | false | false | 0 |
easy_perform(struct SessionHandle *data, bool events)
{
CURLM *multi;
CURLMcode mcode;
CURLcode code = CURLE_OK;
SIGPIPE_VARIABLE(pipe_st);
if(!data)
return CURLE_BAD_FUNCTION_ARGUMENT;
if(data->multi) {
failf(data, "easy handled already used in multi handle");
return CURLE_FAILED_INIT;
}
... | false | false | false | false | false | 0 |
hostap_is_eapol_frame(local_info_t *local, struct sk_buff *skb)
{
struct net_device *dev = local->dev;
u16 fc, ethertype;
struct ieee80211_hdr *hdr;
u8 *pos;
if (skb->len < 24)
return 0;
hdr = (struct ieee80211_hdr *) skb->data;
fc = le16_to_cpu(hdr->frame_control);
/* check that the frame is unicast frame... | false | false | false | false | false | 0 |
oparse(char *s)
{
for (no = 0; no<2*NFLD && *s; no++, s++) {
switch(*s) {
case 0:
return;
case '0':
olistf[no] = F0;
break;
case '1':
case '2':
if(s[1] == '.' && isdigit((uchar)s[2])) {
olistf[no] = *s=='1'? F1: F2;
olist[no] = atoi(s += 2);
break;
} /* fall thru */
default:
e... | false | false | false | false | true | 1 |
XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,
struct xgi_hw_device_info *HwDeviceExtension,
unsigned short ModeNo, unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo)
{
unsigned short RefreshRateTableIndex, temp;
XGI_SetSeqRegs(pVBInfo);
outb(XGI330_StandTable.MISC, pVBInfo->P3c2);
XGI_SetCRT... | false | false | false | false | false | 0 |
SetProgramAndStartVLC()
{
if (!Viewer->Supported()) {
Error(_("ERROR: VLC not installed"));
return;
}
/*
* Program number.
*/
uint16_t ProgramNumber = 0;
GtkTreeIter iter;
if (gtk_combo_box_get_active_iter(ProgramList, &iter)) {
uint32_t iterProgramNumber;
gtk_tree_model_get(GTK_TREE_MODEL(ProgramLi... | false | false | false | false | false | 0 |
sata_link_hardreset(struct ata_link *link, const unsigned long *timing,
unsigned long deadline,
bool *online, int (*check_ready)(struct ata_link *))
{
u32 scontrol;
int rc;
DPRINTK("ENTER\n");
if (online)
*online = false;
if (sata_set_spd_needed(link)) {
/* SATA spec says nothing about how to reconfig... | false | false | false | false | false | 0 |
R_DrawFuzzColumn (void)
{
int count;
byte* dest;
fixed_t frac;
fixed_t fracstep;
// Adjust borders. Low...
if (!dc_yl)
dc_yl = 1;
// .. and high.
if (dc_yh == viewheight-1)
dc_yh = viewheight - 2;
count = dc_yh - dc_yl;
// Zero length.
if (count < 0) ... | false | false | false | false | false | 0 |
RotateLogFile( char *filename, int max_size, char *log_line )
{
char backup_file_name[LOG_FILENAME_MAX_LENGTH + 1];
size_t delta = 0;
long pos;
/* Make sure there's a valid file pointer. */
if (Logfp == NULL) {
return 1;
}
/* Make sure there's a file name. */
if (filename == NULL) {
// [Temp r... | false | false | false | false | false | 0 |
doGet(ExecState* exec, const ScriptableExtension::Object& o,
const QString& field, bool* ok)
{
*ok = false;
if (!o.owner) // such as when was constructed from null .data();
return QVariant();
QVariant v = o.owner->get(principal(exec), o.objId, field);
if (... | false | false | false | false | false | 0 |
GtkMainWindow() : score(&game), hexBoard(&game), navBar(&game), menu(&game), gameoverdialog(&game)
{
/* Vertical box top: Menu, Navbar */
add(vbox);
vbox.pack_start(topBox, Gtk::PACK_SHRINK);
topBox.pack_start(menu, Gtk::PACK_EXPAND_WIDGET);
topBox.pack_start(navBar, Gtk::PACK_SHRINK);
/* Vert... | false | false | false | false | false | 0 |
loose_lookup_to_packfile(
struct packref **ref_out,
refdb_fs_backend *backend,
const char *name)
{
git_buf ref_file = GIT_BUF_INIT;
struct packref *ref = NULL;
size_t name_len;
*ref_out = NULL;
if (reference_read(&ref_file, NULL, backend->path, name, NULL) < 0)
return -1;
git_buf_rtrim(&ref_file);
name_... | false | true | false | false | false | 1 |
CloseFiles(const vector<string>& filenames) {
// iterate over filenames
vector<string>::const_iterator filesIter = filenames.begin();
vector<string>::const_iterator filesEnd = filenames.end();
for ( ; filesIter != filesEnd; ++filesIter ) {
const string& filename = (*filesIter);
if ( fi... | false | false | false | false | false | 0 |
ide_start_power_step(ide_drive_t *drive, struct request *rq)
{
struct ide_pm_state *pm = rq->special;
struct ide_cmd cmd = { };
switch (pm->pm_step) {
case IDE_PM_FLUSH_CACHE: /* Suspend step 1 (flush cache) */
if (drive->media != ide_disk)
break;
/* Not supported? Switch to next step now. */
if (ata_id_f... | false | false | false | false | false | 0 |
SetRefMol(const OBMol &refmol) {
_prefmol = &refmol;
// Set up the BitVec for the hydrogens and store the refmol coords
_frag_atoms.Clear();
_frag_atoms.Resize(refmol.NumAtoms() + 1);
_refmol_coords.resize(0);
OBAtom* atom;
int delta = 1;
_newidx.resize(0);
for (unsigned int i=1; i... | false | false | false | false | false | 0 |
onDNDRequest(FXObject* sender,FXSelector sel,void* ptr){
FXEvent *event=(FXEvent*)ptr; FXushort *clr; FXchar *str;
// Try handling it in base class first
if(FXFrame::onDNDRequest(sender,sel,ptr)) return 1;
// Requested as a color
if(event->target==colorType){
FXMALLOC(&clr,FXushort,4);
clr[0]=257*FX... | false | false | false | false | false | 0 |
get_fi_for_callee (gimple call)
{
tree decl;
/* If we can directly resolve the function being called, do so.
Otherwise, it must be some sort of indirect expression that
we should still be able to handle. */
decl = gimple_call_fndecl (call);
if (decl)
return get_vi_for_tree (decl);
decl = gimp... | false | false | false | false | false | 0 |
slapi_int_rdn_explode( Slapi_RDN *rdn )
{
char *next;
if ( rdn->rdn != NULL ) {
return LDAP_SUCCESS;
}
return ldap_bv2rdn( &rdn->bv, &rdn->rdn, &next, LDAP_DN_FORMAT_LDAP );
} | false | false | false | false | false | 0 |
set_authtype(cmd_parms *cmd, void *mconfig,
const char *word1)
{
authn_core_dir_conf *aconfig = (authn_core_dir_conf *)mconfig;
aconfig->auth_type_set = 1;
aconfig->ap_auth_type = strcasecmp(word1, "None") ? word1 : NULL;
return NULL;
} | false | false | false | false | false | 0 |
parseCommit(RCommit& commit) {
std::string line;
std::vector<std::string> entries;
if(!logf->getNextLine(line)) return false;
//skip empty line if there is one
if(line.size() == 0) {
if(!logf->getNextLine(line)) return false;
}
//read commit no
if(!cvsexp_commitno_regex.match... | false | false | false | false | false | 0 |
scope_demod(struct demod_state *s, float *buffer, int length)
{
float *src, *dst;
int i;
if (s->l1.scope.dispnum == -1)
return;
if (length >= MEMSIZE) {
src = buffer+length-MEMSIZE;
dst = s->l1.scope.data;
i = MEMSIZE;
} else {
i = MEMSIZE-length;
memmove(s->l1.scope.data, s->l1.scope.data+i,
i*siz... | false | false | false | false | false | 0 |
sxgbe_set_coalesce(struct net_device *dev,
struct ethtool_coalesce *ec)
{
struct sxgbe_priv_data *priv = netdev_priv(dev);
unsigned int rx_riwt;
if (!ec->rx_coalesce_usecs)
return -EINVAL;
rx_riwt = sxgbe_usec2riwt(ec->rx_coalesce_usecs, priv);
if ((rx_riwt > SXGBE_MAX_DMA_RIWT) || (rx_riwt < SXGBE_M... | false | false | false | false | false | 0 |
tcl_countusers STDVAR
{
BADARGS(1, 1, "");
Tcl_AppendResult(irp, int_to_base10(count_users(userlist)), NULL);
return TCL_OK;
} | false | false | false | false | false | 0 |
image_zoom_set_fill_geometry(ImageWindow *imd, gboolean vertical)
{
PixbufRenderer *pr;
gdouble zoom;
gint width, height;
pr = (PixbufRenderer *)imd->pr;
if (!pixbuf_renderer_get_pixbuf(pr) ||
!pixbuf_renderer_get_image_size(pr, &width, &height)) return;
if (vertical)
{
zoom = (gdouble)pr->viewport_he... | false | false | false | false | false | 0 |
pkix_pl_GeneralName_Hashcode(
PKIX_PL_Object *object,
PKIX_UInt32 *pHashcode,
void *plContext)
{
PKIX_PL_GeneralName *name = NULL;
PKIX_UInt32 firstHash, secondHash, nameHash;
PKIX_ENTER(GENERALNAME, "pkix_pl_GeneralName_Hashcode");
PKIX_NULLCHECK_TWO(object, pHa... | false | false | false | false | false | 0 |
is_possible_base_fuel(const struct tile *ptile,
const struct pf_parameter *param)
{
enum known_type tile_known;
tile_known = (param->omniscience ? TILE_KNOWN_SEEN
: tile_get_known(ptile, param->owner));
if (tile_known == TILE_UNKNOWN) {
/* Cannot guess if it ... | false | false | false | false | false | 0 |
retrieve_select_type (SELECT_TYPE *set, SCM ports_ready, SCM list_or_vec)
{
SCM answer_list = ports_ready;
if (scm_is_simple_vector (list_or_vec))
{
int i = SCM_SIMPLE_VECTOR_LENGTH (list_or_vec);
while (--i >= 0)
{
answer_list = get_element (set,
SCM_SIMPLE_VECTOR_REF (list_or_vec, i... | false | false | false | false | false | 0 |
dump(ostream&out, unsigned ind) const
{
out << setw(ind) << "" << *lval() << " = ";
if (delay_) out << "#" << *delay_ << " ";
if (count_) out << "repeat(" << *count_ << ") ";
if (event_) out << *event_ << " ";
out << *rval() << ";" << " /* " << get_fileline() << " */" << endl;
} | false | false | false | false | false | 0 |
fiu_enable_random(const char *name, int failnum, void *failinfo,
unsigned int flags, float probability)
{
struct pf_info *pf;
pf = pf_create(name, failnum, failinfo, flags, PF_PROB);
if (pf == NULL)
return -1;
pf->minfo.probability = probability;
return insert_pf(pf);
} | false | false | false | false | false | 0 |
gnome_scan_settings_set (GnomeScanSettings *settings,
const gchar *name,
const GValue *value)
{
g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings) && G_IS_VALUE (value));
g_hash_table_insert (GET_PRIVATE (settings)->values, g_strdup (name),
g_boxed_copy (G_TYP... | false | false | false | false | false | 0 |
Ns_SetDelete(Ns_Set *set, int index)
{
if ((index != -1) && (index < set->size)) {
int i;
ns_free(set->fields[index].name);
ns_free(set->fields[index].value);
for (i = index; i < set->size; ++i) {
set->fields[i].name = set->fields[i + 1].name;
set->fields[i].value =... | false | false | false | false | false | 0 |
dio_get_requirement(struct data_in *din, struct requirement *preq)
{
int type, range, value;
bool survives, negated;
if (!dio_get_uint8(din, &type)
|| !dio_get_sint32(din, &value)
|| !dio_get_uint8(din, &range)
|| !dio_get_bool8(din, &survives)
|| !dio_get_bool8(din, &negated)) {
retu... | false | false | false | false | false | 0 |
createMesh()
{
ai_assert( NULL != m_pModel );
m_pModel->m_pCurrentMesh = new ObjFile::Mesh;
m_pModel->m_Meshes.push_back( m_pModel->m_pCurrentMesh );
unsigned int meshId = m_pModel->m_Meshes.size()-1;
if ( NULL != m_pModel->m_pCurrent )
{
m_pModel->m_pCurrent->m_Meshes.push_back( meshId );
}
else
{
Default... | false | false | false | false | false | 0 |
H5Aopen_name(hid_t loc_id, const char *name)
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute opened */
hid_t ret_value;
FUNC_ENTER_API(H5Aopen_name, FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* check arguments */
if(H5I_ATTR == H5I_ge... | false | false | false | false | false | 0 |
testchecksum(const char *header, int targetsum)
{
const unsigned char *posix;
const signed char *legacy;
int posix_sum = 0, legacy_sum = 0;
int i;
// targetsum -1 represents an error from octal()
if (targetsum == -1) {
return -1;
}
/* Build checksums. POSIX is unsigned; some legacy tars use signed. */
pos... | false | false | false | false | false | 0 |
iakerb_save_token(iakerb_ctx_id_t ctx, const gss_buffer_t token)
{
char *p;
p = realloc(ctx->conv.data, ctx->conv.length + token->length);
if (p == NULL)
return ENOMEM;
memcpy(p + ctx->conv.length, token->value, token->length);
ctx->conv.data = p;
ctx->conv.length += token->length;
... | false | true | false | false | false | 1 |
glade_gtk_store_read_data (GladeWidget * widget, GladeXmlNode * node)
{
GladeXmlNode *data_node, *row_node, *col_node;
GNode *data_tree, *row, *item;
GladeModelData *data;
GValue *value;
GList *column_types = NULL;
GladeColumnType *column_type;
gint colnum;
if ((data_node = glade_xml_search_child (node... | false | false | false | false | false | 0 |
CountNumOperands(StringRef AsmString) {
unsigned NumOps = 0;
std::pair<StringRef, StringRef> ASM = AsmString.split(' ');
while (!ASM.second.empty()) {
++NumOps;
ASM = ASM.second.split(' ');
}
return NumOps;
} | false | false | false | false | false | 0 |
name_field_focus_out (NautilusEntry *name_field,
GdkEventFocus *event,
gpointer callback_data)
{
g_assert (NAUTILUS_IS_PROPERTIES_WINDOW (callback_data));
if (gtk_widget_get_sensitive (GTK_WIDGET (name_field))) {
name_field_done_editing (name_field, NAUTILUS_PROPERTIES_WINDOW (callback_data));
}
... | false | false | false | false | false | 0 |
mvumi_check_ob_list_9143(struct mvumi_hba *mhba,
unsigned int *cur_obf, unsigned int *assign_obf_end)
{
unsigned int ob_write, ob_write_shadow;
struct mvumi_hw_regs *regs = mhba->regs;
do {
ob_write = ioread32(regs->outb_copy_pointer);
ob_write_shadow = ioread32(mhba->ob_shadow);
} while ((ob_write & regs->... | false | false | false | false | false | 0 |
FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib) {
if (!FreeImage_HasPixels(dib)) return FALSE;
if ((FreeImage_GetBPP(dib) != 32) || (FreeImage_GetImageType(dib) != FIT_BITMAP)) {
return FALSE;
}
int width = FreeImage_GetWidth(dib);
int height = FreeImage_GetHeight(dib);
for(int y = 0; y < height; y++) {
BYT... | false | false | false | false | false | 0 |
EncodeSyncPacket()
{
// This method contains every step of sync packet informations coding
// first of all, clear sync packet
memset(fTxData, 0, PACKET_AVAILABLE_SIZE(&fParams));
// then first step : transport
// Transport is not used for now...
/*
if (fParam... | false | false | false | false | false | 0 |
ap_get_limit_req_body(const request_rec *r)
{
core_dir_config *d =
(core_dir_config *)ap_get_core_module_config(r->per_dir_config);
if (d->limit_req_body == AP_LIMIT_REQ_BODY_UNSET) {
return AP_DEFAULT_LIMIT_REQ_BODY;
}
return d->limit_req_body;
} | false | false | false | false | false | 0 |
gcr_parsed_get_data (GcrParsed *parsed,
gsize *n_data)
{
g_return_val_if_fail (n_data != NULL, NULL);
while (parsed != NULL) {
if (parsed->data != NULL)
return g_bytes_get_data (parsed->data, n_data);
parsed = parsed->next;
}
*n_data = 0;
return NULL;
} | false | false | false | false | false | 0 |
proximity_init(void)
{
if (!main_opts.gatt_enabled) {
DBG("GATT is disabled");
return -ENOTSUP;
}
connection = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
if (connection == NULL)
return -EIO;
config = open_config_file(CONFIGDIR "/proximity.conf");
if (proximity_manager_init(connection, config) < 0) {
dbus_con... | false | false | false | false | false | 0 |
CLASS_ctype_to_type(CLASS *class, CTYPE ctype)
{
if (ctype.id == T_OBJECT && ctype.value >= 0)
return (TYPE)(class->load->class_ref[ctype.value]);
else if (ctype.id == TC_ARRAY)
return (TYPE)CARRAY_get_array_class(class, class->load->array[ctype.value]->ctype);
else if (ctype.id == TC_STRUCT)
return (TYP... | false | false | false | false | false | 0 |
glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last,
Char *pattern, Char *restpattern, Char *restpattern_last, glob_t *pglob,
struct glob_lim *limitp, int recursion)
{
struct dirent *dp;
DIR *dirp;
int err;
char buf[MAXPATHLEN];
/*
* The readdirfunc declarati... | true | true | false | false | false | 1 |
plip_hard_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type, const void *daddr,
const void *saddr, unsigned len)
{
int ret;
ret = eth_header(skb, dev, type, daddr, saddr, len);
if (ret >= 0)
plip_rewrite_address (dev, (struct ethhdr *)skb->data);
return ret;
} | false | false | false | false | false | 0 |
drag_data_get
(
GtkWidget *widget, // The view window.
GdkDragContext *context,
GtkSelectionData *seldata, // Fill this in.
guint info,
guint time,
gpointer data // ->Chunk_chooser.
)
{
cout << "In DRAG_DATA_GET" << endl;
Chunk_chooser *chooser = (Chunk_chooser *) data;
if (chooser->selected < 0 || info ... | 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.