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 |
|---|---|---|---|---|---|---|
gst_bcm_dec_init(GstBcmDec *bcmdec)
{
pid_t pid;
BC_STATUS sts = BC_STS_SUCCESS;
int shmid = 0;
BC_HW_CAPS hwCaps;
GST_DEBUG_OBJECT(bcmdec, "gst_bcm_dec_init");
bcmdec_reset(bcmdec);
hwCaps.DecCaps = 0;
sts = decif_getcaps(&bcmdec->decif, &hwCaps);
if(hwCaps.DecCaps & BC_DEC_FLAGS_M4P2) {
bcmdec->sinkpad ... | false | false | false | false | false | 0 |
Buffer_destroy(Buffer *buffer) {
if (buffer) {
if (buffer->cells) {
size_t i;
BufferCell *buffer_cell;
for (i = 0; i < buffer->cell_count; i++) {
buffer_cell = buffer->cells[i];
BufferCell_destroy(buffer_cell);
}
free(buffer->cells);
}
free(buffer);
}
} | false | false | false | false | false | 0 |
pgstat_count_heap_update(Relation rel, bool hot)
{
PgStat_TableStatus *pgstat_info = rel->pgstat_info;
if (pgstat_track_counts && pgstat_info != NULL)
{
/* We have to log the effect at the proper transactional level */
int nest_level = GetCurrentTransactionNestLevel();
if (pgstat_info->trans == NULL ||
... | false | false | false | false | false | 0 |
x_putc(int c)
#endif
{
if (f__recpos >= f__buflen)
f__bufadj(f__recpos, f__buflen);
f__buf[f__recpos++] = c;
} | false | false | false | false | false | 0 |
clunit_get_unit_index(cst_clunit_db *cludb,
const char *unit_type,
int instance)
{
int i;
i = clunit_get_unit_type_index(cludb, unit_type);
if (i == -1)
{
/* TODO: fall back to closest possible match */
cst_errmsg("clunit_get_unit_index: can't find unit type %s, using 0\n",
unit_type);... | false | false | false | false | false | 0 |
ajSeqdateDel(AjPSeqDate* Pdate)
{
AjPSeqDate date;
if(!Pdate)
return;
if(!*Pdate)
return;
date = *Pdate;
ajTimeDel(&date->CreDate);
ajTimeDel(&date->ModDate);
ajTimeDel(&date->SeqDate);
ajStrDel(&date->CreRel);
ajStrDel(&date->ModRel);
ajStrDel(&date->SeqRel);
ajStrDel... | false | false | false | false | false | 0 |
nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr)
{
struct nfs_inode *nfsi = NFS_I(inode);
unsigned long ret = 0;
if ((fattr->valid & NFS_ATTR_FATTR_PRECHANGE)
&& (fattr->valid & NFS_ATTR_FATTR_CHANGE)
&& inode->i_version == fattr->pre_change_attr) {
inode->i_version = fattr->change_attr;
... | false | false | false | false | false | 0 |
flickr_utils_parse_response (SoupBuffer *body,
DomDocument **doc_p,
GError **error)
{
DomDocument *doc;
DomElement *node;
doc = dom_document_new ();
if (! dom_document_load (doc, body->data, body->length, error)) {
g_object_unref (doc);
return FALSE;
}
for (node = DOM_ELEMENT (doc)->... | false | false | false | false | true | 1 |
luaD_protectedparser (lua_State *L, ZIO *z, int bin) {
struct SParser p;
int status;
ptrdiff_t oldtopr = savestack(L, L->top); /* save current top */
p.z = z; p.bin = bin;
luaZ_initbuffer(L, &p.buff);
status = luaD_rawrunprotected(L, f_parser, &p);
luaZ_freebuffer(L, &p.buff);
if (status != 0) { /* er... | false | false | false | false | false | 0 |
check_integrity(app_ur_conn_info *clnet_info, stun_buffer *message)
{
SHATYPE sht = clnet_info->shatype;
if(oauth && clnet_info->oauth) {
st_password_t pwd;
return stun_check_message_integrity_by_key_str(get_turn_credentials_type(),
message->buf, (size_t)(message->len), clnet_info->key, pwd, sht, NULL);
... | false | false | false | false | false | 0 |
pk_marshal_VOID__STRING_STRING_STRING_STRING_STRING_STRING_UINT64 (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
... | false | false | false | false | false | 0 |
Document_is_tag(Document *self)
{
if (iks_type(self->doc) == IKS_TAG) {
Py_INCREF(Py_True);
return Py_True;
} else {
Py_INCREF(Py_False);
return Py_False;
}
} | false | false | false | false | false | 0 |
pixFindOverlapFraction(PIX *pixs1,
PIX *pixs2,
l_int32 x2,
l_int32 y2,
l_int32 *tab,
l_float32 *pratio,
l_int32 *pnoverlap)
{
l_int32 *tab8;
l_int32 w... | false | false | false | false | false | 0 |
H5O_close(H5O_loc_t *loc)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
HDassert(loc->file);
HDassert(H5F_NOPEN_OBJS(loc->file) > 0);
/* Decrement open-lock counters */
H5F_DECR_NOPEN_OBJS(loc->file);
#ifdef H5O_DEBUG
if... | false | false | false | false | false | 0 |
exsltDateFormatDuration (const exsltDateValDurationPtr dt)
{
xmlChar buf[100], *cur = buf;
double secs, days;
double years, months;
if (dt == NULL)
return NULL;
/* quick and dirty check */
if ((dt->sec == 0.0) && (dt->day == 0) && (dt->mon == 0))
return xmlStrdup((xmlChar*)"P0D");
... | false | false | false | false | false | 0 |
ompi_attr_free_keyval(ompi_attribute_type_t type, int *key,
bool predefined)
{
int ret;
ompi_attribute_keyval_t *keyval;
/* Find the key-value pair */
OPAL_THREAD_LOCK(&attribute_lock);
ret = opal_hash_table_get_value_uint32(keyval_hash, *key,
... | false | false | false | false | false | 0 |
do_one_server_aliases_test (SoupURI *uri,
const char *alias,
gboolean succeed)
{
GSocketClient *client;
GSocketConnectable *addr;
GSocketConnection *conn;
GInputStream *in;
GOutputStream *out;
GError *error = NULL;
GString *req;
static char buf[1024];
debug_printf (1, " %s via %s\n", alia... | true | true | true | false | false | 1 |
compare(const char *expr)
{
char *expr_dup;
int idx, mtype;
enum arg_type type1, type2;
long lng_a, lng_b;
double dbl_a, dbl_b;
idx = find_match_op(expr);
mtype = get_match_type(expr);
if (!idx || mtype == -1) {
NORM_ERR("failed to parse compare string '%s'", expr);
return -2;
}
expr_dup = strdup(expr)... | false | false | false | false | true | 1 |
zterp_io_open(const char *filename, int mode)
{
zterp_io *io;
char smode[] = "wb";
io = malloc(sizeof *io);
if(io == NULL) goto err;
io->mode = mode;
if (mode & ZTERP_IO_RDONLY) smode[0] = 'r';
else if(mode & ZTERP_IO_APPEND) smode[0] = 'a';
if(textmode(io)) smode[1] = 0;
#ifdef ZTERP_GLK
int ... | false | false | false | false | false | 0 |
e_cell_toggle_construct (ECellToggle *cell_toggle,
const gchar **icon_names,
guint n_icon_names)
{
guint ii;
g_return_if_fail (E_IS_CELL_TOGGLE (cell_toggle));
g_return_if_fail (icon_names != NULL);
g_return_if_fail (n_icon_names > 0);
cell_toggle->priv->icon_nam... | false | false | false | false | false | 0 |
DefineView(RangeVar *view, Query *viewParse, bool replace)
{
Oid viewOid;
/*
* If the user didn't explicitly ask for a temporary view, check whether
* we need one implicitly.
*/
if (!view->istemp)
{
view->istemp = isViewOnTempTable(viewParse);
if (view->istemp)
ereport(NOTICE,
(errmsg("view \"%... | false | false | false | false | false | 0 |
L323()
{ object *old_base=vs_base;
fixnum x;
x=
XWriteBitmapFile(
object_to_fixnum(vs_base[0]),
vs_base[1],
object_to_fixnum(vs_base[2]),
object_to_fixnum(vs_base[3]),
object_to_fixnum(vs_base[4]),
object_to_fixnum(vs_base[5]),
object_to_fixnum(vs_base[6]));
vs_top=(vs_base=old_base)+1;
vs_base[0]=CMPmake_f... | false | false | false | false | false | 0 |
toggleStyle()
{
if (!currentWindow) return;
switch (currentWindow->currentStyle) {
default:
case 0 :
currentWindow->setStyle(2);
styleAction->setChecked(false);
break;
case 2 :
currentWindow->setStyle(0);
styleAction->setChecked(true);
break;
}
... | false | false | false | false | false | 0 |
hitItem(FXint index,FXint /*x*/,FXint /*y*/,FXint /*ww*/,FXint /*hh*/) const {
#if 0
FXint ix,iy,r,c,hit=0;
if(0<=index && index<items.no()){
x-=pos_x;
y-=pos_y;
y-=header->getDefaultHeight();
// r=index;
// c=0;
// ix=header->getTotalSize()*c;
// iy=lineHeight*r;
hit=2; //FIXME items[in... | false | false | false | false | false | 0 |
layer3d_draw_2d(GF_Node *node, GF_TraverseState *tr_state)
{
DrawableContext *ctx = tr_state->ctx;
if (tr_state->visual->DrawBitmap(tr_state->visual, tr_state, ctx, NULL))
return;
visual_2d_texture_path(tr_state->visual, ctx->drawable->path, ctx, tr_state);
} | false | false | false | false | false | 0 |
fribidi_iso8859_6_to_unicode_c (
/* input */
char sch
)
{
register unsigned char ch = (unsigned char) sch;
if (ch >= ISO_HAMZA && ch <= ISO_SUKUN)
return ch - ISO_HAMZA + UNI_HAMZA;
else
return ch;
} | false | false | false | false | false | 0 |
cipher_algo_to_string( int algo )
{
int i;
do {
for(i=0; cipher_table[i].name; i++ )
if( cipher_table[i].algo == algo )
return cipher_table[i].name;
} while( load_cipher_modules() );
return NULL;
} | false | false | false | false | false | 0 |
ocfs2_create_symlink_data(struct ocfs2_super *osb,
handle_t *handle,
struct inode *inode,
const char *symname)
{
struct buffer_head **bhs = NULL;
const char *c;
struct super_block *sb = osb->sb;
u64 p_blkno, p_blocks;
int virtual, blocks, status, i, bytes_left;
bytes_left = i_size_read... | false | true | false | false | false | 1 |
check_variable_name(xmlNodePtr node)
{
Octstr *name = NULL;
xmlAttrPtr attr;
var_esc_t ret = FAILED;
if ((attr = node->properties) != NULL) {
while (attr != NULL) {
if (attr->name && strcmp((char *)attr->name, "name") == 0) {
name = create_octstr_from_node((char *)a... | false | false | false | false | false | 0 |
SimplifyExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs,
const Query &, unsigned) {
if (auto *CAgg = dyn_cast<Constant>(Agg))
return ConstantFoldExtractValueInstruction(CAgg, Idxs);
// extractvalue x, (insertvalue y, elt, n), n -> elt
unsigned NumIdxs = Idxs.size()... | false | false | false | false | false | 0 |
blkmap_flush()
{
int bmpf_rc = FSCK_OK;
uint32_t bytes_written;
struct fsck_blk_map_page *fsck_bmpt_ptr;
if (agg_recptr->blkmp_buf_write) {
/* buffer has been updated since most recent write */
/* swap if on big endian machine */
fsck_bmpt_ptr = agg_recptr->blkmp_buf_ptr;
swap_multiple(ujfs_swap_fsck_blk_... | false | false | false | false | false | 0 |
Save (xmlDocPtr xml) const
{
xmlNodePtr parent, child;
gchar buf[256];
parent = xmlNewDocNode (xml, NULL, (xmlChar*) "view", NULL);
if (!parent)
return NULL;
child = xmlNewDocNode (xml, NULL, (xmlChar*) "orientation", NULL);
if (child)
xmlAddChild (parent, child);
else {
xmlFreeNode (parent);
return NUL... | false | false | false | false | false | 0 |
DespawnAdds()
{
if (m_pInstance)
{
for (GuidSet::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr)
{
if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr))
{
if (pCreature->IsAlive())
... | false | false | false | false | false | 0 |
_evas_yuv_init(void)
{
#ifdef BUILD_C
int i;
for (i = 0; i < 256; i++)
{
_v1164[i] = (int)(((float)(i - 16 )) * 1.164);
_v1596[i] = (int)(((float)(i - 128)) * 1.596);
_v813[i] = (int)(((float)(i - 128)) * 0.813);
_v391[i] = (int)(((float)(i - 128)) * 0.391);
_v2018[i] = (int)(((float)(i - 128)) * 2... | false | false | false | false | false | 0 |
map_remove(Map *map, const void *key)
{
int ret;
int err;
if (!map || !key)
return set_errno(EINVAL);
if ((err = map_wrlock(map)))
return set_errno(err);
ret = map_remove_unlocked(map, key);
if ((err = map_unlock(map)))
return set_errno(err);
return ret;
} | false | false | false | false | false | 0 |
initConnectors(QList<QDomElement> * connectorList)
{
QWidget * widget = QApplication::focusWidget();
if (widget) {
QList<QWidget *> children = m_scrollFrame->findChildren<QWidget *>();
if (children.contains(widget)) {
widget->blockSignals(true);
}
}
if (m_scrollFram... | false | false | false | false | false | 0 |
reckon_time_sound(int time_)
{
switch(time_){
case 0:
CSound::play(SND_0);
break;
case 1:
CSound::play(SND_1);
break;
case 2:
CSound::play(SND_2);
break;
case 3:
CSound::play(SND_3);
break;
case 4:
CSound::play(SND_4);
break;
case 5:
CSound::play(SND_5);
break;
case 6:... | false | false | false | false | false | 0 |
bthci_EventWriteRemoteAmpAssoc(
struct rtw_adapter *padapter,
enum hci_status status,
u8 PLHandle
)
{
u8 localBuf[TmpLocalBufSize] = "";
u8 *pRetPar;
u8 len = 0;
struct packet_irp_hcievent_data *PPacketIrpEvent;
PlatformZeroMemory(&localBuf[0], TmpLocalBufSize);
PPacketIrpEvent = (struct packet_irp_hcievent_... | false | false | false | false | false | 0 |
extend_parse_config(const char *token, char *cptr)
{
netsnmp_extend *extension;
char exec_name[STRMAX];
char exec_name2[STRMAX]; /* For use with UCD execFix directive */
char exec_command[STRMAX];
oid oid_buf[MAX_OID_LEN];
size_t oid_len;
extend_registration_block *eptr;
int flags;... | true | true | true | false | true | 1 |
subrip_fix_up_markup (gchar ** p_txt)
{
gchar *cur, *next_tag;
gchar open_tags[32];
guint num_open_tags = 0;
g_assert (*p_txt != NULL);
cur = *p_txt;
while (*cur != '\0') {
next_tag = strchr (cur, '<');
if (next_tag == NULL)
break;
++next_tag;
switch (*next_tag) {
case '/':{
... | false | false | false | false | false | 0 |
get_speed_setting(u8 speed, struct hpt_info *info)
{
int i;
/*
* Lookup the transfer mode table to get the index into
* the timing table.
*
* NOTE: For XFER_PIO_SLOW, PIO mode 0 timings will be used.
*/
for (i = 0; i < ARRAY_SIZE(xfer_speeds) - 1; i++)
if (xfer_speeds[i] == speed)
break;
return inf... | false | false | false | false | false | 0 |
inf_gtk_browser_view_browser_added(InfGtkBrowserView* view,
InfcBrowser* browser,
GtkTreePath* path,
GtkTreeIter* iter)
{
InfGtkBrowserViewPrivate* priv;
InfGtkBrowserViewBrowser* view_browser;
GtkTreeModel* m... | false | false | false | false | false | 0 |
GetFeatureCount( int bForce )
{
if( bEmptyLayer )
return 0;
if( m_poAttrQuery == NULL &&
EQUALN(osSQLCurrent, "SELECT COUNT(*) FROM", strlen("SELECT COUNT(*) FROM")) &&
osSQLCurrent.ifind(" GROUP BY ") == std::string::npos &&
osSQLCurrent.ifind(" UNION ") == std::string::npos &&... | false | false | false | false | false | 0 |
save_preview (string path)
{
drawing_area da (0, 0, screen::length () >> 1, screen::height () >> 1);
image temp (da.length (), da.height());
image preview (72, 54);
mapview *view = data::engine->get_mapview ();
mapsquare_area *area = data::engine->get_landmap ()->get_submap
(data::the_playe... | false | false | false | false | false | 0 |
local_strdup(char **dst, const char *src)
{
if (dst == 0) {
return 0;
}
free(*dst);
*dst = 0;
if (src != 0) {
size_t n;
for (n = 0; src[n] != 0; ++n) { /* calc src string length */
}
if (n > 0) { /* string length without zero termination */
ass... | false | false | false | false | false | 0 |
calendar_devstate_change(const void *data)
{
struct ast_calendar_event *event = (struct ast_calendar_event *)data;
struct timeval now = ast_tvnow();
int is_end_event;
if (!event) {
ast_log(LOG_WARNING, "Event was NULL!\n");
return 0;
}
ao2_ref(event, +1);
is_end_event = event->end <= now.tv_sec;
if (is_... | false | false | false | false | false | 0 |
mixer_channel_resample_8_pan(struct mixer_channel_data *channel, int* volume, unsigned dst_len, INT8** src, unsigned src_len)
{
unsigned count;
if (!is_stereo || channel->pan == MIXER_PAN_LEFT) {
count = mixer_channel_resample_8(channel, channel->left, volume[0], left_accum, dst_len, src, src_len);
} else i... | false | false | false | false | false | 0 |
print_union_pw_qpolynomial_fold_isl(
__isl_take isl_printer *p,
__isl_keep isl_union_pw_qpolynomial_fold *upwf)
{
struct isl_union_print_data data = { p, 1 };
isl_space *dim;
dim = isl_union_pw_qpolynomial_fold_get_space(upwf);
if (isl_space_dim(dim, isl_dim_param) > 0) {
p = print_tuple(dim, p, isl_dim_param, ... | false | false | false | false | false | 0 |
iwl_poll_direct_bit(struct iwl_trans *trans, u32 addr, u32 mask,
int timeout)
{
int t = 0;
do {
if ((iwl_read_direct32(trans, addr) & mask) == mask)
return t;
udelay(IWL_POLL_INTERVAL);
t += IWL_POLL_INTERVAL;
} while (t < timeout);
return -ETIMEDOUT;
} | false | false | false | false | false | 0 |
gf_term_refresh_cache(GF_Config *cfg)
{
u32 i, count;
count = gf_cfg_get_section_count(cfg);
for (i=0; i<count; i++) {
const char *opt;
u32 sec, frac, exp;
Bool force_delete;
const char *file;
const char *name = gf_cfg_get_section_name(cfg, i);
if (strncmp(name, "@cache=", 7)) continue;
file = gf_cfg_... | false | false | false | false | false | 0 |
gst_audio_visualizer_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object);
switch (prop_id) {
case PROP_SHADER:
scope->shader_type = g_value_get_enum (value);
gst_audio_visualizer_change_shader (scop... | false | false | false | false | false | 0 |
document_loader_load (DocumentLoader *doclod, gint type, gchar *filename, gint goto_line)
{
if (!doclod) return;
DocumentLoaderDetails *docloddet = DOCUMENT_LOADER_GET_PRIVATE(doclod);
docloddet->type = type;
if (!filename){
/* create a new untitled and exit */
_document_loader_create_untitled(doclod);... | false | false | false | false | false | 0 |
multiplexor(Boolean_t block)
{
struct timeval tv, *tvp = NULL;
int j;
fd_t maxfd = 0;
ssize_t bytes;
struct stream *stream, *prev, *next;
fd_set fds[3];
char *rdbuff = NULL;
for (j = 0; j < 3; j++)
FD_ZERO(&fds[j]);
FD_SET(0, &fds[0]);
FD_SET(0, &fds[2]);
for (stream = streams; stream; stream = stream->ne... | false | false | false | false | true | 1 |
luaX_lexerror (LexState *ls, const char *msg, int token) {
char buff[MAXSRC];
luaO_chunkid(buff, getstr(ls->source), MAXSRC);
msg = luaO_pushfstring(ls->L, "%s:%d: %s", buff, ls->linenumber, msg);
if (token)
luaO_pushfstring(ls->L, "%s near " LUA_QS, msg, txtToken(ls, token));
luaD_throw(ls->L, LUA_ERRSYN... | false | false | false | false | false | 0 |
parse_rules(void)
{
char buf[4096];
FILE *f = fopen(rules_file, "r");
if (!f) return 0;
for (;; )
{
if (!fgets(buf, sizeof(buf), f)) goto err;
if (!strncmp(buf, "! layout", 8))
{
for (;; )
{
Layout *lay;
char nam... | true | true | false | false | true | 1 |
ncbytesprepend(NCbytes* bb, char elem)
{
int i; /* do not make unsigned */
if(bb == NULL) return ncbytesfail();
if(bb->length >= bb->alloc) if(!ncbytessetalloc(bb,0)) return ncbytesfail();
/* could we trust memcpy? instead */
for(i=bb->alloc;i>=1;i--) {bb->content[i]=bb->content[i-1];}
bb->content[0] = elem... | false | false | false | false | true | 1 |
res_write_java(struct SResource *res,UErrorCode *status) {
if (U_FAILURE(*status)) {
return ;
}
if (res != NULL) {
switch (res->fType) {
case URES_STRING:
string_write_java (res, status);
return;
case URES_ALIAS:
printf("Encountered... | false | false | false | false | false | 0 |
giggle_dispatcher_finalize (GObject *object)
{
GiggleDispatcher *dispatcher = GIGGLE_DISPATCHER (object);
GiggleDispatcherPriv *priv = GET_PRIV (object);
DispatcherJob *job;
if (priv->current_job_wait_id) {
dispatcher_stop_current_job (dispatcher);
}
while ((job = g_queue_pop_head (priv->queue))) {... | false | false | false | false | false | 0 |
hotkey_notify_usrevent(const u32 hkey,
bool *send_acpi_ev,
bool *ignore_acpi_ev)
{
/* 0x5000-0x5FFF: human interface helpers */
*send_acpi_ev = true;
*ignore_acpi_ev = false;
switch (hkey) {
case TP_HKEY_EV_PEN_INSERTED: /* X61t: tablet pen inserted into bay */
case TP_HKEY_EV_PEN_REMOVED: /* X61t: ... | false | false | false | false | false | 0 |
compile_sprshade (const a_pixel *src, a_pixel transp_color,
a_pixel glenz_color, a_pixel *glenz_line,
unsigned int block_height,
unsigned int block_width,
unsigned int src_width, unsigned int dest_width)
{
a_sprite* sprite;
unsigned int row;
unsigned int code_size;
a_u8 *pc; /* pro... | false | false | false | false | false | 0 |
hash_delete(HashTable *table, char *key)
{
HashEntry **entry;
int code = table->hash_code(key, table->size) % table->size;
for (entry = &table->table[code]; *entry != NULL; entry = &((*entry)->next))
if ((*table->equal) ((*entry)->key, key)) {
*entry = (*entry)->next;
table-... | false | false | false | false | false | 0 |
u_redo(count)
int count;
{
u_newcount = 0;
u_oldcount = 0;
while (count--)
{
if (curbuf->b_u_curhead == NULL || p_ul <= 0) /* nothing to redo */
{
beep();
break;
}
u_undoredo();
curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev; /* advance for next redo */
}
u_undo_end();
} | false | false | false | false | false | 0 |
saveData(long id, QDataStream *str)
{
assert(d->dict.contains( id ));
KHTMLPageCacheEntry *entry = d->dict.value( id );
if (!entry->isComplete())
{
QTimer::singleShot(20, this, SLOT(saveData()));
return;
}
QIODevice* file = KFilterDev::deviceForFile (entry->fileName(), "application/x-gzip");
... | false | false | false | false | false | 0 |
batch_readline_init(ulong max_size,FILE *file)
{
LINE_BUFFER *line_buff;
MY_STAT input_file_stat;
#ifndef __WIN__
if (my_fstat(fileno(file), &input_file_stat, MYF(MY_WME)) ||
MY_S_ISDIR(input_file_stat.st_mode) ||
MY_S_ISBLK(input_file_stat.st_mode))
return 0;
#endif
if (!(line_buff=(LINE_BUFF... | false | false | false | false | false | 0 |
tree_ssa_dominator_optimize (void)
{
struct dom_walk_data walk_data;
memset (&opt_stats, 0, sizeof (opt_stats));
/* Create our hash tables. */
avail_exprs = htab_create (1024, real_avail_expr_hash, avail_expr_eq, free_expr_hash_elt);
avail_exprs_stack.create (20);
const_and_copies_stack.create (20);
ne... | false | false | false | false | false | 0 |
scanline_callback(int scanline)
{
/* update the video */
beathead_scanline_update(scanline);
/* on scanline zero, clear any halt condition */
if (scanline == 0)
cpu_set_halt_line(0, CLEAR_LINE);
/* wrap around at 262 */
scanline++;
if (scanline >= MAX_SCANLINES)
scanline = 0;
/* set the sca... | false | false | false | false | false | 0 |
split_on_space3(char *buf,
char **first,
char **second,
char **rest)
{
*first = buf;
*second = NULL;
*rest = NULL;
while(*buf && !isspace(*buf)) buf++;
if (*buf && isspace(*buf)) {
*buf = 0;
*second = buf+1;
buf++;
while(*buf && !isspace(*buf)) buf++;
if (*buf && isspace(*buf)) {
*bu... | false | false | false | false | false | 0 |
NLD_GetMatrix(M_NonLinearDeformer *nld, GF_Matrix *mx)
{
SFVec3f v1, v2;
SFRotation r;
Fixed l1, l2, dot;
/*compute rotation matrix from NLD axis to 0 0 1*/
v1 = nld->axis;
gf_vec_norm(&v1);
v2.x = v2.y = 0; v2.z = FIX_ONE;
if (gf_vec_equal(v1, v2)) return 0;
l1 = gf_vec_len(v1);
l2 = gf_vec_len(v2);
dot =... | false | false | false | false | false | 0 |
iscsit_cause_connection_reinstatement(struct iscsi_conn *conn, int sleep)
{
spin_lock_bh(&conn->state_lock);
if (atomic_read(&conn->connection_exit)) {
spin_unlock_bh(&conn->state_lock);
return;
}
if (atomic_read(&conn->transport_failed)) {
spin_unlock_bh(&conn->state_lock);
return;
}
if (atomic_read(&c... | false | false | false | false | false | 0 |
ERR_error_string(unsigned long errNumber, char* buffer)
{
static const char* msg = "Please supply a buffer for error string";
CYASSL_ENTER("ERR_error_string");
if (buffer) {
SetErrorString(errNumber, buffer);
return buffer;
}
return (char*)msg;
} | false | false | false | false | false | 0 |
gst_mpeg_parse_change_state (GstElement * element, GstStateChange transition)
{
GstMPEGParse *mpeg_parse = GST_MPEG_PARSE (element);
GstStateChangeReturn result = GST_STATE_CHANGE_FAILURE;
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
if (!mpeg_parse->packetize) {
mpeg_parse->pac... | false | false | false | false | false | 0 |
mailmime_content_dup(struct mailmime_content * content)
{
clist * list;
struct mailmime_type * type;
int r;
struct mailmime_content * dup_content;
char * subtype;
type = mailmime_type_dup(content->ct_type);
if (type == NULL)
goto err;
subtype = strdup(content->ct_subtype);
if (subtype == NULL)... | false | false | false | false | false | 0 |
_PyBuiltin_Init(void)
{
PyObject *mod, *dict, *debug;
mod = PyModule_Create(&builtinsmodule);
if (mod == NULL)
return NULL;
dict = PyModule_GetDict(mod);
#ifdef Py_TRACE_REFS
/* "builtins" exposes a number of statically allocated objects
* that, before this code was added in 2.3, never... | false | false | false | false | false | 0 |
help_update_tech(const struct help_item *pitem, char *title)
{
char buf[4096];
int i;
struct advance *padvance = advance_by_translated_name(title);
create_help_page(HELP_TECH);
set_title_topic(pitem);
if (padvance && !is_future_tech(i = advance_number(padvance))) {
create_tech_tree(help_tech_tree, 0... | false | false | false | false | false | 0 |
setProp(const QString & prop, const QString & value) {
if (m_hasLogo && prop.compare("color", Qt::CaseInsensitive) == 0) {
m_color = value;
modelPart()->setLocalProp("color", m_color);
setLogo(m_logo, true);
return;
}
LogoItem::setProp(prop, value);
} | false | false | false | false | false | 0 |
cq_heartbeat(cqueue_t *cq)
{
tm_t tv;
time_delta_t delay;
cqueue_check(cq);
/*
* How much milliseconds elapsed since last heart beat?
*/
mutex_lock(&cq->cq_lock);
tm_now_exact(&tv);
delay = tm_elapsed_ms(&tv, &cq->cq_last_heartbeat);
cq->cq_last_heartbeat = tv; /* struct copy */
/*
* If too much va... | false | false | false | false | false | 0 |
ad5933_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val,
int *val2,
long m)
{
struct ad5933_state *st = iio_priv(indio_dev);
__be16 dat;
int ret;
switch (m) {
case IIO_CHAN_INFO_RAW:
mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev)) {
re... | false | false | false | false | false | 0 |
miniexp_symbol(const char *name)
{
struct symtable_t::sym *r;
if (! symbols)
symbols = new symtable_t;
r = symbols->lookup(name, true);
return (miniexp_t)(((size_t)r)|((size_t)2));
} | false | false | false | false | false | 0 |
dump_table_entry (lf *file,
char *prefix, const table_entry *entry, char *suffix)
{
lf_printf (file, "%s(table_entry*) 0x%lx", prefix, (long) entry);
if (entry != NULL)
{
int field;
lf_indent (file, +1);
dump_line_ref (file, "\n(line ", entry->line, ")");
lf_printf (file, "\n(type %s... | false | false | false | false | false | 0 |
test_gtk_plugin_manager_gtkbuilder (void)
{
GtkBuilder *builder;
GError *error = NULL;
PeasGtkPluginManager *manager;
PeasGtkPluginManagerView *view;
static const gchar *gtkbuilder_string =
"<?xml version='1.0' encoding='UTF-8'?>\n"
"<interface>\n"
"<object class='PeasGtkPluginManagerView' id='vie... | false | false | false | false | false | 0 |
hashAttribute(DIEValue Value, dwarf::Tag Tag) {
dwarf::Attribute Attribute = Value.getAttribute();
// Other attribute values use the letter 'A' as the marker, and the value
// consists of the form code (encoded as an unsigned LEB128 value) followed by
// the encoding of the value according to the form code. To... | false | false | false | false | false | 0 |
static_III_L(Class *class, MethodBlock *mb, uintptr_t *ostack) {
if(!initJNILrefs())
return NULL;
*ostack = (uintptr_t)REF_TO_OBJ((*(uintptr_t (*)(void*, void*, uintptr_t, uintptr_t, uintptr_t))mb->code) (
&jni_env,
class,
*(uintptr_t *)&ostack[0],
*(uintptr_t *)&ostack[1],
*(uintptr_t *)&ostack[2... | false | false | false | false | false | 0 |
nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback *cb)
{
struct nfs4_client *clp = cb->cb_clp;
struct nfsd4_session *session = clp->cl_cb_session;
bool ret = true;
if (!clp->cl_minorversion) {
/*
* If the backchannel connection was shut down while this
* task was queued, we need to resubm... | false | false | false | false | false | 0 |
php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC)
{
zval *tmp;
char *ptr;
#if PHP_WIN32
char path_bak[MAXPATHLEN];
memcpy(path_bak, path, path_len);
path_bak[path_len] = 0;
TRANSLATE_SLASHES_LOWER(path_bak);
path = path_bak;
#endif
/* Walk through each directory in path and apply any found ... | true | true | false | false | false | 1 |
e1000_validate_mdi_setting(struct e1000_hw *hw)
{
if (!hw->autoneg && (hw->mdix == 0 || hw->mdix == 3)) {
e_dbg("Invalid MDI setting detected\n");
hw->mdix = 1;
return -E1000_ERR_CONFIG;
}
return E1000_SUCCESS;
} | false | false | false | false | false | 0 |
amdgpu_fence_process(struct amdgpu_ring *ring)
{
if (amdgpu_fence_activity(ring))
wake_up_all(&ring->fence_drv.fence_queue);
} | false | false | false | false | false | 0 |
pm80x_onkey_handler(int irq, void *data)
{
struct pm80x_onkey_info *info = data;
int ret = 0;
unsigned int val;
ret = regmap_read(info->map, PM800_STATUS_1, &val);
if (ret < 0) {
dev_err(info->idev->dev.parent, "failed to read status: %d\n", ret);
return IRQ_NONE;
}
val &= PM800_ONKEY_STS1;
input_report_k... | false | false | false | false | false | 0 |
_test_strings_get_global(const char *name, Eina_Bool (*func)(unsigned int *count, const char ***elements))
{
const char **value;
unsigned int count;
Eina_Bool ret;
INF("BEGIN: testing strings get %s", name);
ret = func(&count, &value);
if (ret)
{
INF("SUCCESS: testing strings get %s: %p", name,... | false | false | false | false | false | 0 |
accept (ACE_SSL_SOCK_Stream &new_stream,
ACE_Addr *remote_addr,
ACE_Time_Value *timeout,
bool restart,
bool reset_new_handle) const
{
ACE_TRACE ("ACE_SSL_SOCK_Acceptor::accept");
// Take into... | false | false | false | false | false | 0 |
mariner_draw_background(struct mame_bitmap *bitmap)
{
UINT8 x;
UINT8 *prom;
/* the background PROM contains the color codes for each 8 pixel
line (column) of the screen. The first 0x20 bytes for unflipped,
and the 2nd 0x20 bytes for flipped screen. */
prom = memory_region(REGION_USER1);
if... | false | false | false | false | false | 0 |
delete_capability(const char *capab_name)
{
dlink_node *ptr;
dlink_node *next_ptr;
struct Capability *cap;
DLINK_FOREACH_SAFE(ptr, next_ptr, cap_list.head)
{
cap = ptr->data;
if (cap->cap != 0)
{
if (irccmp(cap->name, capab_name) == 0)
{
default_server_capabs &= ~(cap->cap);
dlinkD... | false | false | false | false | false | 0 |
add_line(struct Plus_head *plus, int lineid, int type, struct line_pnts *Points,
long offset)
{
int node, lp;
P_LINE *line;
BOUND_BOX box;
plus->Line[lineid] = dig_alloc_line();
line = plus->Line[lineid];
/* Add nodes */
G_debug(3, "Register node: type = %d, %f,%f", type, Points->x[... | false | false | false | false | false | 0 |
cfile_chdir(char *dir)
{
int e;
char OriginalDirectory[CFILE_ROOT_DIRECTORY_LEN];
char *Path = NULL;
char NoDir[] = "\\.";
_getcwd(OriginalDirectory, CFILE_ROOT_DIRECTORY_LEN-1);
#ifdef _WIN32
char *colon_pos = strchr(dir, ':');
if (colon_pos) {
if (!cfile_chdrive( tolower(*(colon_pos - 1)) - 'a' + 1, 1))
... | false | false | false | false | false | 0 |
process_spec_exprs (av_set_t *av_ptr)
{
bool try_data_p = true;
bool try_control_p = true;
expr_t expr;
av_set_iterator si;
if (spec_info == NULL)
return;
/* Scan *AV_PTR to find out if we want to consider speculative
instructions for scheduling. */
FOR_EACH_EXPR_1 (expr, si, av_ptr)
{
... | false | false | false | false | false | 0 |
wasp_skip_space( char* str ){
//TODO: Add skip comments code.
for(;;){
char ch = *str;
if( isspace( ch ) ){
str ++;
}else if( ch == ';' ){
// Sigh.. Comments.. Who comments, anymore?
str ++;
while( ! strchr( "\r\n", *str ) ) str ++;
... | false | false | false | false | false | 0 |
width() const
{
int child_width = 0;
if (firstChild() != 0)
child_width = firstChild()->myRect().width();
QString value = explicitAttribute("width");
if (value.isNull())
return child_width;
bool ok;
int w = interpretSpacing(value, child_width, &ok);
if (ok)
return w;
return child_w... | false | false | false | false | false | 0 |
HU_Start(void)
{
int i;
char* s;
// haleyjd 20120211: [STRIFE] not called here.
//if (headsupactive)
// HU_Stop();
// haleyjd 20120211: [STRIFE] moved up
// create the map title widget
HUlib_initTextLine(&w_title,
HU_TITLEX, HU_TITLEY,
... | false | false | false | false | false | 0 |
gagt_find_equivalent_special (gagt_paragraphref_t paragraph)
{
gagt_specialref_t special, match;
/* Check each special paragraph entry for a match against this paragraph. */
match = NULL;
for (special = GAGT_SPECIALS; special->replace; special++)
{
if (gagt_compare_special_paragraph (special, paragra... | false | false | false | false | false | 0 |
xfs_add_to_ioend(
struct inode *inode,
struct buffer_head *bh,
xfs_off_t offset,
unsigned int type,
xfs_ioend_t **result,
int need_ioend)
{
xfs_ioend_t *ioend = *result;
if (!ioend || need_ioend || type != ioend->io_type) {
xfs_ioend_t *previous = *result;
ioend = xfs_alloc_ioend(inode, type);
io... | false | false | false | false | false | 0 |
bifinp(bifcxdef *ctx, int argc)
{
char inbuf[128];
/* check for proper argument count */
bifcntargs(ctx, 0, argc);
/* make sure the prompt is displayed */
tioflushn(ctx->bifcxtio, 0);
/* reset count of lines since the last keyboard input */
tioreset(ctx->bifcxtio);
/* r... | 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.