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 |
|---|---|---|---|---|---|---|
is_old_pixel_value(struct fillinfo *info, int x, int y)
{
unsigned char *p = info->rgb + y * info->rowstride + x * info->pixelsize;
unsigned char or, og, ob, oa;
or = *p;
og = *(p + 1);
ob = *(p + 2);
oa = *(p + 3);
if ((or == info->or) && (og == info->og) &&
(ob == info->ob) && (oa ==... | false | false | false | false | false | 0 |
cmp(const FWObject *obj, bool recursive) throw(FWException)
{
if (Management::constcast(obj)==NULL) return false;
if (!FWObject::cmp(obj, recursive)) return false;
const Management *o2=Management::constcast(obj);
return (addr==o2->addr);
} | false | false | false | false | false | 0 |
extping_serverinfo(ucharbuf &pi, ucharbuf &po)
{
char lang[3];
lang[0] = tolower(getint(pi)); lang[1] = tolower(getint(pi)); lang[2] = '\0';
const char *reslang = lang, *buf = infofiles.getinfo(lang); // try client language
if(!buf) buf = infofiles.getinfo(reslang = "en"); // try english
sendstr... | false | false | false | false | false | 0 |
uwbd_msg_handle_reset(struct uwb_event *evt)
{
struct uwb_rc *rc = evt->rc;
int ret;
dev_info(&rc->uwb_dev.dev, "resetting radio controller\n");
ret = rc->reset(rc);
if (ret < 0) {
dev_err(&rc->uwb_dev.dev, "failed to reset hardware: %d\n", ret);
goto error;
}
return 0;
error:
/* Nothing can be done except... | false | false | false | false | false | 0 |
t1_callback(isc_task_t *task, isc_event_t *event) {
int i;
int j;
UNUSED(task);
j = 0;
for (i = 0; i < 1000000; i++)
j += 100;
t_info("task %s\n", (char *)event->ev_arg);
isc_event_free(&event);
} | false | false | false | false | false | 0 |
transition(
const QwtEventPattern &, const QEvent *e )
{
QList<QwtPickerMachine::Command> cmdList;
switch ( e->type() )
{
case QEvent::Enter:
case QEvent::MouseMove:
{
if ( state() == 0 )
{
cmdList += Begin;
cmdList += Appe... | false | false | false | false | false | 0 |
compare_timers (gconstpointer a, gconstpointer b, gpointer user_data)
{
const GkmTimer *ta = a;
const GkmTimer *tb = b;
if (ta->when < tb->when)
return -1;
return ta->when > tb->when;
} | false | false | false | false | false | 0 |
filterDiskObjects(DiskObjectPtr from, const char *root, int recursive)
{
int n = strlen(root);
DiskObjectPtr p, q;
while(from && !filter(from, root, n, recursive)) {
p = from;
from = p->next;
free(p->location);
free(p);
}
p = from;
while(p && p->next) {
... | false | false | false | false | false | 0 |
gfire_clan_create(guint32 p_clanid, const gchar *p_longName, const gchar *p_shortName, gboolean p_createGroup)
{
gfire_clan *ret = g_malloc0(sizeof(gfire_clan));
if(!ret)
goto error;
ret->id = p_clanid;
if(p_longName)
{
ret->long_name = g_strdup(p_longName);
if(!ret->long_name)
{
gfire_clan_free(ret);... | false | false | false | false | false | 0 |
decide_copy_try_finally (int ndests, bool may_throw, gimple_seq finally)
{
int f_estimate, sw_estimate;
gimple eh_else;
/* If there's an EH_ELSE involved, the exception path is separate
and really doesn't come into play for this computation. */
eh_else = get_eh_else (finally);
if (eh_else)
{
... | false | false | false | false | false | 0 |
renameSaved(u_int fi)
{
if (fi > 0 && items[fi-1].isSavedOp()) {
FaxItem& src = items[fi-1];
fxStr basedoc = mkbasedoc(src.item);
if (Sys::rename(src.item, basedoc) < 0) {
logError("Unable to rename transmitted document %s: %s",
(const char*) src.item, strerror(errno));
}
// Posix rename will succeed wi... | false | false | false | false | false | 0 |
new_molcas(GtkWidget *widget, gchar *data)
{
gchar t[BSIZE];
gchar t1[BSIZE];
if(imodif == DATA_MOD_YES)
{
sprintf(t,_("\nThe \"%s\" file has been modified.\n\n"),get_name_file(fileopen.datafile));
sprintf(t1,"%s",t);
sprintf(t,_(" %sIf you continue, you lose what you have changed.\n\n"),t1);
sprint... | false | true | false | false | false | 1 |
eliminate_subexp_dosum_sum_inner(Module_table *mpt,
Block *body,
Quadruple **tmpqpt,
Operand **opt,
int entry,
int idx_entry)
{
if (body != NULL) {
eliminate_subexp_dosum_sum_pe(mpt, body->pre_head, tmpqpt,
opt, ent... | false | false | false | false | false | 0 |
create_hosthash_from_file(char *hostfile,
int hashsize, struct gfarm_hash_table **hashp)
{
int error_line = -1, nhosts;
gfarm_error_t e;
char **hosts;
if (hostfile == NULL) {
*hashp = NULL;
return (GFARM_ERR_NO_ERROR);
}
e = gfarm_hostlist_read(hostfile, &nhosts, &hosts, &error_line);
if (e != GFARM_ERR_NO... | false | false | false | false | false | 0 |
GetPerspective()
{
ConfigManager *c = Manager::Get()->GetConfigManager(wxT("debugger_common"));
int v = c->ReadInt(wxT("/common/perspective"), static_cast<int>(OnePerDebuggerConfig));
if (v < OnlyOne || v > OnePerDebuggerConfig)
return OnePerDebuggerConfig;
return static_cast<Perspective>(v);
} | false | false | false | false | false | 0 |
dma_free_tx_skbufs(struct sxgbe_priv_data *priv)
{
int queue_num;
SXGBE_FOR_EACH_QUEUE(SXGBE_TX_QUEUES, queue_num) {
struct sxgbe_tx_queue *tqueue = priv->txq[queue_num];
tx_free_ring_skbufs(tqueue);
}
} | false | false | false | false | false | 0 |
z_wnew(Void)
{
if (f__recpos < f__hiwater) {
f__icptr += f__hiwater - f__recpos;
f__recpos = f__hiwater;
}
while(f__recpos++ < f__svic->icirlen)
*f__icptr++ = ' ';
f__recpos = 0;
f__cursor = 0;
f__hiwater = 0;
f__icnum++;
return 1;
} | false | false | false | false | false | 0 |
_ev_convert (char * bufResult,
const char * szString)
{
UT_ASSERT (szString && bufResult);
char *pl = bufResult;
const char *s = static_cast<const char *>(szString);
int len = strlen (szString);
int i;
for (i = 0; i < len; i++)
{
if (*s == '&')
s++;
else
*pl++ = *s++;
}
*... | false | false | false | false | false | 0 |
list_tail(struct list *list)
{
if (list->tailpred->pred)
return list->tailpred;
return NULL;
} | false | false | false | false | false | 0 |
xmlrpc_normalizeBuffer(const char *buf)
{
char *newbuf;
int i, len, j = 0;
len = strlen(buf);
newbuf = (char *)smalloc(sizeof(char) * len + 1);
for (i = 0; i < len; i++)
{
switch (buf[i])
{
/* ctrl char */
case 1:
break;
/* Bold ctrl char */
case 2:
break;
/* Color ctrl char... | false | false | false | false | false | 0 |
reschedule_declaration_region(RegionStack &rstack)
{
const bool is_architecture_top_region =
TopDeclarativeRegion (rstack)->is (IR_ARCHITECTURE_DECLARATION);
pIIR_DeclarativeRegion active_region = ActiveDeclarativeRegion (rstack);
pIIR_DeclarativeRegion root_region = RootDeclarativeRegion (rstack);
pIIR_... | false | false | false | false | false | 0 |
git_remove_command_run (AnjutaCommand *command)
{
GitRemoveCommand *self;
self = GIT_REMOVE_COMMAND (command);
git_command_add_arg (GIT_COMMAND (command), "rm");
if (self->priv->force)
git_command_add_arg (GIT_COMMAND (command), "-f");
git_command_add_list_to_args (GIT_COMMAND (command), self->priv->path... | false | false | false | false | false | 0 |
usbhs_pipe_data_sequence(struct usbhs_pipe *pipe, int sequence)
{
u16 mask = (SQCLR | SQSET);
u16 val;
/*
* sequence
* 0 : data0
* 1 : data1
* -1 : no change
*/
switch (sequence) {
case 0:
val = SQCLR;
break;
case 1:
val = SQSET;
break;
default:
return;
}
usbhsp_pipectrl_set(pipe, ma... | false | false | false | false | false | 0 |
getnetgrent_p(const char **host, const char **user, const char **domain,
struct net_data *net_data ) {
struct irs_ng *ng;
if (!net_data || !(ng = net_data->ng))
return (0);
return ((*ng->next)(ng, host, user, domain));
} | false | false | false | false | false | 0 |
execute(CMD_Args *args, CMD_Context context)
{
const char *filename, *text;
_args = args;
filename = _args->get_string_arg("tape-filename");
if (!filename)
return;
text = _args->get_string_arg("tape-rename-title");
if (!text)
return;
init(filename, text);
} | false | false | false | false | false | 0 |
decode_tic6x_unwind_regmask (unsigned int mask)
{
int i;
for (i = 12; mask; mask >>= 1, i--)
{
if (mask & 1)
{
fputs (tic6x_unwind_regnames[i], stdout);
if (mask > 1)
fputs (", ", stdout);
}
}
} | false | false | false | false | false | 0 |
ssl_wrapper_init(const char *local_addr, const char *target_addr,
const char **err_msg) {
struct ns_mgr *mgr = (struct ns_mgr *) calloc(1, sizeof(mgr[0]));
*err_msg = NULL;
if (mgr == NULL) {
*err_msg = "malloc failed";
} else {
ns_mgr_init(mgr, (void *) target_addr);
if (ns_... | false | false | false | false | false | 0 |
bna_rx_mod_stop(struct bna_rx_mod *rx_mod, enum bna_rx_type type)
{
struct bna_rx *rx;
rx_mod->flags &= ~BNA_RX_MOD_F_ENET_STARTED;
rx_mod->flags &= ~BNA_RX_MOD_F_ENET_LOOPBACK;
rx_mod->stop_cbfn = bna_enet_cb_rx_stopped;
bfa_wc_init(&rx_mod->rx_stop_wc, bna_rx_mod_cb_rx_stopped_all, rx_mod);
list_for_each_en... | false | false | false | false | false | 0 |
mpzspv_neg (mpzspv_t r, spv_size_t r_offset, mpzspv_t x, spv_size_t x_offset,
spv_size_t len, mpzspm_t mpzspm)
{
unsigned int i;
ASSERT (mpzspv_verify (r, r_offset + len, 0, mpzspm));
ASSERT (mpzspv_verify (x, x_offset, len, mpzspm));
for (i = 0; i < mpzspm->sp_num; i++)
spv_neg (r[i] + r_offset, ... | false | false | false | false | false | 0 |
on_menu_runmakeindex_activate (GtkWidget *widget, void *user) {
if (latex_run_makeindex (g_active_editor)) {
statusbar_set_message (_("Running Makeindex.."));
}
else {
statusbar_set_message (_("Error running Makeindex.."));
}
motion_force_compile (gummi->motion);
} | false | false | false | false | false | 0 |
UniquePlanetName(void)
{
char c = 'A';
again:
foreach(Planet *planet, planets()) {
if (planet->name().at(0).toAscii() == c) {
c++;
goto again;
}
}
return QChar(c);
} | false | false | false | false | false | 0 |
emit_event (GnomeCanvas *canvas,
GdkEvent *event)
{
GdkEvent *ev;
gint finished;
GnomeCanvasItem *item;
GnomeCanvasItem *parent;
guint mask;
/* Perform checks for grabbed items */
if (canvas->grabbed_item &&
!is_descendant (canvas->current_item, canvas->grabbed_item)) {
/* I think this warni... | false | false | false | false | false | 0 |
free_processlist( struct processlist * lptr ) {
struct processlist * ls = NULL ;
if( lptr == NULL ) return;
for( ; lptr ; ) {
if(lptr->p) { free_process(lptr->p); }
ls = lptr;
lptr = lptr->next;
free(ls);
}
} | false | false | false | false | false | 0 |
cast1_encrypt(struct keystate *ks, u_int8_t *data, u_int16_t len)
{
u_int16_t i, blocksize = ks->xf->blocksize;
u_int8_t *iv = ks->liv;
memcpy(iv, ks->riv, blocksize);
for (i = 0; i < len; data += blocksize, i += blocksize) {
XOR64(data, iv);
cast_encrypt(&ks->ks_cast, data, data);
SET64(iv, dat... | false | true | false | false | false | 1 |
assert_status(
const char *path,
int status_flags)
{
unsigned int status;
int error;
error = git_status_file(&status, repo, path);
if (status_flags < 0) {
cl_assert_equal_i(status_flags, error);
return;
}
cl_assert_equal_i(0, error);
cl_assert_equal_i((unsigned int)status_flags, status);
} | false | false | false | false | false | 0 |
beta_from_snapshot( libspectrum_snap *snap )
{
if( !libspectrum_snap_beta_active( snap ) ) return;
if( !( machine_current->capabilities &
LIBSPECTRUM_MACHINE_CAPABILITY_128_MEMORY ) ) {
settings_current.beta128_48boot = libspectrum_snap_beta_autoboot( snap );
}
beta_active = libspectrum_snap_beta... | false | false | false | false | false | 0 |
socks5_consume_reply_address (CamelTcpStreamRaw *raw,
PRFileDesc *fd,
GCancellable *cancellable,
GError **error)
{
gchar address_type;
gint bytes_to_consume;
gchar *address_and_port;
address_and_port = NULL;
if (read_from_p... | false | false | false | false | false | 0 |
SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string name = 1;
if (_has_bit(0)) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
... | false | false | false | false | false | 0 |
rfc2045_decodemsgtoutf8(struct rfc2045src *src,
struct rfc2045 *p,
struct rfc2045_decodemsgtoutf8_cb *callback)
{
struct rfc2045headerinfo *hi;
int rc;
hi=rfc2045header_start(src, p);
if (hi)
{
char *header;
char *value;
while (rfc2045header_get(hi, &header, &value,
RFC2045H_NOLC |
... | false | false | false | false | false | 0 |
echocmd(FILE *input, BSOCK *UA_sock)
{
for (int i=1; i < argc; i++) {
senditf("%s ", argk[i]);
}
sendit("\n");
return 1;
} | false | false | false | false | false | 0 |
tda826x_set_params(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct tda826x_priv *priv = fe->tuner_priv;
int ret;
u32 div;
u32 ksyms;
u32 bandwidth;
u8 buf [11];
struct i2c_msg msg = { .addr = priv->i2c_address, .flags = 0, .buf = buf, .len = 11 };
dprintk("%s:\n"... | false | false | false | false | false | 0 |
WrapperRepr(TableWrapper *wp)
{
PyObject *items, *result, *itemstring;
char buf[256];
switch (wp->rep.flag) {
case SETFLAG:
sprintf(buf, "kjSet("); break;
case DICTFLAG:
sprintf(buf, "kjDict("); break;
case GRAPHFLAG:
sprintf(buf, "kjGraph("); break;
default:
PyErr_SetString(PyExc_SystemEr... | false | false | false | false | false | 0 |
core_alua_show_access_type(
struct t10_alua_tg_pt_gp *tg_pt_gp,
char *page)
{
if ((tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_EXPLICIT_ALUA) &&
(tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_IMPLICIT_ALUA))
return sprintf(page, "Implicit and Explicit\n");
else if (tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_IMPL... | false | false | false | false | false | 0 |
done()
{
ht_format_group::done();
ht_elf_shared_data *elf_shared=(ht_elf_shared_data *)shared_data;
if (elf_shared->shnames) {
for (uint i=0; i < elf_shared->sheaders.count; i++)
free(elf_shared->shnames[i]);
free(elf_shared->shnames);
}
free(elf_shared->shrelocs);
switch (elf_shared->ident.e_ident[ELF_E... | false | false | false | false | false | 0 |
source(fname)
char *fname;
{
FILE *f;
if (strcmp(fname, "-") == 0)
file_src("<stdin>", stdin);
else {
if ((f = fopen(fname, "r")) == NULL)
err2("cannot open ", fname);
file_src(fname, f);
}
} | false | false | true | false | true | 1 |
php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, int filename_len TSRMLS_DC)
{
/* always clear CurrentStatFile and CurrentLStatFile even if filename is not NULL
* as it may contain outdated data (e.g. "nlink" for a directory when deleting a file
* in this directory, as shown by lstat_stat... | false | false | false | false | false | 0 |
unpack_track(GF_TrackBox *trak)
{
GF_Err e = GF_OK;
if (!trak->is_unpacked) {
e = stbl_UnpackOffsets(trak->Media->information->sampleTable);
trak->is_unpacked = 1;
}
return e;
} | false | false | false | false | false | 0 |
close_smacker(bgav_demuxer_context_t * ctx)
{
smacker_priv_t * priv;
priv = ctx->priv;
if(priv)
{
free_header(&priv->h);
free(priv);
}
} | false | false | false | false | false | 0 |
toSymbol (void)
{
if (!sym)
{
sym = new Symbol();
// Build reference symbol.
tree ctype = type->toCtype();
tree decl = build_decl (UNKNOWN_LOCATION, VAR_DECL, NULL_TREE, ctype);
get_unique_name (decl, "*");
set_decl_location (decl, loc);
TREE_PUBLIC (decl) = 0;
TR... | false | false | false | false | false | 0 |
Init_Inline_Data(void)
{
char **p, **q;
if (inline_asm == 0)
return;
p = inline_asm_data;
while(*p)
{
q = &INL_ACCESS_NEXT(p);
for(p += 4; *p != INL_END_FUNC; p++)
;
p++;
*q = (char *) p;
}
} | false | false | false | false | false | 0 |
bLoad( SimnNgSpice & roSimn )
{
bool bRtn=TRUE;
// Load components into the signal source choice box
PnlAnaBase::LoadSrcNames( roSimn.m_oaCpnts, wxT("VIR") );
// Go no further if the DC command isn't valid
if( ! roSimn.m_oCmdDC.bIsValid( ) ) return( FALSE );
// Set the source comp... | false | false | false | false | false | 0 |
cb_end_doctype(void *udata)
{
gxml_data * xd = (gxml_data *)udata;
if( xd->verb > 2 ){
show_depth(xd->depth, 1, stderr);
fprintf(stderr, "end_doctype\n");
}
} | false | false | false | false | false | 0 |
ResetIOMode (BOOL bDevID, BOOL bStatus)
{
if (thePrinter)
{
thePrinter->IOMode.bDevID = bDevID;
thePrinter->IOMode.bStatus = bStatus;
thePrinter->bCheckForCancelButton = bDevID;
}
} | false | false | false | false | false | 0 |
restml_copynode(node *c, node *d)
{
/* copy a node */
long i;
set_branchnum(d, c->branchnum);
for ( i = 0 ; i <= endsite ; i++)
copy_sitelike(d->x2[i],c->x2[i],sitelength);
d->v = c->v;
d->iter = c->iter;
d->xcoord = c->xcoord;
d->ycoord = c->ycoord;
d->ymin = c->ymin;
d->ymax = c->ymax;
d... | false | false | false | false | false | 0 |
blame_request(struct view *view, enum request request, struct line *line)
{
enum open_flags flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT;
struct blame *blame = line->data;
switch (request) {
case REQ_VIEW_BLAME:
if (check_blame_commit(blame)) {
string_copy(opt_ref, blame->commit->id);
open_view(v... | false | false | false | false | false | 0 |
SetSMSCenter(gn_data *data, struct gn_statemachine *state)
{
unsigned char req[64] = {FBUS_FRAME_HEADER, 0x30, 0x64};
gn_sms_message_center *smsc;
unsigned char *pos;
smsc = data->message_center;
if ((smsc->id < 1) || (smsc->id > 255))
return GN_ERR_INVALIDLOCATION;
pos = req+5;
*pos++ = smsc->id;
pos++;
*... | true | true | false | false | false | 1 |
GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness,
GNUNET_SCHEDULER_Task task,
void *task_cls)
{
GNUNET_SCHEDULER_TaskIdentifier ret;
ret =
GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
... | false | false | false | false | false | 0 |
incTwoBytePrimaryByOffset(uint32_t basePrimary, UBool isCompressible, int32_t offset) {
// Extract the second byte, minus the minimum byte value,
// plus the offset, modulo the number of usable byte values, plus the minimum.
// Reserve the PRIMARY_COMPRESSION_LOW_BYTE and high byte if necessary.
uint32_... | false | false | false | false | false | 0 |
exportMesh(const Mesh* pMesh, const String& filename,
MeshVersion version, Endian endianMode)
{
std::fstream *f = OGRE_NEW_T(std::fstream, MEMCATEGORY_GENERAL)();
f->open(filename.c_str(), std::ios::binary | std::ios::out);
DataStreamPtr stream(OGRE_NEW Fi... | false | false | false | false | false | 0 |
rb_file_open_internal(VALUE io, VALUE filename, const char *modestr)
{
int fmode = rb_io_modestr_fmode(modestr);
const char *p = strchr(modestr, ':');
convconfig_t convconfig;
if (p) {
parse_mode_enc(p+1, &convconfig.enc, &convconfig.enc2, &fmode);
}
else {
rb_encoding *e;
/* Set to d... | false | false | false | false | false | 0 |
handle_dir_common(int opts)
{
FILE *ls_fp;
char *line;
int ls_fd;
if (!(opts & USE_CTRL_CONN) && !port_or_pasv_was_seen())
return; /* port_or_pasv_was_seen emitted error response */
/* -n prevents user/groupname display,
* which can be problematic in chroot */
ls_fd = popen_ls((opts & LONG_LISTING) ? "-l" :... | false | false | false | false | false | 0 |
gda_handler_time_get_value_from_str (GdaDataHandler *iface, const gchar *str, GType type)
{
g_assert (str);
GdaHandlerTime *hdl;
g_return_val_if_fail (GDA_IS_HANDLER_TIME (iface), NULL);
hdl = (GdaHandlerTime*) (iface);
if (*str == '\'')
return NULL;
else
return gda_handler_time_get_value_from_locale (iface... | false | false | false | false | false | 0 |
load_glyphs(void)
{
int i;
if (glyphs)
return;
for (i = 1; i <= 4; i++) {
char buf[GPATH_MAX];
sprintf(buf, "%s/fonts/hersh.oc%d", G_gisbase(), i);
read_hersh(buf);
}
} | true | true | false | false | false | 1 |
ext2fs_inode_has_valid_blocks2(ext2_filsys fs, struct ext2_inode *inode)
{
/*
* Only directories, regular files, and some symbolic links
* have valid block entries.
*/
if (!LINUX_S_ISDIR(inode->i_mode) && !LINUX_S_ISREG(inode->i_mode) &&
!LINUX_S_ISLNK(inode->i_mode))
return 0;
/*
* If the symbolic l... | false | false | false | false | false | 0 |
addseriesdim(StackInfo *si, Array oldpos, Array addpos, int stackdim)
{
int i, j, k;
int reps, skips;
Type t;
Category c;
int rank, shape[MAXRANK];
Array newpos = NULL;
int nitems;
float *ofp, *nfp;
/* oldpos is the old positions, combined into a single array
* but without the ... | false | false | false | false | false | 0 |
getSymbolName(DataRefImpl Symb) const {
StringRef StringTable = getStringTableData();
MachO::nlist_base Entry = getSymbolTableEntryBase(this, Symb);
const char *Start = &StringTable.data()[Entry.n_strx];
if (Start < getData().begin() || Start >= getData().end())
report_fatal_error(
"Symbol name entr... | false | false | false | false | false | 0 |
get_terminal(git_reference **out, git_repository *repo, const char *ref_name, int nesting)
{
git_reference *ref;
int error = 0;
if (nesting > MAX_NESTING_LEVEL) {
giterr_set(GITERR_REFERENCE, "Reference chain too deep (%d)", nesting);
return GIT_ENOTFOUND;
}
/* set to NULL to let the caller know that they're... | false | false | false | false | false | 0 |
icaltime_from_string(const char* str)
{
struct icaltimetype tt = icaltime_null_time();
int size;
icalerror_check_arg_re(str!=0,"str",icaltime_null_time());
size = strlen(str);
if(size == 15) { /* floating time */
tt.is_utc = 0;
tt.is_date = 0;
} else if (size == 16) { /* UTC time, ends ... | false | false | false | false | false | 0 |
rv770_dpm_disable(struct radeon_device *rdev)
{
struct rv7xx_power_info *pi = rv770_get_pi(rdev);
if (!rv770_dpm_enabled(rdev))
return;
rv770_clear_vc(rdev);
if (pi->thermal_protection)
rv770_enable_thermal_protection(rdev, false);
rv770_enable_spread_spectrum(rdev, false);
if (pi->dynamic_pcie_gen2)
r... | false | false | false | false | false | 0 |
kadmin_renameprinc(int argc, char *argv[])
{
kadm5_ret_t retval;
krb5_principal oprinc = NULL, nprinc = NULL;
char *ocanon = NULL, *ncanon = NULL;
char reply[5];
if (!(argc == 3 || (argc == 4 && !strcmp("-force", argv[1])))) {
fprintf(stderr, _("usage: rename_principal [-force] old_principa... | true | true | true | false | false | 1 |
slotConverter()
{
QDir path = helpPath();
QString file(path.absPath() + "/dateconvert.html");
#ifdef WIN32
ShellExecuteA(NULL, "open", file.latin1(), NULL, NULL, SW_SHOWNORMAL);
#else
QString envValue(getenv(BrowserEnvironmentVariable));
if (envValue.isEmpty())
{
#ifndef DEBIAN_PACKAGE
QMessag... | false | false | false | false | false | 0 |
mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table)
{
const struct mmc_fixup *f;
u64 rev = cid_rev_card(card);
/* Non-core specific workarounds. */
if (!table)
table = mmc_fixup_methods;
for (f = table; f->vendor_fixup; f++) {
if ((f->manfid == CID_MANFID_ANY ||
f->manfid == card->c... | false | false | false | false | false | 0 |
dump_rule (dest, rule, dump_commands)
FILE *dest;
struct rules *rule;
Bool dump_commands;
{
struct cmds *this_cmd;
register int i;
char *deps, *this_dep;
if (rule == NULL) return;
for (i = 0; rule->targetlist[i] && (i < MAXHERIT); i++) {
fprintf (dest, "%s ", rule->targetlist[i]);
}
f... | false | false | false | false | false | 0 |
UpdateFromResulting()
{
if (m_LockUpdates || !txtPrjPath || !txtPrjName || !txtFinalDir || txtFinalDir->GetValue().IsEmpty())
return; // not ready yet
m_LockUpdates = true;
wxFileName fn = txtFinalDir->GetValue();
txtPrjPath->SetValue(fn.GetPath(wxPATH_GET_VOLUME));
txtPrjName->SetValue(fn.... | false | false | false | false | false | 0 |
convert_strdup (char *src, char **dstp)
{
if (src == 0) {
*dstp = 0;
return 0;
}
*dstp = NDMOS_API_STRDUP (src);
if (!*dstp)
return -1;
return 0;
} | false | false | false | false | false | 0 |
trace_find_cmdline(int pid, char comm[])
{
preempt_disable();
arch_spin_lock(&trace_cmdline_lock);
__trace_find_cmdline(pid, comm);
arch_spin_unlock(&trace_cmdline_lock);
preempt_enable();
} | false | false | false | false | false | 0 |
value_name()const {incomplete(); return "";} | false | false | false | false | false | 0 |
PrereadNewIndex ( ServedIndex_t & tIdx, const CSphConfigSection & hIndex, const char * szIndexName )
{
CSphString sWarning;
tIdx.m_pSchema = tIdx.m_pIndex->Prealloc ( tIdx.m_bMlock, sWarning );
if ( !tIdx.m_pSchema || !tIdx.m_pIndex->Preread() )
{
sphWarning ( "index '%s': preload: %s; NOT SERVING", szIndexName,... | false | false | false | false | false | 0 |
style_arrow(GB_DRAW *d, int x, int y, int w, int h, int type, int state)
{
QStyleOption opt;
QStyle::PrimitiveElement pe;
init_option(opt, x, y, w, h, state);
switch (type)
{
case ALIGN_NORMAL: pe = GB.System.IsRightToLeft() ? QStyle::PE_IndicatorArrowLeft : QStyle::PE_IndicatorArrowRight; break;
case ALIG... | false | false | false | false | false | 0 |
rndr_listitem(struct buf *ob, const struct buf *text, int flags, void *opaque)
{
BUFPUTSL(ob, "<li>");
if (text) {
size_t size = text->size;
while (size && text->data[size - 1] == '\n')
size--;
bufput(ob, text->data, size);
}
BUFPUTSL(ob, "</li>\n");
} | false | false | false | false | false | 0 |
onCurrentPatientChanged()
{
m_Interactions.clear();
m_DoTests.clear();
m_Cache.clear();
m_ComputedInteractionCache.clear();
m_ProcessedUid.clear();
int currentRow = patient()->currentPatientIndex().row();
refreshDrugsPrecautions(patient()->index(currentRow, 0), patient()->index(currentRow, p... | false | false | false | false | false | 0 |
opmmx(x86_insn_op *op, const char *xop)
{
if (strlen(xop) == 3 && xop[0] == 'm' && xop[1] == 'm'
&& xop[2] >= '0' && xop[2] <= '7') {
op->type = X86_OPTYPE_MMX;
op->size = 8;
op->mmx = xop[2] - '0';
return true;
} else {
return false;
}
} | false | false | false | false | false | 0 |
setup (Test *test, gconstpointer unused)
{
CK_OBJECT_CLASS klass = CKO_G_CREDENTIAL;
GkmObject *cred;
CK_ATTRIBUTE attrs[] = {
{ CKA_CLASS, &klass, sizeof (klass) },
{ CKA_VALUE, NULL, 0 }
};
test->module = test_secret_module_initialize_and_enter ();
test->session = test_secret_module_open_session (TRUE);
... | false | false | false | false | false | 0 |
codefile_write_header(codefile* cf) {
fitsbin_t* fb = cf->fb;
fitsbin_chunk_t* chunk = codes_chunk(cf);
chunk->itemsize = cf->dimcodes * sizeof(double);
chunk->nrows = cf->numcodes;
if (fitsbin_write_primary_header(fb) ||
fitsbin_write_chunk_header(fb, chunk)) {
ERROR("Failed to write codefile header");
... | false | false | false | false | false | 0 |
ExecQuadAtrib(quadrupla quad) {
int tipo1, valint1;
float valfloat1;
char valchar1, vallogic1;
switch(quad->opnd1.tipo) {
case INTOPND:
tipo1 = INTOPND;
valint1 = quad->opnd1.atr.valint; break;
case REALOPND:
tipo1 = REALOPND;
valfloat1 = quad->opnd1.atr.valfloat; break;
case... | false | false | false | false | true | 1 |
vga_switchto_stage2(struct vga_switcheroo_client *new_client)
{
int ret;
struct vga_switcheroo_client *active;
active = find_active_client(&vgasr_priv.clients);
if (!active)
return 0;
active->active = false;
set_audio_state(active->id, VGA_SWITCHEROO_OFF);
if (new_client->fb_info) {
struct fb_event event... | false | false | false | false | false | 0 |
my_exec(void)
{
if (xen_present())
xen_kexec_exec();
else
reboot(LINUX_REBOOT_CMD_KEXEC);
/* I have failed if I make it here */
fprintf(stderr, "kexec failed: %s\n",
strerror(errno));
return -1;
} | false | false | false | false | false | 0 |
e_util_shell_env_path_eval(const char *path)
{
/* evaluate things like:
* $HOME/bling -> /home/user/bling
* $HOME/bin/$HOSTNAME/blah -> /home/user/bin/localhost/blah
* etc. etc.
*/
const char *p, *v2, *v1 = NULL;
char buf[PATH_MAX], *pd, *s, *vp;
char *v = NULL;
int esc = 0, invar = 0;
... | false | false | false | false | false | 0 |
text_render_realize (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (IS_TEXT_RENDER (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
TextRender *obj = TEXT_RENDER (widget);
GdkWindowAttr attributes;
attributes.x = widget->allocation.x;
attributes.y = widge... | false | false | false | false | false | 0 |
gf_isom_get_media_data_size(GF_ISOFile *movie, u32 trackNumber)
{
u32 i, size;
GF_SampleSizeBox *stsz;
GF_TrackBox *tk = gf_isom_get_track_from_file(movie, trackNumber);
if (!tk) return 0;
stsz = tk->Media->information->sampleTable->SampleSize;
if (stsz->sampleSize) return stsz->sampleSize*stsz->sampleCount;
siz... | false | false | false | false | false | 0 |
gf_es_drop_au(GF_Channel *ch)
{
GF_DBUnit *au;
if (ch->is_pulling) {
if (ch->AU_buffer_pull) {
gf_term_channel_release_sl_packet(ch->service, ch);
ch->AU_buffer_pull->data = NULL;
ch->AU_buffer_pull->dataLength = 0;
}
ch->first_au_fetched = 1;
return;
}
/*lock the channel before touching the queu... | false | false | false | false | false | 0 |
fromHex(const char* hex) {
HashConvert hc;
if (strlen(hex) != 32)
throw hsBadParamException(__FILE__, __LINE__, "Invalid hex string");
for (size_t i=0; i<16; i++) {
int ch1 = charToHex(hex[(2*i) ]);
int ch2 = charToHex(hex[(2*i) + 1]);
if (ch1 == -1 || ch2 == -1)
... | false | false | false | false | false | 0 |
v_paste(m, cnt, cmd)
MARK m; /* where to paste the text */
long cnt; /* (ignored) */
int cmd; /* either 'p' or 'P' */
{
ChangeText
{
m = paste(m, cmd == 'p', FALSE);
}
return m;
} | false | false | false | false | false | 0 |
fs_rawudp_transmitter_set_type_of_service (FsRawUdpTransmitter *self,
gint tos)
{
gint i;
g_mutex_lock (self->priv->mutex);
if (self->priv->type_of_service == tos)
goto out;
self->priv->type_of_service = tos;
for (i = 0; i < self->components; i++)
{
GList *item;
for (item = self->priv->u... | false | false | false | false | false | 0 |
InitTempTableNamespace(void)
{
char namespaceName[NAMEDATALEN];
Oid namespaceId;
Oid toastspaceId;
Assert(!OidIsValid(myTempNamespace));
/*
* First, do permission check to see if we are authorized to make temp
* tables. We use a nonstandard error message here since "databasename:
* permission denied" ... | false | false | false | false | false | 0 |
AddToQueue(int module, unsigned long *ptr, int size, int done)
{
struct queue_buff_struct *c,*e;
unsigned long *d;
c = (struct queue_buff_struct *)safemalloc(sizeof(struct queue_buff_struct));
c->next = NULL;
c->size = size;
c->done = done;
d = (unsigned long *)safemalloc(size);
c->data = d;
memcpy(d... | false | false | false | false | false | 0 |
MipLevelSize(int miplevel)
{
if ( miplevel >= 0 && miplevel < CalcNumMipmaps() ) {
if ( !storageSize.size() )
CalcMipLevelSizes();
return storageSize[miplevel];
}
return 0;
} | false | false | false | false | false | 0 |
back_up_VAR (const GRETL_VAR *v)
{
GRETL_VAR *vbak;
int err = 0;
vbak = malloc(sizeof *vbak);
if (vbak == NULL) {
return NULL;
}
gretl_VAR_clear(vbak);
clear_gretl_matrix_err();
vbak->Y = gretl_matrix_copy(v->Y);
vbak->B = gretl_matrix_copy(v->B);
if (v->xcols > v->X->... | false | false | false | false | false | 0 |
alarm_applet_apps_load (AlarmApplet *applet)
{
AlarmListEntry *entry;
gchar *filename, *name, *icon, *command;
xmlDoc *xml_doc;
xmlNode *root, *section, *element;
gchar *executable;
const gchar *tmp;
const gchar* const *sysdirs;
gint i;
if (applet->apps != NULL)
alarm_list_entry_list_free (&(applet->a... | false | false | false | false | false | 0 |
addPreEmitPass() {
addPass(createThumb2SizeReductionPass());
// Constant island pass work on unbundled instructions.
addPass(createUnpackMachineBundles([this](const Function &F) {
return this->TM->getSubtarget<ARMSubtarget>(F).isThumb2();
}));
// Don't optimize barriers at -O0.
if (getOptLevel() != Co... | 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.