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 |
|---|---|---|---|---|---|---|
ahci_exec_polled_cmd(struct ata_port *ap, int pmp,
struct ata_taskfile *tf, int is_cmd, u16 flags,
unsigned long timeout_msec)
{
const u32 cmd_fis_len = 5; /* five dwords */
struct ahci_port_priv *pp = ap->private_data;
void __iomem *port_mmio = ahci_port_base(ap);
u8 *fis = pp->cmd_tbl;
u32 tmp;
/* prep... | false | false | false | false | false | 0 |
_evas_object_table_sizes_calc_noexpand(Evas_Coord *sizes, int start, int end, Evas_Coord space)
{
Evas_Coord *itr = sizes + start, *itr_end = sizes + end - 1;
Evas_Coord step;
int units;
/* XXX move to fixed point math and spread errors among cells */
units = end - start;
step = space / units;
for... | false | false | false | false | false | 0 |
checkOperatingSystemCapabilities()
{
mCapabilities |= checkForDBusInterface("org.gnome.SessionManager",
"/org/gnome/SessionManager",
"org.gnome.SessionManager",
"CanShutdown", false) ? GnomeSessionManager : 0;
mCapabilities |= checkForDBusInterface("org.gnome.ScreenSaver",
"/Sc... | false | false | false | false | false | 0 |
vrrp_snmp_instance_preempt(int action,
u_char *var_val, u_char var_val_type, size_t var_val_len,
u_char *statP, oid *name, size_t name_len)
{
vrrp_rt *vrrp = NULL;
switch (action) {
case RESERVE1:
/* Check that the proposed value is acceptable */
if (var_val_type != ASN_INTEGER)
return SNMP_ERR_WR... | false | false | false | false | false | 0 |
clarion_singlespace (char *data)
{
char *p = NULL;
uint32_t offset;
while (*data != '\0')
{
if (*data == 0x20)
{
if (p == NULL)
p = data;
}
else
{
if (p != NULL)
{
p++;
offset = data - p;
memmove(p, data, strlen(data)+1);
data = data - offset;
... | false | false | false | false | false | 0 |
property_set_get( FRAME * frame, int flags )
{
OBJECT * varname = object_new( "self.raw" );
LIST * props = var_get( frame->module, varname );
const char * name = object_str( list_front( lol_get( frame->args, 0 ) ) );
size_t name_len = strlen( name );
LISTITER begin, end;
LIST * result = L0;
... | false | false | false | false | false | 0 |
xdrposix_sync(xdrs)
XDR *xdrs;
{
biobuf *biop = (biobuf *)xdrs->x_private ;
if(biop->isdirty)
{
/* flush */
if(wrbuf(biop) < 0)
return -1 ;
}
biop->nwrote = 0 ; /* force seek in rdbuf */
/* read it in */
if(rdbuf(biop) < 0 )
return -1 ;
return b... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
int retval;
int o;
int mode = MODE_MASTER;
char domain[NET_MAX_QNAME];
uint16 port;
int do_listen;
#ifdef WIN32
WSADATA wsaData;
if ((retval = WSAStartup(0x202, &wsaData)) != 0) {
error("Server: WSAStartup() failed with error %d\n", retval);
WSAClean... | true | true | false | false | true | 1 |
read(string const &datafile, string const &fstfile)
{
// datafile
FILE *in = fopen(datafile.c_str(), "r");
if(!in)
{
cerr << "Error: Could not open file '" << datafile << "'." << endl;
exit(EXIT_FAILURE);
}
readData(in);
fclose(in);
readBil(fstfile);
} | false | false | false | false | false | 0 |
ProcArrayEndTransaction(PGPROC *proc, TransactionId latestXid)
{
if (TransactionIdIsValid(latestXid))
{
/*
* We must lock ProcArrayLock while clearing proc->xid, so that we do
* not exit the set of "running" transactions while someone else is
* taking a snapshot. See discussion in
* src/backend/access/... | false | false | false | false | false | 0 |
free_NTLMInitReply(NTLMInitReply *data)
{
der_free_octet_string(&(data)->opaque);
der_free_utf8string(&(data)->targetname);
der_free_octet_string(&(data)->challenge);
if((data)->targetinfo) {
der_free_octet_string((data)->targetinfo);
free((data)->targetinfo);
(data)->targetinfo = NULL;
}
} | false | false | false | false | false | 0 |
process_espeak_command( t_espeak_command* the_command)
{
ENTER("process_espeak_command");
SHOW("command=0x%x\n", the_command);
if (the_command == NULL)
{
return;
}
the_command->state = CS_PROCESSED;
switch(the_command->type)
{
case ET_TEXT:
{
t_espeak_text* data = &(the_comman... | false | false | false | false | false | 0 |
on_gsql_prefs_use_system_font_check_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
GSQL_TRACE_FUNC;
GtkWidget * font_button;
gboolean status;
status = gtk_toggle_button_get_active (togglebutton);
font_button = (GtkWidget *) g_object_get_data... | false | false | false | false | false | 0 |
__redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, char *cmd, size_t len) {
redisContext *c = &(ac->c);
redisCallback cb;
/* Don't accept new commands when the connection is lazily closed. */
if (c->flags & REDIS_DISCONNECTING) return REDIS_ERR;
__redisAppendCommand(c,c... | false | false | false | false | false | 0 |
efi_file_info ( struct image *image, UINTN *len,
VOID *data ) {
EFI_FILE_INFO info;
const char *name;
/* Populate file information */
memset ( &info, 0, sizeof ( info ) );
if ( image ) {
info.FileSize = image->len;
info.PhysicalSize = image->len;
info.Attribute = EFI_FILE_READ_ONLY;
name = image->na... | false | false | false | false | false | 0 |
acpi_bus_osc_support(void)
{
u32 capbuf[2];
struct acpi_osc_context context = {
.uuid_str = sb_uuid_str,
.rev = 1,
.cap.length = 8,
.cap.pointer = capbuf,
};
acpi_handle handle;
capbuf[OSC_QUERY_DWORD] = OSC_QUERY_ENABLE;
capbuf[OSC_SUPPORT_DWORD] = OSC_SB_PR3_SUPPORT; /* _PR3 is in use */
if (IS_ENABLE... | false | false | false | false | false | 0 |
ajStrKeepSetAlpha(AjPStr* Pstr)
{
AjPStr thys;
char *p;
char *q;
if(!*Pstr)
*Pstr = ajStrNewResLenC("", 1, 0);
else if((*Pstr)->Use > 1)
ajStrGetuniqueStr(Pstr);
thys = *Pstr;
p = thys->Ptr;
q = thys->Ptr;
while(*p)
{
if(isalpha((ajint)*p))
*q++=*p;
p+... | false | false | false | false | false | 0 |
dm_report_field_int32(struct dm_report *rh,
struct dm_report_field *field, const int32_t *data)
{
const int32_t value = *data;
uint64_t *sortval;
char *repstr;
if (!(repstr = dm_pool_zalloc(rh->mem, 13))) {
log_error("dm_report_field_int32: dm_pool_alloc failed");
return 0;
}
if (!(sortval = dm_pool_al... | false | false | false | false | false | 0 |
refSelected(QTreeWidgetItem * sel)
{
if (isBufferReadonly())
return;
/* int const cur_item = refsTW->currentRow();
bool const cur_item_selected = cur_item >= 0 ?
refsLB->isSelected(cur_item) : false;*/
bool const cur_item_selected = refsTW->isItemSelected(sel);
if (cur_item_selected)
referenceED->setText(se... | false | false | false | false | false | 0 |
unregister_process_nocpsch(struct device_queue_manager *dqm,
struct qcm_process_device *qpd)
{
int retval;
struct device_process_node *cur, *next;
BUG_ON(!dqm || !qpd);
pr_debug("In func %s\n", __func__);
pr_debug("qpd->queues_list is %s\n",
list_empty(&qpd->queues_list) ? "empty" : "not empty");
retv... | false | false | false | false | false | 0 |
getblock(std::string& block, unsigned& lineno)
{
unsigned depth = 1;
Token<> t(getloosetoken());
size_t abortindex = buf_.offset();
lineno = lineno_;
// Ignore all whitespace before the opening brace;
while (t.type == token_whitespace)
t = getloosetoken();
// If the current token is not an open brace then so... | false | false | false | false | false | 0 |
ixgbe_write_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,
u8 dev_addr, u8 data, bool lock)
{
s32 status;
u32 max_retry = 1;
u32 retry = 0;
u32 swfw_mask = hw->phy.phy_semaphore_mask;
if (lock && hw->mac.ops.acquire_swfw_sync(hw, swfw_mask))
return IXGBE_ERR_SWFW_SYNC;
do {
ixgbe_i2c_sta... | false | false | false | false | false | 0 |
cb_complete_test (CutRunContext *run_context, CutTest *test,
CutTestContext *test_context, gboolean success,
CutConsoleUI *console)
{
if (console->verbose_level < CUT_VERBOSE_LEVEL_VERBOSE)
return;
g_print(": (%f)\n", cut_test_get_elapsed(test));
fflush(stdout);
... | false | false | false | false | false | 0 |
ufshcd_scsi_to_upiu_lun(unsigned int scsi_lun)
{
if (scsi_is_wlun(scsi_lun))
return (scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID)
| UFS_UPIU_WLUN_ID;
else
return scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID;
} | false | false | false | false | false | 0 |
GetChild(wxChar ch)
{
SearchTreeLinkMap::const_iterator found = m_Children.find(ch);
if (found == m_Children.end())
return 0;
return found->second;
} | false | false | false | false | false | 0 |
system_supports_ext2(void)
{
static time_t last_check = 0;
static int ret = -1;
time_t now = time(0);
if (ret != -1 || (now - last_check) < 5)
return ret;
last_check = now;
ret = (fs_proc_check("ext2") || check_for_modules("ext2"));
return ret;
} | false | false | false | false | false | 0 |
uncompress_section_contents (unsigned char **buffer ATTRIBUTE_UNUSED,
dwarf_size_type *size ATTRIBUTE_UNUSED)
{
#ifndef HAVE_ZLIB_H
return FALSE;
#else
dwarf_size_type compressed_size = *size;
unsigned char * compressed_buffer = *buffer;
dwarf_size_type uncompressed_size;
unsigned char * uncompressed_... | false | false | false | false | false | 0 |
select_transform_array_function(EPR_EDataTypeId band_tid,
EPR_EDataTypeId raw_tid) {
EPR_FArrayTransformer transform_array_func;
if (band_tid == e_tid_float && raw_tid == e_tid_short)
transform_array_func = transform_array_short_to_float;
else if (band_tid == e_tid_float && raw_tid == e_tid_... | false | false | false | false | false | 0 |
frac(gdouble x)
{
x -= (gint) x;
return ((x < 0) ? x + 1.0 : x);
} | false | false | false | false | false | 0 |
shader_fade_and_move_right (GstBaseAudioVisualizer * scope,
const guint8 * s, guint8 * d)
{
guint i, j, k, bpf = scope->bpf;
guint w = scope->width;
guint r = (scope->shade_amount >> 16) & 0xff;
guint g = (scope->shade_amount >> 8) & 0xff;
guint b = (scope->shade_amount >> 0) & 0xff;
/* move to the lef... | false | false | false | false | false | 0 |
val_real()
{
DBUG_ASSERT(fixed == 1);
double tmp= (*ref)->val_result();
owner->was_null|= null_value= (*ref)->null_value;
return tmp;
} | false | false | false | false | false | 0 |
obj_info_max(hid_t loc_id, const char *name, const H5L_info_t *info, void *op_data)
{
int type = -1;
herr_t retVal = 0;
info_all_t* datainfo = (info_all_t*)op_data;
H5O_info_t object_info;
retVal = H5Oget_info(loc_id, &object_info);
if ( retVal < 0) {
*(datainfo->otype+datainfo->count) ... | false | true | false | false | false | 1 |
is_same_member(RfmMember member, RfmMember prev)
{
if ((member == NULL) || (prev == NULL)) {
return(FALSE);
}
if ((member->is_bitfield) &&
(prev->is_bitfield) &&
(member->bit_offset != 0)) {
return(TRUE);
}
return(FALSE);
} | false | false | false | false | false | 0 |
gnc_table_save_state (Table *table, gchar * state_section)
{
GnucashSheet *sheet;
GNCHeaderWidths widths;
GList *node;
gchar *key;
GKeyFile *state_file = gnc_state_get_current();
if (!table)
return;
if (table->ui_data == NULL)
return;
if (!gnc_prefs_get_bool(GNC_PR... | false | false | false | false | false | 0 |
get_mx_records(DnsMessage *a, bool fail_if_none) {
stl_list(mx_record) ret;
mx_record rec;
stl_list(rrdat) res = get_records(a, fail_if_none);
stl_list(rrdat)::iterator it = res.begin();
while (it != res.end()) {
rec.preference = rr_getshort(it->msg, DNS_TYPE_MX, 0);
rec.server = rr_getdomain(it->msg,... | false | false | false | false | false | 0 |
BoomBehDeleteUselessAux( BehFigure, InitialAux, RemoveBerin )
befig_list *BehFigure;
beaux_list *InitialAux;
{
boombeauxinfo *AuxInfo;
beaux_list *BehAux;
beaux_list *DelBehAux;
beaux_list *HeadBehAux;
beaux_list **PrevBehAux;
authelem *Element;
if ( BoomUselessAuxHashTable == (aut... | false | false | false | false | false | 0 |
altera_free_buffers(struct altera_state *astate)
{
struct altera_jtag *js = &astate->js;
/* If the JTAG interface was used, reset it to TLR */
if (js->jtag_state != ILLEGAL_JTAG_STATE)
altera_jreset_idle(astate);
kfree(js->dr_pre_data);
js->dr_pre_data = NULL;
kfree(js->dr_post_data);
js->dr_post_data = NULL... | false | false | false | false | false | 0 |
ipmipower_check_command (ipmipower_powercmd_t ip, packet_type_t pkt)
{
uint8_t cmd = 0;
uint8_t expected_cmd = 0;
uint64_t val;
fiid_obj_t obj_cmd;
assert (ip);
assert (PACKET_TYPE_VALID_RES (pkt));
/* Assert this is not an IPMI 2.0 Session Setup Packet */
assert (pkt != OPEN_SESSION_RES
&& p... | false | false | false | false | false | 0 |
aset_randlift(node A, int seed, int L, int U)
{
int d;
node ptp, ptc;
rand_seed(seed);
d = aset_dim(A);
A = St(A);
while ((ptc = aset_next_cfg(&A)) != 0)
while ((ptp = aset_next_pnt(&ptc)) != 0)
aset_pnt_set(ptp, d, rand_int(L, U));
return 1;
} | false | false | false | false | false | 0 |
AttachModelInstancesFCDPhysicsModel(FCDPhysicsModel* physicsModel)
{
bool status = true;
FCDPhysicsModelDataMap::iterator it = FArchiveXML::documentLinkDataMap[physicsModel->GetDocument()].physicsModelDataMap.find(physicsModel);
FUAssert(it != FArchiveXML::documentLinkDataMap[physicsModel->GetDocument()].phys... | false | false | false | false | false | 0 |
XML_GetCurrentByteIndex(XML_Parser parser)
{
if (eventPtr)
return parseEndByteIndex - (parseEndPtr - eventPtr);
return -1;
} | false | false | false | false | false | 0 |
bufferevent_add(struct event *ev, int timeout)
{
struct timeval tv, *ptv = NULL;
if (timeout) {
evutil_timerclear(&tv);
tv.tv_sec = timeout;
ptv = &tv;
}
return (event_add(ev, ptv));
} | false | false | false | false | false | 0 |
rocker_port_fwding(struct rocker_port *rocker_port,
struct switchdev_trans *trans, int flags)
{
bool pop_vlan;
u32 out_pport;
__be16 vlan_id;
u16 vid;
int err;
/* Port will be forwarding-enabled if its STP state is LEARNING
* or FORWARDING. Traffic from CPU can still egress, regardless of
* port ST... | false | false | false | false | false | 0 |
proc_wait2(argc, argv)
int argc;
VALUE *argv;
{
VALUE pid = proc_wait(argc, argv);
if (NIL_P(pid)) return Qnil;
return rb_assoc_new(pid, rb_last_status);
} | false | false | false | false | false | 0 |
nautilus_directory_monitor_remove_internal (NautilusDirectory *directory,
NautilusFile *file,
gconstpointer client)
{
g_assert (NAUTILUS_IS_DIRECTORY (directory));
g_assert (file == NULL || NAUTILUS_IS_FILE (file));
g_assert (client != NULL);
remove_monitor (directory, file, client);
if (direct... | false | false | false | false | false | 0 |
wsgi_merge_server_config(apr_pool_t *p, void *base_conf,
void *new_conf)
{
WSGIServerConfig *config = NULL;
WSGIServerConfig *parent = NULL;
WSGIServerConfig *child = NULL;
config = newWSGIServerConfig(p);
parent = (WSGIServerConfig *)base_conf;
child = (W... | false | false | false | false | false | 0 |
get_cpu_time_linux(pid_t pid, uint64_t *accum)
{
/* /dev/proc/[pid]/stat */
uint64_t kernel, user;
FILE *fstat = open_proc_file(pid, "stat");
if(!fstat)
return 1;
fscanf(fstat,
"%*s" /* pid */ "%*s" /* cmd line */ "%*s" /* state */ "%*s" /* pid of parent */
"%*s" /* group ID */ "%*s" /* sessio... | false | false | false | false | false | 0 |
rpcsvc_dump (rpcsvc_request_t *req)
{
char rsp_buf[8 * 1024] = {0,};
gf_dump_rsp rsp = {0,};
struct iovec iov = {0,};
int op_errno = EINVAL;
int ret = -1;
uint32_t dump_rsp_len = 0;
... | true | true | false | false | false | 1 |
rcar_vin_set_crop(struct soc_camera_device *icd,
const struct v4l2_crop *a)
{
struct v4l2_crop a_writable = *a;
const struct v4l2_rect *rect = &a_writable.c;
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
struct rcar_vin_priv *priv = ici->priv;
struct v4l2_crop cam_crop;
struct rcar_vin_ca... | false | false | false | false | false | 0 |
removeField(const ByteVector &id)
{
if(d->fieldListMap.contains(id))
d->fieldListMap.erase(id);
} | false | false | false | false | false | 0 |
copyProperties(const as_object& o)
{
PropsCopier copier(*this);
// TODO: check if non-visible properties should be also copied !
o.visitProperties<Exists>(copier);
} | false | false | false | false | false | 0 |
cortexa7_younger (FILE *file, int verbose, rtx insn)
{
if (recog_memoized (insn) < 0)
{
if (verbose > 5)
fprintf (file, ";; not cortexa7_younger %d\n", INSN_UID (insn));
return false;
}
if (get_attr_insn (insn) == INSN_MOV)
return true;
switch (get_attr_type (insn))
{
cas... | false | false | false | false | false | 0 |
ProduceShotgunDamageReport (edict_t * self)
{
int l;
int total = 0, total_to_print, printed = 0;
char *textbuf;
//FB 6/2/99 - shotgun/handcannon damage notification
for (l = 1; l <= game.maxclients; l++)
{
if (took_damage[l - 1])
total++;
}
if (!total)
return;
if (total > 10)
total_to_print = 10;
e... | false | true | false | false | false | 1 |
real_lookup(REAL_DATA *data,const struct sockaddr_atmpvc *addr)
{
VCC **walk;
for (walk = &data->vccs; *walk; walk = &(*walk)->next)
if ((*walk)->addr.sap_addr.vpi == addr->sap_addr.vpi &&
(*walk)->addr.sap_addr.vci == addr->sap_addr.vci) break;
return walk;
} | false | false | false | false | false | 0 |
saveEntry( Entry &entry ) const
{
entry.clearValue( "acl" );
for ( int i = 0; i < mModel->rowCount(); ++i ) {
QStringList acl = mModel->data( mModel->index( i, 0 ), Qt::UserRole ).toStringList();
entry.addValue( "acl", QString( "%1 %2" ).arg( acl[ 0 ], acl[ 1 ] ) );
}
} | false | false | false | false | false | 0 |
gt_blindtrie_resize(GtBlindtrie *blindtrie,unsigned int maxnumofnodes)
{
gt_assert(maxnumofnodes > 0);
if (blindtrie->allocatedBlindtrienode > maxnumofnodes)
{
blindtrie->allocatedBlindtrienode = maxnumofnodes;
blindtrie->spaceBlindtrienode
= gt_realloc(blindtrie->spaceBlindtrienode,
... | false | false | false | false | false | 0 |
bookmarks_compare_names (GtkTreeModel *model,
GtkTreeIter *a,
GtkTreeIter *b)
{
gchar *n1;
gchar *n2;
gint result;
guint f1;
guint f2;
gtk_tree_model_get (model, a,
GEDIT_FILE_BOOKMARKS_STORE_COLUMN_NAME, &n1,
GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f1,
-1);
gtk_tree_model_get (... | false | false | false | false | false | 0 |
write_rail_rect_16(STREAM* s, RAIL_RECT_16* rect)
{
stream_write_uint16(s, rect->left); /*Left*/
stream_write_uint16(s, rect->top); /*Top*/
stream_write_uint16(s, rect->right); /*Right*/
stream_write_uint16(s, rect->bottom); /*Bottom*/
} | false | false | false | false | false | 0 |
path_poly(PG_FUNCTION_ARGS)
{
PATH *path = PG_GETARG_PATH_P(0);
POLYGON *poly;
int size;
int i;
/* This is not very consistent --- other similar cases return NULL ... */
if (!path->closed)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("open path cannot be converted to poly... | false | false | false | false | false | 0 |
getIndexedType(const Type *Ptr, Value *Idx) {
const PointerType *PTy = dyn_cast<PointerType>(Ptr);
if (!PTy) return 0; // Type isn't a pointer type!
// Check the pointer index.
if (!PTy->indexValid(Idx)) return 0;
return PTy->getElementType();
} | false | false | false | false | false | 0 |
activate_sm_complete(struct fpi_ssm *ssm)
{
struct fp_img_dev *dev = ssm->priv;
int err = ssm->error;
fp_dbg("status %d", err);
fpi_imgdev_activate_complete(dev, err);
fpi_ssm_free(ssm);
if (!err)
start_finger_detection(dev);
} | false | false | false | false | false | 0 |
H5FD_alloc_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr, hsize_t *frag_size)
{
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5FD_ALLOC_DEBUG
HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
#endif... | false | false | false | false | false | 0 |
btrfs_read_dev_super(struct block_device *bdev)
{
struct buffer_head *bh;
struct buffer_head *latest = NULL;
struct btrfs_super_block *super;
int i;
u64 transid = 0;
int ret = -EINVAL;
/* we would like to check all the supers, but that would make
* a btrfs mount succeed after a mkfs from a different FS.
* S... | false | false | false | false | false | 0 |
get_history( const std::string& url, CORE::DATA_INFO_LIST& info_list )
{
info_list.clear();
BBSListViewBase* view = dynamic_cast< BBSListViewBase* >( get_view( url ) );
if( view ) return view->get_history( info_list );
} | false | false | false | false | false | 0 |
_exo_thumbnail_get_for_file (const gchar *filename,
ExoThumbnailSize size,
GError **error)
{
struct stat statb;
GdkPixbuf *thumbnail = NULL;
GError *err = NULL;
gchar *name;
gchar *path;
gchar *md5;
gchar *uri;
... | false | false | false | false | false | 0 |
printf_generic_info (struct printf_info *const pinfo, size_t n, int *argtypes)
{
int type = pinfo->type;
if (!n)
return 1;
if ((type & PA_TYPE_MASK) == PA_POINTER)
type |= PA_FLAG_UNSIGNED;
if (pinfo->is_char)
type = PA_CHAR;
if (pinfo->is_short)
type |= PA_FLAG_SHORT;
if (pinfo->is_lon... | false | false | false | false | false | 0 |
has_autocmd(event, sfname, buf)
event_T event;
char_u *sfname;
buf_T *buf;
{
AutoPat *ap;
char_u *fname;
char_u *tail = gettail(sfname);
int retval = FALSE;
fname = FullName_save(sfname, FALSE);
if (fname == NULL)
return FALSE;
#ifdef BACKSLASH_IN_FILENAME
/*
* Rep... | false | false | false | false | false | 0 |
CC_Sparc_Assign_Ret_Split_64(unsigned &ValNo, MVT &ValVT,
MVT &LocVT, CCValAssign::LocInfo &LocInfo,
ISD::ArgFlagsTy &ArgFlags, CCState &State)
{
static const MCPhysReg RegList[] = {
SP::I0, SP::I1, SP::I2, SP::I3, SP::I4, SP::I5
... | false | false | false | false | false | 0 |
restarted (SoupMessage *msg, gpointer user_data)
{
TestRequest **treq = user_data;
SoupURI *uri = soup_message_get_uri (msg);
debug_printf (2, " %s %s\n", msg->method, uri->path);
if ((*treq)->method && !(*treq)->repeat)
(*treq)++;
if (!(*treq)->method) {
debug_printf (1, " - Expected to be done!\n");... | false | false | false | false | false | 0 |
createElement( const DOMString &tagName )
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
ElementImpl* r = ((DocumentImpl *)impl)->createElement(tagName, &exceptioncode);
if ( exceptioncode )
throw DOMException( exceptioncode );
return r;
} | false | false | false | false | false | 0 |
afr_sh_data_close (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
afr_self_heal_t *sh = NULL;
int i = 0;
int call_count = 0;
local = frame->local;
sh = &... | false | false | false | false | false | 0 |
qof_collection_remove_entity (QofInstance *ent)
{
QofCollection *col;
const GncGUID *guid;
if (!ent) return;
col = qof_instance_get_collection(ent);
if (!col) return;
guid = qof_instance_get_guid(ent);
g_hash_table_remove (col->hash_of_entities, guid);
if (!qof_alt_dirty_mode)
q... | false | false | false | false | false | 0 |
builtin_eval(char **argv)
{
int rcode = EXIT_SUCCESS;
argv = skip_dash_dash(argv);
if (*argv) {
char *str = expand_strvec_to_string(argv);
/* bash:
* eval "echo Hi; done" ("done" is syntax error):
* "echo Hi" will not execute too.
*/
parse_and_run_string(str);
free(str);
rcode = G.last_exitcode;
... | false | false | false | false | false | 0 |
GammaBuilder_pushLABEL(CTX ctx, kStmtExpr *stmt, kBasicBlock *lbC, kBasicBlock *lbB)
{
kObject *tkL = NULL;
if(IS_Map(DP(stmt)->metaDictCaseMap)) {
tkL = knh_DictMap_getNULL(ctx, DP(stmt)->metaDictCaseMap, S_tobytes(TS_ATlabel));
}
if(tkL == NULL) {
tkL = KNH_NULVAL(CLASS_Tdynamic);
}
knh_Array_add(ctx, DP(ct... | false | false | false | false | false | 0 |
list_remove_empty_desc (MonoLockFreeAllocSizeClass *sc)
{
int num_non_empty = 0;
for (;;) {
Descriptor *desc = (Descriptor*) mono_lock_free_queue_dequeue (&sc->partial);
if (!desc)
return;
/*
* We don't need to read atomically because we're the
* only thread that references this descriptor.
*/
if ... | false | false | false | false | false | 0 |
filter_normalize_ext( struct slapi_filter *f, PRBool norm_values )
{
char *tmp;
if ( f == NULL ) {
return;
}
switch ( f->f_choice ) {
case LDAP_FILTER_GE:
case LDAP_FILTER_LE:
case LDAP_FILTER_APPROX:
case LDAP_FILTER_EQUALITY:
filter_normalize_ava( f, norm_values );
break;
case... | false | false | false | false | false | 0 |
ConvertAnimations()
{
// first of all determine framerate
const FileGlobalSettings::FrameRate fps = doc.GlobalSettings().TimeMode();
const float custom = doc.GlobalSettings().CustomFrameRate();
anim_fps = FrameRateToDouble(fps, custom);
const std::vector<const AnimationStack*>& animations = doc.AnimationSt... | false | false | false | false | false | 0 |
flex_init(int device)
{
int i;
if (debug)
printf("Initializing FLEX\n");
/* more clocks required to initialize the device */
for (i = 0 ; i < 10 ; i++)
{
set_DCLK(device, 1);
set_DCLK(device, 0);
}
} | false | false | false | false | false | 0 |
AttackedBy(Unit* pAttacker)
{
if (m_creature->getVictim())
{
return;
}
if (m_creature->GetCharmInfo() && !m_creature->GetCharmInfo()->HasReactState(REACT_PASSIVE) &&
m_creature->CanReachWithMeleeAttack(pAttacker))
{
AttackStart(pAttacker);
}
} | false | false | false | false | false | 0 |
alloc_agpphysmem_i8xx(size_t pg_count, int type)
{
struct agp_memory *new;
struct page *page;
switch (pg_count) {
case 1: page = agp_bridge->driver->agp_alloc_page(agp_bridge);
break;
case 4:
/* kludge to get 4 physical pages for ARGB cursor */
page = i8xx_alloc_pages();
break;
default:
return NULL;
}... | false | false | false | false | false | 0 |
standard_fields_match(krb5_context context, const krb5_creds *mcreds, const krb5_creds *creds)
{
return (krb5_principal_compare(context, mcreds->client,creds->client)
&& krb5_principal_compare(context, mcreds->server,creds->server));
} | false | false | false | false | false | 0 |
mei_hbm_cl_flow_control_res(struct mei_device *dev,
struct hbm_flow_control *flow_control)
{
struct mei_cl *cl;
if (!flow_control->host_addr) {
/* single receive buffer */
mei_hbm_add_single_flow_creds(dev, flow_control);
return;
}
cl = mei_hbm_cl_find_by_cmd(dev, flow_control);
if (cl) {
cl->mei_fl... | false | false | false | false | false | 0 |
micky_to_displacement(unsigned long w)
{
long d = (long)w ;
// long a = abs(d);
// return a >= double_speed_threshold ? (a >= triple_speed_threshold ? 3 * d : 2 * d) : d;
return abs(d) >= double_speed_threshold ? d+d : d;
} | false | false | false | false | false | 0 |
vfsc_getsize(Vfs_handle *handle, char *key, size_t *length)
{
int st;
char *reply, *request;
unsigned long len;
Handle *h;
h = (Handle *) handle->h;
if (key != NULL)
request = ds_xprintf("getsize %s", key);
else
request = "getsize";
st = invoke_cgi(handle, HTTP_GET_METHOD, request, NULL, NULL, &rep... | false | false | false | false | false | 0 |
standard_input(void)
{
static string_ty *name;
sub_context_ty *scp;
if (!name)
{
scp = sub_context_new();
name = subst_intl(scp, i18n("standard input"));
sub_context_delete(scp);
}
return name;
} | false | false | false | false | false | 0 |
Print_Special (Object port, register int c) {
register char *fmt = "\\%c";
switch (c) {
case '\b': c = 'b'; break;
case '\t': c = 't'; break;
case '\r': c = 'r'; break;
case '\n': c = 'n'; break;
default:
fmt = "\\%03o";
}
Printf (port, fmt, (unsigned char)c);
} | false | false | false | false | false | 0 |
core_alloc_rtpi(struct se_lun *lun, struct se_device *dev)
{
struct se_lun *tmp;
spin_lock(&dev->se_port_lock);
if (dev->export_count == 0x0000ffff) {
pr_warn("Reached dev->dev_port_count =="
" 0x0000ffff\n");
spin_unlock(&dev->se_port_lock);
return -ENOSPC;
}
again:
/*
* Allocate the next RELATIVE TA... | false | false | false | false | false | 0 |
atkin_q1_visit(char* chunk, llong lower, llong range, llong x, llong y0)
{
for (; x > 0; x-= 15)
{
llong q = 4 * x * x + y0 * y0 - lower;
while (q < 0)
{
q += y0 * 60 + 900;
y0 += 30;
}
for (llong y = y0; q < range; q += y * 60 + 900, y += 30)
... | false | false | false | false | false | 0 |
genProperty(ParserControl *parm, parseUnion *stateUnion)
{
parseUnion lvalp={0};
ct = localLex((parseUnion*)&stateUnion->xtokProperty, parm);
if(ct == XTOK_PROPERTY) {
dontLex = 1;
property(parm, (parseUnion*)&stateUnion->xtokProperty.val);
if(stateUnion->xtokProperty.val.value.type == typeValue_Instance) {
... | false | false | false | false | false | 0 |
ft_dft_data(unsigned char *data, int length _is_unused)
{
struct data_buffer *data_bufr = (struct data_buffer *)data;
unsigned short data_length, data_type;
unsigned char *cp;
if (ft_state == FT_NONE) {
trace_ds(" (no transfer in progress)\n");
return;
}
/* Get the length. */
cp = (unsigned char *)(data_bu... | false | false | false | false | false | 0 |
g_pkcs11_array_find_ulong (GPkcs11Array *array,
CK_ATTRIBUTE_TYPE type,
gulong *value)
{
const CK_ATTRIBUTE* attr;
g_return_val_if_fail (array, FALSE);
g_return_val_if_fail (value, FALSE);
attr = g_pkcs11_array_find (array, type);... | false | false | false | false | false | 0 |
reap_common(pid_t child)
{
pid_t self;
int errno_save;
self = getpid();
errno_save = errno;
if (getenv("ORPHAND_DEBUG")) {
fprintf(stderr, "== %s == REAP %d => %d\n", PROGNAME, self, child);
}
send_orphand_message(self, child, ORPHAND_ACTION_UNREGISTER);
errno = errno_save;
} | false | false | false | false | true | 1 |
do_integrate (double *par)
{
/* Integrate in frequency domain by dividing by kr [scale optional] */
GMT_LONG k;
double fact, scale;
scale = (*par != 0.0) ? *par : 1.0;
datac[0] = datac[1] = 0.0;
for (k = 2; k < ndatac; k+= 2) {
fact = 1.0 / (scale * modk(k) );
datac[k] *= (float)fact;
datac[k+1] *= (float)... | false | false | false | false | false | 0 |
json_user_get(){
cson_value * payV = NULL;
char const * pUser = NULL;
if(!g.perm.Admin && !g.perm.Setup){
json_set_err(FSL_JSON_E_DENIED,
"Requires 'a' or 's' privileges.");
return NULL;
}
pUser = json_find_option_cstr2("name", NULL, NULL, g.json.dispatchDepth+1);
if(!pUser || !*pUs... | false | false | false | false | false | 0 |
scanner_pending_add_all(scanner_pending_t *pending, const GArray *arr)
{
char **itr;
for (itr = (char **)arr->data; *itr != NULL; itr++)
pending->paths = g_list_prepend(pending->paths, g_strdup(*itr));
pending->paths = g_list_reverse(pending->paths);
} | false | false | false | false | false | 0 |
str_list_append_to_dstring(const lList *this_list, dstring *string,
const char delimiter)
{
const char *ret = NULL;
DENTER(STR_LAYER, "str_list_append_to_dstring");
if (string != NULL) {
lListElem *elem = NULL;
bool printed = false;
for_each(elem, this_list) {
... | false | false | false | false | false | 0 |
Put(SOCKET sk, char *buf,size_t len)
{
ssize_t r;
if( _left_buffer_size < len ){ //no enough space
r = FlushOut(sk);
if( r < 0 ) return r;
for( ; _left_buffer_size < len; ) // still no enough space
if(_realloc_buffer() < 0) return -3;
}
memcpy(b + p, buf, len);
p += len;
return 0;
} | false | false | false | false | false | 0 |
BD_DecMultipleReplace(GF_BifsDecoder * codec, GF_BitStream *bs)
{
GF_Err e;
u32 NodeID, flag;
GF_Node *node;
NodeID = 1 + gf_bs_read_int(bs, codec->info->config.NodeIDBits);
node = gf_sg_find_node(codec->current_graph, NodeID);
if (!node) return GF_NON_COMPLIANT_BITSTREAM;
flag = gf_bs_read_int(bs, 1);
if (f... | false | false | false | false | false | 0 |
jumpshot_read_data(struct us_data *us,
struct jumpshot_info *info,
u32 sector,
u32 sectors)
{
unsigned char *command = us->iobuf;
unsigned char *buffer;
unsigned char thistime;
unsigned int totallen, alloclen;
int len, result;
unsigned int sg_offset = 0;
struct scatterlist *sg = NULL;... | false | false | false | false | false | 0 |
addDereferenceableAttr(uint64_t Bytes) {
if (Bytes == 0) return *this;
Attrs[Attribute::Dereferenceable] = true;
DerefBytes = Bytes;
return *this;
} | 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.