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 |
|---|---|---|---|---|---|---|
smtp_connect(smtp_t * smtp)
{
enum connect_result status;
if ((smtp->fd = socket(global_data->smtp_server.ss_family, SOCK_STREAM, IPPROTO_TCP)) == -1) {
DBG("SMTP connect fail to create socket.");
free_smtp_all(smtp);
return;
}
status = tcp_connect(smtp->fd, &global_data->smtp_server);
/* Handle connectio... | false | false | false | false | false | 0 |
get_words(FILE *fp, int *nwords, char **orig_line)
{
#define BIG_STGAPS 4096
static char str[BIG_STGAPS];
static char str_copy[BIG_STGAPS];
char **words;
int max_words = 10;
int num_words = 0;
char *ptr,*ptr2;
char *result;
words = (char **) myalloc (sizeof (char *) * max_words);
/* read in a line *... | false | false | false | false | false | 0 |
__queue_delayed_work(int cpu, struct workqueue_struct *wq,
struct delayed_work *dwork, unsigned long delay)
{
struct timer_list *timer = &dwork->timer;
struct work_struct *work = &dwork->work;
WARN_ON_ONCE(!wq);
WARN_ON_ONCE(timer->function != delayed_work_timer_fn ||
timer->data != (unsigned long)dwork... | false | false | false | false | false | 0 |
hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
{
void *ctx = state;
/* For-loops and while-loops start a new scope, but do-while loops do not.
*/
if (mode != ast_do_while)
state->symbols->push_scope();
if (init_statement != NULL)
init_statement->hir(instructions... | false | false | false | false | false | 0 |
find(string_ty *name)
{
//
// We cache the answers. A typical session is going to do this
// for many requests, not just one.
//
static symtab_ty *stp;
if (!stp)
{
stp = new symtab_ty(5);
stp->set_reap(reaper);
}
module_ty *mp = (module_ty *)stp->query(name);
if (mp)
{
... | false | false | false | false | false | 0 |
get_city_tile_output_bonus(const struct city *pcity,
const struct tile *ptile,
const struct output_type *poutput,
enum effect_type effect_type)
{
fc_assert_ret_val(pcity != NULL, 0);
return get_target_bonus_effects(NULL,
city_owner(pcity), pcity, NULL,
ptile, NULL, poutput... | false | false | false | false | false | 0 |
lock_ool(volatile AO_TS_t *l)
{
int i = 0;
while (AO_test_and_set_acquire(l) == AO_TS_SET)
AO_pause(++i);
} | false | false | false | false | false | 0 |
checkAccess(IOAccessMode mask)
{
if ((mAccessMode & mask) != mask) throw IOException(EACCES);
} | false | false | false | false | false | 0 |
do_set_bar_color(const char* tk, bar_struct* bar, int type) {
/* Use tokenizer that jumps over () pairs to be able to parse CVTRGB(...) */
int fi = 0;
string tokstr = (const char*)tk;
level_char_separator separator(",", "", "(", ")");
tokenizer<level_char_separator> tokens(tokstr, separator);
while (tokens.has_mo... | false | false | false | false | false | 0 |
bridge_channel_unsuspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
{
ao2_lock(bridge_channel);
bridge_channel->suspended = 0;
bridge_array_add(bridge, bridge_channel->chan);
ast_cond_signal(&bridge_channel->cond);
ao2_unlock(bridge_channel);
if (bridge->technology->unsuspend) {
brid... | false | false | false | false | false | 0 |
xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
{
struct mm_struct *mm;
/* convert pages-usec to Mbyte-usec */
stats->coremem = p->acct_rss_mem1 * PAGE_SIZE / MB;
stats->virtmem = p->acct_vm_mem1 * PAGE_SIZE / MB;
mm = get_task_mm(p);
if (mm) {
/* adjust to KB unit */
stats->hiwater_rss = get... | false | false | false | false | false | 0 |
regex_exec_match(const struct my_regex *preg, const char *subject,
size_t nmatch, regmatch_t pmatch[]) {
#if defined(USE_PCRE) || defined(USE_PCRE_JIT)
int ret;
int matches[MAX_MATCH * 3];
int enmatch;
int i;
/* Silently limit the number of allowed matches. max
* match i the maximum value f... | false | false | false | false | false | 0 |
sym_read_S24C16_nvram(struct sym_device *np, int offset, u_char *data, int len)
{
u_char gpcntl, gpreg;
u_char old_gpcntl, old_gpreg;
u_char ack_data;
int retv = 1;
int x;
/* save current state of GPCNTL and GPREG */
old_gpreg = INB(np, nc_gpreg);
old_gpcntl = INB(np, nc_gpcntl);
gpcntl = old_gpcntl & 0x1c;
... | false | false | false | false | false | 0 |
embDbiSortOpen(AjPFile* alistfile,
ajuint ifile, const AjPStr dbname,
AjPStr const * fields, ajuint nfields)
{
AjPFile elistfile;
ajuint ifield;
elistfile = embDbiFileSingle(dbname, "list", ifile+1);
for(ifield=0;ifield < nfields; ifield++)
alistfile[ifield] = embDbiFileSingle(dbnam... | false | false | false | false | false | 0 |
skipColon(lex_state_t * state) {
if (!iseos(state) && ischr(state, ':')) {
state->pos++;
return SKIP_OK;
} else {
return SKIP_NONE;
}
} | false | false | false | false | false | 0 |
print_tmdispatch( tmdispatch *disp, size_t depth ) {
int j,k;
jprintf( depth, " Channel | Frequencies\n" );
jprintf( depth, "---------|----------------\n" );
for (j = 0; j < CHANNELS; j++) {
jprintf( depth, "% 8d |", j );
for (j = 0; j < FREQUENCIES; j++) {
printf( " %f", di... | false | false | false | false | true | 1 |
glade_widget_adaptor_create_eprop_by_name (GladeWidgetAdaptor *adaptor,
const gchar *property_id,
gboolean packing,
gboolean use_command)
{
GladePropertyClass *klass;
g_return_val_if_fail... | false | false | false | true | false | 1 |
byte_to_binary (int x)
{
static char b[9] = {0};
int z;
for (z = 256; z > 0; z >>= 1) {
strcat(b, ((x & z) == z) ? "1" : "0");
}
return b;
} | false | false | false | false | false | 0 |
putNCvx_schar_longlong(NC *ncp, const NC_var *varp,
const size_t *start, size_t nelems, const longlong *value)
{
off_t offset = NC_varoffset(ncp, varp, start);
size_t remaining = varp->xsz * nelems;
int status = NC_NOERR;
void *xp;
if(nelems == 0)
... | false | false | false | false | false | 0 |
nssCertificateArray_Join (
NSSCertificate **certs1,
NSSCertificate **certs2
)
{
if (certs1 && certs2) {
NSSCertificate **certs, **cp;
PRUint32 count = 0;
PRUint32 count1 = 0;
cp = certs1;
while (*cp++) count1++;
count = count1;
cp = certs2;
while (*cp++) count++;
certs = nss_ZREALLOCARRAY(certs1, NSSCe... | false | false | false | false | false | 0 |
gitrp_next(git_revpool *pool)
{
git_commit *next;
if (!pool->walking)
gitrp__prepare_walk(pool);
while ((next = pool->next_commit(&pool->iterator)) != NULL) {
if (!next->uninteresting)
return next;
}
/* No commits left to iterate */
gitrp_reset(pool);
return NULL;
} | false | false | false | false | false | 0 |
graph_walk(graph_ty *gp)
{
int nproc;
string_ty *key;
string_ty *s;
id_ty *idp;
string_list_ty wl;
opcode_context_ty *ocp;
/*
* see if the jobs variable is set
*/
key = str_from_c("parallel_jobs");
ocp = opcode_context_new(0, 0);
idp ... | false | false | false | false | true | 1 |
evaluate_consecutive_weekends (Chromosome chromo, unsigned worker)
{
unsigned value = 0;
unsigned power = 0;
unsigned base = get_consweekend_base (chromo);
worker %= chromo.width;
for (int day = SATURDAY; day + 1 < chromo.length; day += WEEK)
if (!is_working_the_weekend (chromo, worker, day / WEEK))
... | false | false | false | false | false | 0 |
GenerateInputRequestedRegion()
{
for ( DataObjectPointerMap::iterator it=m_Inputs.begin(); it != m_Inputs.end(); ++it )
{
if ( it->second )
{
it->second->SetRequestedRegionToLargestPossibleRegion();
}
}
} | false | false | false | false | false | 0 |
IS_POSOBJ_Handler (
Obj self,
Obj obj )
{
return (TNUM_OBJ(obj) == T_POSOBJ ? True : False);
} | false | false | false | false | false | 0 |
pdf_load_type0_font(pdf_document *xref, pdf_obj *dict)
{
pdf_obj *dfonts;
pdf_obj *dfont;
pdf_obj *subtype;
pdf_obj *encoding;
pdf_obj *to_unicode;
dfonts = pdf_dict_gets(dict, "DescendantFonts");
if (!dfonts)
fz_throw(xref->ctx, "cid font is missing descendant fonts");
dfont = pdf_array_get(dfonts, 0);
s... | false | false | false | false | false | 0 |
alloc_segment(int flag, int len, int noconv_len)
{
struct anthy_input_segment *seg;
seg = (struct anthy_input_segment*)
malloc(sizeof(struct anthy_input_segment));
seg->flag = flag;
seg->cand_no = -1;
seg->nr_cand = -1;
seg->noconv_len = noconv_len;
if (len) {
seg->str = (char *)malloc(len);
} e... | false | false | false | false | false | 0 |
EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
DEBUG_LOG("BattleGroundAV: player destroyed point node %i", node);
MANGOS_ASSERT(m_Nodes[node].Owner != BG_AV_TEAM_NEUTRAL)
BattleGroundTeamIndex ownerTeamIdx = BattleGroundTeamIndex(m_Nodes[node].Owner);
Team ownerTeam = ownerTeamIdx == BG_TEAM_ALLIANCE ? ... | false | false | false | false | false | 0 |
find_best_mode (GnomeRRMode **modes, int *out_width, int *out_height)
{
int i;
*out_width = 0;
*out_height = 0;
for (i = 0; modes[i] != NULL; i++)
{
int w, h;
w = gnome_rr_mode_get_width (modes[i]);
h = gnome_rr_mode_get_height (modes[i]);
if (w * h > *out_width * *out_height)
... | false | false | false | false | false | 0 |
circuit_mark_all_unused_circs(void)
{
circuit_t *circ;
for (circ=global_circuitlist; circ; circ = circ->next) {
if (CIRCUIT_IS_ORIGIN(circ) &&
!circ->marked_for_close &&
!circ->timestamp_dirty)
circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED);
}
} | false | false | false | false | false | 0 |
findDefinition(const char *n)
{
SymbolManager *sm = this->getSymbolManager();
Symbol s = sm->getSymbol(n);
if (s == 0)
return NULL;
else
return this->findDefinition(s);
} | false | false | false | false | false | 0 |
preedit_caret_callback(XIC xic __UNUSED__,
XPointer client_data,
XIMPreeditCaretCallbackStruct *call_data)
{
EINA_LOG_DBG("in");
Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)client_data;
Ecore_IMF_Context_Data *imf_context_data;
imf_context_data = ecore_imf_con... | false | false | false | false | false | 0 |
cik_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclk)
{
int r, i;
struct atom_clock_dividers dividers;
u32 tmp;
r = amdgpu_atombios_get_clock_dividers(adev,
COMPUTE_GPUCLK_INPUT_FLAG_DEFAULT_GPUCLK,
ecclk, false, ÷rs);
if (r)
return r;
for (i = 0; i < 100; i++) {
... | false | false | false | false | false | 0 |
bnxt_dump_tx_sw_state(struct bnxt_napi *bnapi)
{
struct bnxt_tx_ring_info *txr = bnapi->tx_ring;
int i = bnapi->index;
if (!txr)
return;
netdev_info(bnapi->bp->dev, "[%d]: tx{fw_ring: %d prod: %x cons: %x}\n",
i, txr->tx_ring_struct.fw_ring_id, txr->tx_prod,
txr->tx_cons);
} | false | false | false | false | false | 0 |
glp_write_asnprob(glp_graph *G, int v_set, int a_cost, const char
*fname)
{ XFILE *fp;
glp_vertex *v;
glp_arc *a;
int i, k, count = 0, ret;
double cost;
if (v_set >= 0 && v_set > G->v_size - (int)sizeof(int))
xerror("glp_write_asnprob: v_set = %d; invalid offset\n",
... | false | true | false | false | false | 1 |
Java_org_gdal_gdal_gdalJNI_SetConfigOption(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
(void)jenv;
(void)jcls;
arg1 = 0;
if (jarg1) {
arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
if (!arg1) return ;
}
arg2 = 0;
if (jarg... | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__gfx__drivers__hb_getSFntTable(void * font, HB_Tag tableTag, HB_Byte * buffer, HB_UInt * length)
{
FT_Face face = (FT_Face)font;
FT_ULong ftlen = *length;
FT_Error error = 0;
if(!((*face).face_flags & (1L << 3)))
return HB_Err_Invalid_Argument;
error = FT_Load_Sfnt_Table(face, tableTag, 0, buff... | false | false | false | false | false | 0 |
platform_pci_set_power_state(struct pci_dev *dev,
pci_power_t t)
{
return pci_platform_pm ? pci_platform_pm->set_state(dev, t) : -ENOSYS;
} | false | false | false | false | false | 0 |
khttp_connect_file(knetFile *fp)
{
int ret, l = 0;
char *buf, *p;
if (fp->fd != -1) netclose(fp->fd);
fp->fd = socket_connect(fp->host, fp->port);
buf = calloc(0x10000, 1); // FIXME: I am lazy... But in principle, 64KB should be large enough.
l += sprintf(buf + l, "GET %s HTTP/1.0\r\nHost: %s\r\n", fp->path, fp->... | false | true | false | false | true | 1 |
pixSerializeToMemory(PIX *pixs,
l_uint32 **pdata,
size_t *pnbytes)
{
char *id;
l_int32 w, h, d, wpl, rdatasize, cdatasize, ncolors, nbytes, index;
l_uint8 *cdata; /* data in colormap (4 bytes/color table entry) */
l_uint32 *data;
l_uint32 *rdata; /* dat... | false | false | false | false | false | 0 |
glusterd_peerinfo_is_uuid_unknown (glusterd_peerinfo_t *peerinfo)
{
GF_ASSERT (peerinfo);
if (uuid_is_null (peerinfo->uuid))
return _gf_true;
return _gf_false;
} | false | false | false | false | false | 0 |
ulong_to_longchs(unsigned long sno, struct geometry G) {
longchs aa;
if (G.heads && G.sectors && G.cylindersize) {
aa.s = 1 + sno % G.sectors;
aa.h = (sno / G.sectors) % G.heads;
aa.c = sno / G.cylindersize;
return aa;
} else {
return zero_longchs;
}
} | false | false | false | false | false | 0 |
smp_scan_config(unsigned long base, unsigned long length)
{
unsigned int *bp = phys_to_virt(base);
struct mpf_intel *mpf;
unsigned long mem;
apic_printk(APIC_VERBOSE, "Scan for SMP in [mem %#010lx-%#010lx]\n",
base, base + length - 1);
BUILD_BUG_ON(sizeof(*mpf) != 16);
while (length > 0) {
mpf = (struct... | false | false | false | false | false | 0 |
nxp_nci_fw_send(struct nxp_nci_info *info)
{
struct nxp_nci_fw_info *fw_info = &info->fw_info;
long completion_rc;
int r;
reinit_completion(&fw_info->cmd_completion);
if (fw_info->written == 0) {
fw_info->frame_size = get_unaligned_be16(fw_info->data) &
NXP_NCI_FW_FRAME_LEN_MASK;
fw_info->data += N... | false | false | false | false | false | 0 |
gda_postgres_handler_bin_get_value_from_sql (G_GNUC_UNUSED GdaDataHandler *iface, const gchar *sql, GType type)
{
g_assert (sql);
GValue *value = NULL;
if (*sql) {
gint i = strlen (sql);
if ((i>=2) && (*sql=='\'') && (sql[i-1]=='\'')) {
gchar *str = g_strdup (sql);
guchar *unstr;
size_t retlength;
... | false | false | false | false | false | 0 |
createNewContext(GLXFBConfig fbConfig, GLint renderType, ::GLXContext shareList, GLboolean direct) const
{
::GLXContext glxContext = NULL;
int profile;
int minVersion;
int maxVersion = 5;
switch(mContextProfile) {
case CONTEXT_COMPATIBILITY:
profile = GL... | false | false | false | false | false | 0 |
getArgument(unsigned I) const { return Arguments[I]; } | false | false | false | false | false | 0 |
GetImage (VScreenType * pixmap) /*Work as in shared memory mose but use
normal Image handling functions...good
for local server that don't support
MITshm (like my metroX) */
{
int memsize;
unsigned char *data;
Pixmap testpixmap;
long VfTime = 0;
long ... | false | false | false | false | false | 0 |
requestUploadSelfLoops()
{
parent->progressLabel->setText(tr("Upload ride to Selfloops..."));
parent->progressBar->setValue(parent->progressBar->value()+10/parent->shareSiteCount);
QEventLoop eventLoop;
QNetworkAccessManager networkMgr;
connect(&networkMgr, SIGNAL(finished(QNetworkReply*)), this, ... | false | false | false | false | false | 0 |
wl1251_tx_double_buffer_busy(struct wl1251 *wl, u32 data_out_count)
{
int used, data_in_count;
data_in_count = wl->data_in_count;
if (data_in_count < data_out_count)
/* data_in_count has wrapped */
data_in_count += TX_STATUS_DATA_OUT_COUNT_MASK + 1;
used = data_in_count - data_out_count;
WARN_ON(used < 0);... | false | false | false | false | false | 0 |
init_sigchld (void)
{
#ifdef SIGCHLD
# ifdef HAVE_SIGACTION /* Thanks to Tom Kelly <tom@ancilla.toronto.on.ca> */
static Bool sigchld_initialized_p = 0;
if (!sigchld_initialized_p)
{
struct sigaction action, old;
action.sa_handler = sigchld_handler;
sigemptyset(&action.sa_mask);
actio... | true | true | false | false | false | 1 |
dlm_purge_lockres(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res)
{
int master;
int ret = 0;
assert_spin_locked(&dlm->spinlock);
assert_spin_locked(&res->spinlock);
master = (res->owner == dlm->node_num);
mlog(0, "%s: Purging res %.*s, master %d\n", dlm->name,
res->lockname.len, res->locknam... | false | false | false | false | false | 0 |
loadA(Action* a) {
for (int i = 0; i < numPreconds(a); i++)
playground[getPrecond(a,i)] |= FL_PRE;
for (int i = 0; i < numAdds(a); i++)
playground[getAdd(a,i)] |= FL_ADD;
for (int i = 0; i < numDels(a); i++)
playground[getDel(a,i)] |= FL_DEL;
} | false | false | false | false | false | 0 |
socket_gethostbyaddr(PyObject *self, PyObject *args)
{
sock_addr_t addr;
struct sockaddr *sa = SAS2SA(&addr);
char *ip_num;
struct hostent *h;
PyObject *ret = NULL;
#ifdef HAVE_GETHOSTBYNAME_R
struct hostent hp_allocated;
#ifdef HAVE_GETHOSTBYNAME_R_3_ARG
struct hostent_data data;
#else
... | false | false | false | false | false | 0 |
skip_use_of_return_value (rtx orig_insn, enum rtx_code code)
{
rtx insn;
insn = next_nonnote_insn (orig_insn);
if (insn
&& GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) == code
&& (XEXP (PATTERN (insn), 0) == current_function_return_rtx
|| XEXP (PATTERN (insn), 0) == const0_rtx))
... | false | false | false | false | false | 0 |
go_data_cache_records_set_size (GODataCache *cache, unsigned int n)
{
int expand = n - cache->records_allocated;
if (0 == expand)
return;
cache->records = g_realloc (cache->records, n * cache->record_size);
if (expand > 0)
memset (cache->records + cache->records_allocated * cache->record_size, 0,
expand * c... | false | false | false | false | false | 0 |
nameToASCII(const UnicodeString &name, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
process(name, FALSE, TRUE, dest, info, errorCode);
if( dest.length()>=254 && (info.errors&UIDNA_ERROR_DOMAIN_NAME_TOO_LONG)==0 &&
isASCIIString(dest) &&
(dest.length()>25... | false | false | false | false | false | 0 |
setContentCopy (GooString* new_content)
{
delete content;
content = NULL;
if (new_content) {
content = new_content->copy();
//append the unicode marker <FE FF> if needed
if (!content->hasUnicodeMarker()) {
content->insert(0, 0xff);
content->insert(0, 0xfe);
}
}
Object obj1;
ob... | false | false | false | false | false | 0 |
cmd_cnext (int interactive, struct cmdarg **args)
{
rp_window *cur, *last, *win;
cur = current_window();
if (!cur || !cur->res_class) /* Can't be done. */
return cmd_next (interactive, args);
/* CUR !in cycle list, so LAST marks last node. */
last = group_prev_window (rp_current_group, cur);
if (las... | false | false | false | false | false | 0 |
kendall_tau (const int *list, const DATASET *dset,
gretlopt opt, PRN *prn)
{
struct xy_pair *xy = NULL;
int T = dset->t2 - dset->t1 + 1;
const double *x, *y;
double tau, z;
int vx, vy;
int t, nn = 0;
int err = 0;
if (list[0] != 2) {
pputs(prn, _("This command requires two variables... | false | false | false | false | true | 1 |
getCompactUnwindRegNum(unsigned RegNum, bool isEH) const {
switch (getLLVMRegNum(RegNum, isEH)) {
case X86::EBX: case X86::RBX: return 1;
case X86::ECX: case X86::R12: return 2;
case X86::EDX: case X86::R13: return 3;
case X86::EDI: case X86::R14: return 4;
case X86::ESI: case X86::R15: return 5;
case X86... | false | false | false | false | false | 0 |
statusHepMC(int i) const {
// Positive codes are final particles. Status -12 are beam particles.
int statusNow = entry[i].status();
if (statusNow > 0) return 1;
if (statusNow == -12) return 4;
// Hadrons, muons, taus that decay normally are status 2.
int idNow = entry[i].id();
if (ent... | false | false | false | false | false | 0 |
cli_print_volume_status_call_frame (dict_t *dict, char *prefix)
{
int ret = -1;
char key[1024] = {0,};
int ref_count = 0;
char *translator = 0;
int complete = 0;
char *parent = NULL;
char ... | false | false | false | false | false | 0 |
FillSecondShaper(cmsUInt16Number* Table, cmsToneCurve* Curve, cmsBool Is8BitsOutput)
{
int i;
cmsFloat32Number R, Val;
for (i=0; i < 16385; i++) {
R = (cmsFloat32Number) (i / 16384.0);
Val = cmsEvalToneCurveFloat(Curve, R); // Val comes 0..1.0
if (Is8BitsOutput) {
... | false | false | false | false | false | 0 |
unix_info(std::string &name,uid_t &uid,gid_t &gid,unsigned long long &size,time_t &changed,time_t &modified,bool &is_file) {
struct stat fst;
if(stat(name.c_str(),&fst) != 0) {
return 1;
};
uid=fst.st_uid; gid=fst.st_gid;
size=fst.st_size; modified=fst.st_mtime; changed=fst.st_ctime;
if(S_ISREG(fst.st_m... | false | false | false | false | false | 0 |
inline_read_summary (void)
{
struct lto_file_decl_data **file_data_vec = lto_get_file_decl_data ();
struct lto_file_decl_data *file_data;
unsigned int j = 0;
inline_summary_alloc ();
while ((file_data = file_data_vec[j++]))
{
size_t len;
const char *data = lto_get_section_data (file_data,
... | false | false | false | false | false | 0 |
mailmbox_validate_lock(struct mailmbox_folder * folder,
int (* custom_lock)(struct mailmbox_folder *),
int (* custom_unlock)(struct mailmbox_folder *))
{
struct stat buf;
int res;
int r;
r = stat(folder->mb_filename, &buf);
if (r < 0) {
buf.st_mtime = (time_t) -1;
}
if ((buf.st_mtime != fold... | false | false | false | false | false | 0 |
mono_debug_close_method (MonoCompile *cfg)
{
MiniDebugMethodInfo *info;
MonoDebugMethodJitInfo *jit;
MonoMethodHeader *header;
MonoMethodSignature *sig;
MonoDebugMethodAddress *debug_info;
MonoMethod *method;
int i;
info = (MiniDebugMethodInfo *) cfg->debug_info;
if (!info || !info->jit) {
if (info)
g_fr... | false | false | false | false | false | 0 |
xen_rebuild_p2m_list(unsigned long *p2m)
{
unsigned int i, chunk;
unsigned long pfn;
unsigned long *mfns;
pte_t *ptep;
pmd_t *pmdp;
int type;
p2m_missing = alloc_p2m_page();
p2m_init(p2m_missing);
p2m_identity = alloc_p2m_page();
p2m_init(p2m_identity);
p2m_missing_pte = alloc_p2m_page();
paravirt_alloc_p... | false | false | false | false | false | 0 |
gst_inter_sub_sink_stop (GstBaseSink * sink)
{
GstInterSubSink *intersubsink = GST_INTER_SUB_SINK (sink);
g_mutex_lock (&intersubsink->surface->mutex);
if (intersubsink->surface->sub_buffer) {
gst_buffer_unref (intersubsink->surface->sub_buffer);
}
intersubsink->surface->sub_buffer = NULL;
g_mutex_unlo... | false | false | false | false | false | 0 |
navi_pviews_reset(void)
{
gint l_row;
for(l_row = 0; l_row < naviD->dyn_rows; l_row++)
{
FrameWidget *fw;
fw = &naviD->frame_widget_tab[l_row];
fw->frame_timestamp = 0;
gap_pview_drop_repaint_buffers(fw->pv_ptr);
}
} | false | false | false | false | false | 0 |
associationCheck(DUL_ASSOCIATESERVICEPARAMETERS * params,
const char *title, CTNBOOLEAN forgive,
DUL_ABORTITEMS * abortItems)
{
CONDITION
cond = APP_NORMAL;
if (strcmp(params->applicationContextName, DICOM_STDAPPLICATIONCONTEXT) != 0) {
abortItems->result = DUL_REJECT_PERMANENT;
abortItems->source ... | false | false | false | false | false | 0 |
byteflip(unsigned long int value, int n)
{
if (n == 2) return ((value & 0x00ff) << 8) | ((value & 0xff00) >> 8);
return ((value & 0x000000ff) << 24) |
((value & 0x0000ff00) << 8) |
((value & 0x00ff0000) >> 8) |
((value & 0xff000000) >> 24);
} | false | false | false | false | false | 0 |
gt_readjoiner_overlap_option_parser_new(
void *tool_arguments)
{
GtReadjoinerOverlapArguments *arguments = tool_arguments;
GtOptionParser *op;
GtOption *option, *optionparts, *optionmemlimit, *q_option, *v_option;
gt_assert(arguments);
/* init */
op = gt_option_parser_new("[option ...] [file]",
... | false | false | false | false | false | 0 |
getTestBundle(const char* bundleName, UErrorCode &status)
{
if(U_SUCCESS(status)) {
UResourceBundle *testBundle = NULL;
const char* icu_data = fLog.getTestDataPath(status);
if (testBundle == NULL) {
testBundle = ures_openDirect(icu_data, bundleName, &status);
if (status != U_ZERO_ERROR) {... | false | false | false | false | false | 0 |
midgard_key_config_real_set_value (MidgardKeyConfig* self, const char* group, const char* key, const char* value) {
g_return_if_fail (self != NULL);
g_return_if_fail (group != NULL);
g_return_if_fail (key != NULL);
g_return_if_fail (value != NULL);
return;
} | false | false | false | false | false | 0 |
analyze() {
if (Saiph::encumbrance() >= OVERTAXED)
return; // we can't eat while carrying too much
/* are we hungry? */
if (Saiph::hunger() <= HUNGRY) {
/* yes, we are, eat the food item in our inventory with lowest priority */
if (_food_items.size() > 0) {
map<unsigned char, Item>::iterator eat = Inventor... | false | false | false | false | false | 0 |
CassetteRead(int num_ticks)
{
if (cassette_readable) {
int loaded = FALSE; /* Function's return value */
event_time_left -= num_ticks;
while (event_time_left < 0) {
unsigned int length;
if (!passing_gap && pending_serin) {
serin_byte = pending_serin_byte;
/* A byte is loaded, return TRUE so it gets... | false | false | false | false | false | 0 |
dGeomHeightfieldDataBuildSingle( dHeightfieldDataID d,
const float *pHeightData, int bCopyHeightData,
dReal width, dReal depth, int widthSamples, int depthSamples,
dReal scale, dReal offset, dReal thickness, i... | false | true | false | false | false | 1 |
P_Display_Default_Colormap (Object d) {
register Display *dpy;
Check_Type (d, T_Display);
dpy = DISPLAY(d)->dpy;
return Make_Colormap (0, dpy, DefaultColormap (dpy, DefaultScreen (dpy)));
} | false | false | false | false | false | 0 |
cli_xml_output_vol_info_options (xmlTextWriterPtr writer, dict_t *dict,
char *prefix)
{
int ret = -1;
int opt_count = 0;
data_pair_t *pairs = 0;
data_t *value = 0;
char *ptr = NULL;
char ... | false | false | false | false | false | 0 |
ews_decode_mapi_property_string_id (const gchar *hexa_id,
guint32 *prop_id)
{
gint64 value;
g_return_val_if_fail (hexa_id != NULL, FALSE);
g_return_val_if_fail (prop_id != NULL, FALSE);
g_return_val_if_fail (g_ascii_strncasecmp (hexa_id, "0x", 2) == 0, FALSE);
value = g_ascii_strtoll (hexa_id + 2, NULL, ... | false | false | false | false | false | 0 |
show_stmt_cassign(ivl_statement_t net, unsigned ind)
{
unsigned idx;
unsigned lwid = 0;
fprintf(out, "%*sCONTINUOUS ASSIGN <lwidth=%u>\n", ind, "",
ivl_stmt_lwidth(net));
for (idx = 0 ; idx < ivl_stmt_lvals(net) ; idx += 1) {
lwid += show_assign_lval(ivl_stmt_lval(net, idx), ind+... | false | false | false | false | false | 0 |
gtk_dateentry_entry_key (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
GtkDateEntry *dateentry = user_data;
DB( g_print("\n[dateentry] entry key pressed: state=%04x, keyval=%04x\n", event->state, event->keyval) );
if( event->keyval == GDK_KEY_Up )
{
if( !(event->state & (GDK_SHIFT_MASK | GDK_CONTR... | false | false | false | false | false | 0 |
nv30_fb_tile_init(struct nvkm_fb *fb, int i, u32 addr, u32 size, u32 pitch,
u32 flags, struct nvkm_fb_tile *tile)
{
/* for performance, select alternate bank offset for zeta */
if (!(flags & 4)) {
tile->addr = (0 << 4);
} else {
if (fb->func->tile.comp) /* z compression */
fb->func->tile.comp(fb, i, size,... | false | false | false | false | false | 0 |
threebody(Param *paramij, Param *paramik, Param *paramijk,
double rsq1, double rsq2,
double *delr1, double *delr2,
double *fj, double *fk, int eflag, double &eng)
{
double r1,rinvsq1,rainv1,gsrainv1,gsrainvsq1,expgsrainv1;
double r2,rinvsq2,rainv2... | false | false | false | false | false | 0 |
test_checkout_index__options_dir_modes(void)
{
git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct stat st;
git_oid oid;
git_commit *commit;
mode_t um;
if (!cl_is_chmod_supported())
return;
cl_git_pass(git_reference_name_to_id(&oid, g_repo, "refs/heads/dir"));
cl_git_pass(git_commit_lookup(&commit... | false | false | false | false | false | 0 |
clear_domain_process_object (GCObject *obj, MonoDomain *domain)
{
gboolean remove;
process_object_for_domain_clearing (obj, domain);
remove = need_remove_object_for_domain (obj, domain);
if (remove && obj->synchronisation) {
guint32 dislink = mono_monitor_get_object_monitor_gchandle (obj);
if (dislink)
mon... | false | false | false | false | false | 0 |
migrate_process_corrections (GHashTable *corrections)
{
GHashTableIter iter;
gpointer old_filename;
gpointer new_filename;
g_hash_table_iter_init (&iter, corrections);
while (g_hash_table_iter_next (&iter, &old_filename, &new_filename)) {
migrate_rename (old_filename, new_filename);
g_hash_table_iter_remove ... | false | false | false | false | false | 0 |
efx_ef10_filter_rfs_insert(struct efx_nic *efx,
struct efx_filter_spec *spec)
{
struct efx_ef10_filter_table *table = efx->filter_state;
MCDI_DECLARE_BUF(inbuf, MC_CMD_FILTER_OP_IN_LEN);
struct efx_filter_spec *saved_spec;
unsigned int hash, i, depth = 1;
bool replacing = false;
int ins_index = -1;
u64... | false | false | false | false | false | 0 |
static_ranges_next (gamgi_rcp *rcp)
{
gamgi_slist **ranges;
gamgi_rod *rod;
gamgi_slist *slist;
int index;
ranges = rcp->ranges;
index = rcp->index;
if (index == INT_MAX) return NULL;
slist = ranges[index];
rod = (gamgi_rod *) slist->data;
return rod;
} | false | false | false | false | false | 0 |
mwifiex_wmm_eval_downgrade_ac(struct mwifiex_private *priv,
enum mwifiex_wmm_ac_e eval_ac)
{
int down_ac;
enum mwifiex_wmm_ac_e ret_ac;
struct mwifiex_wmm_ac_status *ac_status;
ac_status = &priv->wmm.ac_status[eval_ac];
if (!ac_status->disabled)
/* Okay to use this AC, its enabled */
return eval_ac;... | false | false | false | false | false | 0 |
dht_link (call_frame_t *frame, xlator_t *this,
loc_t *oldloc, loc_t *newloc)
{
xlator_t *cached_subvol = NULL;
xlator_t *hashed_subvol = NULL;
int op_errno = -1;
int ret = -1;
dht_local_t *local = NULL;
VALIDATE_OR_GOTO (frame, err);
... | false | false | false | false | false | 0 |
icon_list_button_release(GtkWidget *widget,
GdkEventButton *event,
ToolbarPage *prefs_toolbar )
{
static guint id = -1;
if (id >= 0) {
g_source_remove(id);
id = -1;
}
id = g_timeout_add(100, ok_cb, prefs_toolbar);
return FALSE;
} | false | false | false | false | false | 0 |
p_init_mplayer_working_dir(GapMPlayerParams *gpp)
{
gchar tmp_dir[200];
gchar *absolute;
pid_t l_pid;
/* include process id of the current process in the temp dir name */
l_pid = gap_base_getpid();
g_snprintf(tmp_dir, sizeof(tmp_dir), "tmp_mplayer_frames.%d", (int)l_pid);
if((gpp->b... | false | false | false | false | false | 0 |
palette_update_display(struct mame_display *display)
{
/* palettized case: point to the palette info */
if (colormode == PALETTIZED_16BIT)
{
display->game_palette = adjusted_palette;
display->game_palette_entries = total_colors_with_ui;
display->game_palette_dirty = dirty_palette;
if (adjusted_pale... | false | false | false | false | false | 0 |
inf_adopted_request_get_index(InfAdoptedRequest* request)
{
InfAdoptedRequestPrivate* priv;
g_return_val_if_fail(INF_ADOPTED_IS_REQUEST(request), NULL);
priv = INF_ADOPTED_REQUEST_PRIVATE(request);
return inf_adopted_state_vector_get(priv->vector, priv->user_id);
} | false | false | false | false | false | 0 |
string_hash(const void *key)
{
unsigned long hash;
const char *str;
hash = 0;
str = key;
while (*str)
hash += 31 * hash + *str++;
return hash;
} | false | false | false | false | false | 0 |
display_entryrdn_parent(DB *db, ID id, const char *nrdn, int indent)
{
DBC *cursor = NULL;
DBT key, data;
char *keybuf = NULL;
int rc = 0;
rdn_elem *elem;
char buffer[1024];
rc = db->cursor(db, NULL, &cursor, 0);
if (rc) {
printf("Can't create db cursor: %s\n", db_strerror(rc))... | false | false | false | false | false | 0 |
cmp(const GP<GStringRep> &s1, const char *s2,
const int len )
{
return cmp((s1?s1->data:0),s2,len);
} | 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.