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 |
|---|---|---|---|---|---|---|
make_graph(int n)
{
int i;
rawgraph* g = NEW(rawgraph);
g->nvs = n;
g->vertices = N_NEW(n, vertex);
for(i=0;i<n;i++) {
g->vertices[i].adj_list = openIntSet ();
g->vertices[i].color = UNSCANNED;
}
return g;
} | false | false | false | false | false | 0 |
GetArrayName(int index)
{
if(index >= 0 && index < this->GetNumberOfArrays())
{
return this->Internal->ArrayNames[index].c_str();
}
return 0;
} | false | false | false | false | false | 0 |
ProcessNonLiveChildren(List<AstNode*>* stack,
ZoneList<Expression*>* body_definitions,
int variable_count) {
if (!key()->IsPropertyName()) MarkIfNotLive(key(), stack);
MarkIfNotLive(obj(), stack);
} | false | false | false | false | false | 0 |
zGetDNAWindowedGC(zDNA* dna, coor_t pos){
int i = zGetSeqBlockID(dna->seq,pos);
if(i == -1){
zGetSequencePos(dna->seq,pos);
i = zGetSeqBlockID(dna->seq,pos);
}
return dna->gcs[i];
} | false | false | false | false | false | 0 |
show_chain(const tenm_object *player)
{
char temp[16];
int chain;
/* sanity check */
chain = get_chain();
if (chain < 0)
return 0;
/* hide the stat if the game is still on and
* if the player is near it
*/
if ((player != NULL) && (get_ship() >= 0)
&& (player->x > (double) (WINDOW_WIDTH *... | false | false | false | false | false | 0 |
PrintStack() {
if (stack_trace_nesting_level == 0) {
stack_trace_nesting_level++;
StringAllocator* allocator;
if (preallocated_message_space == NULL) {
allocator = new HeapStringAllocator();
} else {
allocator = preallocated_message_space;
}
NativeAllocationChecker allocation_che... | false | false | false | false | false | 0 |
istrport_finalize(char **str, scm_bool ownership, void **opaque)
{
if (ownership)
free(*str);
} | false | false | false | false | false | 0 |
fimc_pipeline_validate(struct fimc_dev *fimc)
{
struct v4l2_subdev_format sink_fmt, src_fmt;
struct fimc_vid_cap *vc = &fimc->vid_cap;
struct v4l2_subdev *sd = &vc->subdev;
struct fimc_pipeline *p = to_fimc_pipeline(vc->ve.pipe);
struct media_pad *sink_pad, *src_pad;
int i, ret;
while (1) {
/*
* Find curre... | false | false | false | false | false | 0 |
SparseMatrix_new(int m, int n, int nz, int type, int format){
/* return a sparse matrix skeleton with row dimension m and storage nz. If nz == 0,
only row pointers are allocated */
SparseMatrix A;
size_t sz;
sz = size_of_matrix_type(type);
A = SparseMatrix_init(m, n, type, sz, format);
if (nz > 0) A... | false | false | false | false | false | 0 |
rfb_decoder_iterate (RfbDecoder * decoder)
{
g_return_val_if_fail (decoder != NULL, FALSE);
g_return_val_if_fail (decoder->fd != -1, FALSE);
if (decoder->state == NULL) {
GST_DEBUG ("First iteration: set state to -> wait for protocol version");
decoder->state = rfb_decoder_state_wait_for_protocol_version... | false | false | false | false | false | 0 |
setItemIcon(FXint index,FXIcon* icon,FXbool owned){
if(isItemCurrent(index)) field->setIcon(icon);
list->setItemIcon(index,icon,owned);
recalc();
} | false | false | false | false | false | 0 |
if_convertible_phi_p (struct loop *loop, basic_block bb, gimple phi)
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "-------------------------\n");
print_gimple_stmt (dump_file, phi, 0, TDF_SLIM);
}
if (bb != loop->header && gimple_phi_num_args (phi) != 2)
{
if (... | false | false | false | false | false | 0 |
pcf8563_clkout_is_prepared(struct clk_hw *hw)
{
struct pcf8563 *pcf8563 = clkout_hw_to_pcf8563(hw);
struct i2c_client *client = pcf8563->client;
unsigned char buf;
int ret = pcf8563_read_block_data(client, PCF8563_REG_CLKO, 1, &buf);
if (ret < 0)
return ret;
return !!(buf & PCF8563_REG_CLKO_FE);
} | false | false | false | false | false | 0 |
gentab(int bits, uint64 poly, int reflected)
{
int i;
uint64 topbit = 1ULL << (bits-1);
uint64 mask = ~0ULL >> (64-bits);
for (i = 0; i < 256; ++i) {
uint64 crc = i;
int j;
if (reflected) crc = reflect(crc, 8);
crc <<= bits - 8;
for (j = 0; j < 8; ++j)
crc = (crc << 1) ^ ((crc & topbit... | false | false | false | false | false | 0 |
pixSnapColorCmap(PIX *pixd,
PIX *pixs,
l_uint32 srcval,
l_uint32 dstval,
l_int32 diff)
{
l_int32 i, w, h, ncolors, index, found;
l_int32 rval, gval, bval, rsval, gsval, bsval, rdval, gdval, bdval;
PIX *pixm, *pixt;
PIXCMAP *... | false | false | false | false | false | 0 |
free_tags_list (GList **listp)
{
GList *l;
l = *listp;
while (l)
{
if (l->data)
gst_tag_list_unref (l->data);
l = g_list_delete_link (l, l);
}
*listp = NULL;
} | false | false | false | false | false | 0 |
qed_init_cmd_mode(struct qed_hwfn *p_hwfn,
struct init_if_mode_op *p_cmd,
int modes)
{
u16 offset = le16_to_cpu(p_cmd->modes_buf_offset);
if (qed_init_cmd_mode_match(p_hwfn, &offset, modes))
return 0;
else
return GET_FIELD(le32_to_cpu(p_cmd->op_data),
INIT_IF_MODE_OP_CMD_OFFSET);
} | false | false | false | false | false | 0 |
insertFloatDescriptor(VimosDescriptor **desc, const char *name,
float value, const char *comment, const char *refName, int before)
{
VimosDescriptor *newDesc = newFloatDescriptor(name, value, comment);
if (newDesc) return insertDescriptor(desc, refName, newDesc, before);
return VM_FALSE;
} | false | false | false | false | false | 0 |
ext2fs_expand_dir(ext2_filsys fs, ext2_ino_t dir)
{
errcode_t retval;
struct expand_dir_struct es;
struct ext2_inode inode;
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
if (!(fs->flags & EXT2_FLAG_RW))
return EXT2_ET_RO_FILSYS;
if (!fs->block_map)
return EXT2_ET_NO_BLOCK_BITMAP;
retval = ext2fs_che... | false | false | false | false | false | 0 |
truespeech_update_filters(TSContext *dec, int16_t *out, int quart)
{
int i;
for(i = 0; i < 86; i++)
dec->filtbuf[i] = dec->filtbuf[i + 60];
for(i = 0; i < 60; i++){
dec->filtbuf[i + 86] = out[i] + dec->newvec[i] - (dec->newvec[i] >> 3);
out[i] += dec->newvec[i];
}
} | false | false | false | false | false | 0 |
tlfree(tl)
toplink *tl;
{
toplink *nt = NULL;
while (tl) {
free(tl->description);
free(tl->keyword);
/* Don't free the button stuff... */
nt = tl->next;
free(tl);
tl = nt;
}
return;
} | false | false | false | false | false | 0 |
gncs_get_widget (GNCSearchCoreType *fe)
{
GtkWidget *button, *label, *menu, *box;
GNCSearchAccount *fi = (GNCSearchAccount *)fe;
char *desc;
g_return_val_if_fail (fi, NULL);
g_return_val_if_fail (IS_GNCSEARCH_ACCOUNT (fi), NULL);
box = gtk_hbox_new (FALSE, 3);
/* Build and connect the opt... | false | false | false | false | false | 0 |
flexcop_dma_xfer_control(struct flexcop_device *fc,
flexcop_dma_index_t dma_idx,
flexcop_dma_addr_index_t index,
int onoff)
{
flexcop_ibi_value v0x0,v0xc;
flexcop_ibi_register r0x0,r0xc;
if ((dma_idx & FC_DMA_1) == dma_idx) {
r0x0 = dma1_000;
r0xc = dma1_00c;
} else if ((dma_idx & FC_DMA_2) == dma_idx) {... | false | false | false | false | false | 0 |
add_define(Context *ctx, const char *sym, const char *val,
char **parameters, int paramcount)
{
const uint8 hash = hash_define(sym);
hlmojo_Define *bucket = ctx->define_hashtable[hash];
while (bucket)
{
if (strcmp(bucket->identifier, sym) == 0)
{
failf(c... | false | false | false | false | false | 0 |
pd_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
struct pd_unit *disk = bdev->bd_disk->private_data;
switch (cmd) {
case CDROMEJECT:
mutex_lock(&pd_mutex);
if (disk->access == 1)
pd_special_command(disk, pd_eject);
mutex_unlock(&pd_mutex);
return 0;
default:
r... | false | false | false | false | false | 0 |
Transport_GetAuditDigestSigned(TSS_HCONTEXT tspContext, /* in */
TCS_KEY_HANDLE keyHandle, /* in */
TSS_BOOL closeAudit, /* in */
TPM_NONCE *antiReplay, /* in */
TPM_AUTH *privAuth, /* in/out */
UINT32 *counterValueSize, /* o... | false | false | false | false | false | 0 |
unit_change_owner(struct unit *punit, struct player *pplayer,
int homecity, enum unit_loss_reason reason)
{
struct unit *gained_unit;
/* Convert the unit to your cause. Fog is lifted in the create algorithm. */
gained_unit = create_unit_full(pplayer, unit_tile(punit),
... | false | false | false | false | false | 0 |
push(int, Packet *p)
{
if (p->network_length() <= (int) _mtu)
output(0).push(p);
else
fragment(p);
} | false | false | false | false | false | 0 |
murrine_get_parent_window (GtkWidget *widget)
{
GtkWidget *parent = widget->parent;
while (parent && GTK_WIDGET_NO_WINDOW (parent))
parent = parent->parent;
return parent;
} | false | false | false | false | false | 0 |
TransactionIdIsInProgress(TransactionId xid)
{
bool result = false;
ProcArrayStruct *arrayP = procArray;
int i,
j;
int nxids = 0;
TransactionId *xids;
TransactionId topxid;
bool locked;
/*
* Don't bother checking a transaction older than RecentXmin; it could not
* possibly still be running. (Not... | false | false | false | false | true | 1 |
goBoard_fprint(GoBoard *b, FILE *fnum) {
int x, y;
for (y = 0; y < goBoard_size(b); ++y) {
for (x = 0; x < goBoard_size(b); ++x) {
printf("%c ", goStone_char(b->pieces[goBoard_xy2Loc(b, x,y)].type));
}
printf("\n");
}
} | false | false | false | false | false | 0 |
tor_tls_received_v3_certificate(tor_tls_t *tls)
{
X509 *cert = SSL_get_peer_certificate(tls->ssl);
EVP_PKEY *key = NULL;
X509_NAME *issuer_name, *subject_name;
int is_v3 = 0;
if (!cert) {
log_warn(LD_BUG, "Called on a connection with no peer certificate");
goto done;
}
subject_name = X509_get_su... | false | false | false | false | false | 0 |
printFailure(bool printTestName) const {
if (failures_.empty()) {
return;
}
if (printTestName) {
printf("* Detail of %s test failure:\n", name_.c_str());
}
// Print in reverse to display the callstack in the right order
Failures::const_iterator itEnd = failures_.end();
for (Failures::const_itera... | false | false | false | false | false | 0 |
answerPhoneCmd(AnswerType atype, const char* dialnumber)
{
CallType ctype = ClassModem::CALLTYPE_UNKNOWN;
if (state == LISTENING) {
/*
* We were listening to rings when an answer command
* was received. The modem is already locked so just
* cancel any timeout and answer the call.
*/
Dispatcher::insta... | false | false | false | false | false | 0 |
ReadVarint64Slow(uint64* value) {
// Slow path: This read might cross the end of the buffer, so we
// need to check and refresh the buffer if and when it does.
uint64 result = 0;
int count = 0;
uint32 b;
do {
if (count == kMaxVarintBytes) return false;
while (buffer_ == buffer_end_) {
if (!... | false | false | false | false | false | 0 |
sis190_irq(struct net_device *dev, int enable)
{
struct sis190_private *tp = netdev_priv(dev);
void *ioaddr = tp->mmio_addr;
SIS_W32(IntrStatus, 0xffffffff);
if (enable == 0)
SIS_W32(IntrMask, 0x00);
else
SIS_W32(IntrMask, sis190_intr_mask);
SIS_PCI_COMMIT();
} | false | false | false | false | false | 0 |
__pyx_pf_6Cython_4Plex_8Scanners_7Scanner_2get_position(struct __pyx_obj_6Cython_4Plex_8Scanners_Scanner *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupCont... | false | false | false | false | false | 0 |
qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = Object::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 17)
qt_static_metacall(this, _c, _id, _a);
_id -= 17;
}
#ifndef QT_NO_PROPERTIES
else if... | false | false | false | false | false | 0 |
sig_handler(int sig)
{
int status = 0;
jp_logf(JP_LOG_DEBUG, "caught signal SIGCHLD\n");
/* wait for any child processes */
waitpid(-1, &status, WNOHANG);
/* SIGCHLD status is 0 for innocuous events like suspend/resume. */
/* We specifically exit with return code 255 to trigger this cleanup */
i... | false | false | false | false | false | 0 |
led_work(struct work_struct *work)
{
int ret;
struct blinkm_led *led;
struct blinkm_data *data;
struct blinkm_work *blm_work = work_to_blmwork(work);
led = blm_work->blinkm_led;
data = i2c_get_clientdata(led->i2c_client);
ret = blinkm_transfer_hw(led->i2c_client, BLM_GO_RGB);
atomic_dec(&led->active);
dev_dbg... | false | false | false | false | false | 0 |
MkString(s) /* Push a String onto the stack */
String s;
{
BEGIN_PROTECT
pushString(s);
#ifndef NO_DYNAMIC_TYPES
topfun(ap(nameToDyn,getTypeableDict(typeString)));
#endif
END_PROTECT
} | false | false | false | false | false | 0 |
slapi_mod_remove_value(Slapi_Mod *smod)
{
/* loop over the mod values moving them down to cover up the value to be removed */
struct berval **vals;
int i, k;
PR_ASSERT(smod!=NULL);
PR_ASSERT(smod->mod!=NULL);
vals= smod->mod->mod_bvalues;
i= smod->iterator-1;
ber_bvfree( vals[i] );
for ( k = i + 1; vals[k] ... | false | false | false | false | false | 0 |
on_name_acquired (GDBusConnection *connection,
const char *name,
gpointer user_data)
{
settings = gdm_settings_new ();
if (settings == NULL) {
g_warning ("Unable to initialize settings");
exit (1);
}
} | false | false | false | false | false | 0 |
fail(string dummy)
{
mail::callback * volatile c= &callback;
delete this;
c->fail(dummy);
} | false | false | false | false | false | 0 |
__ecereMethod_IDEWorkSpace_ProjectClose(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct IDEWorkSpace * __ecerePointer_IDEWorkSpace = (struct IDEWorkSpace *)(this ? (((char *)this) + __ecereClass_IDEWorkSpace->offset) : 0);
__ecereProp___ecereNameSpace__ecere__gui__Window_Set_visible(__ecerePointer_IDEWo... | false | false | false | false | false | 0 |
vidioc_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *freq)
{
struct usb_usbvision *usbvision = video_drvdata(file);
struct v4l2_frequency new_freq = *freq;
/* Only one tuner for now */
if (freq->tuner)
return -EINVAL;
call_all(usbvision, tuner, s_frequency, freq);
call_all(usbvis... | false | false | false | false | false | 0 |
schematicJumperWillFit(GridPoint & gridPoint, const Grid * grid, int halfSize)
{
if (schematicJumperWillFitAux(gridPoint, grid, halfSize, -(halfSize * 2), 0)) {
gridPoint.flags |= GridPointJumperLeft;
return true;
}
if (schematicJumperWillFitAux(gridPoint, grid, halfSize, 0, halfSize * 2)) ... | false | false | false | false | false | 0 |
make_room(ART_CACHE_NODE *cache, int size)
{
if (size <= 0)
return False;
if (cache[0].file_name) {
if (cache[size - 1].no > 0)
clear_cache_node(cache + size - 1);
if (size - 1 > 0)
memmove(cache + 1, cache, (size - 1) * sizeof cache[0]);
cache[0].file_name = NULL;
}
cache[0].no = 0;
... | false | false | false | false | false | 0 |
doRetrieve(char* buffer, int count) {
/* retrieve data */
ssize_t data_received = 0;
ssize_t amount;
if (_synchronous > 0) {
do {
amount = read(_link[0], &buffer[data_received], count - data_received - 2);
if (amount > 0) {
int th = removeThorns(&buffer[data_received], amount);
data_received -= th;
... | false | false | false | false | false | 0 |
Pulse()
{
if (CurrentItem == 0)
return;
struct stat Buf;
if (stat(CurrentItem->Owner->DestFile.c_str(),&Buf) != 0)
return;
CurrentSize = Buf.st_size;
// Hmm? Should not happen...
if (CurrentSize > TotalSize && TotalSize != 0)
TotalSize = CurrentSize;
} | false | false | false | false | false | 0 |
StringIsUnsupported(unsigned int offset)
{
const int *string_list;
int i;
string_list = unsupported_strings[deh_hhe_version];
for (i=0; string_list[i] >= 0; ++i)
{
if ((unsigned int) string_list[i] == offset)
{
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
test_unlock_keyring (Test *test, gconstpointer unused)
{
CK_OBJECT_HANDLE credential;
CK_RV rv;
CK_OBJECT_CLASS klass = CKO_G_CREDENTIAL;
CK_ATTRIBUTE attrs[] = {
{ CKA_CLASS, &klass, sizeof (klass) },
{ CKA_VALUE, NULL, 0 },
{ CKA_G_OBJECT, &test->collection, sizeof (test->collection) },
};
/* Create cre... | false | false | false | false | false | 0 |
discard_slot(Module_table *module,
Block *discard,
const int pgno,
Stasche_lm_dt *sld,
Slot *slot,
Boolean layer_last_flg)
{
if (cmp_ya_templ) {
if (flg_lad_multi_module_div) {
discard_slot_for_multi_module(discard, sld, pgno, slot... | false | false | false | false | false | 0 |
dobanner(void)
{
const char *mechlist;
int mechcount;
if (!sync_userid) {
if (sasl_listmech(sync_saslconn, NULL,
"* SASL ", " ", "\r\n",
&mechlist, NULL, &mechcount) == SASL_OK
&& mechcount > 0) {
prot_printf(sync_out, "%s", mechlist);
}
if (tls_enabled() && !sync_starttls_done) {
... | false | false | false | false | false | 0 |
vidioc_enum_input(struct file *file, void *priv,
struct v4l2_input *inp)
{
struct vivid_dev *dev = video_drvdata(file);
if (inp->index >= dev->num_inputs)
return -EINVAL;
inp->type = V4L2_INPUT_TYPE_CAMERA;
switch (dev->input_type[inp->index]) {
case WEBCAM:
snprintf(inp->name, sizeof(inp->name), "Webcam... | false | false | false | false | false | 0 |
gdl_dock_placeholder_set_property (GObject *g_object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdlDockPlaceholder *ph = GDL_DOCK_PLACEHOLDER (g_object);
switch (prop_id) {
... | false | false | false | false | false | 0 |
mcrop_data_cb(GwyDataChooser *chooser,
GwyDataObjectId *object)
{
GtkWidget *dialog;
object->data = gwy_data_chooser_get_active(chooser, &object->id);
gwy_debug("data: %p %d", object->data, object->id);
dialog = g_object_get_data(G_OBJECT(chooser), "dialog");
g_assert(GTK_IS_DIALOG(d... | false | false | false | false | false | 0 |
pn533_send_async_complete(struct pn533 *dev)
{
struct pn533_cmd *cmd = dev->cmd;
int status = cmd->status;
struct sk_buff *req = cmd->req;
struct sk_buff *resp = cmd->resp;
int rc;
dev_kfree_skb(req);
if (status < 0) {
rc = cmd->complete_cb(dev, cmd->complete_cb_context,
ERR_PTR(status));
dev_k... | false | false | false | false | false | 0 |
Check16BitComponents(DDSHEAD *Header)
{
if (Header->RGBBitCount != 32)
Has16BitComponents = IL_FALSE;
// a2b10g10r10 format
if (Header->RBitMask == 0x3FF00000 && Header->GBitMask == 0x000FFC00 && Header->BBitMask == 0x000003FF
&& Header->RGBAlphaBitMask == 0xC0000000)
Has16BitComponents = IL_TRUE;
// a2r10g10... | false | false | false | false | false | 0 |
ap_reducedproduct_of_box(ap_manager_t* manager,
size_t intdim, size_t realdim,
ap_interval_t** tinterval)
{
ap_reducedproduct_internal_t* intern = get_internal_init0(manager);
size_t i;
ap_reducedproduct_t* res = ap_reducedproduct_alloc(intern->size);
for (i=0;i<intern->size;i++){
ap_... | false | false | false | false | false | 0 |
color_on(const char *prefix, long color)
{
const char *ctlseq;
smallstr buf;
sprintf(buf, "start_color_%s%s", prefix, enum_color[color].data);
if ((ctlseq = getvar(buf))) {
print_to_ascii(outbuf, ctlseq);
} else {
sprintf(buf, "start_color_%s%ld", prefix, color);
if ((ctlseq... | false | true | false | false | false | 1 |
rep_hist_add_buffer_stats(double mean_num_cells_in_queue,
double mean_time_cells_in_queue, uint32_t processed_cells)
{
circ_buffer_stats_t *stat;
if (!start_of_buffer_stats_interval)
return; /* Not initialized. */
stat = tor_malloc_zero(sizeof(circ_buffer_stats_t));
stat->mean_num_cells_in_queue = mean_... | false | false | false | false | false | 0 |
embDbiFileOut(const AjPStr dbname, const char* extension)
{
AjPFile ret;
ajFmtPrintS(&dbiOutFname, "%S.%s", dbname, extension);
ret = ajFileNewOutNameS(dbiOutFname);
if(!ret)
ajFatal("Cannot open %S for writing", dbiOutFname);
return ret;
} | false | false | false | false | false | 0 |
hd6309_set_irq_line(int irqline, int state)
{
if (irqline == IRQ_LINE_NMI)
{
if (hd6309.nmi_state == state) return;
hd6309.nmi_state = state;
LOG(("HD6309#%d set_irq_line (NMI) %d (PC=%4.4X)\n", cpu_getactivecpu(), state, pPC));
if( state == CLEAR_LINE ) return;
/* if the stack was not yet initial... | false | false | false | false | false | 0 |
efx_ef10_alloc_rss_context(struct efx_nic *efx, u32 *context,
bool exclusive, unsigned *context_size)
{
MCDI_DECLARE_BUF(inbuf, MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN);
MCDI_DECLARE_BUF(outbuf, MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN);
struct efx_ef10_nic_data *nic_data = efx->nic_data;
size_t outlen;
int rc;
u32 all... | false | false | false | false | false | 0 |
is_user_min_admin_level(void *db_conn, uid_t uid,
slurmdb_admin_level_t min_level)
{
bool is_admin = 1;
/* This only works when running though the slurmdbd.
* THERE IS NO AUTHENTICATION WHEN RUNNNING OUT OF THE
* SLURMDBD!
*/
if (slurmdbd_conf) {
/* We have to check the authentication here in the
... | false | false | false | false | false | 0 |
try_to_simplify (gimple stmt)
{
tree tem;
/* For stores we can end up simplifying a SSA_NAME rhs. Just return
in this case, there is no point in doing extra work. */
if (gimple_assign_copy_p (stmt)
&& TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
return NULL_TREE;
switch (TREE_CODE_CLASS... | false | false | false | false | false | 0 |
AcpiDmConvertResourceIndexes (
ACPI_PARSE_OBJECT *ParseTreeRoot,
ACPI_NAMESPACE_NODE *NamespaceRoot)
{
ACPI_STATUS Status;
ACPI_OP_WALK_INFO Info;
ACPI_WALK_STATE *WalkState;
if (!ParseTreeRoot)
{
return;
}
/* Create and initialize a new... | false | false | false | false | false | 0 |
prefs_toolbar_down(GtkButton *button, ToolbarPage *prefs_toolbar)
{
GtkListStore *store = NULL;
GtkTreeModel *model = NULL;
GtkTreeIter next, sel;
if (!gtk_tree_selection_get_selected
(gtk_tree_view_get_selection
(GTK_TREE_VIEW(prefs_toolbar->list_view_set)),
&model,
&sel))
return;
store = (GtkList... | false | false | false | false | false | 0 |
text_size_dialog_response(GtkWidget *w, gint response,
GSCHEM_TOPLEVEL *w_current)
{
GtkWidget *spin_size;
gint size;
switch (response) {
case GTK_RESPONSE_ACCEPT:
spin_size = g_object_get_data(G_OBJECT(w_current->tswindow),"spin_size");
size = gtk_spin_button_get_value_a... | false | false | false | false | false | 0 |
AsObject() {
if (hash_field_ == 0) Hash();
return HEAP->AllocateAsciiSymbol(string_, hash_field_);
} | false | false | false | false | false | 0 |
ResolveTargetsInGeneratorExpression(
std::string &input,
cmTarget* target,
std::vector<std::string> &missingTargets)
{
std::string::size_type pos = 0;
std::string::size_type lastPos = pos;
cmMakefile *mf =... | false | false | false | false | false | 0 |
MetricTypeToString(MetricType metric)
{
char
*metric_string="Undefined";
switch (metric)
{
case UndefinedMetric:
metric_string="Undefined";
break;
case MeanAbsoluteErrorMetric:
metric_string="MeanAbsoluteError";
break;
case MeanSquaredErrorMetric:
metric_string="Me... | false | false | false | false | false | 0 |
add_char(uint32_t const U, unsigned char const * const r)
{
uint32_t const C=r[0];
return ((C|0x3f) == 0xbf)?((U<<6)|(C&0x3f)):0;
} | false | false | false | false | false | 0 |
ax25_aton(const char *call, struct full_sockaddr_ax25 *sax)
{
char *bp, *np;
char *addrp;
int n = 0;
char *tmp = strdup(call);
if (tmp == NULL)
return -1;
bp = tmp;
addrp = sax->fsa_ax25.sax25_call.ax25_call;
do {
/* Fetch one callsign token */
while (*bp != '\0' && isspace(*bp))
bp++;
np = ... | false | false | false | false | false | 0 |
_block2mtd_erase(struct block2mtd_dev *dev, loff_t to, size_t len)
{
struct address_space *mapping = dev->blkdev->bd_inode->i_mapping;
struct page *page;
int index = to >> PAGE_SHIFT; // page index
int pages = len >> PAGE_SHIFT;
u_long *p;
u_long *max;
while (pages) {
page = page_read(mapping, index);
if (I... | false | false | false | false | false | 0 |
fso_gsm_htc_at_parser_instance_init (FsoGsmHtcAtParser * self) {
gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
gchar* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
gchar* _tmp6_ = NULL;
gchar* _tmp7_ = NULL;
gchar* _tmp8_ = NULL;
gchar* _tmp9_ = NULL;
gchar** _tmp10_ = NULL;
... | false | false | false | false | false | 0 |
rec_dont(struct connectdata *conn, int option)
{
struct TELNET *tn = (struct TELNET *)conn->data->reqdata.proto.telnet;
switch(tn->us[option])
{
case CURL_NO:
/* Already disabled */
break;
case CURL_YES:
tn->us[option] = CURL_NO;
send_negotiation(conn, CURL_WONT, option);
br... | false | false | false | false | false | 0 |
php_getimagesize_from_stream(php_stream *stream, zval **info, INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
{
char *temp;
int itype = 0;
struct gfxinfo *result = NULL;
if (!stream) {
RETURN_FALSE;
}
itype = php_getimagetype(stream, NULL TSRMLS_CC);
switch( itype) {
case IMAGE_FILETYPE_GIF:
result = php_handle... | false | false | false | false | false | 0 |
static_pbc_x0y1z1 (int cell_x, int cell_y, int cell_z,
double *position0, double radius0, int mark, int shell,
double *borders, double *width, gamgi_voronoi *voronoi)
{
gamgi_slist *slist;
double position1[3], shift[3];
double radius1, size;
int n, n_x, n_y, n_z;
int local, global;
int index;
n = voronoi->n_cells;
/... | false | false | false | false | false | 0 |
gt_BwtSeqpositionextractor_extract(BwtSeqpositionextractor *bspex,
unsigned long lowerbound)
{
unsigned long pos;
gt_assert(lowerbound < bspex->upperbound);
pos = gt_BWTSeqLocateMatch(bspex->bwtseq,lowerbound,&bspex->extBits);
return pos;
} | false | false | false | false | false | 0 |
make_canonical_pathkey(PlannerInfo *root,
EquivalenceClass *eclass, Oid opfamily,
int strategy, bool nulls_first)
{
PathKey *pk;
ListCell *lc;
MemoryContext oldcontext;
/* The passed eclass might be non-canonical, so chase up to the top */
while (eclass->ec_merged)
eclass = eclass->ec_merge... | false | false | false | false | false | 0 |
onHScrollerDragged(FXObject*,FXSelector,void* ptr){
if(!(options&SCROLLERS_DONT_TRACK)){
FXint new_x=-(FXint)(FXival)ptr;
if(new_x!=pos_x){
moveContents(new_x,pos_y);
}
}
flags&=~FLAG_TIP;
return 1;
} | false | false | false | false | false | 0 |
isChosen() const
{
QReadLocker lock( &m_dataLock );
if( m_data.isEmpty() )
{
foreach( MusicBrainzTagsItem *item, m_childItems )
if( item->isChosen() )
return true;
return false;
}
return m_chosen;
} | false | false | false | false | false | 0 |
spool_flatfile_read_list(lList **answer_list, const lDescr *descr,
const spooling_field *fields_in, int fields_out[],
bool parse_values, const spool_flatfile_instr *instr,
const spool_flatfile_format format,
FILE *file,... | false | false | false | false | false | 0 |
zlib_inflate_init(value wbits) {
value z = zlib_new_stream();
if( inflateInit2(zval(z),Int_val(wbits)) != Z_OK )
failwith("zlib_inflate_init");
return z;
} | false | false | false | false | false | 0 |
isofs_get_blocks(struct inode *inode, sector_t iblock,
struct buffer_head **bh, unsigned long nblocks)
{
unsigned long b_off = iblock;
unsigned offset, sect_size;
unsigned int firstext;
unsigned long nextblk, nextoff;
int section, rv, error;
struct iso_inode_info *ei = ISOFS_I(inode);
error = -EIO;
rv =... | false | false | false | false | false | 0 |
dnxhd_decode_close(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
if (ctx->picture.data[0])
avctx->release_buffer(avctx, &ctx->picture);
free_vlc(&ctx->ac_vlc);
free_vlc(&ctx->dc_vlc);
free_vlc(&ctx->run_vlc);
return 0;
} | false | false | false | false | false | 0 |
PerlIO_resolve_layers(pTHX_ const char *layers,
const char *mode, int narg, SV **args)
{
dVAR;
PerlIO_list_t *def = PerlIO_default_layers(aTHX);
int incdef = 1;
if (!PL_perlio)
PerlIO_stdstreams(aTHX);
if (narg) {
SV * const arg = *args;
/*
* If it is a reference but not an object see i... | false | false | false | false | false | 0 |
ungrabKeys() {
WindowMap::iterator it = m_window_map.begin();
WindowMap::iterator it_end = m_window_map.end();
for (; it != it_end; ++it) {
if ((it->second & Keys::GLOBAL) > 0)
FbTk::KeyUtil::ungrabKeys(it->first);
}
} | false | false | false | false | false | 0 |
get_next_token(const char **rval, unsigned *rlen,
struct parse *cfile, isc_boolean_t raw) {
int rv;
if (cfile -> token) {
if (cfile -> lexline != cfile -> tline)
cfile -> token_line = cfile -> cur_line;
cfile -> lexchar = cfile -> tlpos;
cfile -> lexline = cfile -> tline;
rv = cfile -> token;
c... | false | false | false | false | false | 0 |
ConfigPrint(fp,cfp)
FILE *fp;
struct config *cfp;
{
struct rule *rp;
int i;
rp = cfp->rp;
fprintf(fp,"%s ::=",rp->lhs->name);
for(i=0; i<=rp->nrhs; i++){
if( i==cfp->dot ) fprintf(fp," *");
if( i==rp->nrhs ) break;
fprintf(fp," %s",rp->rhs[i]->name);
}
} | false | false | false | false | false | 0 |
s5p_mfc_set_enc_params(struct s5p_mfc_ctx *ctx)
{
struct s5p_mfc_dev *dev = ctx->dev;
struct s5p_mfc_enc_params *p = &ctx->enc_params;
unsigned int reg;
unsigned int shm;
/* width */
mfc_write(dev, ctx->img_width, S5P_FIMV_ENC_HSIZE_PX);
/* height */
mfc_write(dev, ctx->img_height, S5P_FIMV_ENC_VSIZE_PX);
/* ... | false | false | false | false | false | 0 |
cat_mc1_mce(u16 ec, u8 xec)
{
u8 r4 = R4(ec);
bool ret = true;
if (!MEM_ERROR(ec))
return false;
if (TT(ec) != TT_INSTR)
return false;
if (r4 == R4_IRD)
pr_cont("Data/tag array parity error for a tag hit.\n");
else if (r4 == R4_SNOOP)
pr_cont("Tag error during snoop/victimization.\n");
else if (xec... | false | false | false | false | false | 0 |
dhcp_failover_state_destroy (omapi_object_t *h,
const char *file, int line)
{
dhcp_failover_state_t *s;
if (h -> type != dhcp_type_failover_state)
return DHCP_R_INVALIDARG;
s = (dhcp_failover_state_t *)h;
if (s -> link_to_peer)
dhcp_failover_link_dereference (&s -> link_to_peer, file, line);
if... | false | false | false | false | false | 0 |
pk_debuginfo_install_progress_cb (PkProgress *progress, PkProgressType type, PkDebuginfoInstallPrivate *priv)
{
gint percentage;
gchar *package_id = NULL;
if (type == PK_PROGRESS_TYPE_PERCENTAGE) {
g_object_get (progress, "percentage", &percentage, NULL);
pk_progress_bar_set_percentage (priv->progress_bar, perc... | false | false | false | false | false | 0 |
php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */
{
php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract;
if (!ts || !ts->innerstream) {
return -1;
}
return php_stream_stat(ts->innerstream, ssb);
} | false | false | false | false | false | 0 |
trimR(const char* c) {
register int iend;
for (iend=length()-1; iend>=0 && strchr(c,chars()[iend])!=NULL;iend--) ;
if (iend==-1) {
replace_data(0); //string was entirely trimmed
return *this;
}
int newlen=iend+1;
if (newlen==length()) //nothing to trim
return *this;
make_unique()... | false | false | false | false | false | 0 |
process_plug ()
{
// Register the session with the socket.
if (!name.empty ()) {
bool ok = owner->register_session (name.c_str (), this);
// There's already a session with the specified identity.
// We should syslog it and drop the session. TODO
zmq_assert (ok);
}
//... | false | false | false | false | false | 0 |
ompi_btl_openib_connect_base_select_for_local_port(mca_btl_openib_module_t *btl)
{
char *msg = NULL;
int i, rc, cpc_index, len;
ompi_btl_openib_connect_base_module_t **cpcs;
cpcs = (ompi_btl_openib_connect_base_module_t **) calloc(num_available,
sizeof(ompi_btl_openib_connect_base_mod... | false | true | false | false | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.