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 |
|---|---|---|---|---|---|---|
git_config_get_long(git_config *cfg, const char *name, long int *out)
{
const char *value, *num_end;
int ret;
long int num;
ret = git_config_get_string(cfg, name, &value);
if (ret < GIT_SUCCESS)
return ret;
ret = git__strtol32(&num, value, &num_end, 0);
if (ret < GIT_SUCCESS)
return ret;
switch (*num_end... | false | false | false | false | false | 0 |
Launch(const LevelSet& levelset, wxUint16 levelnumber) const {
LevelSet tmplevelset(levelset);
if(ruleset)
tmplevelset.ruleset = ruleset;
wxString gamecmd;
if(program.empty())
gamecmd = arguments;
else
gamecmd = PlayTestProcess::GetArgumentQuoted(program) + wxT(" ") + argumen... | false | false | false | false | false | 0 |
load_locate_elem(lList *load_list, lListElem *global_consumable,
lListElem *host_consumable, lListElem *queue_consumable,
const char *limit) {
lListElem *load_elem = NULL;
lListElem *load = NULL;
for_each(load, load_list) {
if ((lGetPosRef(load, L... | false | false | false | false | false | 0 |
gf_w64_bytwo_p_nosse_multiply_region(gf_t *gf, void *src, void *dest, gf_val_64_t val, int bytes, int xor)
{
uint64_t *s64, *d64, ta, prod, amask, pmask, pp;
gf_region_data rd;
gf_internal_t *h;
if (val == 0) { gf_multby_zero(dest, bytes, xor); return; }
if (val == 1) { gf_multby_one(src, dest, bytes, xor); ... | false | false | false | false | false | 0 |
cf_section_parse_free(CONF_SECTION *cs, void *base)
{
int i;
const CONF_PARSER *variables = cs->variables;
/*
* Don't automatically free the strings if we're being
* called from a module. This is also for clients.c,
* where client_free() expects to be able to free the
* client structure. If we moved every... | true | true | false | false | false | 1 |
send_player_kick_packet(int player_index, int ban, int reason)
{
ubyte data[MAX_PACKET_SIZE];
int packet_size = 0;
BUILD_HEADER(KICK_PLAYER);
// add the address of the player to be kicked
ADD_SHORT(Net_players[player_index].player_id);
// indicate if he should be banned
ADD_INT(ban);
ADD_INT(reason);
//... | false | false | false | false | false | 0 |
useredit(void)
{
char iwho[100];
int il;
printf("\n\n===== chntpw Edit User Info & Passwords ====\n\n");
if (H_SAM < 0) {
printf("ERROR: SAM registry file (which contains user data) is not loaded!\n\n");
return;
}
list_users(1);
while (1) {
printf("\nSelect: ! - quit, . - list users, 0x... | true | true | false | false | false | 1 |
check_http (void)
{
GVfs *vfs;
gboolean error_out_on_http = FALSE;
if (g_strcmp0 (g_get_user_name (), "hadess") == 0 &&
http_supported == FALSE)
error_out_on_http = TRUE;
vfs = g_vfs_get_default ();
if (vfs == NULL) {
if (error_out_on_http)
g_error ("gvfs with http support is required (no gvfs)");
... | false | false | false | false | false | 0 |
get_attribute(
const list<TagAttribute> *as,
const char *name, // Attribute name
const char *dflt1, // If attribute not specified
int dflt2, // If string value does not match s1, ...
const char *s1,
int v1,
...
)
{
... | false | false | false | false | false | 0 |
collect_no_from_block_list(IntSet set, List *blklist)
{
List *li;
for (li = blklist; li != NULL; li = li->next) {
Block *bpt = li->data;
add1_IntSet(set, bpt->no);
}
} | false | false | false | false | false | 0 |
gst_video_test_src_smpte75 (GstVideoTestSrc * v, GstVideoFrame * frame)
{
int i;
int j;
paintinfo pi = PAINT_INFO_INIT;
paintinfo *p = π
int w = frame->info.width, h = frame->info.height;
videotestsrc_setup_paintinfo (v, p, w, h);
if (v->info.colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_BT601) {
p... | false | false | false | false | false | 0 |
removeItem(AbstractNode& node, void* item)
{
BoundableList& boundables = *(node.getChildBoundables());
BoundableList::iterator childToRemove = boundables.end();
for (BoundableList::iterator i=boundables.begin(),
e=boundables.end();
i!=e; i++)
{
Boundable* childBoundable = *i;
if (ItemBoundable *ib=dynam... | false | false | false | false | false | 0 |
dump_basic_block_info (FILE *file, rtx insn, basic_block *start_to_bb,
basic_block *end_to_bb, int bb_map_size, int *bb_seqn)
{
basic_block bb;
if (!flag_debug_asm)
return;
if (INSN_UID (insn) < bb_map_size
&& (bb = start_to_bb[INSN_UID (insn)]) != NULL)
{
edge e;
... | false | false | false | false | false | 0 |
propertyNodeToList(LoadState &state,
QString typeName, Node pnode)
{
Nodes sequence = sequenceStartingAt(pnode);
QVariantList list;
foreach (Node node, sequence) {
Nodes vnodes;
vnodes << node;
QVariant value = propertyNodeListToVariant(state, ... | false | false | false | false | false | 0 |
restart(char *buf)
{
int n = 0;
double *list = (double *) buf;
int flag = static_cast<int> (list[n++]);
if (flag) {
int m = static_cast<int> (list[n++]);
if (tstat_flag && m == mtchain) {
for (int ich = 0; ich < mtchain; ich++)
eta[ich] = list[n++];
for (int ich = 0; ich < mtchain; i... | false | false | false | false | false | 0 |
gst_mem_index_free_id (gpointer key, gpointer value, gpointer user_data)
{
GstMemIndexId *id_index = (GstMemIndexId *) value;
if (id_index->format_index) {
g_hash_table_foreach (id_index->format_index, gst_mem_index_free_format,
NULL);
g_hash_table_destroy (id_index->format_index);
id_index->fo... | false | false | false | false | false | 0 |
rb_file_s_ctime(klass, fname)
VALUE klass, fname;
{
struct stat st;
if (rb_stat(fname, &st) < 0)
rb_sys_fail(RSTRING(fname)->ptr);
return rb_time_new(st.st_ctime, 0);
} | false | false | false | false | false | 0 |
FindLockTime(char *name)
{ CF_DB *dbp;
struct LockData entry;
Debug("FindLockTime(%s)\n",name);
if ((dbp = OpenLock()) == NULL)
{
return -1;
}
if (ReadDB(dbp,name,&entry,sizeof(entry)))
{
CloseLock(dbp);
return entry.time;
}
else
{
CloseLock(dbp);
return -1;
}
} | false | false | false | false | false | 0 |
recv_socket(void *data, size_t data_size, gearman_return_t& ret)
{
ssize_t read_size;
while (1)
{
read_size= ::recv(fd, data, data_size, MSG_NOSIGNAL);
if (read_size == 0)
{
ret= gearman_error(universal, GEARMAN_LOST_CONNECTION, "lost connection to server (EOF)");
close_socket();
... | false | false | false | false | false | 0 |
slave_run(char *domain, int service_port, char *service_addr, int do_listen)
{
slave_instance_t *slave; // pointer to slave instance
uint32 *ns_test_list;
int udp_listen_port;
// allocate memory for slave instance
slave = (slave_instance_t *) malloc_or_die(sizeof(slave_instance_t));
slave->ticket = 0; /... | false | false | false | false | false | 0 |
qf_free()
{
struct qf_line *qfp;
while (qf_count)
{
qfp = qf_start->qf_next;
free(qf_start->qf_text);
free(qf_start);
qf_start = qfp;
--qf_count;
}
} | false | false | false | false | false | 0 |
fiji_upload_smu_firmware_image(struct pp_smumgr *smumgr)
{
const uint8_t *src;
uint32_t byte_count;
uint32_t *data;
struct cgs_firmware_info info = {0};
cgs_get_firmware_info(smumgr->device,
fiji_convert_fw_type_to_cgs(UCODE_ID_SMU), &info);
if (info.image_size & 3) {
printk(KERN_ERR "SMC ucode is not 4 by... | false | false | false | false | false | 0 |
plpgsql_validator(PG_FUNCTION_ARGS)
{
Oid funcoid = PG_GETARG_OID(0);
HeapTuple tuple;
Form_pg_proc proc;
char functyptype;
int numargs;
Oid *argtypes;
char **argnames;
char *argmodes;
bool istrigger = false;
int i;
/* Get the new function's pg_proc entry */
tuple = SearchSysCache(PROCOID,... | false | false | false | true | false | 1 |
IsWritable(SignalingProtocol protocol,
const ContentDescription* content) {
const MediaContentDescription* media =
static_cast<const MediaContentDescription*>(content);
if (protocol == PROTOCOL_GINGLE &&
media->type() == MEDIA_TYPE_DATA) {
return false;
}
retu... | false | false | false | false | false | 0 |
test_lookup_no_match (Test *test,
gconstpointer used)
{
GError *error = NULL;
GHashTable *attributes;
SecretValue *value;
attributes = secret_attributes_build (&MOCK_SCHEMA,
"even", TRUE,
"string", "one",
... | false | false | false | false | false | 0 |
mxf_metadata_file_descriptor_to_structure (MXFMetadataBase * m)
{
GstStructure *ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_file_descriptor_parent_class)->to_structure (m);
MXFMetadataFileDescriptor *self = MXF_METADATA_FILE_DESCRIPTOR (m);
gchar str[48];
if (self->linked_track_id)
gst_structur... | false | false | false | false | false | 0 |
dp(A a)
{
I k,d=0;
if(QF(a))R -1;
if(a->t<Et)R 0;
DO(a->n,if((k=1+dp((A)a->p[i]))>d)d=k);
R d;
} | false | false | false | false | true | 1 |
sci_request_build_sgl(struct isci_request *ireq)
{
struct isci_host *ihost = ireq->isci_host;
struct sas_task *task = isci_request_access_task(ireq);
struct scatterlist *sg = NULL;
dma_addr_t dma_addr;
u32 sg_idx = 0;
struct scu_sgl_element_pair *scu_sg = NULL;
struct scu_sgl_element_pair *prev_sg = NULL;
i... | false | false | false | false | false | 0 |
pdf_mark_font_descriptor_used(gx_device_pdf *pdev, pdf_font_descriptor_t *pfd)
{
if (pfd != NULL && pfd->common.object->id == -1)
pdf_reserve_object_id(pdev, (pdf_resource_t *)&pfd->common, 0);
return 0;
} | false | false | false | false | false | 0 |
set_FloatPrecision (GelETree * a)
{
long bits;
if G_UNLIKELY ( ! check_argument_integer (&a, 0, "set_FloatPrecision"))
return NULL;
bits = mpw_get_long(a->val.value);
if G_UNLIKELY (gel_error_num) {
gel_error_num = 0;
return NULL;
}
if G_UNLIKELY (bits < 60 || bits > 16384) {
gel_errorout (_("%s: argume... | false | false | false | false | false | 0 |
n_pure_div_eq(struct isl_basic_map *bmap)
{
int i, j;
unsigned total;
total = isl_space_dim(bmap->dim, isl_dim_all);
for (i = 0, j = bmap->n_div-1; i < bmap->n_eq; ++i) {
while (j >= 0 && isl_int_is_zero(bmap->eq[i][1 + total + j]))
--j;
if (j < 0)
break;
if (isl_seq_first_non_zero(bmap->eq[i] + 1 + to... | false | false | false | false | false | 0 |
UpdatePageVars(void)
{
float temp; /* Swapping variable */
switch (Orientation & 3)
{
case 0 : /* Portait */
break;
case 1 : /* Landscape */
temp = PageLeft;
PageLeft = PageBottom;
PageBottom = temp;
temp = PageRight;
PageRight = PageTop;
PageTop = temp;
temp ... | false | false | false | false | false | 0 |
get_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMModem *self = NM_MODEM (user_data);
GError *error = NULL;
GValue value = { 0, };
if (!dbus_g_proxy_end_call (proxy, call_id, &error,
G_TYPE_VALUE, &value,
G_TYPE_INVALI... | false | false | false | false | false | 0 |
parse_include(std::ostream* os)
{
Object params;
if (getparamlist(params))
return;
Object::ArrayType& pl = params.array();
if (pl.size() != 1)
{
recorderror("Error: @include takes exactly 1 parameter");
return;
}
Object& obj = *pl[0].get();
if (obj.gettype() != Object::type_scalar)
{
recorderror("Err... | false | false | false | false | false | 0 |
byt_pte_encode(dma_addr_t addr,
enum i915_cache_level level,
bool valid, u32 flags)
{
gen6_pte_t pte = valid ? GEN6_PTE_VALID : 0;
pte |= GEN6_PTE_ADDR_ENCODE(addr);
if (!(flags & PTE_READ_ONLY))
pte |= BYT_PTE_WRITEABLE;
if (level != I915_CACHE_NONE)
pte |= BYT_PTE_SNOOPED_BY_CPU_CACHES;
return p... | false | false | false | false | false | 0 |
makePlanarTextureMapping(scene::IMeshBuffer* buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) const
{
u32 idxcnt = buffer->getIndexCount();
u16* idx = buffer->getIndices();
for (u32 i=0; i<idxcnt; i+=3)
{
// calculate planar mapping worldspace coordinates
if (axis==0)
... | false | false | false | false | false | 0 |
mpt_detach(struct pci_dev *pdev)
{
MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
char pname[32];
u8 cb_idx;
unsigned long flags;
struct workqueue_struct *wq;
/*
* Stop polling ioc for fault condition
*/
spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
wq = ioc->reset_work_q;
ioc->reset_work_q = NULL;
spin_unl... | false | false | false | false | false | 0 |
playlists_menuitem_update_individual_playlist (PlaylistsMenuitem* self, PlaylistDetails* new_detail) {
DbusmenuMenuitem* _tmp19_ = NULL;
const gchar* _tmp20_ = NULL;
PlaylistDetails _tmp21_ = {0};
const char* _tmp22_ = NULL;
g_return_if_fail (self != NULL);
g_return_if_fail (new_detail != NULL);
{
GeeIterator*... | false | false | false | false | false | 0 |
xen_hyper_dump_xen_hyper_sched_table(int verbose)
{
struct xen_hyper_sched_context *schc;
char buf[XEN_HYPER_CMD_BUFSIZE];
int len, flag, i;
len = 21;
flag = XEN_HYPER_PRI_R;
XEN_HYPER_PRI(fp, len, "name: ", buf, flag,
(buf, "%s\n", xhscht->name));
XEN_HYPER_PRI(fp, len, "opt_sched: ", buf, flag,
(buf, "%s... | true | true | false | false | false | 1 |
bindUniformParameters(Program* pCpuProgram, const GpuProgramParametersSharedPtr& passParams)
{
const UniformParameterList& progParams = pCpuProgram->getParameters();
UniformParameterConstIterator itParams = progParams.begin();
UniformParameterConstIterator itParamsEnd = progParams.end();
// Bind each u... | false | false | false | false | false | 0 |
gtpfunc_list_commands(const std::string &/*str*/, size_t /*i*/,
bool has_id, unsigned id)
{
std::string output;
for (int k = 0 ; gtp_commands[k].command; ++k) {
if (k != 0)
output += '\n';
output += gtp_commands[k].command;
}
output_response(output, has_id, id);
} | false | false | false | false | false | 0 |
checkLastBoundaryTag(bool being_deleted)
{
// Nothing to do
if ( boundaryTag == NO_INDEX )
return;
// If the last element is being deleted
if (being_deleted) {
if (last_boundaryTag == boundaryTag) {
last_boundaryTag--;
}
}
// If this element has larger id than what
// corresponds to th... | false | false | false | false | false | 0 |
changelog5_dup_config(changelog5Config *config)
{
changelog5Config *dup = (changelog5Config *) slapi_ch_calloc(1, sizeof(changelog5Config));
if (config->dir)
dup->dir = slapi_ch_strdup(config->dir);
if (config->maxAge)
dup->maxAge = slapi_ch_strdup(config->maxAge);
dup->maxEntries = config->maxEntries;
dup... | false | false | false | false | false | 0 |
hdp_get_mdep(struct hdp_device *device, struct hdp_application *app,
hdp_continue_mdep_f func, gpointer data,
GDestroyNotify destroy, GError **err)
{
struct get_mdep_data *mdep_data;
bdaddr_t dst, src;
uuid_t uuid;
device_get_address(device->dev, &dst, NULL);
adapter_get_address(device_get_adapter(device-... | false | false | false | false | false | 0 |
putString(const char *stringVal)
{
/* determine length of the string value */
const Uint32 stringLen = (stringVal != NULL) ? strlen(stringVal) : 0;
/* call the real function */
return putString(stringVal, stringLen);
} | false | false | false | false | false | 0 |
loader_BASIC_load(const char *filename,
unsigned char *data,
long size,
fileio_prop_t **prop)
{
int b;
long xsize, len;
unsigned char *sptr, *dptr;
*prop = (fileio_prop_t *)malloc(sizeof(fileio_prop_t));
if (*prop == NULL)
return -1;
memset(*prop, 0... | false | true | false | false | false | 1 |
frogr_add_tags_dialog_show (GtkWindow *parent, const GSList *pictures, const GSList *tags)
{
FrogrConfig *config = NULL;
GObject *new = NULL;
new = g_object_new (FROGR_TYPE_ADD_TAGS_DIALOG,
"title", _("Add Tags"),
"modal", TRUE,
"pictures", pictur... | false | false | false | false | false | 0 |
PrintFpt(const vector<int>& f, int hash)
{
unsigned int i;
for(i=0;i<f.size();++i)
_ss << f[i] << " ";
_ss << "<" << hash << ">" << endl;
} | false | false | false | false | false | 0 |
xmlXPathCompEqualityExpr(xmlXPathParserContextPtr ctxt) {
xmlXPathCompRelationalExpr(ctxt);
CHECK_ERROR;
SKIP_BLANKS;
while ((CUR == '=') || ((CUR == '!') && (NXT(1) == '='))) {
int eq;
int op1 = ctxt->comp->last;
if (CUR == '=') eq = 1;
else eq = 0;
NEXT;
... | false | false | false | false | false | 0 |
SpillRegToStackSlot(MachineBasicBlock::iterator &MII,
int Idx, unsigned PhysReg, int StackSlot,
const TargetRegisterClass *RC,
bool isAvailable, MachineInstr *&LastStore,
AvailableSpills &Spills,
SmallSet<MachineInstr*, ... | false | false | false | false | false | 0 |
check_effect_access(struct ff_device *ff, int effect_id,
struct file *file)
{
if (effect_id < 0 || effect_id >= ff->max_effects ||
!ff->effect_owners[effect_id])
return -EINVAL;
if (file && ff->effect_owners[effect_id] != file)
return -EACCES;
return 0;
} | false | false | false | false | false | 0 |
do_frame(float frametime)
{
//Figure out how much alpha
if(time_displayed < fade_time)
{
text_color.alpha = (ubyte)fl2i(255.0f*(time_displayed/fade_time));
}
else if(time_displayed > time_displayed_end)
{
//We're finished
return;
}
else if((time_displayed - fade_time) > display_time)
{
text_color.alpha... | false | false | false | false | false | 0 |
graphicsToDeviceCoordinates(const JsGraphics *gfx, short *x, short *y) {
if (gfx->data.flags & JSGRAPHICSFLAGS_SWAP_XY) {
short t = *x;
*x = *y;
*y = t;
}
if (gfx->data.flags & JSGRAPHICSFLAGS_INVERT_X) *x = (short)(gfx->data.width - (*x+1));
if (gfx->data.flags & JSGRAPHICSFLAGS_INVERT_Y) *y = (sho... | false | false | false | false | false | 0 |
list_read(SparseElementList *l, FILE *fp, int n_elts) {
SparseNode n, pn;
int i;
size_t unused;
if (!l || !fp || n_elts < 0) {
if (MATR_DEBUG_MODE) {
fprintf(stderr, "list_write: null arguments.\n");
}
return 0;
}
if (!list_is_empty(l)) {
list_clear(l);
}
l->last_addr = NULL;
... | false | false | false | false | false | 0 |
linkDestination( const QString &name )
{
GooString * namedDest = QStringToGooString( name );
LinkDestinationData ldd(NULL, namedDest, m_doc, false);
LinkDestination *ld = new LinkDestination(ldd);
delete namedDest;
return ld;
} | false | false | false | false | false | 0 |
mag_g_pop_open(mag_t *g, int min_elen)
{
int64_t i;
for (i = 0; i < g->v.n; ++i)
mag_v_pop_open(g, &g->v.a[i], min_elen);
mag_g_merge(g, 0);
} | false | false | false | false | false | 0 |
xgene_enet_clear(struct xgene_enet_pdata *pdata,
struct xgene_enet_desc_ring *ring)
{
u32 addr, val, data;
val = xgene_enet_ring_bufnum(ring->id);
if (xgene_enet_is_bufpool(ring->id)) {
addr = ENET_CFGSSQMIFPRESET_ADDR;
data = BIT(val - 0x20);
} else {
addr = ENET_CFGSSQMIWQRESET_ADDR;
data = BIT(... | false | false | false | false | false | 0 |
updateFreqBandTable(HANDLE_SBR_CONFIG_DATA sbrConfigData,
HANDLE_SBR_HEADER_DATA sbrHeaderData,
INT noQmfChannels)
{
INT k0, k2;
if(FDKsbrEnc_FindStartAndStopBand(sbrConfigData->sampleFreq,
noQmfChannels,
... | false | false | false | false | false | 0 |
ttusb_dec_exit_dvb(struct ttusb_dec *dec)
{
dprintk("%s\n", __func__);
dvb_net_release(&dec->dvb_net);
dec->demux.dmx.close(&dec->demux.dmx);
dec->demux.dmx.remove_frontend(&dec->demux.dmx, &dec->frontend);
dvb_dmxdev_release(&dec->dmxdev);
dvb_dmx_release(&dec->demux);
if (dec->fe) {
dvb_unregister_frontend(... | false | false | false | false | false | 0 |
gst_app_sink_render_common (GstBaseSink * psink, GstMiniObject * data,
gboolean is_list)
{
GstFlowReturn ret;
GstAppSink *appsink = GST_APP_SINK_CAST (psink);
GstAppSinkPrivate *priv = appsink->priv;
gboolean emit;
restart:
g_mutex_lock (priv->mutex);
if (priv->flushing)
goto flushing;
GST_DEBUG... | false | false | false | false | false | 0 |
feed_mailstorage_init(struct mailstorage * storage,
const char * feed_url,
int feed_cached, const char * feed_cache_directory,
const char * feed_flags_directory)
{
struct feed_mailstorage * feed_storage;
int res;
feed_storage = malloc(sizeof(* feed_storage));
if (feed_storage == NULL) {
res =... | false | false | false | false | false | 0 |
ensBasealignfeatureNewIniP(
EnsPProteinalignfeatureadaptor pafa,
ajuint identifier,
EnsPFeaturepair fp,
AjPStr cigar)
{
EnsPBasealignfeature baf = NULL;
if (!fp)
return NULL;
if (!cigar)
return NULL;
AJNEW0(baf);
baf->Use = 1U;
baf->Identifier = identifier;
... | false | false | false | false | false | 0 |
dax_load_hole(struct address_space *mapping, struct page *page,
struct vm_fault *vmf)
{
unsigned long size;
struct inode *inode = mapping->host;
if (!page)
page = find_or_create_page(mapping, vmf->pgoff,
GFP_KERNEL | __GFP_ZERO);
if (!page)
return VM_FAULT_OOM;
/* Recheck i_size under page lock to... | false | false | false | false | false | 0 |
visornic_cleanup(void)
{
visorbus_unregister_visor_driver(&visornic_driver);
if (visornic_timeout_reset_workqueue) {
flush_workqueue(visornic_timeout_reset_workqueue);
destroy_workqueue(visornic_timeout_reset_workqueue);
}
debugfs_remove_recursive(visornic_debugfs_dir);
} | false | false | false | false | false | 0 |
vc1_put_block(VC1Context *v, DCTELEM block[6][64])
{
uint8_t *Y;
int ys, us, vs;
DSPContext *dsp = &v->s.dsp;
if(v->rangeredfrm) {
int i, j, k;
for(k = 0; k < 6; k++)
for(j = 0; j < 8; j++)
for(i = 0; i < 8; i++)
block[k][i + j*8] = ((bloc... | false | false | false | false | false | 0 |
ircprot_freectcp(struct ctcpmessage *cmsg) {
int i;
for (i = 0; i < cmsg->numparams; i++)
free(cmsg->params[i]);
free(cmsg->cmd);
free(cmsg->params);
free(cmsg->paramstarts);
free(cmsg->orig);
} | false | false | false | false | false | 0 |
draw ()
{
int i;
if (active && visible)
{
for (i = 0; i < numcomponents; i ++)
{
components [i]->draw ();
}
}
} | false | false | false | false | false | 0 |
ValidateDayOfTheYear(const char* &start) //Jn,n,Mm.n.d
{
string str="";
switch(*start)
{
case 'J':
str='J'+ValidateJulianDay((++start));
break;
case 'M':
str='M'+ValidateDayOfTheWeek(++start);
break;
default:
str=ValidateZeroJulianDay((start));
... | false | false | false | false | false | 0 |
hwloc_bitmap_compare_first(const struct hwloc_bitmap_s * set1, const struct hwloc_bitmap_s * set2)
{
unsigned i;
HWLOC__BITMAP_CHECK(set1);
HWLOC__BITMAP_CHECK(set2);
for(i=0; i<set1->ulongs_count || i<set2->ulongs_count; i++) {
unsigned long w1 = HWLOC_SUBBITMAP_READULONG(set1, i);
unsigned long w2 = HWLOC_S... | false | false | false | false | false | 0 |
markQueryForLocking(Query *qry, Node *jtnode,
bool forUpdate, bool noWait, bool pushedDown)
{
if (jtnode == NULL)
return;
if (IsA(jtnode, RangeTblRef))
{
int rti = ((RangeTblRef *) jtnode)->rtindex;
RangeTblEntry *rte = rt_fetch(rti, qry->rtable);
if (rte->rtekind == RTE_RELATION)
{
applyLocking... | false | false | false | false | false | 0 |
set_script(cmd_parms *cmd, void *m_v,
const char *method, const char *script)
{
action_dir_config *m = (action_dir_config *)m_v;
int methnum;
if (cmd->pool == cmd->temp_pool) {
/* In .htaccess, we can't globally register new methods. */
methnum = ap_method_numbe... | false | false | false | false | false | 0 |
vs_remove_connection(void)
{
unsigned int i, j;
VSession *session;
VSSubscriptionList *list;
session = VSConnectionStorage.connection[VSConnectionStorage.current_session].session;
for(i = 0; i < VSConnectionStorage.list_length; i++)
{
list = VSConnectionStorage.list[i];
for(j = 0; j < list->session_count && ... | false | false | false | false | false | 0 |
write(hsStream* S) {
S->writeByte(3);
S->writeSafeStr(fName);
S->writeShort(fDisplay.len());
S->writeStr(fDisplay);
S->writeInt(fCount);
S->writeByte(fType);
S->writeSafeStr(fDefault);
S->writeInt(fFlags);
if (fType == kStateDescriptor) {
S->writeSafeStr(fStateDescType);
... | false | false | false | false | false | 0 |
ApplyFunction(uint64_t iLODLevel,
bool (*brickFunc)(void* pData,
const UINT64VECTOR3& vBrickSize,
const UINT64VECTOR3& vBrickOffset,
void* pUserContext),
vo... | false | false | false | false | false | 0 |
iraf2str (irafstring, nchar)
char *irafstring; /* IRAF 2-byte/character string */
int nchar; /* Number of characters in string */
{
char *string;
int i, j;
/* Set swap flag according to position of nulls in 2-byte characters */
if (headswap < 0) {
if (irafstring[0] != 0 && irafstring[1] == 0)
h... | false | false | false | false | false | 0 |
PrepareTrailer (HPDF_Doc pdf)
{
HPDF_PTRACE ((" PrepareTrailer\n"));
if (HPDF_Dict_Add (pdf->trailer, "Root", pdf->catalog) != HPDF_OK)
return pdf->error.error_no;
if (HPDF_Dict_Add (pdf->trailer, "Info", pdf->info) != HPDF_OK)
return pdf->error.error_no;
return HPDF_OK;
} | false | false | false | false | false | 0 |
write_regscript( const statement_list_t *stmts )
{
const type_t *ps_factory;
if (!do_regscript) return;
if (do_everything && !need_proxy_file( stmts )) return;
init_output_buffer();
put_str( indent, "HKCR\n" );
put_str( indent++, "{\n" );
put_str( indent, "NoRemove Interface\n" );
pu... | false | false | false | false | true | 1 |
populateColors()
{
const QStringList colorNames = QStringList()
// Basic 16 HTML colors (minus greys):
<< "black"
<< "white"
<< "maroon"
<< "red"
<< "purple"
<< "fuchsia"
<< "green"
<< "lime"
<< "olive"
<< "yellow"
<< "n... | false | false | false | false | false | 0 |
panel_act_CMPDIR(this, other, quick)
panel_t *this;
panel_t *other;
int quick;
{
int i, j;
il_message(PANEL_COMPARE_DIR_MSG);
tty_update();
if (strcmp(this->path, other->path) == 0)
{
panel_1s_message("No point in comparing a directory with itself. ",
(char *)NULL, IL_BEEP | IL_SA... | false | false | false | false | false | 0 |
gdkgc_gdk_gc_new_with_values(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj drawable_scm;
GdkDrawable* drawable;
ScmObj values_scm;
GdkGCValues* values;
ScmObj mask_scm;
int mask;
ScmObj SCM_SUBRARGS[3];
int SCM_i;
SCM_ENTER_SUBR("gdk-gc-new-with-values");
for (SCM_i=0; SCM_i<3; SCM_i++) {
... | false | false | false | false | false | 0 |
receiveStatusMessage(std::string& message)
{
message.clear();
int status = receiveStatusLine(message);
if (status < 0)
{
while (status <= 0)
{
message += '\n';
status = receiveStatusLine(message);
}
}
return status;
} | false | false | false | false | false | 0 |
print()
{
OsiRowCut * cut;
if (way_ < 0) {
cut = &down_;
printf("CbcCut would branch down");
} else {
cut = &up_;
printf("CbcCut would branch up");
}
double lb = cut->lb();
double ub = cut->ub();
int n = cut->row().getNumElements();
const int * column = cu... | false | false | false | false | false | 0 |
cvt_32(union VALUETYPE *p, const struct magic *m)
{
DO_CVT(l, (uint32_t));
} | false | false | false | false | false | 0 |
ResetTheory(GtkWidget * UNUSED(pw), theorywidget * ptw)
{
float aarRates[2][2];
evalcontext ec = { FALSE, 0, FALSE, TRUE, 0.0 };
float arOutput[NUM_OUTPUTS];
int i, j;
/* get current gammon rates */
GetMatchStateCubeInfo(&ptw->ci, &ms);
getCurrentGammonRates(aarRates, arOutput, msBoard(),... | false | false | false | false | false | 0 |
FindDuplicateQuestion(const mDNS *const m, const DNSQuestion *const question)
{
DNSQuestion *q;
// Note: A question can only be marked as a duplicate of one that occurs *earlier* in the list.
// This prevents circular references, where two questions are each marked as a duplicate of the other.
// Accordingly, we b... | false | false | false | false | false | 0 |
shouldSkip(MachineBasicBlock *From,
MachineBasicBlock *To) {
unsigned NumInstr = 0;
for (MachineBasicBlock *MBB = From; MBB != To && !MBB->succ_empty();
MBB = *MBB->succ_begin()) {
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
NumIn... | false | false | false | false | false | 0 |
split_virtual_grfs()
{
int num_vars = this->virtual_grf_count;
int new_virtual_grf[num_vars];
bool split_grf[num_vars];
memset(new_virtual_grf, 0, sizeof(new_virtual_grf));
/* Try to split anything > 0 sized. */
for (int i = 0; i < num_vars; i++) {
split_grf[i] = this->virtual_grf_sizes[i] != ... | false | false | false | false | false | 0 |
ldm_validate_vmdb(struct parsed_partitions *state,
unsigned long base, struct ldmdb *ldb)
{
Sector sect;
u8 *data;
bool result = false;
struct vmdb *vm;
struct tocblock *toc;
BUG_ON (!state || !ldb);
vm = &ldb->vm;
toc = &ldb->toc;
data = read_part_sector(state, base + OFF_VMDB, §);
if (!data... | false | false | false | false | false | 0 |
TLan_SetMac(struct nic *nic __unused, int areg, unsigned char *mac)
{
int i;
areg *= 6;
if (mac != NULL) {
for (i = 0; i < 6; i++)
TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i,
mac[i]);
} else {
for (i = 0; i < 6; i++)
TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i, 0);
}
} | false | false | false | false | false | 0 |
irq_create_mapping(struct irq_domain *domain,
irq_hw_number_t hwirq)
{
struct device_node *of_node;
int virq;
pr_debug("irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq);
/* Look for default domain if nececssary */
if (domain == NULL)
domain = irq_default_domain;
if (domain == NULL) {
WARN(1, "%s(, %lx... | false | false | false | false | false | 0 |
queue_info_cleanup(void *data_)
{
fd_queue_info_t *qi = data_;
apr_thread_cond_destroy(qi->wait_for_idler);
apr_thread_mutex_destroy(qi->idlers_mutex);
/* Clean up any pools in the recycled list */
for (;;) {
struct recycled_pool *first_pool = qi->recycled_pools;
if (first_pool == N... | false | false | false | false | false | 0 |
hup(sig)
int sig;
{
syslog(LOG_INFO, "Hangup (SIGHUP)");
kill_link = 1;
if (conn_running)
/* Send the signal to the [dis]connector process(es) also */
kill_my_pg(sig);
if (waiting)
longjmp(sigjmp, 1);
} | false | false | false | false | false | 0 |
pattern_walk_forward(int fd, pattern_op_t op, void **state_p, float *percent_p)
{
long storage[TESTBLOCK];
off64_t *state = *state_p;
pattern_result_t result = pr_continue;
switch( op) {
case op_init:
*state_p = calloc(1, sizeof(off64_t));
break;
case op_access:
*percent_p = 100.0*(unsigned l... | false | false | false | false | false | 0 |
nssPKIX509_GetIssuerAndSerialFromDER(NSSDER *der, NSSArena *arena,
NSSDER *issuer, NSSDER *serial)
{
SECStatus secrv;
SECItem derCert;
SECItem derIssuer = { 0 };
SECItem derSerial = { 0 };
SECITEM_FROM_NSSITEM(&derCert, der);
secrv = CERT_SerialNumberFromDER... | false | false | false | false | false | 0 |
set_b_bus_req(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct ci_hdrc *ci = dev_get_drvdata(dev);
if (count > 2)
return -1;
mutex_lock(&ci->fsm.lock);
if (buf[0] == '0')
ci->fsm.b_bus_req = 0;
else if (buf[0] == '1')
ci->fsm.b_bus_req = 1;
ci_otg_queue_work... | false | false | false | false | false | 0 |
getClientRects()
{
if (isRenderInline() && isInlineFlow()) {
QList<QRectF> list;
InlineFlowBox *child = firstLineBox();
if (child) {
int x = 0, y = 0;
absolutePosition(x,y);
do {
QRectF rect(x + child->xPos(), y + child->yPos(), child->wid... | false | false | false | false | false | 0 |
gst_sbc_enc_fill_sbc_params(GstSbcEnc *enc, GstCaps *caps)
{
if (!gst_caps_is_fixed(caps)) {
GST_DEBUG_OBJECT(enc, "didn't receive fixed caps, "
"returning false");
return FALSE;
}
if (!gst_sbc_util_fill_sbc_params(&enc->sbc, caps))
return FALSE;
if (enc->rate != 0 && gst_sbc_parse_rate_from_sbc(enc->sb... | false | false | false | false | false | 0 |
__kvm_write_guest_page(struct kvm_memory_slot *memslot, gfn_t gfn,
const void *data, int offset, int len)
{
int r;
unsigned long addr;
addr = gfn_to_hva_memslot(memslot, gfn);
if (kvm_is_error_hva(addr))
return -EFAULT;
r = __copy_to_user((void __user *)addr + offset, data, len);
if (r)
return -... | false | false | false | false | false | 0 |
FunctionCall4Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2,
Datum arg3, Datum arg4)
{
FunctionCallInfoData fcinfo;
Datum result;
InitFunctionCallInfoData(fcinfo, flinfo, 4, collation, NULL, NULL);
fcinfo.arg[0] = arg1;
fcinfo.arg[1] = arg2;
fcinfo.arg[2] = arg3;
fcinfo.arg[3] = arg4;
fci... | false | false | false | false | false | 0 |
_dxfCategorize( Object o, char **comp_list )
{
catinfo c;
Object retval = o;
if ( !o ) {
DXSetError( ERROR_BAD_PARAMETER, "#10000", "input" );
return ERROR;
}
memset( ( char * ) & c, '\0', sizeof( c ) );
c.maxparallel = DXProcessors( 0 );
if ( c.maxparallel > 1 )
c... | 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.