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 |
|---|---|---|---|---|---|---|
s4u2proxy_import_authdata(krb5_context kcontext,
krb5_authdata_context context,
void *plugin_context,
void *request_context,
krb5_authdata **authdata,
krb5_boolean kdc_issued,
... | true | true | false | false | false | 1 |
deblock_v_consider_entire(guchar *blocks, guint stride)
{
gint count, i, j;
guchar *p1, *p2;
count = 0;
p1 = blocks + stride;
p2 = blocks + (stride * 2);
for (i = 0; i < 7; i++) {
for (j = 0; j < 8; j++) {
gint v1, v2, v;
v1 = p1[j];
v2 = p2[j];
... | false | false | false | false | false | 0 |
SetInterpolator(
vtkAbstractImageInterpolator *interpolator)
{
unsigned long mtime = this->ImageReslice->GetMTime();
this->ImageReslice->SetInterpolator(interpolator);
if (this->ImageReslice->GetMTime() > mtime)
{
this->Modified();
}
} | false | false | false | false | false | 0 |
configinex(void *opt, char *cmd, char *arg1, char *arg2, int rc,
logical in, logical omitinitdot, logical omittrailslash) {
Include **include = (Include **)opt;
Include *ip;
char *errstr;
int erroffset;
char *t;
if (rc == 0) {
shortwarn(cmd, arg1, rc);
return;
}
if (rc > 1)
longwarn(cmd, ... | false | true | false | false | false | 1 |
vnc_base_framebuffer_blt_fast(VncBaseFramebufferPrivate *priv,
guint8 *src, int rowstride,
guint16 x, guint16 y,
guint16 width, guint16 height)
{
guint8 *dst = VNC_BASE_FRAMEBUFFER_AT(priv, ... | false | false | false | false | false | 0 |
ssh_pcap_file_close(ssh_pcap_file pcap){
int err;
if(pcap ==NULL || pcap->output==NULL)
return SSH_ERROR;
err=fclose(pcap->output);
pcap->output=NULL;
if(err != 0)
return SSH_ERROR;
else
return SSH_OK;
} | false | false | false | false | false | 0 |
expand(as)
char *as;
{
char *cs;
char *sgpathp, *oldcs;
struct stat stb;
sgpathp = gpathp;
cs = as;
if (*cs == '~' && gpathp == gpath) {
addpath('~');
for (cs++; letter(*cs) || digit(*cs) || *cs == '-';)
addpath(*cs++);
if (!*cs || *cs == '/') {
if (gpathp != gpath + 1) {
*gpathp = 0;
if (ge... | false | false | false | false | false | 0 |
removeArtist(FXint artist) {
try {
db.begin();
/// Remove tracks from artist from playlists.
delete_artist_from_playlists.setParameter(0,artist);
delete_artist_from_playlists.setParameter(1,artist);
delete_artist_from_playlists.execute();
delete_artist_from_playlists.reset();
/// Remove ... | false | false | false | false | false | 0 |
makeSignamesList(const vector<list<string> >& formulasListsVector, const string& ending)
{
if (formulasListsVector.size() > 0) {
vector<list<string> >::const_iterator it;
string signames = "";
string sep = " ";
for (it = formulasListsVector.begin(); it != formulasListsVector.end(); ++it) {
signames += sep +... | false | false | false | false | false | 0 |
_open_log_safe ( const char* filename, int protectedFd )
{
//open file
int tfd = jalib::open ( filename, O_WRONLY | O_APPEND | O_CREAT /*| O_SYNC*/,
S_IRUSR | S_IWUSR );
if (tfd == -1) return -1;
//change fd to 827 (jalib::logFd -- PFD(6))
int nfd = dup2 ( tfd, protectedFd )... | false | false | false | false | false | 0 |
remapInstructionsInBlocks(
const SmallVectorImpl<BasicBlock *> &Blocks, ValueToValueMapTy &VMap) {
// Rewrite the code to refer to itself.
for (auto *BB : Blocks)
for (auto &Inst : *BB)
RemapInstruction(&Inst, VMap,
RF_NoModuleLevelChanges | RF_IgnoreMissingEntries);
} | false | false | false | false | false | 0 |
bkn_init_ndev(u8 *mac, char *name)
{
struct net_device *dev;
/* Create Ethernet device */
dev = alloc_etherdev(sizeof(bkn_priv_t));
if (dev == NULL) {
DBG_WARN(("Error allocating Ethernet device.\n"));
return NULL;
}
#ifdef SET_MODULE_OWNER
SET_MODULE_OWNER(dev);
#endif
/*... | false | false | false | false | false | 0 |
headset_resume_complete(struct audio_device *dev, void *user_data)
{
struct unix_client *client = user_data;
char buf[BT_SUGGESTED_BUFFER_SIZE];
struct bt_start_stream_rsp *rsp = (void *) buf;
struct bt_new_stream_ind *ind = (void *) buf;
client->req_id = 0;
if (!dev)
goto failed;
client->data_fd = headset_... | false | false | false | false | false | 0 |
answer_find(VCalEvent *event, Answer *answer)
{
GSList *cur = event->answers;
while (cur && cur->data) {
Answer *b = (Answer *)cur->data;
if (!strcasecmp(b->attendee, answer->attendee))
return cur;
cur = cur->next;
}
return NULL;
} | false | false | false | false | false | 0 |
exofs_new_inode(struct inode *dir, umode_t mode)
{
struct super_block *sb = dir->i_sb;
struct exofs_sb_info *sbi = sb->s_fs_info;
struct inode *inode;
struct exofs_i_info *oi;
struct ore_io_state *ios;
int ret;
inode = new_inode(sb);
if (!inode)
return ERR_PTR(-ENOMEM);
oi = exofs_i(inode);
__oi_init(oi);... | false | false | false | false | false | 0 |
bmc150_accel_get_temp(struct bmc150_accel_data *data, int *val)
{
int ret;
unsigned int value;
mutex_lock(&data->mutex);
ret = regmap_read(data->regmap, BMC150_ACCEL_REG_TEMP, &value);
if (ret < 0) {
dev_err(data->dev, "Error reading reg_temp\n");
mutex_unlock(&data->mutex);
return ret;
}
*val = sign_ext... | false | false | false | false | false | 0 |
item_bar_button_released (GocItem *item, int button, double x, double y)
{
GnmItemBar *ib = GNM_ITEM_BAR (item);
if (item == goc_canvas_get_grabbed_item (item->canvas))
gnm_simple_canvas_ungrab (item, 0);
if (ib->colrow_being_resized >= 0) {
if (ib->has_resize_guides)
item_bar_resize_stop (ib, ib->colrow_resi... | false | false | false | false | false | 0 |
listo(target, lastargsp)
struct symstruct *target;
offset_T lastargsp;
{
extend(target);
push(target);
if (lastargsp != 0 && sp != lastargsp - target->type->typesize)
{
loadany(target);
modstk(lastargsp);
push(target);
if (sp != lastargsp - target->type->typesize)
{
bugerror("botched push of a... | false | false | false | false | false | 0 |
bfa_hwcb_msix_getvecs(struct bfa_s *bfa, u32 *msix_vecs_bmap,
u32 *num_vecs, u32 *max_vec_bit)
{
#define __HFN_NUMINTS 13
if (bfa_ioc_pcifn(&bfa->ioc) == 0) {
*msix_vecs_bmap = (__HFN_INT_CPE_Q0 | __HFN_INT_CPE_Q1 |
__HFN_INT_CPE_Q2 | __HFN_INT_CPE_Q3 |
__HFN_INT_RME_Q0 | __HFN_INT_RME_Q1 |
_... | false | false | false | false | false | 0 |
DeadPHICycle(PHINode *PN,
SmallPtrSet<PHINode*, 16> &PotentiallyDeadPHIs) {
if (PN->use_empty()) return true;
if (!PN->hasOneUse()) return false;
// Remember this node, and if we find the cycle, return.
if (!PotentiallyDeadPHIs.insert(PN))
return true;
// Don't scan crazily co... | false | false | false | false | false | 0 |
urlgetcwd(uh, path, size)
int uh;
char *path;
ALLOC_T size;
{
urllog("getcwd()\n");
if (validhost(uh, 0) < 0) return(NULL);
switch (urlhostlist[uh].prototype) {
#ifdef DEP_FTPPATH
case TYPE_FTP:
path = ftpgetcwd(uh, path, size);
break;
#endif
#ifdef DEP_HTTPPATH
case TYPE_HTTP:
path = httpgetcwd(uh, pat... | false | false | false | false | false | 0 |
ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){
if(ogg_stream_check(os)) return -1;
ogg_stream_reset(os);
os->serialno=serialno;
return(0);
} | false | false | false | false | false | 0 |
get_input_into_string(char* string,char* infile)
{
int i = 0;
int string_length = 2;
char c = 0;
FILE *file = 0;
if(infile){
if (!(file = fopen( infile, "r" ))){
return 0;
fprintf(stderr,"Cannot open file '%s'\n", infile);
exit(1);
}
if (fseek(file,0,SEEK_END) != 0){
(void)fprintf(stderr,... | false | true | false | false | true | 1 |
handle_counter(struct mlx4_dev *dev, struct mlx4_qp_context *qpc,
u8 slave, int port)
{
if (qpc->pri_path.counter_index != MLX4_SINK_COUNTER_INDEX(dev))
return handle_existing_counter(dev, slave, port,
qpc->pri_path.counter_index);
return handle_unexisting_counter(dev, qpc, slave, port);
} | false | false | false | false | false | 0 |
gearman_task_attr_is_background(const gearman_task_attr_t *self)
{
if (self)
{
return (self->kind == GEARMAN_TASK_ATTR_BACKGROUND or self->kind == GEARMAN_TASK_ATTR_EPOCH);
}
return false;
} | false | false | false | false | false | 0 |
shouldDeleteUpstreamPosition(const Position &pos)
{
if (!pos.node()->isTextNode())
return false;
RenderObject *renderer = pos.node()->renderer();
if (!renderer)
return true;
TextImpl *textNode = static_cast<TextImpl *>(pos.node());
if (pos.offset() >= (long)textNode->length())
... | false | false | false | false | false | 0 |
gtsvector_union(PG_FUNCTION_ARGS)
{
GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0);
int *size = (int *) PG_GETARG_POINTER(1);
BITVEC base;
int4 i,
len;
int4 flag = 0;
SignTSVector *result;
MemSet((void *) base, 0, sizeof(BITVEC));
for (i = 0; i < entryvec->n; i++)
{
if (unio... | false | false | false | false | false | 0 |
pf_findtoken(t1_font *tf, size_t off, char const *needle) {
char *tok;
pfstate pfs, *pf = &pfs;
pf->data = tf->data;
pf_seek(pf, off);
for (;;) {
tok = pf_read_token(pf);
if (tok == NULL) {
if (pf->offset == 0 && pf->curblock->type == PFB_BINARY)
pf->curblock = pf->curblock->next;
els... | false | false | false | false | false | 0 |
canid_parse_rule(struct rules *rules, struct bstr *a, int iseff)
{
unsigned int can_id = 0;
unsigned int can_mask = 0;
if (sscanf(a->data, "%"SCNx32 ":" "%"SCNx32, &can_id, &can_mask) != 2) {
if (sscanf(a->data, "%"SCNx32, &can_id) != 1) {
return -1;
} else {
can_mask = (iseff) ? CAN_EFF_MASK : CAN_SFF_MA... | false | true | false | false | true | 1 |
processCreate(void)
{
int processID;
#if defined(HAVE_LIBPTHREAD)
pthread_mutex_lock(&processMutex);
#endif
processID = NumProcess++;
NumProcessActive++;
#if defined(HAVE_LIBPTHREAD)
pthread_mutex_unlock(&processMutex);
#endif
if ( processID >= MAX_PROCESS )
Error("Limit of %d processes reached!",... | false | false | false | false | false | 0 |
mmc_sdio_init_uhs_card(struct mmc_card *card)
{
int err;
if (!card->scr.sda_spec3)
return 0;
/*
* Switch to wider bus (if supported).
*/
if (card->host->caps & MMC_CAP_4_BIT_DATA)
err = sdio_enable_4bit_bus(card);
/* Set the driver strength for the card */
sdio_select_driver_type(card);
/* Set bus sp... | false | false | false | false | false | 0 |
ican3_new_recv_msg(struct ican3_dev *mod, struct ican3_msg *msg)
{
struct ican3_new_desc desc;
void __iomem *desc_addr = mod->dpm + (mod->rx_num * sizeof(desc));
/* switch to the tohost queue, and read the buffer descriptor */
ican3_set_page(mod, QUEUE_TOHOST);
memcpy_fromio(&desc, desc_addr, sizeof(desc));
if ... | false | false | false | false | false | 0 |
caml_register_generational_global_root(value *r)
{
value v = *r;
Assert (((intnat) r & 3) == 0); /* compact.c demands this (for now) */
if (Is_block(v)) {
if (Is_young(v))
caml_insert_global_root(&caml_global_roots_young, r);
else if (Is_in_heap(v))
caml_insert_global_root(&caml_global_roots_... | false | false | false | false | false | 0 |
make_chain(double **V, int n, int (*cmp) (const void *, const void *))
{
int i, j, s = 1;
double *t;
qsort(V, (size_t) n, sizeof(double *), cmp); /* It sorts the V's index */
/* */
for (i = 2; i < n; i++) {
for (j = s; j >= 1 && ccw(V, i, j, j - 1); j--) ;
s = j + 1;
t = V[s];
V[s] = V[i];
V[... | false | false | false | false | false | 0 |
init_tcpTable(void)
{
const oid tcpTable_oid[] = { SNMP_OID_MIB2, 6, 13 };
netsnmp_table_registration_info *table_info;
netsnmp_iterator_info *iinfo;
netsnmp_handler_registration *reginfo;
int rc;
DEBUGMSGTL(("mibII/tcpTable", "Initialising TCP Table\n... | false | false | false | false | false | 0 |
addVerifyPass(const std::string &Banner) {
if (VerifyMachineCode)
PM->add(createMachineVerifierPass(Banner));
} | false | false | false | false | false | 0 |
find_special(object body, struct bind_temp *start, struct bind_temp *end)
{
object temporary;
object form=Cnil;
object ds, vs, v;
struct bind_temp *bt;
bool special_processed;
vs_mark;
vs_push(Cnil);
for (; !endp(body); body = body->c.c_cdr) {
form = body->c.c_car;
/* MACRO EXPANSION */
form... | false | false | false | false | false | 0 |
soap_in__wsse__Password(struct soap *soap, const char *tag, struct _wsse__Password *a, const char *type)
{
(void)type; /* appease -Wall -Werror */
if (soap_element_begin_in(soap, tag, 1, NULL))
return NULL;
if (!(a = (struct _wsse__Password *)soap_id_enter(soap, soap->id, a, SOAP_TYPE__wsse__Password, sizeof(struc... | false | false | false | false | false | 0 |
handle_method_call (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *method_name,
GVariant *parameters,
GDBusMethodInvocation *invo... | false | false | false | false | false | 0 |
jorp_flip(GtkWidget *jorp, struct sparts *sp)
{
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(jorp))) {
gtk_widget_set_sensitive(sp->sdev, TRUE);
gtk_widget_set_sensitive(sp->stit, FALSE);
gtk_widget_set_sensitive(sp->suser, FALSE);
}
else {
gtk_widget_set_sensitive(sp->sdev, FALSE);
gtk_widget_set... | false | false | false | false | false | 0 |
PyDict_Merge(PyObject *a, PyObject *b, int override)
{
PyDictObject *mp, *other;
Py_ssize_t i, n;
PyDictKeyEntry *entry;
/* We accept for the argument either a concrete dictionary object,
* or an abstract "mapping" object. For the former, we can do
* things quite efficiently. For the latter... | false | false | false | false | false | 0 |
playStream(int soundId, StreamBlockId blockId)
{
StreamingSoundData& s = *_streamingSounds[soundId];
if (s.isPlaying() || s.empty()) return;
try {
std::auto_ptr<InputStream> is(
s.createInstance(*_mediaHandler, blockId));
plugInputStream(is);
}
catch (const MediaExce... | false | false | false | false | false | 0 |
UnloadBlob(UINT64 *offset, UINT32 size, BYTE *container, BYTE *object)
{
if (object)
memcpy(object, &container[*offset], size);
(*offset) += (UINT64) size;
} | false | false | false | false | false | 0 |
parse_args(serv_command *com, int argc, char *argv[]) {
char com_str[MSG_SIZ] = { '\0' };
int i = 1;
while (i < argc) {
strncat(com_str, argv[i], strlen(argv[i]));
strncat(com_str, " ", 1);
i++;
}
return string2command(com, com_str);
} | false | false | false | false | false | 0 |
CheckHomeSubDir(char *testpath,char *tidypath,int recurse)
{ char *subdirstart, *sp1, *sp2;
char buffer[CF_BUFSIZE];
int homelen;
Debug("CheckHomeSubDir(%s,%s)\n",testpath,tidypath);
if (strncmp(tidypath,"home/",5) == 0)
{
strcpy(buffer,testpath);
for (ChopLastNode(buffer); strlen(buffer) != 0; Chop... | false | false | false | false | false | 0 |
report_gather_instance_stats(
funit_inst* root /*!< Pointer to root of instance tree to search */
) { PROFILE(REPORT_GATHER_INSTANCE_STATS);
funit_inst* curr; /* Pointer to current instance being evaluated */
/* Create and initialize statistic structure */
statistic_create( &(root->stat) );
/* Get ... | false | false | false | false | false | 0 |
AC3_ChannelGetSLP(GF_InputService *plug, LPNETCHANNEL channel, char **out_data_ptr, u32 *out_data_size, GF_SLHeader *out_sl_hdr, Bool *sl_compressed, GF_Err *out_reception_status, Bool *is_new_data)
{
u64 pos, start_from;
Bool sync;
GF_BitStream *bs;
GF_AC3Header hdr;
AC3Reader *read = plug->priv;
*out_reception... | false | false | false | false | false | 0 |
ExecTypeFromTLInternal(List *targetList, bool hasoid, bool skipjunk)
{
TupleDesc typeInfo;
ListCell *l;
int len;
int cur_resno = 1;
if (skipjunk)
len = ExecCleanTargetListLength(targetList);
else
len = ExecTargetListLength(targetList);
typeInfo = CreateTemplateTupleDesc(len, hasoid);
foreach(l, targ... | false | false | false | false | false | 0 |
destroy_async(struct kref *kref)
{
struct uss720_async_request *rq = container_of(kref, struct uss720_async_request, ref_count);
struct parport_uss720_private *priv = rq->priv;
unsigned long flags;
if (likely(rq->urb))
usb_free_urb(rq->urb);
kfree(rq->dr);
spin_lock_irqsave(&priv->asynclock, flags);
list_del_... | false | false | false | false | false | 0 |
push(String s)
{
if (s.length() > 0) {
html.push_back(s);
}
} | false | false | false | false | false | 0 |
set_x2apic_extra_bits(int pnode)
{
__this_cpu_write(x2apic_extra_bits, pnode << uvh_apicid.s.pnode_shift);
} | false | false | false | false | false | 0 |
encx24j600_tx_timeout(struct net_device *dev)
{
struct encx24j600_priv *priv = netdev_priv(dev);
netif_err(priv, tx_err, dev, "TX timeout at %ld, latency %ld\n",
jiffies, jiffies - dev->trans_start);
dev->stats.tx_errors++;
netif_wake_queue(dev);
return;
} | false | false | false | false | false | 0 |
ftp_lite_get_response_raw( struct ftp_lite_server *s, char *line )
{
char *result;
while(1) {
result = fgets(line,FTP_LITE_LINE_MAX,s->response);
if(result) {
string_chomp(line);
return 1;
} else {
if(errno==EINTR) {
continue;
} else {
errno = ECONNRESET;
return 0;
}
}
}
} | false | false | false | false | false | 0 |
scm_mb_substring(ScmCharCodec *codec,
ScmMultibyteString mbs, size_t i, size_t len)
{
ScmMultibyteString ret, end;
ScmMultibyteCharInfo c;
ret = mbs;
while (i--) {
c = SCM_CHARCODEC_SCAN_CHAR(codec, ret);
SCM_MBS_SKIP_CHAR(ret, c);
}
end = ret;
while (len... | false | false | false | false | false | 0 |
splay_tree_lookup (splay_tree sp, splay_tree_key key)
{
splay_tree_splay (sp, key);
if (sp->root && (*sp->comp)(sp->root->key, key) == 0)
return sp->root;
else
return 0;
} | false | false | false | false | false | 0 |
password_input(const char *prompt, const char *rprompt, const bool norepeat) {
char *pass = NULL;
if (query_emit_id(NULL, UI_PASSWORD_INPUT, &pass, &prompt, norepeat ? NULL : &rprompt) == -2) {
print("password_nosupport");
return NULL;
}
return pass;
} | false | false | false | false | false | 0 |
ext4_inode_to_goal_block(struct inode *inode)
{
struct ext4_inode_info *ei = EXT4_I(inode);
ext4_group_t block_group;
ext4_grpblk_t colour;
int flex_size = ext4_flex_bg_size(EXT4_SB(inode->i_sb));
ext4_fsblk_t bg_start;
ext4_fsblk_t last_block;
block_group = ei->i_block_group;
if (flex_size >= EXT4_FLEX_SIZE_D... | false | false | false | false | false | 0 |
PerlIOBuf_get_ptr(pTHX_ PerlIO *f)
{
const PerlIOBuf * const b = PerlIOSelf(f, PerlIOBuf);
if (!b->buf)
PerlIO_get_base(f);
return b->ptr;
} | false | false | false | false | false | 0 |
entityDefaulted(EntityDefaultedEvent *event)
{
if (generalEntities_) {
SGMLApplication::GeneralEntityEvent appEvent;
setEntity(appEvent.entity, event->entity());
app_->generalEntity(appEvent);
}
delete event;
} | false | false | false | false | false | 0 |
startOneSwapDirCreation(SwapDir * sd)
{
/*
* On Windows, fork() is not available.
* The following is a workaround for create store directories sequentially
* when running on native Windows port.
*/
#ifndef _SQUID_MSWIN_
if (fork())
return;
#endif
if (NULL != sd->newfs)
sd->newfs(sd);
#... | false | false | false | false | false | 0 |
parse(Scope *sc, Dsymbol *s, utf8_t *comment)
{
//printf("parse(%s): '%s'\n", s->toChars(), comment);
if (sc->lastdc && isDitto(comment))
return NULL;
DocComment *dc = new DocComment();
if (!comment)
return dc;
dc->parseSections(comment);
for (size_t i = 0; i < dc->sections.di... | false | false | false | false | false | 0 |
chunk_boot(void)
{
/* Set variables according to the value of opt_lg_chunk. */
chunksize = (ZU(1) << opt_lg_chunk);
assert(chunksize >= PAGE);
chunksize_mask = chunksize - 1;
chunk_npages = (chunksize >> LG_PAGE);
if (config_stats || config_prof) {
if (malloc_mutex_init(&chunks_mtx))
return (true);
memse... | false | false | false | false | false | 0 |
pvr2_v4l2_read(struct file *file,
char __user *buff, size_t count, loff_t *ppos)
{
struct pvr2_v4l2_fh *fh = file->private_data;
int ret;
if (fh->fw_mode_flag) {
struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
char *tbuf;
int c1,c2;
int tcnt = 0;
unsigned int offs = *ppos;
tbuf = kmalloc(PAGE... | false | false | false | false | false | 0 |
plps_sym_possible_dt_timing(Task *task,
Block *target,
Array_entry_dtu_params *eparams,
const int entry)
{
Dtu_mt *discard;
Dtu_mt *depend;
Dtu_mt *var_depend;
Dtu_mt *last, *tmp;
int pgno = task->TaskexePro[target->... | false | false | false | false | false | 0 |
perf_argp_parse_long(const char *name, const char *arg, struct argp_state *state)
{
char *endptr;
long value;
errno = 0;
value = strtol(arg, &endptr, 0);
if (errno)
argp_failure(state, EXIT_FAILURE, errno,
"Invalid %s", name);
else if (*arg == '\0' || *endptr != '\0... | false | false | false | false | false | 0 |
user_var_get_value_and_type (const char *name,
GretlType *type)
{
user_var *u = get_user_var_by_name(name);
void *ret = NULL;
if (u != NULL) {
ret = u->ptr;
*type = u->type;
} else {
*type = GRETL_TYPE_NONE;
}
return ret;
} | false | false | false | false | false | 0 |
GetFileListResponseMsg(char* path, char flags)
{
FileTransferMsg fileListMsg;
FileListInfo fileListInfo;
int status = -1;
memset(&fileListMsg, 0, sizeof(FileTransferMsg));
memset(&fileListInfo, 0, sizeof(FileListInfo));
/* fileListInfo can have null data if the folder is Empty
or if some error conditi... | false | false | false | false | false | 0 |
fragmentCmd(clientData, interp, objc, objv)
ClientData clientData; /* The HTML widget */
Tcl_Interp *interp; /* The interpreter */
int objc; /* Number of arguments */
Tcl_Obj *const *objv; /* List of all arguments */
{
HtmlTree *pTree ... | false | false | false | false | false | 0 |
selinux_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx,
struct xfrm_sec_ctx **new_ctxp)
{
struct xfrm_sec_ctx *new_ctx;
if (!old_ctx)
return 0;
new_ctx = kmemdup(old_ctx, sizeof(*old_ctx) + old_ctx->ctx_len,
GFP_ATOMIC);
if (!new_ctx)
return -ENOMEM;
atomic_inc(&selinux_xfrm_refcount);
*new_ct... | false | false | false | false | false | 0 |
zmq_connect (void *s_, const char *addr_)
{
if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) {
errno = ENOTSOCK;
return -1;
}
return (((zmq::socket_base_t*) s_)->connect (addr_));
} | false | false | false | false | false | 0 |
parse_primitive_type_counter(struct line_parser *lp,
struct ftfil *ftfil)
{
struct ftfil_lookup_counter *ftflc;
struct ftfil_lookup_counter_rec *ftflcr, *ftflcr2;
char *c;
enum ftfil_op op;
c = lp->word;
NEXT_WORD(&lp->buf, lp->word);
if (!lp->word) {
fterr_warnx("%s line %d: Expecting counter.",... | false | false | false | false | false | 0 |
sink_checkphi(jit_State *J, IRIns *ira, IRRef ref)
{
if (ref >= REF_FIRST) {
IRIns *ir = IR(ref);
if (irt_isphi(ir->t) || (ir->o == IR_CONV && ir->op2 == IRCONV_NUM_INT &&
irt_isphi(IR(ir->op1)->t))) {
ira->prev++;
return 1; /* Sinkable PHI. */
}
/* Otherwise the value must be loo... | false | false | false | false | false | 0 |
do_part_set_gpt_type(const char *device, int partnum, const char *guid)
{
if (partnum <= 0) {
reply_with_error ("partition number must be >= 1");
return -1;
}
CLEANUP_FREE char *typecode = NULL;
if (asprintf (&typecode, "%i:%s", partnum, guid) == -1) {
reply_with_perror ("asprintf");
return -1;... | false | false | false | false | false | 0 |
_init_ipmi (void)
{
ipmi_locate_ctx_t locate_ctx = NULL;
assert (err_progname);
if (!(locate_ctx = ipmi_locate_ctx_create ()))
_err_exit ("Error creating locate_ctx: %s", strerror (errno));
if (!ipmi_is_root ())
_err_exit ("Permission denied, must be root.");
if (cmd_args.common.driver_type != IPM... | false | false | false | false | false | 0 |
globus_i_gfs_control_end_421(
const char * msg)
{
int i;
int kill_count;
globus_list_t * list;
globus_l_gfs_server_instance_t * instance;
GlobusGFSName(globus_i_gfs_control_end_421);
... | false | false | false | false | false | 0 |
UpdatePointerToNewGen(HeapObject** p) {
if (!(*p)->IsHeapObject()) return;
Address old_addr = (*p)->address();
ASSERT(HEAP->InFromSpace(*p));
Address new_addr = Memory::Address_at(old_addr);
if (new_addr == NULL) {
// We encountered pointer to a dead object. Clear it so we will
// not visit it agai... | false | false | false | false | false | 0 |
graph_path_key_match(graph *root, dlist *key_path){
size_t size = dlist_length(key_path);
size_t i = 0;
dlist *run = key_path;
graph *troot = root;
while(i < size){
dlist *descent = dlist_find(troot->edges, (void*)run->data, &root->method->comparable, FALSE);
if(descent == NULL) return NULL;
troot = (graph*)... | false | false | false | false | false | 0 |
m_s_kill(KILL_NODE *node, ARTICLE *articles, SUBJECT *subj)
{
ARTICLE *art = get_by_msgid(node);
if (!art || art->subject->no_unread == 0)
return 0;
return mark_subject_read(art->subject, False, True);
} | false | false | false | false | false | 0 |
add_gradm_acl(struct role_acl *role)
{
struct stat fstat;
char gradm_realpath[PATH_MAX] = { 0 };
char *gradm_name;
struct ip_acl ip;
struct protoent *proto;
char *gradm_path;
char *grpam_path;
find_gradm_path(gradm_realpath);
gradm_name = gr_strdup(gradm_realpath);
if (bikeshedding_detected()) {
gradm_pa... | false | false | false | false | false | 0 |
set_size(unsigned mbSize) {
unsigned newSize;
assert(mbSize >= 4 && mbSize <= 1024);
for(newSize = 1024; newSize * 4 * (sizeof(TTEntry)) <= (mbSize << 20);
newSize *= 2);
newSize /= 2;
if(newSize != size) {
size = newSize;
delete [] entries;
entries = new TTEntry[size * 4];
if(entries... | false | false | false | false | false | 0 |
language_support_get_header_file (IAnjutaEditor* editor)
{
GFile *file, *parent;
gchar *parent_uri, *basename, *ext;
GFile *ret = NULL;
file = ianjuta_file_get_file (IANJUTA_FILE (editor), NULL);
if (!file)
return NULL;
parent = g_file_get_parent (file);
parent_uri = g_file_get_uri... | false | false | false | false | false | 0 |
UT_convertToDimensionlessString(double value, const char * szPrecision)
{
// return pointer to static buffer -- use it quickly.
//
// We temporarily force the locale back to english so that
// we get a period as the decimal point.
static char buf[100];
char bufFormat[100];
sprintf(bufFormat,"%%%sf",((szPrecisi... | false | false | false | false | false | 0 |
task_get_billrate (GttTask *tsk)
{
switch (gtt_task_get_billrate (tsk))
{
case GTT_REGULAR: return _("Regular");
case GTT_OVERTIME: return _("Overtime");
case GTT_OVEROVER: return _("Double Overtime");
case GTT_FLAT_FEE: return _("Flat Fee");
default: return "";
}
return "";
} | false | false | false | false | false | 0 |
window_web_view_title_changed_cb (WebKitWebView *web_view,
WebKitWebFrame *web_frame,
const gchar *title,
DhWindow *window)
{
if (web_view == window_get_active_web_view (window)) {
win... | false | false | false | false | false | 0 |
wait_response_timer(gpointer data)
{
struct mcap_mcl *mcl = data;
GError *gerr = NULL;
RELEASE_TIMER(mcl);
g_set_error(&gerr, MCAP_ERROR, MCAP_ERROR_FAILED,
"Timeout waiting response");
mcap_notify_error(mcl, gerr);
g_error_free(gerr);
mcl->mi->mcl_disconnected_cb(mcl, mcl->mi->user_data);
mcap_cache_... | false | false | false | false | false | 0 |
cmd_commit_unconv(struct anthy_input_context* ictx)
{
ensure_buffer(&ictx->commit, &ictx->s_commit,
ictx->n_commit + ictx->n_hbuf + ictx->n_hbuf_follow);
memcpy(ictx->commit + ictx->n_commit, ictx->hbuf, ictx->n_hbuf);
ictx->n_commit += ictx->n_hbuf;
if (ictx->n_hbuf_follow > 0)
memcpy(ictx->commit + ict... | false | false | false | false | false | 0 |
PrintSelf(std::ostream & os, Indent indent) const
{
Superclass::PrintSelf(os, indent);
os << indent << "FileName: " << m_FileName << std::endl;
os << indent << "FileType: " << this->GetFileTypeAsString(m_FileType) << std::endl;
os << indent << "ByteOrder: " << this->GetByteOrderAsString(m_ByteOrder) << std::en... | false | false | false | false | false | 0 |
visit(ir_discard *ir)
{
assert(ir->condition == NULL); /* FINISHME */
/* We track our discarded pixels in f0.1. By predicating on it, we can
* update just the flag bits that aren't yet discarded. By emitting a
* CMP of g0 != g0, all our currently executing channels will get turned
* off.
*/
... | false | false | false | false | false | 0 |
Repl_5_Inc_Protocol_new(Repl_Protocol *rp)
{
repl5_inc_private *rip = NULL;
Private_Repl_Protocol *prp = (Private_Repl_Protocol *)slapi_ch_malloc(sizeof(Private_Repl_Protocol));
prp->delete = repl5_inc_delete;
prp->run = repl5_inc_run;
prp->stop = repl5_inc_stop;
prp->status = repl5_inc_status;
prp->notify_updat... | false | false | false | false | false | 0 |
perl_free(pTHXx)
{
dVAR;
PERL_ARGS_ASSERT_PERL_FREE;
if (PL_veto_cleanup)
return;
#ifdef PERL_TRACK_MEMPOOL
{
/*
* Don't free thread memory if PERL_DESTRUCT_LEVEL is set to a non-zero
* value as we're probably hunting memory leaks then
*/
if (PL_perl_destruct_level == 0) {
const U32 old... | false | false | false | false | false | 0 |
zlib_free(void *strm)
{
z_stream *stream = strm;
if (stream)
vfree(stream->workspace);
kfree(stream);
} | false | false | false | false | false | 0 |
o_undo_cleanup(void)
{
int i;
char *filename;
for (i = 0 ; i < undo_file_index; i++) {
filename = g_strdup_printf("%s%cgschem.save%d_%d.sch", tmp_path,
G_DIR_SEPARATOR, prog_pid, i);
unlink(filename);
g_free(filename);
}
g_free(tmp_path);
tmp_path = NULL;
} | false | false | false | false | false | 0 |
dhcpv6(struct packet *packet) {
struct iaddrmatchlist *ap;
struct client_state *client;
char addrbuf[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")];
/* Silently drop bogus messages. */
if (packet->dhcpv6_msg_type >= dhcpv6_type_name_max)
return;
/* Discard, with log, packets from quenched sources. */
for... | true | true | false | false | true | 1 |
ScanECPGKeywordLookup(const char *text)
{
const ScanKeyword *res;
/* First check SQL symbols defined by the backend. */
res = ScanKeywordLookup(text, SQLScanKeywords, NumSQLScanKeywords);
if (res)
return res;
/* Try ECPG-specific keywords. */
res = ScanKeywordLookup(text, ECPGScanKeywords, lengthof(ECPGScanKe... | false | false | false | false | false | 0 |
get_build_group_pointer(const GeanyBuildSource src, const GeanyBuildGroup grp)
{
GeanyDocument *doc;
GeanyFiletype *ft = NULL;
switch (grp)
{
case GEANY_GBG_FT:
if ((doc = document_get_current()) == NULL)
return NULL;
if ((ft = doc->file_type) == NULL)
return NULL;
switch (src)
{
case GEA... | false | false | false | false | false | 0 |
initstrings(void)
{
stringconsttable = (STRING **) malloc(sizeof(STRING *) * STRCONSTALLOC);
if (stringconsttable == NULL) {
math_error("Unable to allocate constant table");
/*NOTREACHED*/
}
stringconsttable[0] = &_nullstring_;
stringconstcount = 1;
stringconstavail = STRCONSTALLOC - 1;
} | false | false | false | false | false | 0 |
get_bus_name (GUdevClient *uclient, NMDevice *device)
{
GUdevDevice *udevice;
const char *ifname, *bus;
char *display_bus;
bus = g_object_get_data (G_OBJECT (device), BUS_TAG);
if (bus) {
if (*bus)
return bus;
else
return NULL;
}
ifname = nm_device_get_iface (device);
if (!ifname)
return NULL;
u... | false | false | false | false | false | 0 |
RequestDataInternal(
unsigned int composite_index,
vtkDataObject* non_composite_input, vtkSelection* sel,
vtkInformation* outInfo)
{
if (non_composite_input->IsA("vtkCompositeDataSet"))
{
vtkErrorMacro(
"RequestDataInternal cannot be called with a composite data input.");
return NULL;
}
... | false | false | false | false | false | 0 |
da9052_map_voltage(struct regulator_dev *rdev,
int min_uV, int max_uV)
{
struct da9052_regulator *regulator = rdev_get_drvdata(rdev);
struct da9052_regulator_info *info = regulator->info;
int id = rdev_get_id(rdev);
int ret, sel;
ret = verify_range(info, min_uV, max_uV);
if (ret < 0)
return ret;
if ... | false | false | false | false | false | 0 |
snarf_macro (char *av[], char *val)
{
char * p;
int ac = 0;
char * tmp_av[100];
int tmp_ac = 0;
p = NDMOS_API_STRDUP (val);
if (!p) {
error_byebye ("bad strdup macro");
}
for (;;) {
while (isspace((int)*p)) p++;
if (*p == 0) break;
tmp_av[tmp_ac++] = p;
while (*p && !isspace((int)*p)) p++;
if (... | true | true | false | true | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.