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 |
|---|---|---|---|---|---|---|
send_signal(int sig, struct siginfo *info, struct task_struct *t,
int group)
{
int from_ancestor_ns = 0;
#ifdef CONFIG_PID_NS
from_ancestor_ns = si_fromuser(info) &&
!task_pid_nr_ns(current, task_active_pid_ns(t));
#endif
return __send_signal(sig, info, t, group, from_ancestor_ns);
} | false | false | false | false | false | 0 |
kgdb_remove_all_hw_break(void)
{
int i;
int cpu = raw_smp_processor_id();
struct perf_event *bp;
for (i = 0; i < HBP_NUM; i++) {
if (!breakinfo[i].enabled)
continue;
bp = *per_cpu_ptr(breakinfo[i].pev, cpu);
if (!bp->attr.disabled) {
arch_uninstall_hw_breakpoint(bp);
bp->attr.disabled = 1;
contin... | false | false | false | false | false | 0 |
visible(vertex_t *vertex, vertex_t *vertex_prev, int visible, aatree_t *tree)
/* Determines whether or not a vertex is visible from vertex_cur
** Parameters: (vertex_t *) vertex: The vertex
** (vertex_t *) vertex_prev: The previous vertex in the sort
** order, or NULL
*... | false | false | false | false | false | 0 |
ax_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct mkiss *ax = netdev_priv(dev);
if (skb->protocol == htons(ETH_P_IP))
return ax25_ip_xmit(skb);
if (!netif_running(dev)) {
printk(KERN_ERR "mkiss: %s: xmit call when iface is down\n", dev->name);
return NETDEV_TX_BUSY;
}
if (netif_queue_stopped(... | false | false | false | false | false | 0 |
alloc_storage(int32_t size_in_bytes, void **addr_stg_ptr, int32_t * bmap_stg_returned)
{
int as_rc = 0;
int intermed_rc = 0;
*bmap_stg_returned = 0; /* assume we'll get it the usual way */
*addr_stg_ptr = NULL;
intermed_rc = alloc_wrksp((uint32_t) size_in_bytes, 0, -1, addr_stg_ptr);
if ((intermed_rc != 0) || ... | false | false | false | false | false | 0 |
UpdateWebsiteSelection(long lControlGroup, PROJECT* project){
unsigned int i;
CTaskItemGroup* pGroup = NULL;
CTaskItem* pItem = NULL;
wxASSERT(m_pTaskPane);
wxASSERT(m_pListPane);
if (m_bForceUpdateSelection) {
// Update the websites list
//
if (m_T... | false | false | false | false | false | 0 |
callback_send_g_layer_unsubscribe(void *user, VNodeID node_id, VLayerID layer_id)
{
VSNodeGeometry *node;
node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY);
if(node == NULL)
return;
if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL)
return;
if(node->layer[layer_id].subscribers)... | false | false | false | false | false | 0 |
SetNewRanksFromNeighLists( int num_atoms, NEIGH_LIST *NeighList, AT_RANK *nRank, AT_RANK *nNewRank,
AT_RANK *nAtomNumber, int bUseAltSort, int ( *comp )(const void *, const void *) )
{
int i, nNumDiffRanks;
AT_RANK nCurrentRank;
/* -- nAtomNumber[] is already properly set ... | false | false | false | false | false | 0 |
hsvdsolve(x,w,P,D,Q,d,tol) /* original X = PDQ^T; comp. D^{-1/2}P^T x */
double *x, *w, *P, *D, *Q, tol;
INT d;
{ INT i, j;
double mx;
if (tol>0)
{ mx = D[0];
for (i=1; i<d; i++) if (D[i*(d+1)]>mx) mx = D[i*(d+1)];
tol *= mx;
}
for (i=0; i<d; i++)
{ w[i] = 0.0;
for (j=0; j<d; j++) w[i] += P[j*d+... | false | false | false | false | false | 0 |
int_op()
{
longlong value= args[0]->val_int();
if ((null_value= args[0]->null_value))
return 0;
if (args[0]->unsigned_flag &&
(ulonglong) value > (ulonglong) LONGLONG_MAX + 1)
return raise_integer_overflow();
return check_integer_overflow(-value, !args[0]->unsigned_flag && value < 0);
} | false | false | false | false | false | 0 |
slotCategories(QList<KNS::Category*> categories)
{
categorymap.clear();
for (QList<KNS::Category*>::Iterator it = categories.begin(); it != categories.end(); ++it) {
KNS::Category *category = (*it);
//kDebug(551) << "Category: " << category->name().representation();
QPixmap icon = Deskt... | false | false | false | false | false | 0 |
stn_ptr_to_int(skip_tree_node* node)
{
if(node == NULL) {
return -1;
}
return node - s;
} | false | false | false | false | false | 0 |
get_tag_type_iter(TMTagType tag_type, filetype_id ft_id)
{
GtkTreeIter *iter = NULL;
switch (tag_type)
{
case tm_tag_prototype_t:
case tm_tag_method_t:
case tm_tag_function_t:
{
iter = &tv_iters.tag_function;
break;
}
case tm_tag_macro_t:
case tm_tag_macro_with_arg_t:
{
iter = &tv_iters.tag... | false | false | false | false | false | 0 |
ibus_hangul_init (IBusBus *bus)
{
GVariant* value;
hanja_table = hanja_table_load (NULL);
symbol_table = hanja_table_load (IBUSHANGUL_DATADIR "/data/symbol.txt");
config = ibus_bus_get_config (bus);
if (config)
g_object_ref_sink (config);
hangul_keyboard = g_string_new_len ("2", 8);
... | false | false | false | false | false | 0 |
swan_vk_unlock_main(int argc, char *argv[])
{
int ret;
int y;
struct swan_vk_command_option opt;
ret = swan_vk_parse_option(&opt, argc, argv);
if (ret < 0)
{
return ret;
}
if (ret < argc)
{
y = text2value_unsigned(argv[ret], NULL, 10);
}
else
{
y = 75;
}
ret = swan_vk_send_line(&opt, 10, y, 90, y... | false | false | false | false | false | 0 |
send_next_seg(struct ib_mad_send_wr_private *mad_send_wr)
{
struct ib_rmpp_mad *rmpp_mad;
int timeout;
u32 paylen = 0;
rmpp_mad = mad_send_wr->send_buf.mad;
ib_set_rmpp_flags(&rmpp_mad->rmpp_hdr, IB_MGMT_RMPP_FLAG_ACTIVE);
rmpp_mad->rmpp_hdr.seg_num = cpu_to_be32(++mad_send_wr->seg_num);
if (mad_send_wr->seg_n... | false | false | false | false | false | 0 |
setVert(int whichOne, float x, float y, float z)
{
if(whichOne>=0 && whichOne<m_numVertices) {
m_vert[whichOne][0] = x;
m_vert[whichOne][1] = y;
m_vert[whichOne][2] = z;
setModified();
} else {
error("cannot set vertex#%d of %d", whichOne, m_numVertices);
}
} | false | false | false | false | false | 0 |
ev_timer_init(ev_loop_t *loop, int capacity) {
loop->heap = (ev_timer_t**)malloc((capacity + 1)*sizeof(ev_timer_t*));
if (loop->heap == NULL) {
fprintf(stderr, "ERROR: no enough memory!\n");
return -1;
}
int i;
for (i = 0; i <= capacity; i++) {
loop->heap[i] = NULL;
}
loop->heap_size = 0;
loop->heap_capac... | false | true | false | false | false | 1 |
prepare(struct uih_context *c, char *string, int *xmax, int *nr)
{
int xm = 0;
int n = 1;
int pos = 0;
int tmp;
while (1) {
tmp = 0;
while (*string != '\n') {
if (*string == 0) {
tmp++;
if (tmp > xm)
xm = tmp;
*xmax = xm;
*nr = n;
return;
} else
tmp += xte... | false | false | false | false | false | 0 |
readisaac (struct isaac *isaac, unsigned char *p, size_t size)
{
size_t inbytes = isaac->buffered;
while (true)
{
if (size <= inbytes)
{
memcpy (p, isaac->data.b + ISAAC_BYTES - inbytes, size);
isaac->buffered = inbytes - size;
return;
}
memcpy (p, isa... | false | true | false | false | false | 1 |
pm2_mnp(u32 clk, unsigned char *mm, unsigned char *nn,
unsigned char *pp)
{
unsigned char m;
unsigned char n;
unsigned char p;
u32 f;
s32 curr;
s32 delta = 100000;
*mm = *nn = *pp = 0;
for (n = 2; n < 15; n++) {
for (m = 2; m; m++) {
f = PM2_REFERENCE_CLOCK * m / n;
if (f >= 150000 && f <= 300000... | false | false | false | false | false | 0 |
ppm_raw(const char *filename, Pixmap &fb)
{
if (!filename)
return 1;
FILE* fp = fopen(filename, "rb");
if (fp == NULL) {
fb.init(0, 0);
return 5;
}
// Read the header.
int c = 0;
std::string header_token[4];
for (unsigned int tcount = 0; tcount < 4; tcount++) {
for (;;) {
while ... | false | false | false | false | false | 0 |
Populate(mdo::Item* node, bool checkDirty)
{
if(checkDirty)
{
node->SetDirty(IsResourceDirty(GetUuid(
midasResourceType::ITEM, node->GetId())));
}
std::stringstream query;
query << "SELECT bitstream.bitstream_id, bitstream.name, resource_uuid.uuid "
"FROM bitstream, resource_uuid WHERE resou... | false | false | false | false | false | 0 |
dblayer_start_perf_thread(struct ldbminfo *li)
{
int return_value = 0;
if (NULL == PR_CreateThread (PR_USER_THREAD,
(VFP) (void *) perf_threadmain, li,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
... | false | false | false | false | false | 0 |
tableRemoveCol()
{
QTextCursor cursor = textEdit()->textCursor();
QTextTable *table = cursor.currentTable();
int numberOfCols = table->columns();
if (!table) return;
int col = 0;
int row = 0;
int nrows, ncols;
if (cursor.hasSelection()) {
cursor.selectedTableCells(&row, &nrows, &... | false | false | false | false | false | 0 |
archive_access_arcacc_select (struct zfile *zf, unsigned int id, int *retcode)
{
if (zfile_needwrite (zf)) {
if (retcode)
*retcode = -1;
return NULL;
}
return zf;
} | false | false | false | false | false | 0 |
cipvs_submit_if (char *pi, char *t, char *ti,
derive_t rx, derive_t tx)
{
value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
values[0].derive = rx;
values[1].derive = tx;
vl.values = values;
vl.values_len = 2;
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "ipvs", sizeof (vl.... | false | false | false | false | false | 0 |
copy_stream_forward(int in_fd, int out_fd, const char * source, const char * target)
{
char buf[FT_BUFSIZE];
ft_size present = 0, present_aligned, got;
ft_size hole_len, nonhole_len, tosend_offset, tosend_left;
int err = 0;
for (;;) {
got = FT_BUFSIZE - present;
if ((err = this->ful... | false | false | false | false | false | 0 |
msi_verify_entries(struct pci_dev *dev)
{
struct msi_desc *entry;
for_each_pci_msi_entry(entry, dev) {
if (!dev->no_64bit_msi || !entry->msg.address_hi)
continue;
dev_err(&dev->dev, "Device has broken 64-bit MSI but arch"
" tried to assign one above 4G\n");
return -EIO;
}
return 0;
} | false | false | false | false | false | 0 |
main( int argc, const char* argv[] )
{
#ifdef XI_NOB_ENABLED
XI_UNUSED( argc );
XI_UNUSED( argv );
#else
if( argc < REQUIRED_ARGS )
{
print_usage();
exit( 0 );
}
// create the xi library context
xi_context_t* xi_context
= xi_create_context(
XI_HTTP,... | false | false | false | false | false | 0 |
viewkeyAwar(AW_root *aw_root,AW_default awdef,int i, const char *name, bool string_awar) {
const char *awar_name = viewkeyAwarName(i, name);
AW_awar *awar = 0;
if (string_awar) awar = aw_root->awar_string(awar_name, "", awdef);
else awar = aw_root->awar_int(awar_name, 0, awdef);
... | false | false | false | false | false | 0 |
meter_set_level(meter_priv *m, int level)
{
int i;
GdkPixbuf *pb;
ENTER;
if (m->level == level)
RET();
if (!m->num)
RET();
if (level < 0 || level > 100) {
ERR("meter: illegal level %d\n", level);
RET();
}
i = roundf((gfloat) level / 100 * (m->num - 1));
... | false | false | false | false | false | 0 |
cl_sign_data(EVP_PKEY *pkey, char *alg, unsigned char *hash, unsigned int *olen, int encode)
{
EVP_MD_CTX *ctx;
const EVP_MD *md;
unsigned int siglen;
unsigned char *sig;
md = EVP_get_digestbyname(alg);
if (!(md))
return NULL;
ctx = EVP_MD_CTX_create();
if (!(ctx))
retu... | false | false | false | false | false | 0 |
ParseCondition(const char * str)
{
TREE treeData;
if (!ParseTree(&treeData, str, 0))
return FALSE;
condTree = treeData;
condFlag = TRUE;
return TRUE;
} | false | false | false | false | false | 0 |
include(FXfloat x,FXfloat y,FXfloat z){
register FXfloat dx,dy,dz,dist,delta,newradius;
if(0.0f<=radius){
dx=x-center.x;
dy=y-center.y;
dz=z-center.z;
dist=sqrtf(dx*dx+dy*dy+dz*dz);
if(radius<dist){
newradius=0.5f*(radius+dist);
delta=(newradius-radius);
center.x+=delta*dx/dist... | false | false | false | false | false | 0 |
is_like_DeviceCMYK(gx_device * dev)
{
const gx_cm_color_map_procs * cm_procs;
frac cm_comp_fracs[4];
int i;
if ( dev->color_info.num_components != 4 ||
dev->color_info.polarity != GX_CINFO_POLARITY_SUBTRACTIVE )
... | false | false | false | false | false | 0 |
H5I_get_type(hid_t id)
{
H5I_type_t ret_value = H5I_BADID;
FUNC_ENTER_NOAPI(H5I_BADID)
if(id > 0)
ret_value = H5I_TYPE(id);
HDassert(ret_value >= H5I_BADID && ret_value < H5I_next_type);
done:
FUNC_LEAVE_NOAPI(ret_value)
} | false | false | false | false | false | 0 |
doRep(node_t * p, node_t * q, double xdelta, double ydelta, double dist2)
{
int ov;
double force;
/* double dout, din; */
#if defined(DEBUG) || defined(MS) || defined(ALT)
double dist;
#endif
/* double factor; */
while (dist2 == 0.0) {
xdelta = 5 - rand() % 10;
ydelta = 5 - rand() % 10;
dist... | false | false | false | false | false | 0 |
sony_nc_handles_setup(struct platform_device *pd)
{
int i, r, result, arg;
handles = kzalloc(sizeof(*handles), GFP_KERNEL);
if (!handles)
return -ENOMEM;
for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
arg = i + 0x20;
r = sony_nc_int_call(sony_nc_acpi_handle, "SN00", &arg,
&result);
if (!r) {
dpr... | false | false | false | false | false | 0 |
interf_grp_compatible_id_store(struct config_item *item,
const char *page, size_t len)
{
struct usb_os_desc *desc = to_usb_os_desc(item);
int l;
l = min_t(int, 8, len);
if (page[l - 1] == '\n')
--l;
if (desc->opts_mutex)
mutex_lock(desc->opts_mutex);
memcpy(desc->ext_compat_id, page, l);
if (des... | false | false | false | false | false | 0 |
nextChunkSibling(NodePtr &ptr) const
{
while (!chunk()->nextSibling) {
if (!grove()->maybeMoreSiblings(chunk())) {
// Allow for the possibility of invalid documents with elements in the epilog.
if ((const Chunk *)chunk() == grove()->root()->documentElement)
return accessNotInClass;
else
... | false | false | false | false | false | 0 |
special_potion(object *op) {
int i;
if (op->attacktype)
return 1;
if (op->stats.Str
|| op->stats.Dex
|| op->stats.Con
|| op->stats.Pow
|| op->stats.Wis
|| op->stats.Int
|| op->stats.Cha)
return 1;
for (i = 0; i < NROFATTACKS; i++)
if (op->resist[i])
... | false | false | false | false | false | 0 |
sge_sl_elem_search(sge_sl_list_t *list, sge_sl_elem_t **elem, void *key,
sge_sl_compare_f compare, sge_sl_direction_t direction) {
bool ret = true;
DENTER(SL_LAYER, "sge_sl_elem_search");
if (list != NULL && elem != NULL && compare != NULL) {
sge_sl_elem_t *next = NULL;
sge_sl_... | false | false | false | false | false | 0 |
cmp_tabsizes(void)
{
register int32 ni;
register struct net_t *np;
struct mod_t *mdp;
struct task_t *tskp;
for (mdp = __modhdr; mdp != NULL; mdp = mdp->mnxt)
{
__push_wrkitstk(mdp, 0);
if (__inst_mod->mnnum != 0)
{
for (ni = 0, np = &(__inst_mod->mnets[0]); ni < __inst_mod->mnnum;
ni++, np... | false | false | false | false | false | 0 |
getDwarfLineTableSymbol(unsigned CUID) {
MCDwarfLineTable &Table = getContext().getMCDwarfLineTable(CUID);
if (!Table.getLabel()) {
StringRef Prefix = Context.getAsmInfo()->getPrivateGlobalPrefix();
Table.setLabel(
Context.getOrCreateSymbol(Prefix + "line_table_start" + Twine(CUID)));
}
return T... | false | false | false | false | false | 0 |
s_write(CLI *c, int fd, const void *buf, int len) {
/* simulate a blocking write */
u8 *ptr=(u8 *)buf;
int num;
while(len>0) {
s_poll_init(c->fds);
s_poll_add(c->fds, fd, 0, 1); /* write */
switch(s_poll_wait(c->fds, c->opt->timeout_busy, 0)) {
case -1:
s... | false | false | false | false | false | 0 |
gt_aligned_segment_new_from_sa(GtSamAlignment *sa,
GtSamfileEncseqMapping *sem)
{
GtAlignedSegment *as;
size_t dlen;
as = gt_malloc(sizeof (GtAlignedSegment));
gt_assert(sa != NULL);
as->r_reverse = gt_sam_alignment_is_reverse(sa);
as->has_indels = false;
if (gt_sam_alignment_is_unmapped(sa))
gt_a... | false | false | false | false | false | 0 |
clutter_x11_texture_pixmap_init (ClutterX11TexturePixmap *self)
{
self->priv = clutter_x11_texture_pixmap_get_instance_private (self);
if (!check_extensions (self))
{
/* FIMXE: means display lacks needed extensions for at least auto.
* - a _can_autoupdate() method ?
*/
}
self->... | false | false | false | false | false | 0 |
testSpeed(const std::string& filepath, int N = 100)
{
clock_t clk;
// Test multiple json file
auto f1 = getFileContent(filepath);
std::cout << "Test speed for file " << filepath << " (" << (f1.size() / 1024.0) << " KB) ... \n";
clk = clock();
for (int i = 0; i < N; ++i)
{
Ez::JSON j(f1.c_str());
}
std::cout ... | false | false | false | false | false | 0 |
IsMatrixInitialized(unsigned int matrixIndex)
{
if( !m_Matrices )
{
return false;
}
if( !( *m_Matrices )[matrixIndex].GetOrder() )
{
return false;
}
if( !( *m_Matrices )[matrixIndex].GetMaxNonZeroValues() )
{
return false;
}
return true;
} | false | false | false | false | false | 0 |
close_mpeg2(bgav_stream_t*s)
{
mpeg2_priv_t * priv;
priv = s->data.video.decoder->priv;
if(priv->p)
bgav_packet_pool_put(s->pp, priv->p);
if(priv->frame)
{
gavl_video_frame_null(priv->frame);
gavl_video_frame_destroy(priv->frame);
}
if(priv->dec)
mpeg2_close(priv->dec);
f... | false | false | false | false | false | 0 |
TrSetEndLineNumber (
ACPI_PARSE_OBJECT *Op)
{
/* If the end line # is already set, just return */
if (Op->Asl.EndLine)
{
return;
}
Op->Asl.EndLine = Gbl_CurrentLineNumber;
Op->Asl.EndLogicalLine = Gbl_LogicalLineNumber;
} | false | false | false | false | false | 0 |
EffectSendTaxi(SpellEffectIndex eff_idx)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
((Player*)unitTarget)->ActivateTaxiPathTo(m_spellInfo->EffectMiscValue[eff_idx], m_spellInfo->Id);
} | false | false | false | false | false | 0 |
fastEmitInst_r(unsigned MachineInstOpcode,
const TargetRegisterClass *RC,
unsigned Op0, bool Op0IsKill) {
unsigned ResultReg = createResultReg(RC);
const MCInstrDesc &II = TII.get(MachineInstOpcode);
// Make sure the input operand is suffi... | false | false | false | false | false | 0 |
setResourceValue(const string &resname, const string &value) {
Resource_base *res = findResource(resname);
if (res != 0)
res->setFromString(value.c_str());
} | false | false | false | false | false | 0 |
__fuse_get_req(struct fuse_conn *fc, unsigned npages,
bool for_background)
{
struct fuse_req *req;
int err;
atomic_inc(&fc->num_waiting);
if (fuse_block_alloc(fc, for_background)) {
sigset_t oldset;
int intr;
block_sigs(&oldset);
intr = wait_event_interruptible_exclusive(fc->blocked_waitq,
... | false | false | false | false | false | 0 |
readRealEntry(const FXchar *section,const FXchar *key,FXdouble def){
if(!section || !section[0]){ fxerror("FXSettings::readRealEntry: bad section argument.\n"); }
if(!key || !key[0]){ fxerror("FXSettings::readRealEntry: bad key argument.\n"); }
FXStringDict *group=find(section);
if(group){
const char *value... | false | false | false | false | false | 0 |
setup_pci_dev(struct pci_dev *pci_dev)
{
unsigned char lat;
// enable bus master accesses
pci_set_master(pci_dev);
// frobnicate latency (upwards, usually)
pci_read_config_byte (pci_dev, PCI_LATENCY_TIMER, &lat);
if (!pci_lat)
pci_lat = (lat < MIN_PCI_LATENCY) ? MIN_PCI_LATENCY : lat;
if (lat != pci_... | false | false | false | false | false | 0 |
gst_uri_downloader_bus_handler (GstBus * bus,
GstMessage * message, gpointer data)
{
GstUriDownloader *downloader = (GstUriDownloader *) (data);
if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR ||
GST_MESSAGE_TYPE (message) == GST_MESSAGE_WARNING) {
GError *err = NULL;
gchar *dbg_info = NULL;
... | false | false | false | false | false | 0 |
init_rdauxr(struct nvbios_init *init, u32 addr)
{
struct nvkm_i2c_aux *aux = init_aux(init);
u8 data;
if (aux && init_exec(init)) {
int ret = nvkm_rdaux(aux, addr, &data, 1);
if (ret == 0)
return data;
trace("auxch read failed with %d\n", ret);
}
return 0x00;
} | false | false | false | false | false | 0 |
v_catsearch(hfsvol *vol, unsigned long parid, const char *name,
CatDataRec *data, char *cname, node *np)
{
CatKeyRec key;
byte pkey[HFS_CATKEYLEN];
const byte *ptr;
node n;
int found;
if (np == 0)
np = &n;
r_makecatkey(&key, parid, name);
r_packcatkey(&key, pkey, 0);
found = bt_search(&vol->c... | false | true | false | false | false | 1 |
setAssumpThm(const Theorem& thm, int scope) {
if(d_assump==NULL) {
// Make sure d_val==0 all the way to scope 0
d_assump = new(true) CDO<Theorem>(d_vm->getCM()->getCurrentContext());
IF_DEBUG(d_val->setName("CDO[VariableValue::d_val]");)
}
d_assump->set(thm, scope);
} | false | false | false | false | false | 0 |
cmd_sleep(CmdExec *parent)
{
const char *op=args->a0();
if(args->count()!=2)
{
eprintf(_("%s: argument required. "),op);
err:
eprintf(_("Try `help %s' for more information.\n"),op);
return 0;
}
const char *t=args->getarg(1);
TimeIntervalR delay(t);
if(delay.Error())
{
... | false | false | false | false | false | 0 |
get_dump_file_name (int phase)
{
char dump_id[10];
struct dump_file_info *dfi;
if (phase == TDI_none)
return NULL;
dfi = get_dump_file_info (phase);
if (dfi->pstate == 0)
return NULL;
/* If available, use the command line dump filename. */
if (dfi->pfilename)
return xstrdup (dfi->pfilename)... | false | false | false | false | false | 0 |
isl_hmap_map_basic_set_free(isl_ctx *ctx,
__isl_take isl_hmap_map_basic_set *hmap)
{
if (!hmap)
return;
isl_hash_table_foreach(ctx, &hmap->table, &free_pair, NULL);
isl_hash_table_free(ctx, &hmap->table);
} | false | false | false | false | false | 0 |
parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
isc_result_t result;
cfg_obj_t *obj = NULL;
isc_netaddr_t netaddr;
in_port_t port;
unsigned int have_address = 0;
unsigned int have_port = 0;
const unsigned int *flagp = type->of;
if ((*flagp & CFG_ADDR_V4OK) != 0)
isc_netaddr_a... | false | false | false | false | false | 0 |
GetInEdge(vtkIdType v, vtkIdType i)
{
vtkIdType index = v;
if (vtkDistributedGraphHelper *helper = this->GetDistributedGraphHelper())
{
int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER());
if (myRank != helper->GetVertexOwner(v))
{
vtkErrorMacro("vtkGraph cannot retrieve ... | false | false | false | false | false | 0 |
add_tunnel(const String &namein, const String &nameout,
const LandmarkT &landmark, ErrorHandler *errh)
{
if (!errh)
errh = ErrorHandler::silent_handler();
ElementClassT *tun = ElementClassT::tunnel_type();
ElementT *ein = get_element(namein, tun, String(), landmark);
ElementT *eout = get_element... | false | false | false | false | false | 0 |
blend_images(Pixtype b_type, Pointer b_ptr, RGBColor *b_map,
Pixtype o_type, Pointer o_ptr, RGBColor *o_map,
Pixtype c_type, Pointer c_ptr,
int height, int width, float blend)
{
float bbar = 1.0 - blend;
int i,n;
RGBColor *fb = (RGBColor *)b_ptr, b_tmp, *b=NULL;
RGBColor *fo = (RGBCo... | false | false | false | false | false | 0 |
pconnInit(void)
{
int i;
assert(table == NULL);
table = hash_create((HASHCMP *) strcmp, 229, hash_string);
for (i = 0; i < PCONN_HIST_SZ; i++) {
client_pconn_hist[i] = 0;
server_pconn_hist[i] = 0;
}
pconn_data_pool = memPoolCreate("pconn_data", sizeof(struct _pconn));
pconn_fds_pool = memP... | false | false | false | false | false | 0 |
__lambda74_ (Block8Data* _data8_) {
BuildToolsPreferences* self;
GtkTreeIter iter_selected = {0};
gint selected_row = 0;
GtkTreeView* _tmp0_ = NULL;
GtkTreeIter _tmp1_ = {0};
gint _tmp2_ = 0;
gint _tmp3_ = 0;
self = _data8_->self;
_tmp0_ = self->priv->_personal_view;
_tmp2_ = utils_get_selected_row (_tmp0_, &... | false | false | false | false | false | 0 |
_HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd )
{
if ( !cd->loaded )
return;
switch ( cd->ClassFormat )
{
case 1: Free_ClassDef1( &cd->cd.cd1 ); break;
case 2: Free_ClassDef2( &cd->cd.cd2 ); break;
default: break;
}
} | false | false | false | false | false | 0 |
glade_widget_add_signal_handler_impl (GladeWidget *widget, GladeSignal *signal_handler)
{
GPtrArray *signals;
GladeSignal *new_signal_handler;
g_return_if_fail (GLADE_IS_WIDGET (widget));
g_return_if_fail (GLADE_IS_SIGNAL (signal_handler));
signals = glade_widget_list_signal_handlers (widget, signal_handler->nam... | false | false | false | false | false | 0 |
getFirstPureVirtualFunctionCallStack(
std::map<const Function *, std::list<const Token *> > & callsPureVirtualFunctionMap,
const Token & pureCall,
std::list<const Token *> & pureFuncStack)
{
if (isPureWithoutBody(*pureCall.function())) {
pureFuncStack.push_back(pureCall.function()->token);
... | false | false | false | false | false | 0 |
ipmi_lan_set_auth(struct ipmi_intf * intf, uint8_t chan, char * level, char * types)
{
uint8_t data[5];
uint8_t authtype = 0;
char * p;
struct lan_param * lp;
if (level == NULL || types == NULL)
return -1;
lp = get_lan_param(intf, chan, IPMI_LANP_AUTH_TYPE_ENABLE);
if (lp == NULL)
return -1;
if (lp->data ... | false | false | false | false | false | 0 |
import(){
FXint id;
FXString ext;
GMTrack info;
database.database()->begin();
for (FXint i=0;(i<files.no())&&running;i++){
if (FXStat::isDirectory(files[i])){
topdir=files[i];
listDirectory(files[i]);
}
else if (FXStat::isFile(files[i])) {
ext = FXPath::extension(files[i]);
... | false | false | false | false | true | 1 |
dump_table_file (MonoImage *m)
{
MonoTableInfo *t = &m->tables [MONO_TABLE_FILE];
int i, j, len;
fprintf (output, "File Table (1..%d)\n", t->rows);
for (i = 0; i < t->rows; i++){
guint32 cols [MONO_FILE_SIZE];
const char *name, *hash;
mono_metadata_decode_row (t, i, cols, MONO_FILE_SIZE);
name = mono_m... | false | false | false | false | false | 0 |
skcipher_wait_for_data(struct sock *sk, unsigned flags)
{
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
long timeout;
DEFINE_WAIT(wait);
int err = -ERESTARTSYS;
if (flags & MSG_DONTWAIT) {
return -EAGAIN;
}
sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk);
for (;;) {
if (signal_pendin... | false | false | false | false | false | 0 |
vga16fb_clock_chip(struct vga16fb_par *par,
unsigned int pixclock,
const struct fb_info *info,
int mul, int div)
{
static const struct {
u32 pixclock;
u8 misc;
u8 seq_clock_mode;
} *ptr, *best, vgaclocks[] = {
{ 79442 /* 12.587 */, 0x00, 0x08},
{ 70616 /* 14.161 */, 0x04, 0x0... | false | false | false | false | false | 0 |
build_workdir_tree(const char *root, int dirs, int subs)
{
int i, j;
char buf[64], sub[64];
for (i = 0; i < dirs; ++i) {
if (i % 2 == 0) {
p_snprintf(buf, sizeof(buf), "%s/dir%02d", root, i);
cl_git_pass(git_futils_mkdir(buf, NULL, 0775, GIT_MKDIR_PATH));
p_snprintf(buf, sizeof(buf), "%s/dir%02d/file", ... | true | true | false | false | false | 1 |
union_vars(int *v1,
int *v2,
int n,
int *c)
{
int i;
for (i = 0; i < n; i++)
c[i] = v1[i] || v2[i];
} | false | false | false | false | false | 0 |
Bind() {
#ifdef DEBUG
// All the forward-reaching frames should have been adjusted at the
// jumps to this target.
for (int i = 0; i < reaching_frames_.length(); i++) {
ASSERT(reaching_frames_[i] == NULL ||
reaching_frames_[i]->height() == expected_height_);
}
#endif
// Drop leftover statement ... | false | false | false | false | false | 0 |
gst_caps_merge (GstCaps * caps1, GstCaps * caps2)
{
GstStructure *structure;
GstCapsFeatures *features;
int i;
GstCaps *result;
g_return_val_if_fail (GST_IS_CAPS (caps1), NULL);
g_return_val_if_fail (GST_IS_CAPS (caps2), NULL);
if (G_UNLIKELY (CAPS_IS_ANY (caps1))) {
gst_caps_unref (caps2);
resu... | false | false | false | false | false | 0 |
kmo_dfs_load_cube(cpl_frameset *frameset,
const char *category,
int device,
int noise)
{
cpl_frame *frame = NULL; /* must not be deleted at the end */
cpl_imagelist *imglist = NULL;
int ... | false | false | false | false | false | 0 |
poppler_form_field_text_do_spell_check (PopplerFormField *field)
{
g_return_val_if_fail (field->widget->getType () == formText, FALSE);
return !static_cast<FormWidgetText*>(field->widget)->noSpellCheck ();
} | false | false | false | false | false | 0 |
on_button_new_id()
{
Gnome::Gda::Value chosen_id;
const bool chosen = offer_related_record_id_new(chosen_id);
if(!chosen)
return;
//Update the choices, if any, to show the new related record:
m_signal_choices_changed.emit();
set_value(chosen_id);
m_signal_edited.emit(chosen_id);
} | false | false | false | false | false | 0 |
sumortpolsym(int n, real_t x, real_t c[], real_t a[])
{
int k;
real_t h,r,s;
if (n == 0) return (a[0]);
r=a[n];
s=0.0;
for (k=n-1; k>=1; k--) {
h=r;
r=a[k]+x*r+s;
s = -c[k]*h;
}
return (a[0]+x*r+s);
} | false | false | false | false | false | 0 |
new_http_pack_request(
struct packed_git *target, const char *base_url)
{
long prev_posn = 0;
char range[RANGE_HEADER_SIZE];
struct strbuf buf = STRBUF_INIT;
struct http_pack_request *preq;
preq = xmalloc(sizeof(*preq));
preq->target = target;
preq->range_header = NULL;
end_url_with_slash(&buf, base_url);
s... | false | false | false | false | false | 0 |
pdf_load_linear_shading(fz_shade *shade, pdf_document *xref, pdf_obj *dict, int funcs, pdf_function **func)
{
pdf_obj *obj;
float d0, d1;
int e0, e1;
fz_context *ctx = xref->ctx;
obj = pdf_dict_gets(dict, "Coords");
shade->u.l_or_r.coords[0][0] = pdf_to_real(pdf_array_get(obj, 0));
shade->u.l_or_r.coords[0][1] ... | false | false | false | false | false | 0 |
G_getl(char *buf, int n, FILE * fd)
{
if (!fgets(buf, n, fd))
return 0;
for (; *buf && *buf != '\n'; buf++) ;
*buf = 0;
return 1;
} | false | false | false | false | false | 0 |
gl_template_history_model_init (glTemplateHistoryModel *this)
{
this->priv = g_new0 (glTemplateHistoryModelPrivate, 1);
this->priv->history = g_settings_new ("org.gnome.glabels-3.history");
g_return_if_fail (this->priv->history != NULL);
g_signal_connect_swapped (G_OBJECT (this->priv-... | false | false | false | false | false | 0 |
A_Raise(player_t * player, pspdef_t * psp)
{
psp->sy -= RAISESPEED;
if (psp->sy > WEAPONTOP)
{ // Not raised all the way yet
return;
}
psp->sy = WEAPONTOP;
if (player->class == PCLASS_FIGHTER && player->readyweapon == WP_SECOND
&& player->mana[MANA_1])
... | false | false | false | false | false | 0 |
move(const QPointF& mouseScenePos , const QGraphicsScene * scene , int draggedItemPaletteId , QGraphicsItem * draggedItem )
{
//If a palette is already active and the mouse is still over the same drop destination.
if ( mShownPalette )
{
if ( mDropDestination->isUnderMouse() || mShownPalette->isUnderMouse() )
{
... | false | false | false | false | false | 0 |
operator==(const commodity_t& comm) const
{
// If the base commodities don't match, the game's up.
if (base != comm.base)
return false;
if (price &&
(! comm.annotated ||
price != static_cast<const annotated_commodity_t&>(comm).price))
return false;
if (date &&
(! comm.annotated ||
... | false | false | false | false | false | 0 |
set_port_type(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct mlx4_port_info *info = container_of(attr, struct mlx4_port_info,
port_attr);
struct mlx4_dev *mdev = info->dev;
struct mlx4_priv *priv = mlx4_priv(mdev);
enum mlx4_port_type types[MLX4_M... | false | false | false | false | false | 0 |
gf_mixer_remove_all(GF_AudioMixer *am)
{
u32 j;
gf_mixer_lock(am, 1);
while (gf_list_count(am->sources)) {
MixerInput *in = (MixerInput *)gf_list_get(am->sources, 0);
gf_list_rem(am->sources, 0);
for (j=0; j<GF_SR_MAX_CHANNELS; j++) {
if (in->ch_buf[j]) gf_free(in->ch_buf[j]);
}
gf_free(in);
}
am->isE... | false | false | false | false | false | 0 |
cdoOperatorID(void)
{
int processID = processSelf();
int operID = -1;
if ( Process[processID].noper > 0 )
{
for ( operID = 0; operID < Process[processID].noper; operID++ )
if ( Process[processID].operator[operID].name )
if ( strcmp(Process[processID].operatorName, Process[processID].operator[operID... | false | false | false | false | false | 0 |
do_get_buffer (gcry_mpi_t a, unsigned int fill_le,
unsigned int *nbytes, int *sign, int force_secure)
{
unsigned char *p, *buffer;
unsigned int length, tmp;
mpi_limb_t alimb;
int i;
size_t n;
if (sign)
*sign = a->sign;
*nbytes = a->nlimbs * BYTES_PER_MPI_LIMB;
n = *nbytes? *nbytes:1... | false | false | false | false | false | 0 |
emitEnums(raw_ostream &OS) {
EmitSourceFileHeader("Target Instruction Enum Values", OS);
OS << "\n#ifdef GET_INSTRINFO_ENUM\n";
OS << "#undef GET_INSTRINFO_ENUM\n";
OS << "namespace llvm {\n\n";
CodeGenTarget Target(Records);
// We must emit the PHI opcode first...
std::string Namespace = Target.getIn... | false | false | false | false | false | 0 |
vidioc_s_std(struct file *file, void *_fh,
v4l2_std_id std)
{
struct hdpvr_device *dev = video_drvdata(file);
struct hdpvr_fh *fh = _fh;
u8 std_type = 1;
if (!fh->legacy_mode && dev->options.video_input == HDPVR_COMPONENT)
return -ENODATA;
if (dev->status != STATUS_IDLE)
return -EBUSY;
if (std & V4L2_STD_... | 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.