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 |
|---|---|---|---|---|---|---|
_glcpp_parser_expand_function (glcpp_parser_t *parser,
token_node_t *node,
token_node_t **last)
{
macro_t *macro;
const char *identifier;
argument_list_t *arguments;
function_status_t status;
token_list_t *substituted;
int parameter_index;
identifier = node->token->value.str;
ma... | false | false | false | false | false | 0 |
read_papers (void)
{
gchar *data_dir;
GList *papers = NULL;
data_dir = SYSTEM_CONFIG_DIR;
papers = read_paper_files_from_dir (papers, data_dir);
g_free (data_dir);
data_dir = USER_CONFIG_DIR;
papers = read_paper_files_from_dir (papers, data_dir);
g_free ... | false | false | false | false | false | 0 |
ceph_read_dir(struct file *file, char __user *buf, size_t size,
loff_t *ppos)
{
struct ceph_file_info *cf = file->private_data;
struct inode *inode = file_inode(file);
struct ceph_inode_info *ci = ceph_inode(inode);
int left;
const int bufsize = 1024;
if (!ceph_test_mount_opt(ceph_sb_to_client(inode->i_s... | false | false | false | false | false | 0 |
function_stack_trace_call(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *pt_regs)
{
struct trace_array *tr = op->private;
struct trace_array_cpu *data;
unsigned long flags;
long disabled;
int cpu;
int pc;
if (unlikely(!tr->function_enabled))
return;
/*
* Need to use... | false | false | false | false | false | 0 |
icomp_ixent(const void *a, const void *b) {
if ((a == NULL) || (b == NULL))
return 0;
if (((IXENT *)a)->offs < ((IXENT *)b)->offs)
return -1;
if (((IXENT *)a)->offs > ((IXENT *)b)->offs)
return 1;
return 0;
} | false | false | false | false | false | 0 |
xcbc_memory(int cipher,
const unsigned char *key, unsigned long keylen,
const unsigned char *in, unsigned long inlen,
unsigned char *out, unsigned long *outlen)
{
xcbc_state *xcbc;
int err;
/* is the cipher valid? */
if ((err = cipher_is_valid(ci... | false | false | false | false | false | 0 |
isProfitableToCSE(unsigned CSReg, unsigned Reg,
MachineInstr *CSMI, MachineInstr *MI) {
// FIXME: Heuristics that works around the lack the live range splitting.
// If CSReg is used at all uses of Reg, CSE should not increase register
// pressure of CSReg.
bool MayIncreasePre... | false | false | false | false | false | 0 |
CLogger(IEventReceiver* r)
: LogLevel(ELL_INFORMATION), Receiver(r)
{
#ifdef _DEBUG
setDebugName("CLogger");
#endif
} | false | false | false | false | false | 0 |
X509_STORE_set_default_paths(X509_STORE *ctx)
{
X509_LOOKUP *lookup;
lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_file());
if (lookup == NULL) return(0);
X509_LOOKUP_load_file(lookup,NULL,X509_FILETYPE_DEFAULT);
lookup=X509_STORE_add_lookup(ctx,X509_LOOKUP_hash_dir());
if (lookup == NULL) return(0);
X509_LOOK... | false | false | false | false | false | 0 |
endElementTable(const char *pszName)
{
if (stateStack[nStackDepth].nBeginDepth == nDepth)
{
CPLAssert(strcmp(pszName, "table:table") == 0);
if (nCurLine == 0 ||
(nCurLine == 1 && apoFirstLineValues.size() == 0))
{
/* Remove empty sheet */
delete poCur... | false | false | false | false | false | 0 |
vpi_set_vlog_info(int argc, char** argv)
{
static char icarus_product[] = "Icarus Verilog";
static char icarus_version[] = VERSION;
vpi_vlog_info.product = icarus_product;
vpi_vlog_info.version = icarus_version;
vpi_vlog_info.argc = argc;
vpi_vlog_info.argv = argv;
static char trace_b... | false | false | false | false | true | 1 |
CropTo( const gnLocation &l )
{
gnSeqI tmp;
gnSeqI start = l.GetStart();
gnSeqI end = l.GetEnd();
if(m_start < start){
tmp = start < m_end ? start : m_end;
m_startLength += tmp - m_start;
m_start = tmp;
}
if(m_end < end){
tmp = end > m_start ? end : m_start;
m_endLength += m_end - tmp;
m_end = tmp;
}... | false | false | false | false | false | 0 |
beiscsi_bindconn_cid(struct beiscsi_hba *phba,
struct beiscsi_conn *beiscsi_conn,
unsigned int cid)
{
uint16_t cri_index = BE_GET_CRI_FROM_CID(cid);
if (phba->conn_table[cri_index]) {
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
"BS_%d : Connection table already occupied. Detected clash\n");
r... | false | false | false | false | false | 0 |
static_update (int value, gamgi_window *window)
{
int range_new[6], range[6];
/**********************************************
* import GTK data, return if data is invalid *
**********************************************/
if (static_get (range_new, window) == FALSE) return FALSE;
/**********************************... | false | false | false | false | false | 0 |
nesting_copy_decl (tree decl, copy_body_data *id)
{
struct nesting_copy_body_data *nid = (struct nesting_copy_body_data *) id;
void **slot = pointer_map_contains (nid->root->var_map, decl);
if (slot)
return (tree) *slot;
if (TREE_CODE (decl) == TYPE_DECL && DECL_ORIGINAL_TYPE (decl))
{
tree new_... | false | false | false | false | false | 0 |
repair_acsc(TERMTYPE *tp)
{
if (VALID_STRING(acs_chars)) {
size_t n, m;
char mapped[256];
char extra = 0;
unsigned source;
unsigned target;
bool fix_needed = FALSE;
for (n = 0, source = 0; acs_chars[n] != 0; n++) {
target = UChar(acs_chars[n]);
if (source >= target) {
fix_needed = TRUE;
break;... | true | true | false | false | true | 1 |
gst_asf_payload_queue_for_stream (GstASFDemux * demux, AsfPayload * payload,
AsfStream * stream)
{
GST_DEBUG_OBJECT (demux, "Got payload for stream %d ts:%" GST_TIME_FORMAT,
stream->id, GST_TIME_ARGS (payload->ts));
/* make timestamps start from 0; first_ts will be determined during activation (once we h... | false | false | false | false | false | 0 |
OptimizeFunctions(Module &M) {
bool Changed = false;
// Optimize functions.
for (Module::iterator FI = M.begin(), E = M.end(); FI != E; ) {
Function *F = FI++;
// Functions without names cannot be referenced outside this module.
if (!F->hasName() && !F->isDeclaration())
F->setLinkage(GlobalValue... | false | false | false | false | false | 0 |
pre_0(const EL_INFO *el_info, const DOWB_FILL_INFO *info)
{
int i, j;
DECL_SOMEVAR(val);
DECL_DOWB_C(c);
const REAL **values;
DOWBM_TYPE type = info->type;
ASSIGN_MAT(mat, info->element_matrix);
GET_VALUES(type, c, info->c, (el_info, info->quad[0], 0, info->user_data));
values = info->q0... | false | false | false | false | false | 0 |
gdCacheDelete(gdCache_head_t *head)
{
gdCache_element_t *elem, *prev;
elem = head->mru;
while(elem) {
(*(head->gdCacheRelease))(elem->userdata);
prev = elem;
elem = elem->next;
gdFree((char *)prev);
}
gdFree((char *)head);
} | false | false | false | false | false | 0 |
update_player_armor_class()
{
Me.armor_class = 0;
item *protective_equipment[] = {
&Me.armour_item,
&Me.shield_item,
&Me.special_item,
&Me.drive_item,
};
int i;
for (i = 0; i < sizeof(protective_equipment)/sizeof(protective_equipment[0]); i++) {
if (protective_equipment[i]->type != -1) {
Me.armor_c... | false | false | false | false | false | 0 |
_gnutls_handshake_hash_buffers_clear (gnutls_session_t session)
{
if (session->security_parameters.handshake_mac_handle_type ==
HANDSHAKE_MAC_TYPE_10)
{
_gnutls_hash_deinit (&session->internals.handshake_mac_handle.tls10.md5,
NULL);
_gnutls_hash_deinit (&session->inter... | false | false | false | false | false | 0 |
ComputeDirectoryRecordsOffset(const SequenceOfItems *sqi, VL start)
{
SequenceOfItems::SizeType nitems = sqi->GetNumberOfItems();
std::vector<uint32_t> &offsets = Internals->OffsetTable;
Internals->OffsetTable.resize( nitems + 1 );
offsets[0] = start;
for(SequenceOfItems::SizeType i = 1; i <= nitems; ++i)
... | false | false | false | false | false | 0 |
generate_broadcast_aggregator_type(int type_id, gm_code_writer& Body, int reduce_op)
{
//--------------------------------------
// Generate following string
// <Type><Reduce>BV( value )
//--------------------------------------
// Generate following string
if (gm_is_collection_type(type_id))
... | false | false | false | false | false | 0 |
pam_passthru_delete_configEntry(PRCList *entry)
{
PR_REMOVE_LINK(entry);
pam_passthru_free_config_entry((Pam_PassthruConfig **) &entry);
} | false | false | false | false | false | 0 |
cnic_init_bnx2x_irq(struct cnic_dev *dev)
{
struct cnic_local *cp = dev->cnic_priv;
struct cnic_eth_dev *ethdev = cp->ethdev;
int err = 0;
tasklet_init(&cp->cnic_irq_task, cnic_service_bnx2x_bh,
(unsigned long) dev);
if (ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
err = cnic_request_irq(dev);
return... | false | false | false | false | false | 0 |
udcm_rc_qps_to_rts(mca_btl_openib_endpoint_t *lcl_ep)
{
int rc;
for (int qp = 0 ; qp < mca_btl_openib_component.num_qps ; ++qp) {
if (lcl_ep->qps[qp].qp->lcl_qp->state == IBV_QPS_RTS) {
continue;
}
rc = udcm_rc_qp_to_rtr (lcl_ep, qp);
if (OPAL_UNLIKELY(OMPI_SUCCESS ... | false | false | false | false | false | 0 |
GetDrawableText( ExXML &xml )
{
double x;
xml.GetPropertyValue(wxT("x")).ToDouble( &x );
double y;
xml.GetPropertyValue(wxT("y")).ToDouble( &y );
double height;
xml.GetPropertyValue(wxT("height")).ToDouble( &height );
double angle;
xml.GetPropertyValue(wxT("angle")).ToDouble( &angle );
long int tmp;
... | false | false | false | false | false | 0 |
SxLib2MACRO()
{
/* Shift the cell so that the AB is at (0,0). */
shiftphfig (LV_phfig, -LV_phfig->XAB1, -LV_phfig->YAB1);
LV_pMACRO = allocMACRO(LV_phfig->NAME);
if ( strncmp(LV_phfig->NAME, "tie_", 4)
&& strncmp(LV_phfig->NAME, "rowend_", 4))
LV_pMACRO->CLASS = C_CLASS_CORE;
else
LV_p... | false | false | false | false | false | 0 |
sdhci_pci_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct sdhci_pci_chip *chip;
struct sdhci_pci_slot *slot;
int i, ret;
chip = pci_get_drvdata(pdev);
if (!chip)
return 0;
if (chip->fixes && chip->fixes->resume) {
ret = chip->fixes->resume(chip);
if (ret)
return ret;
}
f... | false | false | false | false | false | 0 |
pd_unref_action_data (ParserData *pd)
{
g_free (pd->action_id);
pd->action_id = NULL;
g_free (pd->vendor);
pd->vendor = NULL;
g_free (pd->vendor_url);
pd->vendor_url = NULL;
g_free (pd->icon_name);
pd->icon_name = NULL;
g_free (pd->policy_description_nolang);
pd->policy_description_nolang = NULL;
... | false | false | false | false | false | 0 |
userTextsFunctions( CfgEntry *e, const CfgConfig &cfg, QString itemVarStr=QString(), QString i=QString() )
{
QString txt;
if (itemVarStr.isNull()) itemVarStr=itemPath(e, cfg);
if ( !e->label().isEmpty() ) {
txt += " " + itemVarStr + "->setLabel( ";
if ( !e->labelContext().isEmpty() )
txt += "i18nc(... | false | false | false | false | false | 0 |
gt_pch_p_9eh_status (ATTRIBUTE_UNUSED void *this_obj,
void *x_p,
ATTRIBUTE_UNUSED gt_pointer_operator op,
ATTRIBUTE_UNUSED void *cookie)
{
struct eh_status * x ATTRIBUTE_UNUSED = (struct eh_status *)x_p;
if ((void *)(x) == this_obj)
op (&((*x).region_tree), cookie);
if ((void *)(x) == this_obj)
op (&((... | false | false | false | false | false | 0 |
Scm_MTInitByUI(ScmMersenneTwister *mt, unsigned long s)
{
int mti;
mt->mt[0]= s & 0xffffffffUL;
for (mti=1; mti<N; mti++) {
mt->mt[mti] =
(1812433253UL * (mt->mt[mti-1] ^ (mt->mt[mti-1] >> 30)) + mti);
/* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
/* In the previous ... | false | false | false | false | false | 0 |
GNUNET_DISK_file_size (const char *filename, uint64_t * size,
int includeSymLinks, int singleFileMode)
{
struct GetFileSizeData gfsd;
int ret;
GNUNET_assert (size != NULL);
gfsd.total = 0;
gfsd.include_sym_links = includeSymLinks;
gfsd.single_file_mode = singleFileMode;
ret = getSi... | false | false | false | false | false | 0 |
getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<AliasAnalysis>();
AU.addPreserved<AliasAnalysis>();
AU.addRequired<LiveVariables>();
AU.addPreserved<LiveVariables>();
AU.addRequired<MachineLoopInfo>();
AU.addPreserved<MachineLoopInfo>();
AU.addPreservedID(MachineDominato... | false | false | false | false | false | 0 |
setGridParameterData(int nof_ids, int* gids, int* mesh_indices)
{
nofGridParameterIds = nof_ids;
delete[] gridParameterIds;
delete[] gridParameterMeshIndices;
gridParameterIds = NULL;
gridParameterMeshIndices = NULL;
if ( nof_ids == 0 )
return;
gridParameterIds = new int[nof_ids];
gridParameterM... | false | false | false | false | false | 0 |
fttlv_enc_uint32(void *buf, int buf_size, int flip, u_int16 t, u_int32 v)
{
u_int16 len;
if (buf_size < 8)
return -1;
len = 4;
if (flip) {
SWAPINT16(t);
SWAPINT16(len);
SWAPINT32(v);
}
bcopy(&t, buf, 2);
buf = (char*)buf + 2;
bcopy(&len, buf, 2);
buf = (char*)buf + 2;
bcopy... | false | true | false | false | false | 1 |
gs_init_normbuff(geosurf * gs)
{
long size;
if (!gs) {
return (0);
}
if (gs->norms) {
G_free(gs->norms);
}
size = gs->rows * gs->cols * sizeof(unsigned long);
gs->norms = (unsigned long *)G_malloc(size); /* G_fatal_error */
if (!gs->norms) {
return (-1);
}
gs->norm_needup... | false | false | false | false | false | 0 |
ina226_show_interval(struct device *dev,
struct device_attribute *da, char *buf)
{
struct ina2xx_data *data = dev_get_drvdata(dev);
int status;
unsigned int regval;
status = regmap_read(data->regmap, INA2XX_CONFIG, ®val);
if (status)
return status;
return snprintf(buf, PAGE_SIZE, "%d\n", ina226_reg... | false | false | false | false | false | 0 |
initData() {
bitsPerItem = bits(maxValue);
uintLength = uint_len(length,bitsPerItem);
data = new uint[uintLength];
for(size_t i=0;i<uintLength;i++)
data[i] = 0;
} | false | false | false | false | false | 0 |
reclaim_pages(struct mlx5_core_dev *dev, u32 func_id, int npages,
int *nclaimed)
{
struct mlx5_manage_pages_inbox in;
struct mlx5_manage_pages_outbox *out;
int num_claimed;
int outlen;
u64 addr;
int err;
int i;
if (nclaimed)
*nclaimed = 0;
memset(&in, 0, sizeof(in));
outlen = sizeof(*out) + npages *... | false | false | false | false | false | 0 |
ustop(void)
{
unmac();
if (recmac) {
struct recmac *r = recmac;
MACRO *m;
dostaupd = 1;
recmac = r->next;
if (kbdmacro[r->n])
rmmacro(kbdmacro[r->n]);
kbdmacro[r->n] = r->m;
if (recmac)
record(m = mkmacro(r->n + '0', 1, 0, findcmd(US "play"))), rmmacro(m);
joe_free(r);
}
return 0;
} | false | false | false | false | false | 0 |
get_alarm_packet(void) {
int length, fromlen, n, i;
struct sockaddr_in from;
struct sockaddr_in server;
if ( pcount == 0 ) {
// If it's the first packet, we must establish a UDP socket.
udp_sock=socket(AF_INET, SOCK_DGRAM, 0);
if (udp_sock < 0) {
log_message(1, "Error opening UDP socket");
... | false | false | false | false | false | 0 |
on_copy_action_activate (GtkAction *action, GladeWindow *window)
{
GladeProject *project;
if (!window->priv->active_view)
return;
project = glade_design_view_get_project (window->priv->active_view);
glade_project_copy_selection (project);
} | false | false | false | false | false | 0 |
_sess_open(netsnmp_session * in_session)
{
netsnmp_transport *transport = NULL;
int rc;
in_session->s_snmp_errno = 0;
in_session->s_errno = 0;
_init_snmp();
{
char *clientaddr_save = NULL;
if (NULL != in_session->localname) {
clientaddr_save =
nets... | false | false | false | false | false | 0 |
wait_status_all(struct dlm_ls *ls, uint32_t wait_status,
int save_slots)
{
struct dlm_rcom *rc = ls->ls_recover_buf;
struct dlm_member *memb;
int error = 0, delay;
list_for_each_entry(memb, &ls->ls_nodes, list) {
delay = 0;
for (;;) {
if (dlm_recovery_stopped(ls)) {
error = -EINTR;
goto out;
... | false | false | false | false | false | 0 |
hkl_parameter_new(char const *name,
double min, double value, double max,
int fit, int changed,
HklUnit const *unit, HklUnit const *punit)
{
HklParameter *parameter;
parameter = HKL_MALLOC(HklParameter);
if (hkl_parameter_init(parameter,
name, min, value, max,
fit, changed,
... | false | false | false | false | false | 0 |
write(const void *buf, offile_off_t buflen)
{
if (status_.bad() || (current_ == NULL)) return 0;
// flush output buffer if necessary
if (outputBufCount_ == DCMZLIBOUTPUTFILTER_BUFSIZE) flushOutputBuffer();
// compress pending input from input buffer
while (status_.good() && inputBufCount_ > 0 && outputBufCo... | false | false | false | false | false | 0 |
pollups(utype_t *ups)
{
char status[SMALLBUF];
/* try a reconnect here */
if (!flag_isset(ups->status, ST_CONNECTED))
if (try_connect(ups) != 1)
return;
if (upscli_ssl(&ups->conn) == 1)
upsdebugx(2, "%s: %s [SSL]", __func__, ups->sys);
else
upsdebugx(2, "%s: %s", __func__, ups->sys);
set_alarm();
if... | false | false | false | false | false | 0 |
GDALHillshadeAlg (float* afWin, float fDstNoDataValue, void* pData)
{
GDALHillshadeAlgData* psData = (GDALHillshadeAlgData*)pData;
double x, y, aspect, xx_plus_yy, cang;
// First Slope ...
x = ((afWin[0] + afWin[3] + afWin[3] + afWin[6]) -
(afWin[2] + afWin[5] + afWin[5] + afWin[8])) / psDa... | false | false | false | false | false | 0 |
produce ()
{
register int k = 0;
char *comm;
BKey produced_object;
char *initial_selection = "";
int tfd = open ("...__tt", O_RDONLY | O_CREAT, S_IRUSR);
struct stat sbuf;
touch_time = time ((time_t *)0); /* used in execute_commands */
if (tfd >= 0) {
unlink ("...__tt");
fstat (tfd, &sbuf);
... | false | false | false | false | true | 1 |
__db_print_stats(dbp, ip, flags)
DB *dbp;
DB_THREAD_INFO *ip;
u_int32_t flags;
{
DBC *dbc;
ENV *env;
int ret, t_ret;
env = dbp->env;
/* Acquire a cursor. */
if ((ret = __db_cursor(dbp, ip, NULL, &dbc, 0)) != 0)
return (ret);
DEBUG_LWRITE(dbc, NULL, "DB->stat_print", NULL, NULL, 0);
switch (dbp->type) {... | false | false | false | false | false | 0 |
ivtv_setsda_old(void *data, int state)
{
struct ivtv *itv = (struct ivtv *)data;
if (state)
itv->i2c_state |= 0x01;
else
itv->i2c_state &= ~0x01;
/* write them out */
/* write bits are inverted */
write_reg(~itv->i2c_state, IVTV_REG_I2C_SETSDA_OFFSET);
} | false | false | false | false | false | 0 |
pattern_toggled (GtkWidget * widget, GladeLabelEditor * label_editor)
{
GladeLabelEditorPrivate *priv = label_editor->priv;
GladeProperty *property;
GladeWidget *gwidget = glade_editable_loaded_widget (GLADE_EDITABLE (label_editor));
if (glade_editable_loading (GLADE_EDITABLE (label_editor)) || !gwidget)
... | false | false | false | false | false | 0 |
checkRightThis(Scope *sc, Expression *e)
{
if (e->op == TOKvar && e->type->ty != Terror)
{
VarExp *ve = (VarExp *)e;
if (isNeedThisScope(sc, ve->var))
{
//printf("checkRightThis sc->intypeof = %d, ad = %p, func = %p, fdthis = %p\n",
// sc->intypeof, sc->get... | false | false | false | false | false | 0 |
gst_caps_new_empty (void)
{
GstCaps *caps = g_slice_new (GstCaps);
caps->type = GST_TYPE_CAPS;
caps->refcount = 1;
caps->flags = GST_CAPS_FLAGS_NONE;
caps->structs = g_ptr_array_new ();
/* the 32 has been determined by logging caps sizes in _gst_caps_free
* but g_ptr_array uses 16 anyway if it expands o... | false | false | false | false | false | 0 |
key_press(guint keyval, gchar *commit_str, gchar *preedit_str)
{
guint richting=0;
if(board_paused)
return FALSE;
if (threeDactive) return key_press_3D(keyval, commit_str, preedit_str);
if (modeRelative) return key_press_2D_relative(keyval, commit_str, preedit_str);
switch (keyval)
{
case GDK_... | false | false | false | false | false | 0 |
_ml_P_FileSys_getcwd (ml_state_t *msp, ml_val_t arg)
{
char path[MAXPATHLEN];
char* sts;
ml_val_t p;
int buflen;
char *buf;
sts = getcwd(path, MAXPATHLEN);
if (sts != NIL(char *))
return ML_CString (msp, path);
if (errno != ERANGE)
return RAISE_SYSERR(msp, sts);
... | false | false | false | false | false | 0 |
g_vfs_afp_volume_rename_finish (GVfsAfpVolume *volume,
GAsyncResult *res,
GError **error)
{
GSimpleAsyncResult *simple;
g_return_val_if_fail (g_simple_async_result_is_valid (res, G_OBJECT (volume),
... | false | false | false | false | false | 0 |
reset_rdn_avs( struct berval **rdn_avsp, int *rdn_av_countp )
{
if ( *rdn_av_countp > SLAPI_DNNORM_INITIAL_RDN_AVS ) {
slapi_ch_free( (void **)rdn_avsp );
}
*rdn_avsp = NULL;
*rdn_av_countp = 0;
} | false | false | false | false | false | 0 |
vpe_probe(struct platform_device *pdev)
{
struct vpe_dev *dev;
int ret, irq, func;
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;
spin_lock_init(&dev->lock);
ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
if (ret)
return ret;
atomic_set(&dev->num_instances, ... | false | false | false | false | false | 0 |
gres_plugin_node_state_pack(List gres_list, Buf buffer,
char *node_name)
{
int rc = SLURM_SUCCESS;
uint32_t top_offset, tail_offset;
uint32_t magic = GRES_MAGIC;
uint16_t rec_cnt = 0;
uint8_t has_bitmap;
ListIterator gres_iter;
gres_state_t *gres_ptr;
gres_node_state_t *gres_node_ptr;
if (gres_lis... | false | false | false | false | false | 0 |
dump_on_rq_timestamp(void)
{
ulong runq;
char buf[BUFSIZE];
char format[15];
struct syment *rq_sp;
struct task_context *tc;
int cpu, len, indent;
ulonglong timestamp;
indent = runq = 0;
if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
error(FATAL, "per-cpu runqueues do not exist\n");
for (cpu ... | false | false | false | false | false | 0 |
InsertEdge(vtkIdType p1, vtkIdType p2)
{
vtkIdType index, search;
if ( p1 < p2 )
{
index = p1;
search = p2;
}
else
{
index = p2;
search = p1;
}
if ( index >= this->TableSize )
{
this->Resize(index+1);
}
if ( index > this->TableMaxId )
{
this->TableMaxId... | false | false | false | false | false | 0 |
variableWrapper(Node *n) {
/* NEW LANGUAGE NOTE:***********************************************
Language::variableWrapper(n) will generate two wrapper fns
Foo_get & Foo_set by calling functionWrapper()
so we will just add these into the variable lists
ideally we should not have registered these as f... | false | false | false | false | false | 0 |
skge_tx_clean(struct net_device *dev)
{
struct skge_port *skge = netdev_priv(dev);
struct skge_element *e;
for (e = skge->tx_ring.to_clean; e != skge->tx_ring.to_use; e = e->next) {
struct skge_tx_desc *td = e->desc;
td->control = 0;
}
skge->tx_ring.to_clean = e;
} | false | false | false | false | false | 0 |
Do()
{
int m=STALL;
if(ch!=NOCHAR)
return m;
int oldfl=fcntl(fd,F_GETFL);
if(!(oldfl&O_NONBLOCK))
fcntl(fd,F_SETFL,oldfl|O_NONBLOCK);
unsigned char c;
int res=read(fd,&c,1);
if(res==-1 && errno==EAGAIN)
Block(fd,POLLIN);
else if(res==-1 && errno==EINTR)
m=MOVED;
else... | false | false | false | false | false | 0 |
sd_dq_callback(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
/* Set the normal compression settings once we have captured a
few uncompressed frames (and AEC has hopefully settled) */
if (sd->first_frame) {
sd->first_frame--;
if (sd->first_frame == 0)
command_setcompression(gspca... | false | false | false | false | false | 0 |
__ecereProp___ecereNameSpace__ecere__gui__controls__EditBoxStream_Set_editBox(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * value)
{
struct __ecereNameSpace__ecere__gui__controls__EditBoxStream * __ecerePointer___ecereNameSpace__ecere__gui__controls__EditBoxStream... | false | false | false | true | false | 1 |
new_circle_chain(struct state *st)
{
Circle *head;
double scale = 1.0, factor;
int n;
/* Parent circles are larger than their children by a factor of at
* least FACTOR_MIN and at most FACTOR_MAX.
*/
factor = st->sizeFactorMin + frand(st->sizeFactorMax - st->sizeFactorMin);
/* There are between min... | false | false | false | false | false | 0 |
flushCxnCbk (TimeoutId id, void *data)
{
Connection cxn = (Connection) data ;
ASSERT (id == cxn->flushTimerId) ;
VALIDATE_CONNECTION (cxn) ;
cxn->flushTimerId = 0 ;
if (!(cxn->state == cxnFeedingS || cxn->state == cxnConnectingS ||
cxn->state == cxnIdleS))
{
warn ("%s:%d cxnsleep connecti... | false | false | false | false | false | 0 |
isNonInStatementArrayBracket() const
{
bool returnVal = false;
char nextChar = peekNextChar();
// if this opening bracket begins the line there will be no inStatement indent
if (currentLineBeginsWithBracket
&& charNum == (int) currentLineFirstBracketNum
&& nextChar != '}')
returnVal = true;
// ... | false | false | false | false | false | 0 |
p_filesel_ok_callback (GtkWidget *widget,
gpointer data)
{
WrCurveDialog *wcd;
wr_curves_val_t cuvals;
wcd = (WrCurveDialog *) data;
if(wcd->filesel == NULL) return;
if(wcd->filename) g_free(wcd->filename);
wcd->filename = g_strdup(gtk_file_selection_get_filename (GTK_FILE_SE... | false | false | false | false | false | 0 |
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
NMSettingGsm *setting = NM_SETTING_GSM (object);
switch (prop_id) {
case PROP_NUMBER:
g_value_set_string (value, nm_setting_gsm_get_number (setting));
break;
case PROP_USERNAME:
g_value_set_string (value, nm_setting_gsm_g... | false | false | false | false | false | 0 |
qual_is_redundant(PlannerInfo *root,
RestrictInfo *restrictinfo,
List *restrictlist)
{
Node *newleft;
Node *newright;
List *oldquals;
ListCell *olditem;
List *equalexprs;
bool someadded;
/* Never redundant unless vars appear on both sides */
if (bms_is_empty(restrictinfo->left_relids... | false | false | false | false | false | 0 |
eb_exact_match_word_kana_group(const char *word, const char *pattern,
size_t length)
{
int i = 0;
unsigned char *word_p = (unsigned char *)word;
unsigned char *pattern_p = (unsigned char *)pattern;
unsigned char wc0, wc1, pc0, pc1;
int result;
LOG(("in: eb_exact_match_word_kana_group(word=%... | false | false | false | false | false | 0 |
pages_unmap(void *addr, size_t size)
{
if (munmap(addr, size) == -1) {
char buf[BUFERROR_BUF];
buferror(errno, buf, sizeof(buf));
malloc_write("<jemalloc>: Error in munmap(): ");
malloc_write(buf);
malloc_write("\n");
if (opt_abort)
abort();
}
} | false | false | false | false | false | 0 |
clar__assert_equal_i(
int i1,
int i2,
const char *file,
int line,
const char *err,
int should_abort)
{
if (i1 != i2) {
char buf[128];
snprint_eq(buf, sizeof(buf), "%d != %d", i1, i2);
clar__fail(file, line, err, buf, should_abort);
}
} | true | true | false | false | false | 1 |
process_request(struct connection *conn) {
struct iobuf *io = &conn->ns_conn->recv_iobuf;
try_parse(conn);
DBG(("%p %d %d %d [%.*s]", conn, conn->request_len, io->len,
conn->ns_conn->flags, io->len, io->buf));
if (conn->request_len < 0 ||
(conn->request_len > 0 && !is_valid_uri(conn->mg_conn.uri))... | false | false | false | false | false | 0 |
readEntry(const QDomElement &e, const QString &name, QString *v)
{
QDomElement tag = e.firstChildElement(name);
if(tag.isNull())
return;
*v = tagContent(tag);
} | false | false | false | false | false | 0 |
popup_icon_menu (GtkToggleButton *button, UmPhotoDialog *um)
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)) && !gtk_widget_get_visible (um->photo_popup)) {
gtk_menu_popup (GTK_MENU (um->photo_popup),
NULL, NULL,
(Gt... | false | false | false | false | false | 0 |
fuzq_eq(Query *self, Query *o)
{
FuzzyQuery *fq1 = FzQ(self);
FuzzyQuery *fq2 = FzQ(o);
return (strcmp(fq1->term, fq2->term) == 0)
&& (fq1->field == fq2->field)
&& (fq1->pre_len == fq2->pre_len)
&& (fq1->min_sim == fq2->min_sim);
} | false | false | false | false | false | 0 |
renewPrinter()
{
if (m_Printer) {
delete m_Printer;
m_Printer=0;
}
m_Printer = new QPrinter;
m_Printer->setColorMode(QPrinter::ColorMode(settings()->value(Constants::S_COLOR_PRINT).toInt()));
m_Printer->setPageSize(QPrinter::A4);
} | false | false | false | false | false | 0 |
gst_value_compare_double_range (const GValue * value1, const GValue * value2)
{
if (value2->data[0].v_double == value1->data[0].v_double &&
value2->data[0].v_double == value1->data[0].v_double)
return GST_VALUE_EQUAL;
return GST_VALUE_UNORDERED;
} | false | false | false | false | false | 0 |
ajQueryClear(AjPQuery thys)
{
AjPQueryField field = NULL;
void *result;
ajStrSetClear(&thys->SvrName);
ajStrSetClear(&thys->DbName);
ajStrSetClear(&thys->DbAlias);
ajStrSetClear(&thys->DbType);
while(ajListPop(thys->QueryFields, (void **) &field))
ajQueryfieldDel(&field);
whil... | false | false | false | false | false | 0 |
itab_free(itab_ty *itp)
{
itab_key_ty j;
trace(("itab_free(itp = %p)\n{\n", itp));
for (j = 0; j < itp->hash_modulus; ++j)
{
itab_row_ty **rpp;
rpp = &itp->hash_table[j];
while (*rpp)
{
itab_row_ty *rp;
rp = *rpp;
*rpp = ... | false | false | false | false | false | 0 |
EnvFacts(
void *theEnv,
char *logicalName,
void *vTheModule,
long start,
long end,
long max)
{
struct fact *factPtr;
long count = 0;
struct defmodule *oldModule, *theModule = (struct defmodule *) vTheModule;
int allModules = FALSE;
/*==========================*/
/* Save the current modu... | false | false | false | false | false | 0 |
ShutdownExprContext(ExprContext *econtext)
{
ExprContext_CB *ecxt_callback;
MemoryContext oldcontext;
/* Fast path in normal case where there's nothing to do. */
if (econtext->ecxt_callbacks == NULL)
return;
/*
* Call the callbacks in econtext's per-tuple context. This ensures that
* any memory they might... | false | false | false | false | false | 0 |
QuickLoad( MemBuffer &file ) {
int rc = -1;
// read game info
if ( (file.Read32() == FID_MISSION) && (file.Read8() == FILE_VERSION) ) {
flags = file.Read16();
turn = file.Read16();
name = file.Read8();
level_info = file.Read8();
campaign_name = file.Read8();
campaign_info = file.Read8();... | false | false | false | false | false | 0 |
IL_create_bitmask(struct interp_params *params)
/** Creates a bitmap mask from given raster map **/
{
int i, j, cfmask = 0, irev, MASKfd;
char *mapsetm;
CELL *cellmask, *MASK;
struct BM *bitmask;
if ((MASKfd = G_maskfd()) >= 0)
MASK = G_allocate_cell_buf();
else
MASK = NULL;
if (params-... | false | false | false | false | false | 0 |
mg_globallights( LmLighting *lm, int worldbegin )
{
LtLight *lt, **lp;
HPoint3 oldpos;
int i;
for (i = 0, lp = &lm->lights[0]; i < AP_MAXLIGHTS && *lp != NULL; i++, lp++) {
lt = *lp;
oldpos = lt->globalposition;
switch(lt->location) {
case LTF_GLOBAL:
lt->globalposition = lt->position;
... | false | false | false | false | false | 0 |
save_parm_insns (rtx insn, rtx first_nonparm_insn)
{
if (insn == NULL_RTX)
return;
for (insn = NEXT_INSN (insn); insn; insn = NEXT_INSN (insn))
{
if (insn == first_nonparm_insn)
in_nonparm_insns = 1;
if (INSN_P (insn))
{
/* Record what interesting things happen to our parameters. */
n... | false | false | false | false | false | 0 |
set(const TCHAR* text, const int32_t start, const int32_t end, const TCHAR* typ){
_startOffset = start;
_endOffset = end;
_type = (typ==NULL?getDefaultType():typ);
positionIncrement = 1;
setText(text);
} | false | false | false | false | false | 0 |
save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
const GLvoid * string)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = alloc_instruction(ctx, OPCODE_PROGRAM_STRING_ARB, 3 + POINTER_DWORDS);
if (n) {
GLubyte *programCopy... | false | false | false | false | false | 0 |
_Xi18nDeleteClient (Xi18n i18n_core, CARD16 connect_id)
{
Xi18nClient *target = _Xi18nFindClient (i18n_core, connect_id);
Xi18nClient *ccp;
Xi18nClient *ccp0;
for (ccp = i18n_core->address.clients, ccp0 = NULL;
ccp != NULL;
ccp0 = ccp, ccp = ccp->next)
{
if (ccp == target)... | false | false | false | false | false | 0 |
_elm_frame_smart_calculate(Evas_Object *obj)
{
ELM_FRAME_DATA_GET(obj, sd);
if (ELM_LAYOUT_DATA(sd)->needs_size_calc)
{
/* calling OWN sizing evaluate code here */
_sizing_eval(obj, sd);
ELM_LAYOUT_DATA(sd)->needs_size_calc = EINA_FALSE;
}
} | false | false | false | false | false | 0 |
gf_isom_sdp_track_get(GF_ISOFile *the_file, u32 trackNumber, const char **sdp, u32 *length)
{
GF_TrackBox *trak;
GF_UserDataMap *map;
GF_HintTrackInfoBox *hnti;
GF_SDPBox *sdpa;
*sdp = NULL;
*length = 0;
trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak) return GF_BAD_PARAM;
if (!trak->udt... | false | false | false | false | false | 0 |
compri(struct data * a, struct data * b)
{
apr_interval_time_t p = a->time - a->ctime;
apr_interval_time_t q = b->time - b->ctime;
if (p < q)
return -1;
if (p > q)
return +1;
return 0;
} | false | false | false | false | false | 0 |
store_file_shutdown(void)
{
if (filename == NULL)
return;
active = 0;
gwthread_wakeup(cleanup_thread);
/* wait for cleanup thread */
if (cleanup_thread != -1)
gwthread_join(cleanup_thread);
gwlist_destroy(loaded, NULL);
} | 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.