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 |
|---|---|---|---|---|---|---|
write_csv_record (gint i, gint *cols, gint ncols, FILE *f, GGobiData *d, ggobid *gg)
{
gboolean ok = true;
gchar *gstr;
gint j, jcol;
/*-- row label if present; else index --*/
if (d->rowlab && d->rowlab->data
&& (gstr = (gchar *) g_array_index (d->rowlab, gchar *, i)))
{
fprintf(f, "\"%s\",", ... | false | false | false | false | false | 0 |
prv_connector_acquired(dleyna_connector_id_t connection)
{
g_context.connection = connection;
if (!g_context.control_point->start_service(connection)) {
g_context.error = TRUE;
g_main_loop_quit(g_context.main_loop);
}
} | false | false | false | false | false | 0 |
filter_create_ext (struct filter *chain, const char *cmd,
...)
{
struct filter *f;
int max_args;
const char *s;
va_list ap;
/* allocate and initialize new filter */
f = (struct filter *) flex_alloc (sizeof (struct filter));
memset (f, 0, sizeof (*f));
f->filter_func = NULL;
f->extra = NULL;
f->next... | false | false | false | false | false | 0 |
cbf_set_children (cbf_node *node, unsigned int children)
{
unsigned int count, new_size, kblock;
void *vchild;
int errorcode;
/* Check the arguments */
if (!node)
return CBF_ARGUMENT;
/* Is the current size correct? */
if (children == node->children)
return 0;
/* Compute a tar... | false | false | false | false | false | 0 |
GLECloseFD(int* fd, int i) {
if (fd[i] != -1) {
close(fd[i]);
fd[i] = -1;
}
} | false | false | false | false | false | 0 |
initialize_group_array ()
{
register int i;
if (maxgroups == 0)
maxgroups = getmaxgroups ();
ngroups = 0;
group_array = (GETGROUPS_T *)xrealloc (group_array, maxgroups * sizeof (GETGROUPS_T));
#if defined (HAVE_GETGROUPS)
ngroups = getgroups (maxgroups, group_array);
#endif
/* If getgroups returns n... | false | false | false | false | false | 0 |
TestConstructors() {
printf("Testing constructors\n");
RE_Options options;
options.set_dotall(true);
const char *str = "HELLO\n" "cruel\n" "world";
RE orig("HELLO.*world", options);
CHECK(orig.FullMatch(str));
RE copy1(orig);
CHECK(copy1.FullMatch(str));
RE copy2("not a match");
CHECK(!copy2.Ful... | false | false | false | false | false | 0 |
token_print(const u_char *p, u_int length, u_int caplen)
{
const struct token_header *trp;
u_short extracted_ethertype;
struct ether_header ehdr;
u_int route_len = 0, hdr_len = TOKEN_HDRLEN;
int seg;
trp = (const struct token_header *)p;
if (caplen < TOKEN_HDRLEN) {
printf("[|token-ring]");
return hdr_len;... | false | false | false | false | false | 0 |
_parse_file(struct dm_task *dmt, const char *file)
{
char *buffer = NULL;
size_t buffer_size = 0;
FILE *fp;
int r = 0, line = 0;
/* one-line table on cmdline */
if (_table)
return _parse_line(dmt, _table, "", ++line);
/* OK for empty stdin */
if (file) {
if (!(fp = fopen(file, "r"))) {
err("Couldn't op... | false | false | false | false | false | 0 |
gst_rtp_pt_demux_init (GstRtpPtDemux * ptdemux, GstRtpPtDemuxClass * g_class)
{
GstElementClass *klass = GST_ELEMENT_GET_CLASS (ptdemux);
ptdemux->sink =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
"sink"), "sink");
g_assert (ptdemux->sink != NULL);
gst_pad_set_chain_... | false | false | false | false | false | 0 |
conversion_introspect (Babl *babl)
{
babl_log ("\t\tprocessings:%i pixels:%li",
babl->conversion.processings, babl->conversion.pixels);
if (BABL (babl->conversion.source)->class_type == BABL_FORMAT)
{
babl_log ("\t\terror: %f", babl_conversion_error (&babl->conversion));
}
} | false | false | false | false | false | 0 |
pas_audio_close(int dev)
{
unsigned long flags;
spin_lock_irqsave(&pas_lock, flags);
pas_audio_reset(dev);
pas_remove_intr(PAS_PCM_INTRBITS);
pcm_mode = PCM_NON;
pcm_busy = 0;
spin_unlock_irqrestore(&pas_lock, flags);
} | false | false | false | false | false | 0 |
find_prop_handler(const char *name,
const struct hlist_head *handlers)
{
struct prop_handler *h;
if (!handlers) {
u64 hash = btrfs_name_hash(name, strlen(name));
handlers = find_prop_handlers_by_hash(hash);
if (!handlers)
return NULL;
}
hlist_for_each_entry(h, handlers, node)
if (!strcmp(h->xattr_... | false | false | false | false | false | 0 |
Channel_verifychanactive(chanrec *chan)
{
if(!(chan->flags & CHAN_ONCHAN))
{
Log_write(LOG_DEBUG,"*","Oops. Found myself on %s and CHAN_ONCHAN is not set. Resetting.",chan->name);
Channel_resetchaninfo(chan);
return 0;
}
if(!(chan->flags & CHAN_ACTIVE))
return 0;
return 1;
} | false | false | false | false | false | 0 |
FuncLOWINDEX_PREPARE_RELS (
Obj self,
Obj r ) /* rels */
{
UInt i,j,k,l;
Obj ri, rel;
UInt * rp;
for (i=1;i<=LEN_PLIST(r);i++) {
ri=ELM_PLIST(r,i);
for (j=1;j<=LEN_PLIST(ri);j++) {
rel=ELM_PLIST(ri,j); /* single relator */
l=LEN_PLIST(... | false | false | false | false | false | 0 |
freex_notip(long nonodes, pointarray treenode)
{
/* used in dnaml & dnamlk */
long i, j;
node *p;
for (i = spp; i < nonodes; i++) {
p = treenode[i];
do {
for (j = 0; j < endsite; j++)
free(p->x[j]);
free(p->underflows);
free(p->x);
p = p->next;
} while (p != treenode... | false | false | false | false | false | 0 |
Xpage(int modifier, char *label, char *mnemo, char *oper)
{
char *s1,*s2;
register struct result *r;
register int plen;
if ( !oper )
{
outputEOP();
return 0;
}
if ( !filter(oper,"?_,_?",&s1,&s2) )
error("syntax: PAGE or PAGE plen,llen ");
checktype( r=parse(s1), L_ABSOLUTE );
plen=r->value;
che... | false | false | false | false | false | 0 |
jspeFactorArray() {
int idx = 0;
JsVar *contents = 0;
if (JSP_SHOULD_EXECUTE) {
contents = jsvNewWithFlags(JSV_ARRAY);
if (!contents) { // out of memory
jspSetError(false);
return 0;
}
}
/* JSON-style array */
JSP_MATCH_WITH_RETURN('[', contents);
while (!JSP_SHOULDNT_PARSE && exec... | false | false | false | false | false | 0 |
parse_combining_expression(unsigned int start, unsigned int end)
{
if (start >= end)
return NULL;
std::vector<expression *> subjects;
std::vector<token_t> combiners;
unsigned int idx = start;
bool first = true;
while (idx < end)
{
if (! first)
{
/* This... | false | false | false | false | false | 0 |
print_regexp(FILE *out, struct regexp *r) {
if (r == NULL) {
fprintf(out, "<NULL>");
return;
}
fputc('/', out);
if (r->pattern == NULL)
fprintf(out, "%p", r);
else {
char *rx;
size_t rx_len;
fa_restrict_alphabet(r->pattern->str, strlen(r->pattern->str... | false | false | false | false | false | 0 |
rtx_to_undefined (x)
rtx x;
{
unsigned int len, beg;
unsigned HOST_WIDE_INT ret;
len = GET_MODE_SIZE (GET_MODE (x));
beg = (GET_CODE (x) == SUBREG) ? SUBREG_BYTE (x) : 0;
ret = ~ ((unsigned HOST_WIDE_INT) 0);
ret = (~(ret << len)) << beg;
return ret;
} | false | false | false | false | false | 0 |
ArgusCheckTimeout(struct ArgusFlowStruct *obj)
{
int retn = 0;
unsigned int lapseTime;
struct timeval *tvp = NULL, thisTimeout;
if (obj->qhdr.lasttime.tv_sec > 0) {
lapseTime = obj->qhdr.lasttime.tv_sec + obj->ArgusTimeout;
if (((ArgusGlobalTime.tv_sec > lapseTime) || ((ArgusGlobalTime.tv_sec ... | false | false | false | false | false | 0 |
_cleanup_twitpic (char *string)
{
guchar *start;
size_t len;
g_return_if_fail (string != NULL);
for (start = (guchar*) string; *start && (g_ascii_isspace (*start) || *start == '-'); start++)
;
len = strlen ((char*)start);
g_memmove (string, start, len + 1);
while (len--) {
if (g_ascii_isspace... | false | false | false | false | false | 0 |
amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
{
struct drm_minor *minor = adev->ddev->primary;
struct dentry *ent, *root = minor->debugfs_root;
ent = debugfs_create_file("amdgpu_regs", S_IFREG | S_IRUGO, root,
adev, &amdgpu_debugfs_regs_fops);
if (IS_ERR(ent))
return PTR_ERR(ent);
i_size_write(ent-... | false | false | false | false | false | 0 |
operator<<(QDataStream& s, const AIValue& value)
{
for (int i=0;i<AIValue::NO_OF_LEVELS;i++) s << (qint32)value.mValue[i];
return s;
} | false | false | false | false | false | 0 |
WriteTemplates()
{
Areport f;
forlist(&factions) {
Faction *fac = (Faction *) elem;
AString str = "template.";
str = str + fac->num;
if(!fac->IsNPC()) {
int i = f.OpenByName(str);
if (i != -1) {
fac->WriteTemplate(&f, this);
f.Close();
}
fac->present_regions.DeleteAll();
}
Adot();
}... | false | false | false | false | false | 0 |
rewrite_word(int fd, int offset, uint32 value)
{
int old_offset = lseek(fd, 0, L_INCR);
if ((old_offset < 0) ||
(lseek(fd, offset, L_SET) < 0) ||
!write_msb_uint32(fd, value) ||
(lseek(fd, old_offset, L_SET) < 0))
return(0);
return(old_offset);
} | false | false | false | false | false | 0 |
netlink_neigh_update(struct nlmsghdr *msg)
{
struct ndmsg *ndm = NLMSG_DATA(msg);
struct rtattr *rta[NDA_MAX+1];
struct nhrp_interface *iface;
struct nhrp_peer_selector sel;
int used = FALSE;
netlink_parse_rtattr(rta, NDA_MAX, NDA_RTA(ndm), NDA_PAYLOAD(msg));
if (rta[NDA_DST] == NULL)
return;
if (!(ndm->ndm... | false | false | false | false | false | 0 |
Interpret (Command* cmd) {
if (cmd->IsA(ALIGNTOGRID_CMD)) {
SlotGraphic* slotg = (SlotGraphic*) GetGraphic();
Transformer total;
slotg->TotalTransformation(total);
Coord x0, y0, l;
float tx0, ty0;
slotg->GetOriginal(x0, y0, l);
total.Transform(float(x0), flo... | false | false | false | false | false | 0 |
_backup_cogorc_downsample_vert_cosite_3tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
orc_int8 * ORC_RESTRICT ptr0;
const orc_int8 * ORC_RESTRICT ptr4;
const orc_int8 * ORC_RESTRICT ptr5;
const orc_int8 * ORC_RESTRICT ptr6;
orc_int8 var35;
orc_int8 var36;
orc_int8 var37;
#if defined(__APP... | false | false | false | false | false | 0 |
sketchWidgets()
{
QList<SketchWidget *> list;
list << m_breadboardGraphicsView << m_schematicGraphicsView << m_pcbGraphicsView;
return list;
} | false | false | false | false | false | 0 |
verify_chv3 (app_t app,
gpg_error_t (*pincb)(void*, const char *, char **),
void *pincb_arg)
{
int rc = 0;
#if GNUPG_MAJOR_VERSION != 1
if (!opt.allow_admin)
{
log_info (_("access to admin commands is not configured\n"));
return gpg_error (GPG_ERR_EACCES);
}
#endif
... | false | false | false | false | false | 0 |
max77693_led_flash_strobe_get(
struct led_classdev_flash *fled_cdev,
bool *state)
{
struct max77693_sub_led *sub_led = flcdev_to_sub_led(fled_cdev);
struct max77693_led_device *led = sub_led_to_led(sub_led);
int ret;
if (!state)
return -EINVAL;
mutex_lock(&led->lock);
ret = max77693_get_strobe_status... | false | false | false | false | false | 0 |
OOM_CD(I g, ...) //out-of-memory count-decrement
{ va_list a; V v,o=(V)-1;
va_start(a,g);while(o!=(v=va_arg(a,V)))if(!v)g=1; va_end(a);
P(!g,1)//OK
va_start(a,g);while(o!=(v=va_arg(a,V)))cd(v); va_end(a);
R 0;
} | false | false | false | false | false | 0 |
getListFormatData(
const Locale& locale, UErrorCode& errorCode) {
if (U_FAILURE(errorCode)) {
return NULL;
}
{
Mutex m(&listFormatterMutex);
if (listPatternHash == NULL) {
initializeHash(errorCode);
if (U_FAILURE(errorCode)) {
return NU... | false | false | false | false | false | 0 |
document_manager_set_current_document_from_widget (DocumentManager *docmg, GtkWidget *child)
{
gphpedit_debug(DEBUG_DOC_MANAGER);
if (!docmg) return FALSE;
Document *data = DOCUMENT(document_manager_find_documentable_from_widget (docmg, (void *) child));
if (data){
_document_manager_set_current_document(doc... | false | false | false | false | false | 0 |
getNextMBlock(void *p)
{
MBlockMap *map;
nat off, j;
nat line_no;
MBlockMapLine line;
for (j = 0; j < mblock_map_count; j++) {
map = mblock_maps[j];
if (map->addrHigh32 == (StgWord)p >> 32) break;
}
if (j == mblock_map_count) return NULL;
for (; j < mblock_map_count; j... | false | false | false | false | false | 0 |
alloc(size_t amount)
{
if (amount == 0) {
/* grow until no more memory can be acquired */
long chunksize;
char *nmem;
/* if page size is not available, allocate kilobyte wise */
if ((chunksize = get_pagesize()) == -1)
chunksize = 1024;
nmem = malloc(amou... | false | false | false | false | true | 1 |
MD5Update( MD5Context *ctx, unsigned char *buf, unsigned len)
{
uint32_t t;
/* Update bitcount */
t = ctx->bits[0];
if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t)
ctx->bits[1]++; /* Carry from low to high */
ctx->bits[1] += len >> 29;
t = (t >> 3) & 0x3f; /* Bytes already in s... | false | false | false | false | false | 0 |
getFirstReloc(const coff_section *Sec, MemoryBufferRef M, const uint8_t *Base) {
uint64_t NumRelocs = getNumberOfRelocations(Sec, M, Base);
if (!NumRelocs)
return nullptr;
auto begin = reinterpret_cast<const coff_relocation *>(
Base + Sec->PointerToRelocations);
if (Sec->hasExtendedRelocations()) {
... | false | false | false | false | false | 0 |
skx_register_mci(struct skx_imc *imc)
{
struct mem_ctl_info *mci;
struct edac_mc_layer layers[2];
struct pci_dev *pdev = imc->chan[0].cdev;
struct skx_pvt *pvt;
int rc;
/* allocate a new MC control structure */
layers[0].type = EDAC_MC_LAYER_CHANNEL;
layers[0].size = NUM_CHANNELS;
layers[0].is_virt_csrow = fa... | false | false | false | false | false | 0 |
withDebugLoc(Instruction *I, const DILocation *DL) {
I->setDebugLoc(const_cast<DILocation *>(DL));
return I;
} | false | false | false | false | false | 0 |
ng_test(struct irs_ng *this, const char *name,
const char *host, const char *user, const char *domain)
{
struct pvt *pvt = (struct pvt *)this->private;
char *body = NULL;
size_t bodylen = 0;
int code;
char text[256];
int rval = 0;
UNUSED(name);
if (irs_irp_connection_setup(pvt->girpdata, &pvt->warned) != 0) ... | true | true | false | false | false | 1 |
callback_func0ret ()
{
int retval = 1;
PyObject *py_arg = arguments ? Py_BuildValue ("(O)",arguments) : NULL;
PyObject* val = make_call (py_arg);
if (val) retval = PyInt_AsLong (val);
Py_XDECREF (val);
return retval != 0;
} | false | false | false | false | false | 0 |
handle_split(SMSCConn *conn, Msg *msg, long reason)
{
struct split_parts *split = msg->sms.split_parts;
/*
* If temporarely failed, try again immediately but only if connection active.
* Because if connection is not active we will loop for ever here consuming 100% CPU
* time due to internal ... | false | false | false | false | false | 0 |
gt_ltr_cluster_stream_next(GtNodeStream *ns,
GtGenomeNode **gn,
GtError *err)
{
GtLTRClusterStream *lcs;
GtGenomeNode *ref_gn;
int had_err = 0;
unsigned long i = 0;
gt_error_check(err);
lcs = gt_ltr_cluster_stream_cast(ns);
if (l... | false | false | false | false | false | 0 |
pushcomposename (lua_State *L) {
const char *path = lua_tostring(L, -1);
const char *wild;
int n = 1;
while ((wild = strchr(path, LUA_PATH_MARK)) != NULL) {
/* is there stack space for prefix, name, and eventual last sufix? */
luaL_checkstack(L, 3, "too many marks in a path component");
lua_pushlstr... | false | false | false | false | false | 0 |
botnet_send_away(int idx, char *bot, int sock, char *msg, int linking)
{
int l;
if (tands > 0) {
l = simple_sprintf(OBUF, "aw %s%s %D %s\n",
((idx >= 0) && linking) ? "!" : "",
bot, sock, msg ? msg : "");
send_tand_but(idx, OBUF, -l);
#ifndef NO_OLD_BOTNET
... | false | false | false | false | false | 0 |
sb_set_turn_image ()
{
#if GTK_MAJOR_VERSION == 2
// FIXME: can't get existing bgcolor
static char pixbufs [7][size_sb_set_turn_image*(size_sb_set_turn_image+1)];
char **pixmap_data;
static GdkPixmap *pixmaps[7];
int colors[7] = {0x007700, 0x77ff77, 0x770000, 0xff7777, 0x000077, 0x7777ff,
0x777777};
int i, j... | true | true | false | false | false | 1 |
jbd2_journal_next_log_block(journal_t *journal, unsigned long long *retp)
{
unsigned long blocknr;
write_lock(&journal->j_state_lock);
J_ASSERT(journal->j_free > 1);
blocknr = journal->j_head;
journal->j_head++;
journal->j_free--;
if (journal->j_head == journal->j_last)
journal->j_head = journal->j_first;
w... | false | false | false | false | false | 0 |
procmsg_msginfo_new_from_mimeinfo(MsgInfo *src_msginfo, MimeInfo *mimeinfo)
{
MsgInfo *tmp_msginfo = NULL;
MsgFlags flags = {0, 0};
gchar *tmpfile = get_tmp_file();
FILE *fp = g_fopen(tmpfile, "wb");
if (!mimeinfo || mimeinfo->type != MIMETYPE_MESSAGE ||
g_ascii_strcasecmp(mimeinfo->subtype, "rfc822")) {
... | false | false | false | false | false | 0 |
annMaxSpread( // compute dimension of max spread
ANNpointArray pa, // point array
ANNidxArray pidx, // point indices
int n, // number of points
int dim) // dimension of space
{
int max_dim = 0; // dimension of max spread
ANNcoord max_spr = 0; // amount of max spread
if (n == 0) ... | false | false | false | false | false | 0 |
consolidatetree(long index)
{
node *start, *r, *q;
int i;
i = 0;
start = treenode[index - 1];
q = start->next;
while (q != start) {
r = q;
q = q->next;
chuck(&grbg, r);
}
chuck(&grbg, q);
i = index;
while (i <= nonodes) {
r = treenode[i - 1];
if (!(r->tip))
r->in... | false | false | false | false | false | 0 |
sbrDecoder_SetParam (HANDLE_SBRDECODER self,
const SBRDEC_PARAM param,
const INT value )
{
SBR_ERROR errorStatus = SBRDEC_OK;
/* configure the subsystems */
switch (param)
{
case SBR_SYSTEM_BITSTREAM_DELAY:
if (value < 0 || value ... | false | false | false | false | false | 0 |
computerPic_draw(But *but, int x,int y, int w,int h) {
XPoint points[4];
ButWin *win = but->win;
Display *dpy = butEnv_dpy(butWin_env(win));
Window xwin = butWin_xwin(win);
GC gc = butEnv_gc(butWin_env(win));
int h2 = but->h / 2, h3 = but->h / 3, h12 = but->h / 12;
int w6 = but->w / 6, w9 = but->w... | false | false | false | false | false | 0 |
polygon_new(int type)
/* Allocates and initialises a new polygon
** Parameters: (int) type: The SCI polygon type
** Returns : (polygon_t *) A newly allocated polygon
*/
{
polygon_t *polygon = (polygon_t*)sci_malloc(sizeof(polygon_t));
CLIST_INIT(&polygon->vertices);
polygon->type = type;
return polygon;
} | false | false | false | false | false | 0 |
get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n)
{
if(avctx->slice_count) return avctx->slice_offset[n];
else return AV_RL32(buf + n*8);
} | false | false | false | true | false | 1 |
_mesa_ARBvp_parse_option(struct asm_parser_state *state, const char *option)
{
if (strcmp(option, "ARB_position_invariant") == 0) {
state->option.PositionInvariant = 1;
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
gsql_navigation_menu_popup (GSQLNavigation *navigation, GtkActionGroup *action)
{
GSQL_TRACE_FUNC;
static GtkActionGroup *last_action = NULL;
GSQL_DEBUG ("Action[0x%x] LastAction[0x%x]", action, last_action);
if ((last_action != action) && (last_action != NULL))
gtk_action_group_set_visible (last_action, FA... | false | false | false | false | false | 0 |
OSS_Shutdown(GF_AudioOutput*dr)
{
OSSCTX();
ioctl(ctx->audio_dev,SNDCTL_DSP_RESET,NULL);
close(ctx->audio_dev);
if (ctx->wav_buf) gf_free(ctx->wav_buf);
ctx->wav_buf = NULL;
} | false | false | false | false | false | 0 |
compare(const void *pArg,unsigned argLen) const
{
Comparison result=lessThan;
if (contents()==pArg&&length()==argLen) result=equal;
else if (length()>0)
{
if (argLen>0)
{
int rc=memcmp(contents(),pArg,(length()<argLen)?length():argLen);
if (rc==0) result=(length()==argLen)?equal:(length()<argLen)?... | false | false | false | false | false | 0 |
__ath9k_hw_enable_interrupts(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
u32 sync_default = AR_INTR_SYNC_DEFAULT;
u32 async_mask;
if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) ||
AR_SREV_9561(ah))
sync_default &= ~AR_INTR_SYNC_HOST1_FATAL;
async_mask = AR_INTR_MAC_... | false | false | false | false | false | 0 |
GetSize ( const char * sKey, int iDefault ) const
{
CSphVariant * pEntry = (*this)( sKey );
if ( !pEntry )
return iDefault;
char sMemLimit[256];
strncpy ( sMemLimit, pEntry->cstr(), sizeof(sMemLimit) );
sMemLimit [ sizeof(sMemLimit)-1 ] = '\0';
int iLen = strlen ( sMemLimit );
if ( !iLen )
return iDefault;... | false | false | false | false | false | 0 |
checkYielded()
{
#if BLD_DEBUG
MprThreadService *ts;
MprThread *tp;
int i;
ts = MPR->threadService;
mprLock(ts->mutex);
for (i = 0; i < ts->threads->length; i++) {
tp = (MprThread*) mprGetItem(ts->threads, i);
mprAssert(tp->yielded);
}
mprUnl... | false | false | false | false | false | 0 |
decode_frame_speex(bgav_stream_t * s)
{
int i;
bgav_packet_t * p;
speex_priv_t * priv;
priv = s->data.audio.decoder->priv;
p = bgav_stream_get_packet_read(s);
if(!p)
return 0;
speex_bits_read_from(&priv->bits, (char*)p->data, p->data_size);
for(i = 0; i < priv->header->frames_per_packet; i++)... | false | false | false | false | false | 0 |
chk_decl_siderep(struct expr_t *lhsx, struct expr_t *rhsx,
char *objnam, int32 deltyp, word32 fnind, int32 lcnt)
{
int32 nd_inform, wire_issel;
struct expr_t *ndp;
struct net_t *np;
char s1[RECLEN];
/* expect rhs to be wider */
nd_inform = TRUE;
switch (rhsx->optyp) {
case ID:
nd_inform = FALSE;
np = ... | false | false | false | false | false | 0 |
handleConstantPoolUser(unsigned CPUserIndex) {
CPUser &U = CPUsers[CPUserIndex];
MachineInstr *UserMI = U.MI;
MachineInstr *CPEMI = U.CPEMI;
unsigned CPI = getCombinedIndex(CPEMI);
unsigned Size = CPEMI->getOperand(2).getImm();
// Compute this only once, it's expensive.
unsigned UserOffset = getUserOffse... | false | false | false | false | false | 0 |
extractNames(std::string& cmnName, std::set<std::string>& domainNames) const
{
domainNames.clear();
if (STACK_OF(GENERAL_NAME)* names = static_cast<STACK_OF(GENERAL_NAME)*>(X509_get_ext_d2i(_pCert, NID_subject_alt_name, 0, 0)))
{
for (int i = 0; i < sk_GENERAL_NAME_num(names); ++i)
{
const GENERAL_N... | false | false | false | false | false | 0 |
sv_selection_foreach (SheetView *sv,
gboolean (*range_cb) (SheetView *sv,
GnmRange const *range,
gpointer user_data),
gpointer user_data)
{
GSList *l;
g_return_val_if_fail (IS_SHEET_VIEW (sv), FALSE);
for (l = sv_selection_calc_simplification (sv); l != NULL; l = l->next) {
GnmRan... | false | false | false | false | false | 0 |
return_freelists(void **fl, void **gfl)
{
int i;
for (i = 1; i < TINY_FREELISTS; ++i) {
if ((word)(fl[i]) >= HBLKSIZE) {
return_single_freelist(fl[i], gfl+i);
}
/* Clear fl[i], since the thread structure may hang around. */
/* Do it in a way that is likely to trap ... | false | false | false | false | false | 0 |
coco_string_delete(wchar_t* &data) {
delete [] data;
data = NULL;
} | false | false | false | false | false | 0 |
get_hostname_property (CcInfoPanel *self,
const char *property)
{
GVariant *variant;
char *str;
variant = g_dbus_proxy_get_cached_property (self->priv->hostnamed_proxy,
property);
if (!variant)
{
GError *error = NULL;
GVariant *inner;
... | false | false | false | false | false | 0 |
digit_value_in_base (int c, int base)
{
int digit;
MPFR_ASSERTD (base > 0 && base <= MPFR_MAX_BASE);
if (c >= '0' && c <= '9')
digit = c - '0';
else if (c >= 'a' && c <= 'z')
digit = (base >= 37) ? c - 'a' + 36 : c - 'a' + 10;
else if (c >= 'A' && c <= 'Z')
digit = c - 'A' + 10;
else
retur... | false | false | false | false | false | 0 |
sa_geom_mousefunc() // new v.11.03
{
static int mx1, my1, mx2, my2;
static int mdx0, mdy0;
if (sa_stat != 1) return; // area gone? v.11.07
if (sa_currseq > sa_maxseq-2) {
zmessageACK(mWin,ZTX("e... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
const char *dest;
const time_t *ttls;
unsigned int i, n_ttls;
switch (cm_prefs_preferred_cipher()) {
case cm_prefs_aes128:
printf("cipher: AES128\n");
break;
case cm_prefs_aes256:
printf("cipher: AES256\n");
break;
}
switch (cm_prefs_preferred_digest()) {
case cm_prefs_sh... | false | false | false | false | false | 0 |
launch( float x, float y, float z)
{
XTRACE();
static ParticleGroup *bullets =
ParticleGroupManagerS::instance()->getParticleGroup(
HERO_BULLETS_GROUP);
for( int i=0; i<5; i++)
{
ParticleInfo pi;
pi.position.x = x;
pi.position.y = y;
pi.position.z = z;
pi.velocity.z = 0.0f * GAME_STEP_SCA... | false | false | false | false | false | 0 |
validrace(int rolenum, int racenum)
{
/* Assumes validrole */
return (racenum >= 0 && racenum < SIZE(races)-1 &&
(roles[rolenum].allow & races[racenum].allow & ROLE_RACEMASK));
} | false | false | false | false | false | 0 |
putRaw(const char *data, int size)
{
for (int i = 0; i < size; i++)
iString += data[i];
} | false | false | false | false | false | 0 |
__do_leading_login(void *data, struct list_head *list, struct node_rec *rec)
{
struct iface_rec *pattern_iface = data;
int nr_found;
/* Skip any records that do not match the pattern iface */
if (!iface_match(pattern_iface, &rec->iface))
return -1;
/*
* If there is an existing session that matcthes the targe... | false | false | false | false | false | 0 |
_ecore_con_client_kill(Ecore_Con_Client *cl)
{
if (cl->delete_me)
DBG("Multi kill request for client %p", cl);
else
{
ecore_con_event_client_del(cl);
if (cl->buf) return;
}
INF("Lost client %s", (cl->ip) ? cl->ip : "");
if (cl->fd_handler)
ecore_main_fd_handler_del(cl->fd... | false | false | false | false | false | 0 |
rtl8821ae_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
u32 reg_rcr = rtlpci->receive_config;
if (rtlpriv->psc.rfpwr_state != ERFON)
return;
if (check_bssid) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSI... | false | false | false | false | false | 0 |
mgu_email_check_empty( gchar *address ) {
gchar *retVal = NULL;
if( address ) {
retVal = g_strdup( address );
retVal = g_strchug( retVal );
retVal = g_strchomp( retVal );
if( *retVal == '\0' ) {
g_free( retVal );
retVal = NULL;
}
}
return retVal;
} | false | false | false | false | false | 0 |
import_print_worker_status(ImportWorkerInfo *info)
{
char *name = (info->work_type == PRODUCER ? "Producer" :
(info->work_type == FOREMAN ? "Foreman" :
info->index_info->name));
import_log_status_add_line(info->job,
"%-25s %s%10ld %7.1f", name... | false | false | false | false | false | 0 |
_vala_folks_role_field_details_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
FolksRoleFieldDetails * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_TYPE_ROLE_FIELD_DETAILS, FolksRoleFieldDetails);
switch (property_id) {
case FOLKS_ROLE_FIELD_DETAILS_ID:
fo... | false | false | false | false | false | 0 |
__exp10l (long double x)
{
long double z = __ieee754_exp10l (x);
if (__builtin_expect (!__finitel (z) || z == 0, 0)
&& __finitel (x) && _LIB_VERSION != _IEEE_)
/* exp10l overflow (246) if x > 0, underflow (247) if x < 0. */
return __kernel_standard_l (x, x, 246 + !!__signbitl (x));
return z;
} | false | false | false | false | false | 0 |
mms114_interrupt(int irq, void *dev_id)
{
struct mms114_data *data = dev_id;
struct input_dev *input_dev = data->input_dev;
struct mms114_touch touch[MMS114_MAX_TOUCH];
int packet_size;
int touch_size;
int index;
int error;
mutex_lock(&input_dev->mutex);
if (!input_dev->users) {
mutex_unlock(&input_dev->mut... | false | false | false | false | false | 0 |
mysql_audit_notify(THD *thd, uint event_class, uint event_subtype, ...)
{
va_list ap;
audit_handler_t *handlers= audit_handlers + event_class;
DBUG_ASSERT(event_class < audit_handlers_count);
mysql_audit_acquire_plugins(thd, event_class);
va_start(ap, event_subtype);
(*handlers)(thd, event_subtype, ap);
... | false | false | false | false | false | 0 |
InitializeEntries()
{
if ( this->NumberOfInputs > 0 )
{
for (int i=0; i<this->NumberOfInputs; i++)
{
this->PlotData[i]->Delete();
this->PlotGlyph[i]->Delete();
this->PlotAppend[i]->Delete();
this->PlotMapper[i]->Delete();
this->PlotActor[i]->Delete();
}//for all entri... | false | false | false | false | false | 0 |
limit_to_current_params(struct snd_pcm_substream *substream)
{
struct snd_oxfw *oxfw = substream->private_data;
struct snd_oxfw_stream_formation formation;
enum avc_general_plug_dir dir;
int err;
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
dir = AVC_GENERAL_PLUG_DIR_OUT;
else
dir = AVC_GENERAL_PLUG_DI... | false | false | false | false | false | 0 |
event(QEvent *event)
{
if (event->type() == QEvent::Polish) {
QHeaderView *headerView = header();
headerView->setResizeMode(QHeaderView::Interactive);
headerView->setStretchLastSection(true);
headerView->setMovable(false);
setColumnHidden(KDirModel::Size, m_hideDetailColumns... | false | false | false | false | false | 0 |
bitBlastIneqn(const Expr& e)
{
TRACE("bitvector", "bitBlastIneqn(", e.toString(), ") {");
DebugAssert(BVLT == e.getOpKind() ||
BVLE == e.getOpKind(),
"TheoryBitvector::bitBlastIneqn: "
"input e must be BVLT/BVLE: e = " + e.toString());
DebugAssert(e.arity() == 2,
"TheoryBitvector::bit... | false | false | false | false | false | 0 |
vscrolled // For vertical scrollbar.
(
GtkAdjustment *adj, // The adjustment.
gpointer data // ->Shape_chooser.
)
{
Locator *loc = (Locator *) data;
int oldty = loc->ty;
loc->ty = ((gint) adj->value)*c_tiles_per_chunk;
if (loc->ty != oldty) // (Already equal if this event came
// from Exult msg.).... | false | false | false | false | false | 0 |
init_status(const char *pid_file, const char *client_name)
{
long pid = cl_read_pidfile(pid_file);
if (pid > 0) {
fprintf(stderr, "%s is running [pid: %ld]\n"
, client_name, pid);
return LSB_STATUS_OK;
}
fprintf(stderr, "%s is stopped.\n", client_name);
return LSB_STATUS_STOPPED;
} | false | false | false | false | false | 0 |
thread_create_c(char *name, void *(*start_routine)(void *),
void *arg, int detached, int line, char *file)
{
int ok = 1;
thread_type *thread = NULL;
thread_start_t *start = NULL;
pthread_attr_t attr;
thread = (thread_type *)calloc(1, sizeof(thread_type));
do {
if (thread ==... | false | false | false | false | false | 0 |
_eef_inst_func_dad (eef_addr_t opnd_addr, gchar sec)
{
eef_data_t *dst_h, *dst_l;
eef_addr_t h_data, sec_data;
eef_loc_of_regpair (sec, &dst_h, &dst_l);
if (dst_h == NULL) /* M not supported */
{
g_warning (ERR_IV_OP);
return -1;
}
/* load data */
h_data = eef_regpair_get ('H');
sec_data = eef_j... | false | false | false | false | false | 0 |
o_glist_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, GList *list)
{
GList *iter = list;
while (iter != NULL) {
o_draw_place (w_current, dx, dy, (OBJECT *)iter->data);
iter = g_list_next(iter);
}
} | false | false | false | false | false | 0 |
softing_fct_cmd(struct softing *card, int16_t cmd, const char *msg)
{
int ret;
ret = _softing_fct_cmd(card, cmd, 0, msg);
if (ret > 0) {
dev_alert(&card->pdev->dev, "%s returned %u\n", msg, ret);
ret = -EIO;
}
return ret;
} | false | false | false | false | false | 0 |
virtinput_recv_events(struct virtqueue *vq)
{
struct virtio_input *vi = vq->vdev->priv;
struct virtio_input_event *event;
unsigned long flags;
unsigned int len;
spin_lock_irqsave(&vi->lock, flags);
if (vi->ready) {
while ((event = virtqueue_get_buf(vi->evt, &len)) != NULL) {
spin_unlock_irqrestore(&vi->lock... | false | false | false | false | false | 0 |
rb_econv_binmode(rb_econv_t *ec)
{
const rb_transcoder *trs[3];
int n, i, j;
transcoder_entry_t *entry;
int num_trans;
n = 0;
if (ec->flags & ECONV_UNIVERSAL_NEWLINE_DECORATOR) {
entry = get_transcoder_entry("", "universal_newline");
if (entry->transcoder)
trs[n++] =... | false | false | false | false | false | 0 |
_dxf_isnumber(char *p,int *d, float *ff)
{
int ret,ret1,type;
float f;
char string[250];
char percent[1];
*ff = 0;
*d = 0;
/* use scanf statements to find out if a number */
ret1 = sscanf(p,"$%g %1s %s",&f,percent,string);
ret = sscanf(p,"%g %1s %s",&f,percent,string);
if (ret == 1 || (ret == 2 &&... | 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.