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 |
|---|---|---|---|---|---|---|
fst_init(void)
{
int i;
for (i = 0; i < FST_MAX_CARDS; i++)
fst_card_array[i] = NULL;
spin_lock_init(&fst_work_q_lock);
return pci_register_driver(&fst_driver);
} | false | false | false | false | false | 0 |
page_to_file(int page_num) const
{
GCriticalSectionLock lock((GCriticalSection *) &class_lock);
return (page_num<page2file.size())?page2file[page_num]:(GP<DjVmDir::File>(0));
} | false | false | false | false | false | 0 |
caml_fl_add_blocks (char *bp)
{
Assert (fl_last != NULL);
Assert (Next (fl_last) == NULL);
caml_fl_cur_size += Whsize_bp (bp);
if (bp > fl_last){
Next (fl_last) = bp;
if (fl_last == caml_fl_merge && bp < caml_gc_... | false | false | false | false | false | 0 |
convert_to_gcda(char *buffer, struct gcov_info *info)
{
struct gcov_fn_info *fi_ptr;
struct gcov_ctr_info *ci_ptr;
unsigned int fi_idx;
unsigned int ct_idx;
unsigned int cv_idx;
size_t pos = 0;
/* File header. */
pos += store_gcov_u32(buffer, pos, GCOV_DATA_MAGIC);
pos += store_gcov_u32(buffer, pos, info->ver... | false | false | false | false | false | 0 |
inputNewFragment(giopStream* g) {
if (g->pd_currentInputBuffer) {
g->releaseInputBuffer(g->pd_currentInputBuffer);
g->pd_currentInputBuffer = 0;
}
again:
if (!g->pd_input) {
giopStream_Buffer* p = g->inputMessage();
inputQueueMessage(g,p);
goto again;
}
else {
g->pd_currentInputBuff... | false | false | false | false | false | 0 |
libbfio_memory_range_io_handle_clone(
libbfio_memory_range_io_handle_t **destination_memory_range_io_handle,
libbfio_memory_range_io_handle_t *source_memory_range_io_handle,
libcerror_error_t **error )
{
static char *function = "libbfio_memory_range_io_handle_clone";
if( destination_memory_range_io_ha... | false | false | false | false | false | 0 |
parse_controllers(cont_name_t cont_names[CG_CONTROLLER_MAX],
const char *program_name)
{
int ret = 0;
void *handle;
char path[FILENAME_MAX];
struct cgroup_mount_point controller;
char controllers[CG_CONTROLLER_MAX][FILENAME_MAX];
int max = 0;
path[0] = '\0';
ret = cgroup_get_controller_begin(&handle, &contr... | false | false | false | false | false | 0 |
print_set(int *a) {
int i;
for (i = 0; i < N && a[i]; i++) {
printf("%d ", a[i]);
}
printf("\n");
} | false | false | false | false | false | 0 |
write_properties_between(uchar *p, int mark, int from, int to)
{ int j, k, prop_number, prop_length;
/* Note that p is properties_table. */
for (prop_number=to; prop_number>=from; prop_number--)
{ for (j=0; j<full_object.l; j++)
{ if ((full_object.pp[j].num == prop_number)
&& (... | false | false | false | false | false | 0 |
compareAttEntries(GinState *ginstate, OffsetNumber attnum_a, Datum a,
OffsetNumber attnum_b, Datum b)
{
if (attnum_a == attnum_b)
return compareEntries(ginstate, attnum_a, a, b);
return (attnum_a < attnum_b) ? -1 : 1;
} | false | false | false | false | false | 0 |
dcompare(double a, enum match_type mtype, double b)
{
DBGP2("comparing doubles '%.lf' and '%.lf'", a, b);
COMPARE((a - b), mtype);
} | false | false | false | false | false | 0 |
count(MCInst &Inst,
const MCSubtargetInfo &STI) {
if (InShadow) {
SmallString<256> Code;
SmallVector<MCFixup, 4> Fixups;
raw_svector_ostream VecOS(Code);
CodeEmitter->encodeInstruction(Inst, VecOS, Fixups, STI);
CurrentShadowSize += Co... | false | false | false | false | false | 0 |
modules_load(gchar ** module_list)
{
GDir *dir;
GSList *modules = NULL;
ShellModule *module;
gchar *filename;
filename = g_build_filename(params.path_lib, "modules", NULL);
dir = g_dir_open(filename, 0, NULL);
g_free(filename);
if (dir) {
while ((filename = (gchar *) g_dir_read_name(d... | false | false | false | false | false | 0 |
printing_to_standard_stream (PRN *prn)
{
int ret = 0;
if (prn != NULL && (prn->fp == stdout || prn->fp == stderr)) {
ret = 1;
}
return ret;
} | false | false | false | false | false | 0 |
SolveLeastSquares(float *solution, int rows, int cols,
const FloatMatrix& jacobian,
float *errvec, FloatMatrix& sqarray)
{
int r, c, i;
float sum;
assert(rows >= cols);
/* Multiply Jacobian transpose by Jacobian, and put result in sqarray. */
for (r = 0; r < cols; r++)
for (... | false | false | false | false | false | 0 |
ecryptfs_process_key_cipher(struct crypto_blkcipher **key_tfm,
char *cipher_name, size_t *key_size)
{
char dummy_key[ECRYPTFS_MAX_KEY_BYTES];
char *full_alg_name = NULL;
int rc;
*key_tfm = NULL;
if (*key_size > ECRYPTFS_MAX_KEY_BYTES) {
rc = -EINVAL;
printk(KERN_ERR "Requested key size is [%zd] bytes; ... | true | true | false | false | false | 1 |
shdma_chan_probe(struct shdma_dev *sdev,
struct shdma_chan *schan, int id)
{
schan->pm_state = SHDMA_PM_ESTABLISHED;
/* reference struct dma_device */
schan->dma_chan.device = &sdev->dma_dev;
dma_cookie_init(&schan->dma_chan);
schan->dev = sdev->dma_dev.dev;
schan->id = id;
if (!schan->max_xfer_len)
s... | false | false | false | false | false | 0 |
_dump_node_state (struct node_record *dump_node_ptr, Buf buffer)
{
packstr (dump_node_ptr->comm_name, buffer);
packstr (dump_node_ptr->name, buffer);
packstr (dump_node_ptr->node_hostname, buffer);
packstr (dump_node_ptr->reason, buffer);
packstr (dump_node_ptr->features, buffer);
packstr (dump_node_ptr->gres, bu... | false | false | false | false | false | 0 |
VP8LEncodeImage(const WebPConfig* const config,
const WebPPicture* const picture) {
int width, height;
int has_alpha;
size_t coded_size;
int percent = 0;
WebPEncodingError err = VP8_ENC_OK;
VP8LBitWriter bw;
if (picture == NULL) return 0;
if (config == NULL || picture->argb == NULL... | false | false | false | false | false | 0 |
event_whois_away(IRC_SERVER_REC *server, const char *data)
{
char *params, *nick, *awaymsg, *recoded;
g_return_if_fail(data != NULL);
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
recoded = recode_in(SERVER(server), awaymsg, nick);
printformat(server, nick, MSGLEVEL_CRAP,
IRCTXT_WHOIS_AWAY, ni... | false | false | false | false | false | 0 |
gdm_display_store_find (GdmDisplayStore *store,
GdmDisplayStoreFunc predicate,
gpointer user_data)
{
StoredDisplay *stored_display;
FindClosure closure;
g_return_val_if_fail (store != NULL, NULL);
g_return_val_if_fail (pre... | false | false | false | false | false | 0 |
zend_fcall_info_argp(zend_fcall_info *fci TSRMLS_DC, int argc, zval ***argv) /* {{{ */
{
int i;
if (argc < 0) {
return FAILURE;
}
zend_fcall_info_args_clear(fci, !argc);
if (argc) {
fci->param_count = argc;
fci->params = (zval ***) erealloc(fci->params, fci->param_count * sizeof(zval **));
for (i = 0; ... | false | false | false | false | false | 0 |
change_definition(const sharedptr<const Field>& fieldOld, const sharedptr<const Field>& field)
{
BusyCursor busy_cursor(get_app_window());
//DB field definition:
sharedptr<Field> result;
if(!fieldOld || !field)
return result;
type_vec_const_fields old_fields;
type_vec_fields new_fields;
if(fiel... | false | false | false | false | false | 0 |
TS_CONF_load_certs(const char *file)
{
BIO *certs = NULL;
STACK_OF(X509) *othercerts = NULL;
STACK_OF(X509_INFO) *allcerts = NULL;
int i;
if (!(certs = BIO_new_file(file, "r"))) goto end;
if (!(othercerts = sk_X509_new_null())) goto end;
allcerts = PEM_X509_INFO_read_bio(certs, NULL, NULL, NULL);
for(i = 0; ... | false | false | false | false | false | 0 |
PrintObj (
Obj obj )
{
Int i; /* loop variable */
UInt lastPV; /* save LastPV */
UInt fromview; /* non-zero when we were called
from viewObj of the SAME object */
/* check for interr... | false | false | false | false | false | 0 |
marker_priv_cleanup (xlator_t *this)
{
marker_conf_t *priv = NULL;
GF_VALIDATE_OR_GOTO ("marker", this, out);
priv = (marker_conf_t *) this->private;
GF_VALIDATE_OR_GOTO (this->name, priv, out);
marker_xtime_priv_cleanup (this);
LOCK_DESTROY (&priv->lock);
G... | false | false | false | false | false | 0 |
Shortread_print_quality (FILE *fp, T this, int hardclip_low, int hardclip_high,
int shift, bool show_chopped_p) {
int i;
int c;
if (this->quality == NULL) {
fprintf(fp,"*");
} else {
for (i = hardclip_low; i < this->fulllength - hardclip_high; i++) {
if ((c = this->quality[i] + shift) <= 32) {... | false | false | false | false | false | 0 |
statObjects(void *data)
{
StatObjectsState *state = data;
StoreEntry *e;
hash_link *link_ptr = NULL;
hash_link *link_next = NULL;
if (state->bucket >= store_hash_buckets) {
storeComplete(state->sentry);
storeUnlockObject(state->sentry);
cbdataFree(state);
return;
} else if (EBIT_TEST(state->... | false | false | false | false | false | 0 |
score_moves()
{
if (type == ROOT)
return;
for (unsigned int i=current_move_no+1; i<movelist.size(); i++) {
int score = 0;
Move mov = movelist[i];
if (mov == hashmv) {
/* The hash move is treated specially. It won't be
* returned by pick(), thus we do not need to assign
* any score to it. */
con... | false | false | false | false | false | 0 |
FloodAreaConnections (void)
{
int i;
carea_t *area;
int floodnum;
// all current floods are now invalid
floodvalid++;
floodnum = 0;
// area 0 is not used
for (i=1 ; i<numareas ; i++)
{
area = &map_areas[i];
if (area->floodvalid == floodvalid)
continue; // already flooded into
floo... | false | false | false | false | false | 0 |
lock_tree_promotably (int argc, char **argv, int local, int which, int aflag)
{
TRACE (TRACE_FUNCTION, "lock_tree_promotably (%d, argv, %d, %d, %d)",
argc, local, which, aflag);
/*
* Run the recursion processor to find all the dirs to lock and lock all
* the dirs
*/
lock_tree_list = getl... | false | false | false | false | false | 0 |
get_bw_filesize(request_rec * r, apr_array_header_t * a,
apr_uint32_t filesize, const char *filename)
{
bw_sizel *e = (bw_sizel *) a->elts;
int i;
apr_uint32_t tmpsize = 0, tmprate = 0;
if (!filesize)
return (0);
filesize /= 1024;
for (i = 0; i < a->nelts; ... | false | false | false | false | false | 0 |
gf_isom_streamer_del(GF_ISOMRTPStreamer *streamer)
{
GF_RTPTrack *track = streamer->stream;
while (track) {
GF_RTPTrack *tmp = track;
if (track->au) gf_isom_sample_del(&track->au);
if (track->rtp) gf_rtp_streamer_del(track->rtp);
track = track->next;
gf_free(tmp);
}
if (streamer->isom) gf_isom_close(stre... | false | false | false | false | false | 0 |
storeOrigin(IRBuilder<> &IRB, Value *Addr, Value *Shadow, Value *Origin,
unsigned Alignment, bool AsCall) {
const DataLayout &DL = F.getParent()->getDataLayout();
unsigned OriginAlignment = std::max(kMinOriginAlignment, Alignment);
unsigned StoreSize = DL.getTypeStoreSize(Shadow->getType(... | false | false | false | false | false | 0 |
_show_hide(Evas_Object *obj)
{
ELM_FLIP_DATA_GET(obj, sd);
Evas_Coord x, y, w, h;
if (!sd) return;
evas_object_geometry_get(obj, &x, &y, &w, &h);
if (sd->front.content)
{
if ((sd->pageflip) && (sd->state))
{
evas_object_move(sd->front.content, 4999, 4999);
}... | false | false | false | false | false | 0 |
cec_set_menu_state(cec_menu_state state, int bSendUpdate) {
if (cec_parser)
return cec_parser->SetMenuState(state, bSendUpdate == 1) ? 1 : 0;
return -1;
} | false | false | false | false | false | 0 |
ixgbe_acquire_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask)
{
s32 status;
status = ixgbe_acquire_swfw_sync_X540(hw, mask);
if (status)
return status;
if (mask & IXGBE_GSSR_I2C_MASK)
ixgbe_set_mux(hw, 1);
return 0;
} | false | false | false | false | false | 0 |
gst_date_time_get_time_zone_offset (const GstDateTime * datetime)
{
g_return_val_if_fail (datetime != NULL, 0.0);
g_return_val_if_fail (gst_date_time_has_time (datetime), 0.0);
return (g_date_time_get_utc_offset (datetime->datetime) /
G_USEC_PER_SEC) / 3600.0;
} | false | false | false | false | false | 0 |
xmalloc_chunk_find(struct xchunkhead *ch, unsigned stid)
{
link_t *lk;
struct xchunk *xck;
for (lk = elist_first(&ch->list); lk != NULL; lk = elist_next(lk)) {
xck = elist_data(&ch->list, lk);
xchunk_check(xck);
if (0 != xck->xc_count)
goto found;
}
/*
* No free chunk, allocate a new one and move it... | false | false | false | false | false | 0 |
nvme_trans_report_luns(struct nvme_ns *ns, struct sg_io_hdr *hdr,
u8 *cmd)
{
int res;
int nvme_sc;
u32 alloc_len, xfer_len, resp_size;
u8 *response;
struct nvme_id_ctrl *id_ctrl;
u32 ll_length, lun_id;
u8 lun_id_offset = REPORT_LUNS_FIRST_LUN_OFFSET;
__be32 tmp_len;
switch (cmd[2]) {
default:
return... | false | false | false | false | false | 0 |
keyMapPrim()
{
if (!trans.setPrimary(prim_lang))
trans.enablePrimary();
keymapon = true;
keymap = PRIMARY;
} | false | false | false | false | false | 0 |
gt_clustered_set_union_find_merge_clusters(GtClusteredSet *cs,
unsigned long e1,
unsigned long e2,
GtError *err)
{
gt_assert(cs);
int had_err = 0;
GtClusteredSetUFClusterInf... | false | false | false | false | false | 0 |
ic_compar(const void *ap, const void *bp)
{
int st;
char *a_name, *b_name;
Ic_entry *a, *b;
a = *(Ic_entry **) ap;
b = *(Ic_entry **) bp;
if (a->sic != NULL)
a_name = auth_identity_mine(a->sic->username);
else
a_name = a->mic->identity;
if (b->sic != NULL)
b_name = auth_identity_mine(b->sic->usern... | false | false | false | false | false | 0 |
bna_enet_sm_pause_init_wait(struct bna_enet *enet,
enum bna_enet_event event)
{
switch (event) {
case ENET_E_STOP:
enet->flags &= ~BNA_ENET_F_PAUSE_CHANGED;
bfa_fsm_set_state(enet, bna_enet_sm_last_resp_wait);
break;
case ENET_E_FAIL:
enet->flags &= ~BNA_ENET_F_PAUSE_CHANGED;
bfa_fsm_set_state(enet, b... | false | false | false | false | false | 0 |
PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "AreaThreshold: " << this->AreaThreshold;
if (this->SquareNeighborhood)
{
os << indent << "Neighborhood: Square";
}
else
{
os << indent << "Neighborhood: Cross";
}
os << indent << "Island... | false | false | false | false | false | 0 |
as_double() const
{
if (nbits_ == 0) return 0.0;
double val = 0.0;
/* Do we have/want a signed value? */
if (has_sign_ && bits_[nbits_-1] == V1) {
V carry = V1;
for (unsigned idx = 0; idx < nbits_; idx += 1) {
V sum = add_with_carry(~bits_[idx], V0, carry);
if (sum == V1)
... | false | false | false | false | false | 0 |
dmaengine_get(void)
{
struct dma_device *device, *_d;
struct dma_chan *chan;
int err;
mutex_lock(&dma_list_mutex);
dmaengine_ref_count++;
/* try to grab channels */
list_for_each_entry_safe(device, _d, &dma_device_list, global_node) {
if (dma_has_cap(DMA_PRIVATE, device->cap_mask))
continue;
list_for_ea... | false | false | false | false | false | 0 |
prefs_template_delete_cb(gpointer action, gpointer data)
{
Template *tmpl;
gint row;
GtkTreeIter iter;
GtkTreeModel *model;
row = gtkut_list_view_get_selected_row(templates.list_view);
if (row <= 0)
return;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(templates.list_view));
if (!gtk_tree_model_iter_nth_chi... | false | false | false | false | false | 0 |
removeMessages(const std::vector<size_t> &messages,
callback &cb)
{
installTask(new ExpungeTask(*this, cb, true, &messages));
} | false | false | false | false | false | 0 |
bench()
{
int i;
double d, a=1.1,b=123.0,c=0.12334;
double t0;
t0 = second();
for (i = 0; i<100000*multiplier; i++)
d = a*a*i - 4*b*c*i + b*i*b - c*i*i*c;
return (u_short)(second() - t0);
} | false | false | false | false | false | 0 |
match_gai_table(struct sockaddr *sa, const struct gai_table *tbl)
{
struct sockaddr_in *sin = (void *)sa;
struct sockaddr_in6 *sin6 = (void *)sa;
void *addr;
if (sa->sa_family == AF_INET) {
addr = v4mapped;
memcpy(v4mapped+12, &sin->sin_addr, NS_INADDRSZ);
} else
addr = &sin6->sin6_addr;
while (1) {
if ... | false | false | false | false | false | 0 |
nc_API(caller)
const char *caller;
{
char *nc_api=NULL;
nc_api = strstr(caller, "nc");
if (nc_api == caller)
return TRUE;
} | false | false | false | false | false | 0 |
get_encoding (const gchar * text, guint * start_text, gboolean * is_multibyte)
{
LocalIconvCode encoding;
guint8 firstbyte;
*is_multibyte = FALSE;
*start_text = 0;
firstbyte = (guint8) text[0];
/* A wrong value */
g_return_val_if_fail (firstbyte != 0x00, _ICONV_UNKNOWN);
if (firstbyte <= 0x0B) {
... | false | false | false | false | false | 0 |
stp_parameter_has_category_value(const stp_vars_t *v,
const stp_parameter_t *desc,
const char *category, const char *value)
{
char *cptr;
int answer = 0;
if (!v || !desc || !category)
return -1;
cptr = stp_parameter_get_category(v, desc, category);
if (cptr == NULL)
return 0;
if (value == ... | false | false | false | false | false | 0 |
pmcraid_send_hcam_cmd(struct pmcraid_cmd *cmd)
{
if (cmd->ioa_cb->ioarcb.cdb[1] == PMCRAID_HCAM_CODE_CONFIG_CHANGE)
atomic_set(&(cmd->drv_inst->ccn.ignore), 0);
else
atomic_set(&(cmd->drv_inst->ldn.ignore), 0);
pmcraid_send_cmd(cmd, cmd->cmd_done, 0, NULL);
} | false | false | false | false | false | 0 |
seahorse_object_lookup_property (SeahorseObject *self, const gchar *field, GValue *value)
{
GParamSpec *spec;
g_return_val_if_fail (SEAHORSE_IS_OBJECT (self), FALSE);
g_return_val_if_fail (field, FALSE);
g_return_val_if_fail (value, FALSE);
spec = g_object_class_find_property (G_OBJECT_GET_CLASS (self), field)... | false | false | false | false | false | 0 |
message_view_on_column_click(GtkTreeViewColumn * column, gpointer user_data)
{
gint column_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(column), "column id"));
message_view_t *view = (message_view_t *) user_data;
int dir = 0;
seaudit_sort_t *sort;
GtkTreeViewColumn *prev_column;
if (column_id == view->store->s... | false | false | false | false | false | 0 |
cgroup_config_unload_controller(const struct cgroup_mount_point *mount_info)
{
int ret, error;
struct cgroup *cgroup = NULL;
struct cgroup_controller *cgc = NULL;
char path[FILENAME_MAX];
void *handle;
cgroup = cgroup_new_cgroup(".");
if (cgroup == NULL)
return ECGFAIL;
cgc = cgroup_add_controller(cgroup, m... | false | false | false | false | false | 0 |
ar9003_get_training_power_2g(struct ath_hw *ah)
{
struct ath9k_channel *chan = ah->curchan;
unsigned int power, scale, delta;
scale = ar9003_get_paprd_scale_factor(ah, chan);
if (AR_SREV_9330(ah) || AR_SREV_9340(ah) ||
AR_SREV_9462(ah) || AR_SREV_9565(ah)) {
power = ah->paprd_target_power + 2;
} else if (... | false | false | false | false | false | 0 |
expand_number_all(char *s, int add_prefix)
{
int all_allowed = 0;
char *Ptr;
int Index = 0;
char Help[NUMBER_SIZE+1];
static char Num[NUMBER_SIZE+1];
Help[0] = '\0';
Ptr = s;
if (Ptr == NULL || Ptr[0] == '\0')
return "";
while(isblank(*Ptr))
Ptr++;
if (*Ptr == '+')
{
Strncpy(Help,countryprefix,... | false | false | false | false | false | 0 |
ldapu_get_values( LDAP *ld, LDAPMessage *entry, const char *desc )
{
if (ldapu_VTable.ldapuV_get_values) {
return ldapu_VTable.ldapuV_get_values (ld, entry, desc);
} else if (!ldapu_VTable.ldapuV_value_free
&& ldapu_VTable.ldapuV_get_values_len) {
auto struct berval** bvals =
ldapu_VTable.ldapuV_g... | false | false | false | false | false | 0 |
PK11_WriteRawAttribute(PK11ObjectType objType, void *objSpec,
CK_ATTRIBUTE_TYPE attrType, SECItem *item)
{
PK11SlotInfo *slot = NULL;
CK_OBJECT_HANDLE handle;
CK_ATTRIBUTE setTemplate;
CK_RV crv;
CK_SESSION_HANDLE rwsession;
switch (objType) {
case PK11_TypeGeneric:
slot = ((PK11Gener... | false | false | false | false | false | 0 |
help_command(const char *command_name,
int major_version, int minor_version,
const struct option *long_options)
{
std::cout << command_name << " " << major_version << "." << minor_version << std::endl;
std::cout << "Current options. A '=' means the option takes a va... | false | false | false | false | false | 0 |
oc_enc_sb_transform_quantize_intra_chroma(oc_enc_ctx *_enc,
oc_enc_pipeline_state *_pipe,int _pli,int _sbi_start,int _sbi_end){
const oc_sb_map *sb_maps;
oc_sb_flags *sb_flags;
ptrdiff_t *coded_fragis;
ptrdiff_t ncoded_fragis;
int sbi;
sb_maps=(const oc_sb_map *)_enc->state.sb... | false | false | false | false | false | 0 |
update_arrival_stats (RTPSession * sess, RTPArrivalStats * arrival,
gboolean rtp, GstBuffer * buffer, GstClockTime current_time,
GstClockTime running_time, guint64 ntpnstime)
{
/* get time of arrival */
arrival->current_time = current_time;
arrival->running_time = running_time;
arrival->ntpnstime = ntpn... | false | true | false | false | false | 1 |
initialize_savefile_support()
{
CYG_REPORT_FUNCNAME("CdlConfiguration::initialize_savefile_support");
CYG_REPORT_FUNCARG1XV(this);
CYG_PRECONDITION_THISC();
// Start with the generic stuff such as cdl_savefile_version and
// cdl_command.
this->CdlToplevelBody::initialize_savefile_support();... | false | false | false | false | false | 0 |
WriteErrorsToFile(std::string staFileName,
std::string staGdlFile, std::string staInputFontFile,
std::string staOutputFile, std::string staOutputFamily, std::string staVersion,
bool fSepCtrlFile)
{
std::ofstream strmOut;
strmOut.open(staFileName.c_str());
if (strmOut.fail())
{
g_errorList.AddError(106, NULL,
... | false | false | false | false | false | 0 |
gf_w4_log_divide (gf_t *gf, gf_val_32_t a, gf_val_32_t b)
{
int log_sum = 0;
struct gf_logtable_data *ltd;
if (a == 0 || b == 0) return 0;
ltd = (struct gf_logtable_data *) ((gf_internal_t *) (gf->scratch))->private;
log_sum = ltd->log_tbl[a] - ltd->log_tbl[b];
return (ltd->antilog_tbl_div[log_sum]);
... | false | false | false | false | false | 0 |
file_closer(ScmPort *p)
{
int fd = (int)(intptr_t)p->src.buf.data;
SCM_ASSERT(fd >= 0);
close(fd);
} | false | false | false | false | false | 0 |
systemId() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((NotationImpl*)impl)->systemId();
} | false | false | false | false | false | 0 |
file_skip(struct archive *a, void *client_data, off_t request)
#endif
{
struct read_FILE_data *mine = (struct read_FILE_data *)client_data;
(void)a; /* UNUSED */
/*
* If we can't skip, return 0 as the amount we did step and
* the caller will work around by reading and discarding.
*/
if ... | false | false | false | false | false | 0 |
getTracedRays(CSetOfLinesPtr &res) const {
if (!meshUpToDate) updateMesh();
size_t count=0;
for (size_t i=0;i<validityMatrix.getRowCount();i++) for (size_t j=0;j<validityMatrix.getColCount();j++) if (validityMatrix(i,j)) count++;
res->reserve(count);
for (size_t i=0;i<actualMesh.getRowCount();i++) for (size_t j=0;... | false | false | false | false | false | 0 |
entered_from_non_parent_p (ira_loop_tree_node_t loop_node)
{
ira_loop_tree_node_t bb_node, src_loop_node, parent;
edge e;
edge_iterator ei;
for (bb_node = loop_node->children; bb_node != NULL; bb_node = bb_node->next)
if (bb_node->bb != NULL)
{
FOR_EACH_EDGE (e, ei, bb_node->bb->preds)
if (e->src... | false | false | false | false | false | 0 |
connection_cb (GObject *object,
GAsyncResult *res,
gpointer user_data)
{
MyData *md = user_data;
GError *error = NULL;
md->connection = tracker_sparql_connection_get_finish (res, &error);
g_print ("Async connection took: %.6f\n", g_timer_elapsed (md->timer, NULL));
g_timer... | false | false | false | false | false | 0 |
dfb_surface_set_alpha_ramp( CoreSurface *surface,
u8 a0,
u8 a1,
u8 a2,
u8 a3 )
{
D_MAGIC_ASSERT( surface, CoreSurface );
if (fusion_skirmish_prevail( &surfac... | false | false | false | false | false | 0 |
CORD_iter_fn_rpos(char c, CORD_pos_info* info) {
if(info->pos < info->left){
info->pos=STRING_NOT_FOUND;
return 1;
}
if(strchr(info->chars, c))
return 1;
--(info->pos);
return 0;
} | false | false | false | false | false | 0 |
sparse_file_len(struct sparse_file *s, bool sparse, bool crc)
{
int ret;
int chunks = sparse_count_chunks(s);
int64_t count = 0;
struct output_file *out;
out = output_file_open_callback(out_counter_write, &count,
s->block_size, s->len, false, sparse, chunks, crc);
if (!out) {
return -1;
}
ret = write_all... | false | false | false | false | false | 0 |
acct_policy_start( Slapi_PBlock *pb ) {
acctPluginCfg *cfg;
void *plugin_id = get_identity();
/* Load plugin configuration */
if( acct_policy_load_config_startup( pb, plugin_id ) ) {
slapi_log_error( SLAPI_LOG_FATAL, PLUGIN_NAME,
"acct_policy_start failed to load configuration\n" );
return( CALLBACK_ERR );
... | false | false | false | false | false | 0 |
enet_protocol_handle_send_unsequenced (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData)
{
ENetPacket * packet;
enet_uint32 unsequencedGroup, index;
size_t dataLength;
if (command -> header.channelID >= peer -> channelCount ||
(peer -> state != ENET_PEER... | false | false | false | false | false | 0 |
verify_absent_1(struct cache_entry *ce,
enum unpack_trees_error_types error_type,
struct unpack_trees_options *o)
{
int len;
struct stat st;
if (o->index_only || o->reset || !o->update)
return 0;
len = check_leading_path(ce->name, ce_namelen(ce));
if (!len)
return 0;
else if (len > 0) {
char pat... | true | true | false | false | false | 1 |
cancelcb(void *cv, globus_io_handle_t *handlep, globus_result_t r)
{
globus_result_t s = GLOBUS_FAILURE;
char errmsg[MAXERRMSG];
CONNECTION *c = (CONNECTION *) cv;
if (loglevel > 3)
logit(LOG_DEBUG, "cancelcb: connection %X", c);
/*
* If we're quitting, we don't call into globus_io since the
... | false | false | false | false | false | 0 |
json_print_pwr_wghfreq_stats(struct activity *a, int curr, int tab,
unsigned long long itv)
{
int i, k;
struct stats_pwr_wghfreq *spc, *spp, *spc_k, *spp_k;
unsigned long long tis, tisfreq;
int sep = FALSE;
char cpuno[8];
if (!IS_SELECTED(a->options) || (a->nr <= 0))
goto close_json_markup;
json_ma... | true | true | false | false | false | 1 |
run ( const Context& context )
{
if ( !receivers.size() )
return;
while ( mouseparams.taste )
releasetimeslice();
mousevisible ( true );
do {
tdialogbox :: run ( );
int old = markedplayer;
if ( taste == ct_up && markedplayer > 0 )
markedplayer --;
if ( tas... | false | false | false | false | false | 0 |
ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
{
u32 rar_high;
u32 rar_entries = hw->mac.num_rar_entries;
/* Make sure we are using a valid rar index range */
if (rar >= rar_entries) {
hw_dbg(hw, "RAR index %d is out of range.\n", rar);
return IXGBE_ERR_INVALID_ARGUMENT;
}
rar_high = IXGBE_REA... | false | false | false | false | false | 0 |
cma_remove_id_dev(struct rdma_id_private *id_priv)
{
struct rdma_cm_event event;
enum rdma_cm_state state;
int ret = 0;
/* Record that we want to remove the device */
state = cma_exch(id_priv, RDMA_CM_DEVICE_REMOVAL);
if (state == RDMA_CM_DESTROYING)
return 0;
cma_cancel_operation(id_priv, state);
mutex_loc... | false | false | false | false | false | 0 |
canMoveUp() const
{
if (!m_CurrentView)
return false;
const QModelIndex idx = m_CurrentView->prescriptionListView()->currentIndex();
if (!idx.isValid())
return false;
if (idx.row() >= 1)
return true;
return false;
} | false | false | false | false | false | 0 |
clear_gc_stats(void)
{
int i;
for(i = 0; i < MAX_GEN_COUNT; i++)
memset(&gc_stats[i],0,sizeof(F_GC_STATS));
cards_scanned = 0;
decks_scanned = 0;
code_heap_scans = 0;
} | false | false | false | false | false | 0 |
composeDerivatives(const vector<expr_t> &dargs)
{
vector<expr_t> dNodes;
for (int i = 0; i < (int) dargs.size(); i++)
if (dargs.at(i) != 0)
dNodes.push_back(datatree.AddTimes(dargs.at(i),
datatree.AddFirstDerivExternalFunctionNode(symb_id, arguments, i+1)));
exp... | false | false | false | false | false | 0 |
test_partial_ipv4_tcp_msg(void)
{
int sk, received = 0;
sk = connect_tcp_socket("127.0.0.1");
g_assert_cmpint(sk, >=, 0);
change_msg(msg, 2, 20, '1');
send_msg(sk, msg, sizeof(msg), 1);
received = receive_message(sk, 10, sizeof(msg), NULL);
close(sk);
g_assert_cmpint(received, >=, sizeof(msg));
} | false | false | false | false | false | 0 |
handle_cli_config_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct cache_file_mtime *cfmtime;
char *prev = "", *completion_value = NULL;
int wordlen, which = 0;
switch (cmd) {
case CLI_INIT:
e->command = "config reload";
e->usage =
"Usage: config reload <filename.conf>\n"
" Re... | false | false | false | false | false | 0 |
vector_op_clog2(
vector* tgt, /*!< Pointer to vector to store results in */
const vector* src /*! Pointer to value to perform operation on */
) { PROFILE(VECTOR_OP_CLOG2);
bool retval;
ulong vall = 0;
ulong valh = 0;
if( vector_is_unknown( src ) ) {
retval = vector_set_to_x( tgt );
} els... | false | false | false | false | false | 0 |
mob_unlocktarget(struct mob_data *md,unsigned int tick)
{
nullpo_retr(0, md);
md->target_id = 0;
md->ud.attacktarget_lv = 0;
md->state.skillstate = MSS_IDLE;
md->next_walktime = tick + atn_rand()%3000 + 3000;
return 0;
} | false | false | false | false | false | 0 |
snd_cs4281_proc_init(struct cs4281 *chip)
{
struct snd_info_entry *entry;
if (! snd_card_proc_new(chip->card, "cs4281", &entry))
snd_info_set_text_ops(entry, chip, snd_cs4281_proc_read);
if (! snd_card_proc_new(chip->card, "cs4281_BA0", &entry)) {
entry->content = SNDRV_INFO_CONTENT_DATA;
entry->private_data ... | false | false | false | false | false | 0 |
bf_set_task_local(Var arglist, Byte next, void *vdata, Objid progr)
{ /* (ANY value) */
if (!is_wizard(progr)) {
free_var(arglist);
return make_error_pack(E_PERM);
}
Var v = var_ref(arglist.v.list[1]);
free_var(current_local);
current_local = v;
free_var(arglist);
return no_var_pack(... | false | false | false | false | false | 0 |
getNumPreds(const BasicBlock *BB) {
unsigned &NP = BBNumPreds[BB];
if (NP == 0)
NP = std::distance(pred_begin(BB), pred_end(BB))+1;
return NP-1;
} | false | false | false | false | false | 0 |
gameFinished() {
QSettings settings;
int count = settings.value("Current/Count").toInt();
int length = settings.value("Current/Length").toInt();
int msecs = settings.value("Current/Time").toInt();
m_clock->stop();
m_clock->setDisabled(true);
m_pause_action->setDisabled(true);
m_success->show();
m_scores->add... | false | false | false | false | false | 0 |
complete_connection (NMDevice *device,
NMConnection *connection,
const char *specific_object,
const GSList *existing_connections,
GError **error)
{
NMSettingBridge *s_bridge, *tmp;
guint32 i = 0;
char *name;
const GSList *iter;
gbo... | false | false | false | false | false | 0 |
getBoundingRect(const Window& wnd) const
{
Rect compRect;
Rect bounds(0, 0, 0, 0);
// measure all frame components
for(FrameList::const_iterator frame = d_frames.begin(); frame != d_frames.end(); ++frame)
{
compRect = (*frame).getComponentArea().getPixelRect(wnd)... | false | false | false | false | false | 0 |
m6800_get_reg(int regnum)
{
switch( regnum )
{
case REG_PC: return PC;
case M6800_PC: return m6800.pc.w.l;
case REG_SP: return S;
case M6800_S: return m6800.s.w.l;
case M6800_CC: return m6800.cc;
case M6800_A: return m6800.d.b.h;
case M6800_B: return m6800.d.b.l;
case M6800_X: return m6800.... | false | false | false | false | false | 0 |
compareFunction(ExecState* exec, JSValue* a, JSValue* b)
{
return (a == b || (b != 0 && a == 0) || (a && b && sameValue(exec, a, b)));
} | 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.