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 |
|---|---|---|---|---|---|---|
mono_image_get_event_info (MonoReflectionEventBuilder *eb, MonoDynamicImage *assembly)
{
MONO_REQ_GC_UNSAFE_MODE;
MonoDynamicTable *table;
guint32 *values;
guint num_methods = 0;
guint32 semaidx;
/*
* we need to set things in the following tables:
* EVENTMAP (info already filled in _get_type_info ())
* E... | false | false | false | false | false | 0 |
mca_search_char(c)
int c;
{
int flag = 0;
/*
* Certain characters as the first char of
* the pattern have special meaning:
* ! Toggle the NO_MATCH flag
* * Toggle the PAST_EOF flag
* @ Toggle the FIRST_FILE flag
*/
if (len_cmdbuf() > 0)
return (NO_MCA);
switch (c)
{
case CONTROL('E'): /* igno... | false | false | false | false | false | 0 |
SerializeAll(ostream& ofs){
for(boost::unordered_map<std::string, boost::shared_ptr<SRLEventModel> >::iterator it
= m_srlmodels.begin(); it != m_srlmodels.end(); it++){
it->second->Serialize(ofs);
}
} | false | false | false | false | false | 0 |
IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
if (needle == NULL || haystack == NULL)
return needle == haystack;
return wcsstr(haystack, needle) != NULL;
} | false | false | false | false | false | 0 |
socket_write(BIO* b, const char* in, int inl) {
if (!in)
return -1;
talk_base::AsyncSocket* socket = static_cast<talk_base::AsyncSocket*>(b->ptr);
BIO_clear_retry_flags(b);
int result = socket->Send(in, inl);
if (result > 0) {
return result;
} else if (socket->IsBlocking()) {
BIO_set_retry_write... | false | false | false | false | false | 0 |
make(ELObj *obj, const Location &loc, Interpreter &interp) const
{
SosofoObj *sosofo = obj->asSosofo();
if (sosofo && sosofo->isRule())
return new RuleC(identifier(), index(), obj, interp);
invalidValue(loc, interp);
return ConstPtr<InheritedC>();
} | false | false | false | false | false | 0 |
addpatch (unsigned *list, size_t len, register size_t value)
{
register size_t idx;
for (idx = 0; idx < len; idx++)
list[idx] += value;
} | false | false | false | false | false | 0 |
set_pop(struct set *s)
{
if( set_size(s) < 1 )
return 0;
void *element;
set_first_element(s);
element = set_next_element(s);
if(!set_remove(s, element))
return 0;
else
return element;
} | false | false | false | false | false | 0 |
pkg_temp_thermal_get_phy_entry(unsigned int cpu)
{
u16 phys_proc_id = topology_physical_package_id(cpu);
struct phy_dev_entry *phy_ptr;
mutex_lock(&phy_dev_list_mutex);
list_for_each_entry(phy_ptr, &phy_dev_list, list)
if (phy_ptr->phys_proc_id == phys_proc_id) {
mutex_unlock(&phy_dev_list_mutex);
return ... | false | false | false | false | false | 0 |
rsxx_handle_dma_error(struct rsxx_dma_ctrl *ctrl,
struct rsxx_dma *dma,
u8 hw_st)
{
unsigned int status = 0;
int requeue_cmd = 0;
dev_dbg(CARD_TO_DEV(ctrl->card),
"Handling DMA error(cmd x%02x, laddr x%08x st:x%02x)\n",
dma->cmd, dma->laddr, hw_st);
if (hw_st & HW_STATUS_CRC)
ctrl->stats... | false | false | false | false | false | 0 |
arm_strip_name_encoding (const char *name)
{
int skip;
while ((skip = arm_get_strip_length (* name)))
name += skip;
return name;
} | false | false | false | false | false | 0 |
processArcOpts(const AttributeList &atts)
{
StringC attName(docSd_->execToInternal("ArcOptSA"));
docSyntax_->generalSubstTable()->subst(attName);
unsigned ind;
Vector<StringC> arcOptA;
Vector<size_t> arcOptAPos;
const Text *arcOptAText = 0;
if (atts.attributeIndex(attName, ind)) {
const AttributeValue... | false | false | false | false | false | 0 |
stpui_scale_entry_new(GtkTable *table,
gint column,
gint row,
const gchar *text,
gint scale_usize,
gint spinbutton_usize,
gfloat value,
gfloat lower,
gfloat upper,
gfloat step_increment,
... | false | false | false | false | false | 0 |
PyModule_NewObject(PyObject *name)
{
PyModuleObject *m;
m = PyObject_GC_New(PyModuleObject, &PyModule_Type);
if (m == NULL)
return NULL;
m->md_def = NULL;
m->md_state = NULL;
m->md_weaklist = NULL;
m->md_name = NULL;
m->md_dict = PyDict_New();
if (module_init_dict(m, m->md_di... | false | false | false | false | false | 0 |
set_sensitive (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
GtkTreeModel *tree_model,
GtkTreeIter *iter,
gpointer data)
{
gboolean *adhoc = data;
gboolean sensitive = TRUE, adhoc_valid = TRUE;
gtk_tree_model_get (tree_model, iter, S_ADHOC_VALID_COLUM... | false | false | false | false | false | 0 |
get_beval_info(beval, getword, winp, lnump, textp, colp)
BalloonEval *beval;
int getword;
win_T **winp;
linenr_T *lnump;
char_u **textp;
int *colp;
{
win_T *wp;
int row, col;
char_u *lbuf;
linenr_T lnum;
*textp = NULL;
row = Y_2_ROW(beval->y);
col = X_2_COL(beval-... | false | false | false | true | false | 1 |
minimum(double d1, double d2, double d3, double d4) {
if (d1 <= d2 && d1 <= d3 && d1 <= d4){return d1;}
if (d2 <= d1 && d2 <= d3 && d2 <= d4){return d2;}
if (d3 <= d1 && d3 <= d2 && d3 <= d4){return d3;}
if (d4 <= d1 && d4 <= d2 && d4 <= d3){return d4;}
return 0;
} | false | false | false | false | false | 0 |
HandlePetitionShowSignOpcode(WorldPacket& recv_data)
{
// ok
DEBUG_LOG("Received opcode CMSG_PETITION_SHOW_SIGNATURES");
// recv_data.hexlike();
uint8 signs = 0;
ObjectGuid petitionguid;
recv_data >> petitionguid; // petition guid
// solve (possible) some stran... | false | false | false | false | false | 0 |
Identify( GDALOpenInfo * poOpenInfo )
{
if (poOpenInfo->nHeaderBytes < HEADER_SIZE)
return FALSE;
double adfGeoTransform[6];
int nRows, nCols;
int bIsLittleEndian;
if ( !GetHeaderInfo( poOpenInfo->pabyHeader,
adfGeoTransform,
&nRows, &nCols,... | false | false | false | false | false | 0 |
xmalloc(int size)
{
char *tmp;
if (!(tmp = malloc(size))) {
perror("malloc");
exit(1);
}
return tmp;
} | false | false | false | false | false | 0 |
do_info (gint argc,
gchar **argv)
{
gint i;
CamelIndex *idx;
for (i = 2; i < argc; i++) {
printf ("Opening index file: %s\n", argv[i]);
idx = (CamelIndex *) camel_text_index_new (argv[i], O_RDONLY);
if (idx) {
camel_text_index_info ((CamelTextIndex *) idx);
g_object_unref (idx);
} else {
p... | false | false | false | false | false | 0 |
skip_word(int n, const char *s)
{
for ( ; n > 0; n--) {
while (*s != '\0' && ! isspace(*s))
s++;
while (*s != '\0' && isspace(*s))
s++;
}
return s;
} | false | false | false | false | false | 0 |
atEnd()const
{
if(p->zip == NULL)
{
qWarning("QuaZipFile::atEnd(): call setZipName() or setZip() first");
return false;
}
if(!isOpen())
{
qWarning("QuaZipFile::atEnd(): file is not open");
return false;
}
if(openMode()&ReadOnly)
// the same problem as ... | false | false | false | false | false | 0 |
getTileRefAt(int x, int y) const
{
// Find tile based on hash.
int h = computeTileHash(x,y,m_tileLutMask);
dtMeshTile* tile = m_posLookup[h];
while (tile)
{
if (tile->header && tile->header->x == x && tile->header->y == y)
return getTileRef(tile);
tile = tile->next;
}... | false | false | false | false | false | 0 |
insert_string(ECHAR *p)
{
ESIZE_T len;
int i,pos0,pos1;
ECHAR *new;
ECHAR *q;
len = strlen((char *)p);
if (End + len >= Length) {
if ((new = NEW(ECHAR, Length + len + MEM_INC)) == NULL)
return CSstay;
if (Length) {
COPYFROMTO(new, Line, Length);
DISPOSE(Line);
}
Line = new;
... | false | false | false | false | false | 0 |
gi_symbol_get_member (IJsSymbol *obj, const gchar * name)
{
GList *i;
GiSymbol *object = GI_SYMBOL (obj);
GiSymbolPrivate *priv = GI_SYMBOL_PRIVATE (object);
g_assert (object != NULL);
g_assert (priv != NULL);
g_assert (name != NULL);
if (!name)
return NULL;
for (i = priv->member; i; i = g_list_next (i))
... | false | false | false | false | false | 0 |
gsc_hw_set_output_path(struct gsc_ctx *ctx)
{
struct gsc_dev *dev = ctx->gsc_dev;
u32 cfg = readl(dev->regs + GSC_OUT_CON);
cfg &= ~GSC_OUT_PATH_MASK;
if (ctx->out_path == GSC_DMA)
cfg |= GSC_OUT_PATH_MEMORY;
else
cfg |= GSC_OUT_PATH_LOCAL;
writel(cfg, dev->regs + GSC_OUT_CON);
} | false | false | false | false | false | 0 |
read_bssm_file(GthBSSMParam *bssm_param, lua_State *L,
const char *filename, GtError *err)
{
#ifndef NDEBUG
int stack_size;
#endif
int had_err = 0;
gt_error_check(err);
gt_assert(L && filename);
#ifndef NDEBUG
stack_size = lua_gettop(L);
#endif
if (luaL_loadfile(L, filename) || lua... | false | false | false | false | false | 0 |
gda_sql_statement_update_take_on_conflict (GdaSqlStatement *stmt, GValue *value)
{
GdaSqlStatementUpdate *update = (GdaSqlStatementUpdate *) stmt->contents;
if (value) {
update->on_conflict = g_value_dup_string (value);
g_value_reset (value);
g_free (value);
... | false | false | false | false | false | 0 |
_GMenuCreatePopupMenu(GWindow owner,GEvent *event, GMenuItem *mi,
void (*donecallback)(GWindow) ) {
GPoint p;
GMenu *m;
GEvent e;
if ( !gmenubar_inited )
GMenuInit();
p.x = event->u.mouse.x;
p.y = event->u.mouse.y;
GDrawTranslateCoordinates(owner,GDrawGetRoot(GDrawGetDisplayOfWindow(owne... | false | false | false | false | false | 0 |
initstr(STRINGHEAD *hp)
{
if (hp->h_list == NULL) {
hp->h_list = (char *)malloc(2000);
hp->h_avail = 2000;
hp->h_used = 0;
}
hp->h_avail += hp->h_used;
hp->h_used = 0;
hp->h_count = 0;
hp->h_list[0] = '\0';
hp->h_list[1] = '\0';
} | false | false | false | false | false | 0 |
alsa_rawmidi_init(void)
{
snd_ctl_register_ioctl(snd_rawmidi_control_ioctl);
snd_ctl_register_ioctl_compat(snd_rawmidi_control_ioctl);
#ifdef CONFIG_SND_OSSEMUL
{ int i;
/* check device map table */
for (i = 0; i < SNDRV_CARDS; i++) {
if (midi_map[i] < 0 || midi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
pr_err("ALS... | false | false | false | false | false | 0 |
o_quit(struct Luser *lptr, int ac, char **av, int sockfd)
{
char *reason;
struct DccUser *dccptr;
if (!(dccptr = IsDccSock(sockfd)))
return; /* shouldn't happen */
if (ac < 2)
reason = MyStrdup("");
else
reason = GetString(ac - 1, av + 1);
os_notice(lptr, sockfd, "Closing connection: %s",
re... | false | false | false | false | false | 0 |
da9055_buck_get_current_limit(struct regulator_dev *rdev)
{
struct da9055_regulator *regulator = rdev_get_drvdata(rdev);
struct da9055_regulator_info *info = regulator->info;
int ret;
ret = da9055_reg_read(regulator->da9055, DA9055_REG_BUCK_LIM);
if (ret < 0)
return ret;
ret &= info->mode.mask;
return da9055... | false | false | false | false | false | 0 |
network_available() {
#ifndef SIM
for (unsigned int i=0; i<active_tasks.size(); i++) {
ACTIVE_TASK* atp = active_tasks[i];
if (atp->want_network) {
atp->send_network_available();
}
}
#endif
} | false | false | false | false | false | 0 |
markRightEdgesFirst(int32_t edgeNumber) {
if(offset==0) {
firstEdgeNumber=edgeNumber;
int32_t step=0;
int32_t i=length;
do {
Node *edge=equal[--i];
if(edge!=NULL) {
edgeNumber=edge->markRightEdgesFirst(edgeNumber-step);
}
... | false | false | false | false | false | 0 |
fuse_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
struct inode *inode = mapping->host;
struct fuse_fill_wb_data data;
int err;
err = -EIO;
if (is_bad_inode(inode))
goto out;
data.inode = inode;
data.req = NULL;
data.ff = NULL;
err = -ENOMEM;
data.orig_pages = kcalloc(F... | false | false | false | false | false | 0 |
do_cmd_visuals(const char *title, int row)
{
screen_save();
clear_from(0);
if (!visual_menu)
{
visual_menu = menu_new_action(visual_menu_items,
N_ELEMENTS(visual_menu_items));
visual_menu->title = title;
visual_menu->selections = lower_case;
visual_menu->browse_hook = visuals_browse_hook;
visual_men... | false | false | false | false | false | 0 |
cson_json_err_to_rc( JSON_error jrc )
{
switch(jrc)
{
case JSON_E_NONE: return 0;
case JSON_E_INVALID_CHAR: return cson_rc.Parse_INVALID_CHAR;
case JSON_E_INVALID_KEYWORD: return cson_rc.Parse_INVALID_KEYWORD;
case JSON_E_INVALID_ESCAPE_SEQUENCE: return cson_rc.Parse_INVALID_ESCAPE_SEQUE... | false | false | false | false | false | 0 |
HistogramAdd(const VP8LHistogram* const in,
VP8LHistogram* const out) {
int i;
for (i = 0; i < PIX_OR_COPY_CODES_MAX; ++i) {
out->literal_[i] += in->literal_[i];
}
for (i = 0; i < NUM_DISTANCE_CODES; ++i) {
out->distance_[i] += in->distance_[i];
}
for (i = 0; i < 256; ++i) {... | false | false | false | false | false | 0 |
OnEvent(const SEvent& event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = Context.device->getGUIEnvironment();
switch(event.GUIEvent.EventType)
{
/*
If a scrollbar changed its scroll position, and it is
'our' scrollbar ... | false | false | false | false | false | 0 |
plugin_init (GstPlugin * plugin)
{
gboolean ret;
GST_DEBUG_CATEGORY_INIT (aiff_debug, "aiff", 0, "AIFF plugin");
GST_DEBUG_CATEGORY_INIT (aiffparse_debug, "aiffparse", 0, "AIFF parser");
GST_DEBUG_CATEGORY_INIT (aiffmux_debug, "aiffmux", 0, "AIFF muxer");
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s... | false | false | false | false | false | 0 |
DFdiread(int32 file_id, uint16 tag, uint16 ref)
{
DIlist_ptr new_list;
CONSTR(FUNC, "DFdiread");
int32 length;
HEclear();
if (!HDvalidfid(file_id))
HRETURN_ERROR(DFE_ARGS, FAIL);
/* Find the group. */
length = Hlength(file_id, tag, ref);
if (length == FAIL)
HRET... | false | false | false | false | false | 0 |
mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c)
{
mp_int s, x;
mp_err res;
ARGCHK(a != NULL && c != NULL, MP_BADARG);
if((res = mp_init(&s)) != MP_OKAY)
return res;
if((res = mp_init_copy(&x, a)) != MP_OKAY)
goto X;
mp_set(&s, 1);
while(d != 0) {
if(d & 1) {
... | false | false | false | false | false | 0 |
synaptics_set_advanced_gesture_mode(struct psmouse *psmouse)
{
static unsigned char param = 0xc8;
struct synaptics_data *priv = psmouse->private;
if (!(SYN_CAP_ADV_GESTURE(priv->ext_cap_0c) ||
SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)))
return 0;
if (psmouse_sliced_command(psmouse, SYN_QUE_MODEL))
return ... | false | false | false | false | false | 0 |
peer_replicating_free_all(struct peer *peer)
{
gfarm_error_t e;
struct file_replicating *fr;
static const char diag[] = "peer_replicating_free_all";
gfarm_mutex_lock(&peer->replication_mutex, diag, "loop");
while ((fr = peer->replicating_inodes.next_inode) !=
&peer->replicating_inodes) {
gfarm_mutex_unloc... | false | false | false | false | false | 0 |
vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
bool want_excl)
{
int error = may_create(dir, dentry);
if (error)
return error;
if (!dir->i_op->create)
return -EACCES; /* shouldn't it be ENOSYS? */
mode &= S_IALLUGO;
mode |= S_IFREG;
error = security_inode_create(dir, dentry, mode);
if ... | false | false | false | false | false | 0 |
CKYBuffer_InitFromData(CKYBuffer *buf, const CKYByte *data, CKYSize len)
{
CKYStatus ret;
ckyBuffer_initBuffer(buf);
ret = CKYBuffer_Reserve(buf, len);
if (ret != CKYSUCCESS) {
return ret;
}
buf->len = len;
memcpy(buf->data, data, buf->len);
return CKYSUCCESS;
} | false | true | false | false | false | 1 |
e_book_backend_db_cache_get_contact (DB *db,
const gchar *uid)
{
DBT uid_dbt, vcard_dbt;
gint db_error;
EContact *contact = NULL;
g_return_val_if_fail (uid != NULL, NULL);
string_to_dbt (uid, &uid_dbt);
memset (&vcard_dbt, 0 , sizeof (vcard_dbt));
vcard_dbt.flags = DB_DBT_M... | false | false | false | false | false | 0 |
_e_mod_quickpanel_cb_mouse_up(void *data, int type __UNUSED__, void *event)
{
Ecore_Event_Mouse_Button *ev;
E_Illume_Quickpanel *qp;
ev = event;
if (!(qp = data)) return ECORE_CALLBACK_PASS_ON;
if (ev->event_window != qp->clickwin) return ECORE_CALLBACK_PASS_ON;
if (qp->visible) e_mod_quickpanel_hid... | false | false | false | false | false | 0 |
qualifyFunctionDeclTag (const statementInfo *const st,
const tokenInfo *const nameToken)
{
if (! isType (nameToken, TOKEN_NAME))
;
else if (isLanguage (Lang_java) || isLanguage (Lang_csharp))
qualifyFunctionTag (st, nameToken);
else if (st->scope == SCOPE_TYPEDEF)
makeTag (nameToken, st, TRUE, TAG_TYP... | false | false | false | false | false | 0 |
glade_gtk_label_create_eprop (GladeWidgetAdaptor *adaptor,
GladePropertyClass *klass,
gboolean use_command)
{
GladeEditorProperty *eprop;
/* chain up.. */
if (klass->pspec->value_type == GLADE_TYPE_ATTR_GLIST)
{
eprop = g_object_new (GLADE_TYPE_EPROP_ATTRS,
"property-class"... | false | false | false | false | false | 0 |
listdemos(int cn)
{
packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE);
putint(p, SV_SENDDEMOLIST);
putint(p, demofiles.length());
loopv(demofiles) sendstring(demofiles[i].info, p);
sendpacket(cn, 1, p.finalize());
} | false | false | false | false | false | 0 |
local_host (const ACE_TCHAR *s)
{
if (s)
{
ACE_OS::free ((void *) ACE_Log_Msg::local_host_);
{
ACE_NO_HEAP_CHECK;
ACE_ALLOCATOR (ACE_Log_Msg::local_host_, ACE_OS::strdup (s));
}
}
} | false | false | false | false | false | 0 |
siena_test_chip(struct efx_nic *efx, struct efx_self_tests *tests)
{
enum reset_type reset_method = RESET_TYPE_ALL;
int rc, rc2;
efx_reset_down(efx, reset_method);
/* Reset the chip immediately so that it is completely
* quiescent regardless of what any VF driver does.
*/
rc = efx_mcdi_reset(efx, reset_metho... | false | false | false | false | false | 0 |
rb_tree_rotate(RBTree *tree, RBTreeNode *node,
RBTreeNodeSide direction)
{
RBTreeNode *new_root;
/* The child of this node will take its place:
for a left rotation, it is the right child, and vice versa. */
new_root = node->children[1-direction];
/* Make new_root the root, u... | false | false | false | false | false | 0 |
yy_parse_failed(
yyParser *yypParser /* The parser */
){
configparserARG_FETCH;
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
}
#endif
while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
/* Here code is inserted which will be executed whenever the
... | false | false | false | false | false | 0 |
x86_pmu_stop(struct perf_event *event, int flags)
{
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
struct hw_perf_event *hwc = &event->hw;
if (__test_and_clear_bit(hwc->idx, cpuc->active_mask)) {
x86_pmu.disable(event);
cpuc->events[hwc->idx] = NULL;
WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED);
... | false | false | false | false | false | 0 |
checkParameterValue(vector<double const *> const ¶meters,
vector<vector<unsigned int> > const &dims) const
{
unsigned int n = dims[0][0];
double const *T = parameters[1];
double k = *parameters[2];
if (k < 2) {
return false;
}
else {
//NB Not checking positive definiteness
return ... | false | false | false | false | false | 0 |
gst_video_crop_transform_planar (GstVideoCrop * vcrop, GstBuffer * inbuf,
GstBuffer * outbuf)
{
guint8 *y_out, *u_out, *v_out;
guint8 *y_in, *u_in, *v_in;
guint i, dx;
/* Y plane */
y_in = GST_BUFFER_DATA (inbuf);
y_out = GST_BUFFER_DATA (outbuf);
y_in += (vcrop->crop_top * vcrop->in.y_stride) + vcr... | false | true | false | false | false | 1 |
extractPages (const char *srcFileName, const char *destFileName) {
char pathName[1024];
GooString *gfileName = new GooString (srcFileName);
PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL);
if (!doc->isOk()) {
error(-1, "Could not extract page(s) from damaged file ('%s')", srcFileName);
return fa... | false | false | false | false | false | 0 |
gdth_ctr_name(gdth_ha_str *ha)
{
TRACE2(("gdth_ctr_name()\n"));
if (ha->type == GDT_EISA) {
switch (ha->stype) {
case GDT3_ID:
return("GDT3000/3020");
case GDT3A_ID:
return("GDT3000A/3020A/3050A");
case GDT3B_ID:
return("GDT3000B/3010A")... | false | false | false | false | false | 0 |
gmpc_tools_ipc_finalize(GObject * obj)
{
GmpcToolsIPC *self = GMPC_TOOLS_IPC(obj);
GmpcToolsIPCClass *klass = (g_type_class_peek(gmpc_tools_ipc_get_type()));
gpointer parent_class = g_type_class_peek_parent(klass);
if (self->priv != NULL)
{
GmpcToolsIPCPrivate *priv = self->priv;
/* Destroy unique app */
i... | false | false | false | false | false | 0 |
cpl_io_fits_free(cpl_fitsfile_t * self, int * status)
{
if (self != NULL) {
if (*status == 0) {
if (fits_close_file(self->fptr, status)) {
(void)cpl_error_set_fits(CPL_ERROR_BAD_FILE_FORMAT, *status,
fits_close_file, "filename='%s', "
... | false | false | false | false | false | 0 |
Scm_GtkCallThunk(gpointer closure)
{
ScmObj r;
SCM_ASSERT(closure != NULL && SCM_PROCEDUREP(closure));
r = Scm_ApplyRec2(SCM_OBJ(&callcallback_proc__STUB),
SCM_OBJ(closure), SCM_NIL);
return SCM_BOOL_VALUE(r);
} | false | false | false | false | false | 0 |
WCHANadd(cp)
register CHANNEL *cp;
{
if (cp->Out.Left > 0) {
FD_SET(cp->fd, &WCHANmask);
if (cp->fd > CHANlastfd)
CHANlastfd = cp->fd;
}
} | false | false | false | false | false | 0 |
mi_check_print_error(MI_CHECK *param, const char *fmt,...)
{
va_list args;
DBUG_ENTER("mi_check_print_error");
DBUG_PRINT("enter",("format: %s",fmt));
fflush(stdout);
if (!param->warning_printed && !param->error_printed)
{
if (param->testflag & T_SILENT)
fprintf(stderr,"%s: MyISAM file %s\n",my_p... | false | false | false | false | true | 1 |
req_update_mtime(requestobject *self, PyObject *args)
{
double mtime;
if (! PyArg_ParseTuple(args, "d", &mtime))
return NULL; /* bad args */
ap_update_mtime(self->request_rec, apr_time_from_sec(mtime));
Py_INCREF(Py_None);
return Py_None;
} | false | false | false | false | false | 0 |
encode_int(struct evbuffer *evbuf, ev_uint32_t number)
{
int off = 1, nibbles = 0;
ev_uint8_t data[5];
memset(data, 0, sizeof(ev_uint32_t)+1);
while (number) {
if (off & 0x1)
data[off/2] = (data[off/2] & 0xf0) | (number & 0x0f);
else
data[off/2] = (data[off/2] & 0x0f) |
((number & 0x0f) << 4);
n... | false | false | false | false | false | 0 |
ncr_reset (void)
{
board_mask = 131072 - 1;
configured = 0;
if (currprefs.cs_mbdmac == 2) {
board_mask = 65535 - 1;
configured = -1;
}
} | false | false | false | false | false | 0 |
nautilus_file_get_keywords (NautilusFile *file)
{
GList *keywords, *metadata_keywords;
if (file == NULL) {
return NULL;
}
g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
keywords = g_list_copy_deep (file->details->extension_emblems, (GCopyFunc) g_strdup, NULL);
keywords = g_list_concat (keywords, g_lis... | false | false | false | false | false | 0 |
alloc_page_buffers(struct page *page, unsigned long size,
int retry)
{
struct buffer_head *bh, *head;
long offset;
try_again:
head = NULL;
offset = PAGE_SIZE;
while ((offset -= size) >= 0) {
bh = alloc_buffer_head(GFP_NOFS);
if (!bh)
goto no_grow;
bh->b_this_page = head;
bh->b_blocknr = -1;
head =... | false | false | false | false | false | 0 |
blkmk_init_generation2(blktemplate_t *tmpl, void *script, size_t scriptsz, bool *out_newcb) {
if (tmpl->cbtxn)
{
if (out_newcb)
*out_newcb = false;
return 0;
}
if (out_newcb)
*out_newcb = true;
size_t datasz = 62 + sizeof(blkheight_t) + scriptsz;
unsigned char *data = malloc(datasz);
size_t off = 0;... | false | false | false | false | false | 0 |
em_write_G3_APP1 (
PJENC_INST g,
int res) /* resolution of image (number of pixels per inch) */
{
res = ((res+50)/100)*100; /* round res to the nearest 100 */
PUT_MARKER (g, MARKER_APP+1);
PUT_INT (g, 12); /* the length */
/*** ID ***/
*(g->write_buf_next)++ = 'G';
*(g->wr... | false | false | false | false | false | 0 |
merge_equiv_table(ModuleVarInfo *caller, ModuleVarInfo *callee)
{
Common_table *tail;
Common_table *p;
p = copy_common_table_list(callee->module, callee->module->equiv_head);
change_equiv_operand(callee, caller, p);
/* link */
if (caller->module->equiv_head == NULL) {
caller->module->e... | false | false | false | false | false | 0 |
aim_locate_adduserinfo(aim_session_t *sess,
aim_userinfo_t *userinfo)
{
aim_userinfo_t *cur;
cur = aim_locate_finduserinfo(sess, userinfo->sn);
if (cur == NULL) {
cur = (aim_userinfo_t *)calloc(1, sizeof(aim_userinfo_t));
cur->sn = strdup(userinfo->sn);
cur->next = sess->locate.userinfo;
sess->locate.user... | false | false | false | false | false | 0 |
toolBar()
{
if (! d->toolBar)
if ((d->toolBar = createToolBar()))
{
if (d->toolBar->objectName().isEmpty())
d->toolBar->setObjectName("mainToolBar");
if (d->toolBar->windowTitle().isEmpty())
d->toolBar->setWindowTitle(tr("Main ToolBar"));
addToolBar(Qt::TopToolBar... | false | false | false | false | false | 0 |
mp3tunes_locker_playlists(mp3tunes_locker_object_t *obj, mp3tunes_locker_playlist_list_t **playlists) {
xml_xpath_t* xml_xpath;
xmlXPathObjectPtr xpath_obj;
xmlNodeSetPtr nodeset;
xmlNodePtr node;
int i;
xml_xpath = mp3tunes_locker_api_simple_fetch(obj, MP3TUNES_SERVER_API, "api/v1/lockerData/"... | false | false | false | false | false | 0 |
stp_destroy_component_data(stp_vars_t *v, const char *name)
{
stp_list_item_t *item;
CHECK_VARS(v);
item = stp_list_get_item_by_name(v->internal_data, name);
if (item)
stp_list_item_destroy(v->internal_data, item);
} | false | false | false | true | false | 1 |
Equal(const WordKey& other) const
{
const WordKeyInfo& info = *WordKey::Info();
//
// Walk the fields in sorting order. As soon as one of them
// does not compare equal, return.
//
for(int j = 0; j < info.nfields; j++)
{
//
// Only compare fields that are set in both key
//
if(!IsDefined(... | false | false | false | false | false | 0 |
inverse() const
{
if(!isInvertible())
return AffineTransform();
return m_transform.inverted();
} | false | false | false | false | false | 0 |
backref_cache_cleanup(struct backref_cache *cache)
{
struct backref_node *node;
int i;
while (!list_empty(&cache->detached)) {
node = list_entry(cache->detached.next,
struct backref_node, list);
remove_backref_node(cache, node);
}
while (!list_empty(&cache->leaves)) {
node = list_entry(cache->leaves.... | false | false | false | false | false | 0 |
mess_some_more (void)
{
GList *walk;
gint random;
gint removed = 0;
g_mutex_lock (fdlock);
for (walk = fds; walk;) {
GstPollFD *fd = (GstPollFD *) walk->data;
walk = g_list_next (walk);
random = (gint) (10.0 * rand () / (RAND_MAX + 1.0));
switch (random) {
case 0:
{
/*
... | false | false | false | false | true | 1 |
ajCharNewC(const char* txt)
{
char* cp;
size_t len;
if(txt)
{
len = strlen(txt);
cp = (char*) AJALLOC0(len+1);
memmove(cp, txt, len+1);
}
else
{
cp = (char*) AJALLOC0(1);
}
return cp;
} | false | false | false | false | false | 0 |
test_multiple_ipv6_tcp_msg(void)
{
int sk, received = 0, server_closed = 0;
sk = connect_tcp_socket("::1");
g_assert_cmpint(sk, >=, 0);
change_msg2(msg2, '2');
send_msg(sk, msg2, sizeof(msg2), 0);
received = receive_message(sk, 35, sizeof(msg2), &server_closed);
close(sk);
if (server_closed == 0)
g_assert_c... | false | false | false | false | false | 0 |
test_th_render(void){
Blob in;
Th_InitTraceLog();
if( find_option("th-open-config", 0, 0)!=0 ){
db_find_and_open_repository(OPEN_ANY_SCHEMA | OPEN_OK_NOT_FOUND, 0);
db_open_config(0);
}
if( g.argc<3 ){
usage("FILE");
}
blob_zero(&in);
blob_read_from_file(&in, g.argv[2]);
Th_Render(blob_str... | false | false | false | false | false | 0 |
ArgusATMPacket(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
{
struct ether_header *ep = (struct ether_header *) ArgusPacketBuffer;
struct timeval *tvp = (struct timeval *) &h->ts;
unsigned int length = h->len;
unsigned int caplen = h->caplen;
ArgusGlobalTime = *tvp;
if (ArgusGlobalTi... | false | false | false | false | false | 0 |
dump_def_use_chain (struct du_chain *chains)
{
while (chains)
{
struct du_chain *this = chains;
int r = REGNO (*this->loc);
int nregs = HARD_REGNO_NREGS (r, GET_MODE (*this->loc));
fprintf (rtl_dump_file, "Register %s (%d):", reg_names[r], nregs);
while (this)
{
fprintf (rtl_dump... | false | false | false | false | false | 0 |
qib_update_7322_usrhead(struct qib_ctxtdata *rcd, u64 hd,
u32 updegr, u32 egrhd, u32 npkts)
{
/*
* Need to write timeout register before updating rcvhdrhead to ensure
* that the timer is enabled on reception of a packet.
*/
if (hd >> IBA7322_HDRHEAD_PKTINT_SHIFT)
adjust_rcv_timeout(rcd, npkts);
if (u... | false | false | false | false | false | 0 |
register_fwdcb(fwd_cb_t f)
{
struct fwd_callback *cbp;
/* build a new callback structure */
if (!(cbp=pkg_malloc( sizeof( struct fwd_callback)))) {
LM_ERR("out of pkg. mem\n");
return -1;
}
/* fill it up */
cbp->callback = f;
/* link it at the beginning of the list */
cbp->next = fwdcb_hl;
fwdcb_hl = cbp... | false | false | false | false | false | 0 |
writePropertyHeader(const Property* p, const ResourceClass* resourceClass, QTextStream& ms) const
{
if( p->literalRange().isEmpty() &&
!p->range() ) {
if ( !quiet )
qDebug() << "(CodeGenerator::writeSource) type not defined for property: " << p->name() << endl;
return false;
... | false | false | false | false | false | 0 |
__acc_err(int32 id_num, char *fmt, ...)
{
va_list va, va2, va3;
char s1[RECLEN], s2[RECLEN];
acc_error_flag = TRUE;
__pv_err_cnt++;
if (!__acc_displayerrors) return;
if (__run_state == SS_SIM)
sprintf(s1, " now %s", __to_timstr(s2, &__simtime));
else strcpy(s1, "");
if (__vpierr_cb_active && !__iact_state... | true | true | false | false | true | 1 |
coupnum (GDate const *settlement, GDate const *maturity,
GoCouponConvention const *conv)
{
int months;
GDate this_coupondate = *maturity;
if (!g_date_valid (maturity) || !g_date_valid (settlement))
return gnm_nan;
months = g_date_get_month (maturity) - g_date_get_month (settlement) +
12 *... | false | false | false | false | false | 0 |
printdfas(grammar *g, FILE *fp)
{
dfa *d;
int i, j;
printstates(g, fp);
fprintf(fp, "static dfa dfas[%d] = {\n", g->g_ndfas);
d = g->g_dfa;
for (i = 0; i < g->g_ndfas; i++, d++) {
fprintf(fp, " {%d, \"%s\", %d, %d, states_%d,\n",
d->d_type, d->d_name, d->d_initial, d->d_n... | false | false | false | false | false | 0 |
expanded_list_button_press_event_cb (GtkStatusIcon *status_icon,
GdkEventButton *event,
gpointer user_data)
{
GthTagsEntry *self = user_data;
if (event->button == 3) {
gtk_menu_popup (GTK_MENU (self->priv->expanded_list.popup_menu),
NULL,
NULL,
NULL,
NULL,
event->but... | false | false | false | false | false | 0 |
_cgsem_wait(cgsem_t *cgsem, const char *file, const char *func, const int line)
{
retry:
if (unlikely(sem_wait(cgsem))) {
if (interrupted())
goto retry;
quitfrom(1, file, func, line, "Failed to sem_wait errno=%d cgsem=0x%p", errno, cgsem);
}
} | false | false | false | false | false | 0 |
CycleWaitAux()
{
if (!WaitSync()) {
Error(); // Terminates the thread
}
CallSyncCallbackAux();
return GetEngineControl()->fBufferSize;
} | false | false | false | false | false | 0 |
on_npc_set_sched
(
GtkWidget *btn, // One of the 'set' buttons.
gpointer user_data
)
{
static int first = 1; // To initialize signal handlers.
const char *name = glade_get_widget_name(btn);
const char *numptr = name + strlen(name) - 1;
GladeXML *xml = ExultStudio::get_instance()->get_xml();
char lname[20];... | false | false | false | false | false | 0 |
ReplyGetSMSMemorySize(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state)
{
at_driver_instance *drvinst = AT_DRVINST(state);
at_line_buffer buf;
gn_error error;
if ((error = at_error_get(buffer, state)) != GN_ERR_NONE)
return error;
buf.line1 = buffer + 1;
buf.len... | false | false | false | false | false | 0 |
ccss_property_init (ccss_property_t *self,
ccss_property_class_t const *property_class)
{
g_assert (self && property_class);
self->vtable = property_class;
self->state = CCSS_PROPERTY_STATE_INVALID;
} | 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.