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 |
|---|---|---|---|---|---|---|
DumpLinkeditDataCommand(MachOObject &Obj,
const MachOObject::LoadCommandInfo &LCI) {
InMemoryStruct<macho::LinkeditDataLoadCommand> LLC;
Obj.ReadLinkeditDataLoadCommand(LCI, LLC);
if (!LLC)
return Error("unable to read segment load command");
outs() << " ('dataoff', " <<... | false | false | false | false | false | 0 |
sort_user_dec(void *v1, void *v2)
{
slurmdb_report_user_rec_t *user_a;
slurmdb_report_user_rec_t *user_b;
int diff;
diff = 0;
user_a = *(slurmdb_report_user_rec_t **)v1;
user_b = *(slurmdb_report_user_rec_t **)v2;
if (sort_flag == SLURMDB_REPORT_SORT_TIME) {
if (user_a->cpu_secs > user_b->cpu_secs)
return... | false | false | false | false | false | 0 |
playlist()
{
return Playlist::ModelStack::instance()->groupingProxy();
} | false | false | false | false | false | 0 |
alloc_rpf (unsigned mantissa, fiasco_rpf_range_e range)
/*
* Reduced precision format constructor.
* Allocate memory for the rpf_t structure.
* Number of mantissa bits is given by `mantissa'.
* The range of the real values is in the interval [-`range', +`range'].
* In case of invalid parameters, a structure w... | false | false | false | false | false | 0 |
copy_rtx_for_iterators (rtx original)
{
const char *format_ptr;
int i, j;
rtx x;
if (original == 0)
return original;
/* Create a shallow copy of ORIGINAL. */
x = rtx_alloc (GET_CODE (original));
memcpy (x, original, RTX_CODE_SIZE (GET_CODE (original)));
/* Change each string and recursively chan... | false | false | false | false | true | 1 |
client_get_area(ObClient *self)
{
XWindowAttributes wattrib;
Status ret;
ret = XGetWindowAttributes(obt_display, self->window, &wattrib);
g_assert(ret != BadWindow);
RECT_SET(self->area, wattrib.x, wattrib.y, wattrib.width, wattrib.height);
POINT_SET(self->root_pos, wattrib.x, wattrib.y);
... | false | false | false | false | false | 0 |
alloc_raid_set(struct lib_context *lc, const char *who)
{
struct raid_set *ret;
if ((ret = dbg_malloc(sizeof(*ret)))) {
INIT_LIST_HEAD(&ret->list);
INIT_LIST_HEAD(&ret->sets);
INIT_LIST_HEAD(&ret->devs);
ret->status = s_setup;
ret->type = t_undef;
} else
log_alloc_err(lc, who);
return ret;
} | false | false | false | false | false | 0 |
pcm512x_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
struct regmap *regmap;
struct regmap_config config = pcm512x_regmap;
/* msb needs to be set to enable auto-increment of addresses */
config.read_flag_mask = 0x80;
config.write_flag_mask = 0x80;
regmap = devm_regmap_init_i2c(i2c,... | false | false | false | false | false | 0 |
jack_port_type_buffer_size (jack_port_type_info_t* port_type_info, jack_nframes_t nframes)
{
if( port_type_info->buffer_scale_factor < 0 ) {
return port_type_info->buffer_size;
}
return port_type_info->buffer_scale_factor
* sizeof (jack_default_audio_sample_t)
* nframes;
} | false | false | false | false | false | 0 |
__mcam_cam_reset(struct mcam_camera *cam)
{
return sensor_call(cam, core, reset, 0);
} | false | false | false | false | false | 0 |
INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC)
{
struct mtd_info *mtd = inftl->mbd.mtd;
unsigned char BlockUsed[MAX_SECTORS_PER_UNIT];
unsigned char BlockDeleted[MAX_SECTORS_PER_UNIT];
unsigned int thisEUN, status;
int block, silly;
struct inftl_bci bci;
size_t retlen;
pr_debug("INFTL: INFTL... | true | true | false | false | false | 1 |
get_rel_oids(Oid relid, const RangeVar *vacrel, const char *stmttype)
{
List *oid_list = NIL;
MemoryContext oldcontext;
/* OID supplied by VACUUM's caller? */
if (OidIsValid(relid))
{
oldcontext = MemoryContextSwitchTo(vac_context);
oid_list = lappend_oid(oid_list, relid);
MemoryContextSwitchTo(oldcontex... | false | false | false | false | false | 0 |
detach(){
FXShell::detach();
if(icon) icon->detach();
if(miniIcon) miniIcon->detach();
} | false | false | false | false | false | 0 |
flex_regcomp(regex_t *preg, const char *regex, int cflags)
{
int err;
memset (preg, 0, sizeof (regex_t));
if ((err = regcomp (preg, regex, cflags)) != 0) {
const int errbuf_sz = 200;
char *errbuf, *rxerr;
errbuf = (char*)flex_alloc(errbuf_sz *sizeof(char));
if (!errbuf)
flexfatal(_("Unab... | false | false | false | false | false | 0 |
updateConfigFilesIfNeeded(const std::string& rc_file) {
const int CONFIG_VERSION = 13; // TODO: move this to 'defaults.hh' or 'config.h'
FbTk::ResourceManager r_mgr(rc_file.c_str(), false);
FbTk::Resource<int> c_version(r_mgr, 0, "session.configVersion", "Session.ConfigVersion");
if (!r_mgr.load(rc_f... | false | false | false | false | false | 0 |
set_link_ipg(struct hfi1_pportdata *ppd)
{
struct hfi1_devdata *dd = ppd->dd;
struct cc_state *cc_state;
int i;
u16 cce, ccti_limit, max_ccti = 0;
u16 shift, mult;
u64 src;
u32 current_egress_rate; /* Mbits /sec */
u32 max_pkt_time;
/*
* max_pkt_time is the maximum packet egress time in units
* of the fabr... | false | false | false | false | false | 0 |
remap_colors( int num, int addr, int data )
{
/* this is the protection. color codes are shuffled around */
/* the ones with value 0xff are unknown */
if ( addr >= 0x3f00 )
{
int newdata = remapped_colortable[ data & 0x3f ];
if ( newdata != 0xff )
data = newdata;
#ifdef MAME_DEBUG
else
... | false | false | false | false | false | 0 |
command_from(const char *cmd)
{
STACK_CONTEXT *sc = GB_DEBUG.GetStack(0); //STACK_get_current();
if (sc && sc->pc)
{
GB.Signal(GB_SIGNAL_DEBUG_FORWARD, 0);
DEBUG_info.stop = TRUE;
DEBUG_info.leave = FALSE;
DEBUG_info.fp = sc->fp;
DEBUG_info.bp = sc->bp;
}
else
{
GB.Signal(GB_SIGNAL_DE... | false | false | false | false | false | 0 |
cpl_propertylist_load(const char *name, cpl_size position)
{
cxint status = 0;
cpl_propertylist *self;
cpl_error_code code;
fitsfile *file = NULL;
if (name == NULL) {
cpl_error_set_(CPL_ERROR_NULL_INPUT);
return NULL;
}
if ((position < 0) || (position > CX_MAXINT)) {
... | false | false | false | false | false | 0 |
on_tree_view_staged_drag_data_received (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
... | false | false | false | false | false | 0 |
gwy_data_field_number_grains(GwyDataField *mask_field,
gint *grains)
{
const gdouble *data;
gint xres, yres, i, j, grain_id, max_id, id;
gint *m, *mm;
xres = mask_field->xres;
yres = mask_field->yres;
data = mask_field->data;
/* The max number of grains, reache... | false | false | false | false | false | 0 |
clearPaths()
{
// Iterate and clean up all allocated data
ListIterator<PathReference*> it;
it.begin(references_);
while(!it.atLast())
{
deAllocateReference(*it);
delete *it;
++it;
}
// Paranoia?
it.begin(newReferences_);
while(!it.atLast())
{
deAllocateReference(*it);
... | false | false | false | false | false | 0 |
primary_expression(int mode, Value * v) {
if (text_sy == '(') {
next_sy();
expression(mode, v);
if (text_sy != ')') error(ERR_INV_EXPRESSION, "Missing ')'");
next_sy();
}
else if (text_sy == SY_VAL) {
if (mode != MODE_SKIP) *v = text_val;
next_sy();
}
... | false | false | false | false | false | 0 |
opal_compress_gzip_decompress_nb(char * cname, char **fname, pid_t *child_pid)
{
char * cmd = NULL;
char **argv = NULL;
char * dir_cname = NULL;
pid_t loc_pid = 0;
int status;
bool is_tar;
if( 0 == strncmp(&(cname[strlen(cname)-7]), ".tar.gz", strlen(".tar.gz")) ) {
is_tar = true;
... | false | false | false | false | true | 1 |
Download(const std::string &filename, std::string url, IO_MODE outputMode,
curl_progress_callback fprogress, void * fprogress_data,
const char* authentication)
{
std::string URL = url;
if(!m_ServerUrl.empty())
{
URL = m_ServerUrl + URL;
}
m_OutputMode = ... | false | false | false | false | false | 0 |
vn_nary_may_trap (vn_nary_op_t nary)
{
tree type;
tree rhs2 = NULL_TREE;
bool honor_nans = false;
bool honor_snans = false;
bool fp_operation = false;
bool honor_trapv = false;
bool handled, ret;
unsigned i;
if (TREE_CODE_CLASS (nary->opcode) == tcc_comparison
|| TREE_CODE_CLASS (nary->opcode) ... | false | false | false | false | true | 1 |
direntry_remove(struct dinode *parent_inoptr, uint32_t child_inonum)
{
int rd_rc = FSCK_OK;
UniChar uniname[JFS_NAME_MAX];
int uniname_length;
struct component_name uniname_struct;
rd_rc = direntry_get_objnam(parent_inoptr->di_number, child_inonum,
&uniname_length, &(uniname[0]));
if (rd_rc == FSCK_OK) ... | false | false | false | false | false | 0 |
Vect_select_areas_by_box(struct Map_info *Map, BOUND_BOX * Box,
struct ilist *list)
{
int i;
G_debug(3, "Vect_select_areas_by_box()");
G_debug(3, "Box(N,S,E,W,T,B): %e, %e, %e, %e, %e, %e", Box->N, Box->S,
Box->E, Box->W, Box->T, Box->B);
if (!(Map->plus.Spidx_built)) {
G_debug(3, "Building ... | false | false | false | false | false | 0 |
ar5523_get_capability(struct ar5523 *ar, u32 cap, u32 *val)
{
int error;
__be32 cap_be, val_be;
cap_be = cpu_to_be32(cap);
error = ar5523_cmd_read(ar, WDCMSG_TARGET_GET_CAPABILITY, &cap_be,
sizeof(cap_be), &val_be, sizeof(__be32),
AR5523_CMD_FLAG_MAGIC);
if (error != 0) {
ar5523_err(ar, "could not read ... | false | false | false | false | false | 0 |
jl_prepare_ast(jl_lambda_info_t *li, jl_tuple_t *sparams)
{
jl_tuple_t *spenv = NULL;
jl_value_t *l_ast = li->ast;
if (l_ast == NULL) return NULL;
jl_value_t *ast = l_ast;
JL_GC_PUSH(&spenv, &ast);
if (jl_is_tuple(ast))
ast = jl_uncompress_ast((jl_tuple_t*)ast);
spenv = jl_tuple_tvar... | false | false | false | false | false | 0 |
tda827xa_sleep(struct dvb_frontend *fe)
{
struct tda827x_priv *priv = fe->tuner_priv;
static u8 buf[] = { 0x30, 0x90 };
struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
.buf = buf, .len = sizeof(buf) };
dprintk("%s:\n", __func__);
tuner_transfer(fe, &msg, 1);
if (priv->cfg && priv->cfg->sle... | false | false | false | false | false | 0 |
camlidl_environment_ap_environment_var_of_dim(
value _v_e,
value _v_dim)
{
ap_environment_ptr e; /*in*/
ap_dim_t dim; /*in*/
ap_var_t _res;
value _vres;
struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL };
camlidl_ctx _ctx = &_ctxs;
camlidl_ml2c_environment_ap_environment_ptr(_v_e, &e, _ctx);... | false | false | false | false | false | 0 |
get_max_para_of_seq_blocks( Block *bpt, Hmdf_information *hmdf_info_list,
Module_hmdf_information *module_hmdf_info_list )
{
int inner_max_para;
Block *inner_bpt;
Hmdf_information *inner_hmdf_info;
inner_max_para = 1;
for( inner_bpt = bpt->inner; i... | false | false | false | false | false | 0 |
cf(const NEWMAT::ColumnVector& p)const{
//cout<<"CF"<<endl;
//OUT(p.t());
double cfv = 0.0;
double err;
float _a = std::abs(p(2));
float _b = std::abs(p(3));
////////////////////////////////////
ColumnVector fs(nfib);
Matrix x(nfib,3);
float sumf=0;
for(int k=1;k<=nfib;k++){
int kk = 4+3*(k-1)... | false | false | false | false | false | 0 |
animate_fade(gpointer ptr){
Gameboard *g = (Gameboard *)ptr;
fade_state *f = &g->fade;
f->count--;
if(f->count>0){
fade_list *l = f->head;
while(l){
invalidate_vertex(g,l->v);
l=l->next;
}
return 1;
}
fade_cancel(g);
return 0;
} | false | false | false | false | false | 0 |
aln_init(glam2_aln *aln, int seq_num, int max_width, int alph_size) {
int i;
aln->seq_num = seq_num;
XMALLOC(aln->cols, max_width);
for (i = 0; i < max_width; ++i)
col_init(&aln->cols[i], seq_num, alph_size);
XMALLOC(aln->strands, seq_num);
XMALLOC(aln->insert_counts, max_width); /* back is unused */
} | false | false | false | false | false | 0 |
__Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
if (!ob)
goto bad;
if (PyDict_SetItemString(dict, "__pyx_vtabl... | false | false | false | false | false | 0 |
show (bool only_valids)
{
if (pr == NULL)
return;
for (int j = 0; j < n_decls; j++) {
if (!only_valids || decls[j].state == valid)
{
if (only_valids)
pr->info ("%: %n", decls[j].d, decls[j].d);
else
pr->info ("%: %n (%s %d)", decls[j].d,
decls[j].d, item_state[decls[j].state],
de... | false | false | false | false | false | 0 |
m2bus_serial_open(struct gn_statemachine *state)
{
int type;
if (!state)
return false;
if (state->config.connection_type == GN_CT_TCP)
type = GN_CT_TCP;
else
type = GN_CT_Serial;
/* Open device. */
if (!device_open(state->config.port_device, true, false, false, type, state)) {
perror(_("Couldn't open M... | false | false | false | false | false | 0 |
GetHeight(float x, float y, float z) const
{
float staticHeight = m_TerrainData->GetHeightStatic(x, y, z);
// Get Dynamic Height around static Height (if valid)
float dynSearchHeight = 2.0f + (z < staticHeight ? staticHeight : z);
return std::max<float>(staticHeight, m_dyn_tree.getHeight(x, y, dynSearc... | false | false | false | false | false | 0 |
exporthtml_fmt_fullname(
ExportHtmlCtl *ctl, gchar *buf, const ItemPerson *person )
{
gboolean flag;
if( ctl->nameFormat == EXPORT_HTML_LAST_FIRST ) {
flag = FALSE;
if( person->lastName ) {
if( *person->lastName ) {
strcat( buf, " " );
strcat( buf, person->lastName );
flag = TRUE;
}
}
if(... | false | false | false | false | false | 0 |
gl_field_button_menu_set_keys (glFieldButtonMenu *this,
GList *key_list)
{
GList *p;
GtkWidget *menu_item;
gchar *key;
gint i, i_row, i_col;
gl_debug (DEBUG_FIELD_BUTTON, "START");
/*
* Remove all old men... | false | false | false | false | false | 0 |
dio_ReadUnit(DIO_UnitDescriptor * Unit, DIO_EntryCallBack CallBack) {
memset(Unit, 0, sizeof(DIO_UnitDescriptor));
sUnit = Unit;
sUnit->mFile = sSection->file;
sUnit->mSection = sSection;
sUnit->mUnitOffs = dio_GetPos();
sUnit->m64bit = 0;
if (strcmp(sSection->name, ".debug") != 0) {
... | false | false | false | false | false | 0 |
add_numeric_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
GList** pList )
{
GncSqlColumnInfo* info;
gchar* buf;
const GncSqlColumnTableEntry* subtable_row;
g_return_if_fail( be != NULL );
g_return_if_fail( table_row != NULL );
... | false | false | false | false | false | 0 |
isInLineSection(
const TaggedLineString* line,
const vector<std::size_t>& sectionIndex,
const TaggedLineSegment* seg)
{
// not in this line
if (seg->getParent() != line->getParent())
return false;
std::size_t segIndex = seg->getIndex();
if (segIndex >= sectionIndex[0] && segIndex < sectionIndex[1])
retur... | false | false | false | false | false | 0 |
sigbuffer_make_room (SigBuffer *buf, int size)
{
if (buf->end - buf->p < size) {
int new_size = buf->end - buf->buf + size + 32;
char *p = g_realloc (buf->buf, new_size);
size = buf->p - buf->buf;
buf->buf = p;
buf->p = p + size;
buf->end = buf->buf + new_size;
}
} | false | false | false | false | false | 0 |
apply(CEGUI::PropertySet& target) const
{
CEGUI_TRY
{
target.setProperty(d_propertyName, d_propertyValue);
}
// allow 'missing' properties
CEGUI_CATCH (UnknownObjectException&)
{}
} | false | false | false | false | false | 0 |
gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw)
{
if (sdp->sd_log_bio) {
atomic_inc(&sdp->sd_log_in_flight);
submit_bio(rw, sdp->sd_log_bio);
sdp->sd_log_bio = NULL;
}
} | false | false | false | false | false | 0 |
_rl_nsearch_dosearch (cxt)
_rl_search_cxt *cxt;
{
rl_mark = cxt->save_mark;
/* If rl_point == 0, we want to re-use the previous search string and
start from the saved history position. If there's no previous search
string, punt. */
if (rl_point == 0)
{
if (noninc_search_string == 0)
{
... | false | false | false | false | false | 0 |
setInitialStateToUnicodeKR(UConverter* /*converter*/, UConverterDataISO2022 *myConverterData){
if(myConverterData->version == 1) {
UConverter *cnv = myConverterData->currentConverter;
cnv->toUnicodeStatus=0; /* offset */
cnv->mode=0; /* state */
cnv->toULength=0; ... | false | false | false | false | false | 0 |
ar5523_submit_rx_cmd(struct ar5523 *ar)
{
int error;
usb_fill_bulk_urb(ar->rx_cmd_urb, ar->dev,
ar5523_cmd_rx_pipe(ar->dev), ar->rx_cmd_buf,
AR5523_MAX_RXCMDSZ, ar5523_cmd_rx_cb, ar);
ar->rx_cmd_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
error = usb_submit_urb(ar->rx_cmd_urb, GFP_ATOMIC);
if (erro... | false | false | false | false | false | 0 |
ath5k_hw_gainf_calibrate(struct ath5k_hw *ah)
{
u32 data, type;
struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom;
if (ah->ah_rf_banks == NULL ||
ah->ah_gain.g_state == AR5K_RFGAIN_INACTIVE)
return AR5K_RFGAIN_INACTIVE;
/* No check requested, either engine is inactive
* or an adjustment is alrea... | false | false | false | false | false | 0 |
computeCubicForces(VibCorrections* vibCorrections)
{
gdouble deriv0; /* nul on well */
gdouble derivP;
gdouble derivM;
gint nf = vibCorrections->numberOfFrequences;
gdouble f = 2*vibCorrections->delta*sqrt(AMU_TO_AU);
gdouble f2 = vibCorrections->delta*vibCorrections->delta*AMU_TO_AU;
gint i,j;
if(nf<1) re... | false | false | false | false | false | 0 |
comWriteTable(AjPFile fp,const char *name,
const EmbPComUjwin RUj,const EmbPComUjwin MedUj,
const EmbPComUjwin SDUj, const EmbPComUjwin RatUj,
ajint Nwin, ajint jmin, ajint jmax)
{
ajint i;
ajint j;
ajint k;
ajFmtPrintF(fp,"\n");
ajFmtPrintF(fp,"Sequence: %s \n\n",name);
... | false | false | false | false | false | 0 |
init_search (ETable *e_table)
{
if (e_table->search != NULL)
return;
e_table->search = e_table_search_new ();
e_table->search_search_id = g_signal_connect (
e_table->search, "search",
G_CALLBACK (et_search_search), e_table);
e_table->search_accept_id = g_signal_connect (
e_table->search, "accept... | false | false | false | false | false | 0 |
xmlrpc_server_info_copy(xmlrpc_env *env,
xmlrpc_server_info *aserver)
{
xmlrpc_server_info *server;
char *url_copy, *auth_copy;
XMLRPC_ASSERT_ENV_OK(env);
XMLRPC_ASSERT_PTR_OK(aserver);
/* Error-handling preconditions. */
url_copy = NULL;
auth_c... | false | false | false | true | true | 1 |
mapper9_latch( offs_t offset )
{
if( (offset & 0x1ff0) == 0x0fd0 && MMC2_bank_latch[0] != 0xfd )
{
MMC2_bank_latch[0] = 0xfd;
ppu2c03b_set_videorom_bank( 0, 0, 4, MMC2_bank[0], 256 );
}
else if( (offset & 0x1ff0) == 0x0fe0 && MMC2_bank_latch[0] != 0xfe )
{
MMC2_bank_latch[0] = 0xfe;
ppu2c03b_set_... | false | false | false | false | false | 0 |
TableListStore ()
: Gtk::ListStore (TableListColumns::get ()),
cols (TableListColumns::get ())
{
set_sort_func (cols.group, sigc::bind (sigc::mem_fun
(*this, &TableListStore::on_value_sort<Int>), cols.group));
set_sort_func (cols.period, sigc::bind (sigc::mem_fun
(*this, &TableListStore::on_value_sort<Int>), col... | false | false | false | false | false | 0 |
rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
{
int right = includeSelf && m_height > 0 ? m_width : 0;
if (!includeOverflowInterior && hasOverflowClip())
return right;
// FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
// For now, we hav... | false | false | false | false | false | 0 |
receiveEvent(MSEvent& event_)
{
if (event_.type()==AplusEvent::symbol())
{
if (dbg_tmstk) cout<<"Received UpdateEvent in AplusTreeView" <<endl;
AplusEvent *ave=(AplusEvent *)&event_;
V v =((AplusModel *)model())->aplusVar();
A index=ave->index();
A pick =ave->pick();
I ravel=ave->r... | false | false | false | false | false | 0 |
normalize( const QString &raw )
{
const QRegExp spaceRegExp = QRegExp( "\\s" );
return raw.toLower().remove( spaceRegExp ).normalized( QString::NormalizationForm_KC );
} | false | false | false | false | false | 0 |
collect_locales_from_locale_file (const char *locale_file)
{
FILE *langlist;
char curline[256];
char *getsret;
if (locale_file == NULL)
return;
langlist = fopen (locale_file, "r");
if (langlist == NULL)
return;
for (;;) {
... | false | false | false | false | false | 0 |
__pyx_pf_6Cython_8Compiler_7Visitor_15CythonTransform_4visit_CompilerDirectivesNode(struct __pyx_obj_6Cython_8Compiler_7Visitor_CythonTransform *__pyx_v_self, PyObject *__pyx_v_node) {
PyObject *__pyx_v_old = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_line... | false | false | false | false | false | 0 |
vee_store_rename_folder_sync (CamelStore *store,
const gchar *old,
const gchar *new,
GCancellable *cancellable,
GError **error)
{
CamelFolder *folder, *oldfolder;
gchar *p, *name;
gsize name_len;
... | false | false | false | false | false | 0 |
gst_mpegts_find_descriptor (GPtrArray * descriptors, guint8 tag)
{
guint i, nb_desc;
g_return_val_if_fail (descriptors != NULL, NULL);
nb_desc = descriptors->len;
for (i = 0; i < nb_desc; i++) {
GstMpegTsDescriptor *desc = g_ptr_array_index (descriptors, i);
if (desc->tag == tag)
return (const G... | false | false | false | false | false | 0 |
hfield_append(header_field_t *h, const char *text)
{
header_field_check(h);
if (!h->lines) {
h->lines = slist_new();
}
slist_append(h->lines, h_strdup(text));
} | false | false | false | false | false | 0 |
ata_scsi_hotplug(struct work_struct *work)
{
struct ata_port *ap =
container_of(work, struct ata_port, hotplug_task.work);
int i;
if (ap->pflags & ATA_PFLAG_UNLOADING) {
DPRINTK("ENTER/EXIT - unloading\n");
return;
}
/*
* XXX - UGLY HACK
*
* The block layer suspend/resume path is fundamentally broken... | false | false | false | false | false | 0 |
check_suggestions(su, gap)
suginfo_T *su;
garray_T *gap; /* either su_ga or su_sga */
{
suggest_T *stp;
int i;
char_u longword[MAXWLEN + 1];
int len;
hlf_T attr;
stp = &SUG(*gap, 0);
for (i = gap->ga_len - 1; i >= 0; --i)
{
/* Need to append what follows to check for "... | false | false | false | false | false | 0 |
pack_state_update(opal_buffer_t *alert, orte_job_t *jobdat)
{
int rc, i;
orte_proc_t *child;
orte_vpid_t null=ORTE_VPID_INVALID;
/* pack the jobid */
if (ORTE_SUCCESS != (rc = opal_dss.pack(alert, &jobdat->jobid, 1, ORTE_JOBID))) {
ORTE_ERROR_LOG(rc);
return rc;
}
for (i=0; ... | false | false | false | false | false | 0 |
getTimeoutSetting(mail::loginInfo &loginInfo,
const char *name, time_t defaultValue,
time_t minValue, time_t maxValue)
{
map<string, string>::iterator p=loginInfo.options.find(name);
if (p != loginInfo.options.end())
{
istringstream i(p->second);
i >> defaultValue;
}
if (defaultValue < minValu... | false | false | false | false | false | 0 |
gyrus_session_on_entry_changed (GtkEditable *editable,
gpointer user_data)
{
GtkWidget *widget = GTK_WIDGET (user_data);
gboolean sensitive =
gyrus_gtk_entry_has_text (GTK_ENTRY (entry_name)) &&
gyrus_gtk_entry_has_text (GTK_ENTRY (entry_host)) &&
/* gyrus_gtk_entry_has_text (GTK_ENTRY (entry_passwd) && ... | false | false | false | false | false | 0 |
load_config(void)
{
struct ast_config *cfg;
struct ast_variable *var;
struct ast_flags config_flags = { 0 };
int res = 0;
cfg = ast_config_load(CONFIG, config_flags);
if (!cfg || cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_ERROR, "Unable to load " CONFIG ". Not logging custom CSV CDRs.\n");
return -1;
}... | false | false | false | false | false | 0 |
rpcsvc_transport_peer_check_name (dict_t *options, char *volname,
rpc_transport_t *trans)
{
int ret = RPCSVC_AUTH_REJECT;
int aret = RPCSVC_AUTH_REJECT;
int rjret = RPCSVC_AUTH_REJECT;
char clstr[RPCSVC_PEER_STRLEN];
char *hostna... | true | true | false | false | false | 1 |
parse(int argc, char *argv[])
{
int opt;
while ((opt = getopt(argc, argv, "i:c:n:muh?")) != -1) {
switch (opt) {
case 'i':
iter = atoi(optarg);
break;
case 'c':
num_contexts = atoi(optarg);
break;
case 'm':
multiple_fds = 1;
break;
case 'u':
uncontexted = 1;
break;
case 'h':
case... | false | true | false | false | true | 1 |
ReadFooters(const QByteArray &conn_id, const QByteArray &payload)
{
QByteArray sig, contents;
SocksHostAddress name;
QDataStream stream(payload);
stream >> sig;
name = SocksHostAddress(stream);
stream >> contents;
return QSharedPointer<UdpRequestPacket>(new UdpRequestPacket(conn_id, sig,... | false | false | false | false | false | 0 |
icell_get_char(IAnjutaEditorCell* icell, gint index, GError** e)
{
SourceviewCell* cell = SOURCEVIEW_CELL(icell);
GtkTextIter iter;
sourceview_cell_get_iter (cell, &iter);
gunichar c = gtk_text_iter_get_char (&iter);
gchar* outbuf = g_new0(gchar, 6);
gint len = g_unichar_to_utf8 (c, outbuf);
gchar retval;
if (i... | false | false | false | false | false | 0 |
cfg_doc_kv_tuple(cfg_printer_t *pctx, const cfg_type_t *type) {
const cfg_tuplefielddef_t *fields, *f;
fields = type->of;
for (f = fields; f->name != NULL; f++) {
if (f != fields) {
cfg_print_chars(pctx, " [ ", 3);
cfg_print_cstr(pctx, f->name);
if (f->type->doc != cfg_doc_void)
cfg_print_chars(pctx,... | false | false | false | false | false | 0 |
request_post_load_init(vm_obj_id_t obj)
{
CVmHashEntryPLI *entry;
/* check for an existing entry - if there's not one already, add one */
entry = (CVmHashEntryPLI *)
post_load_init_table_->find((char *)&obj, sizeof(obj));
if (entry == 0)
{
/* it's not there yet - add a ... | false | false | false | false | false | 0 |
syn_stack_alloc()
{
long len;
synstate_T *to, *from;
synstate_T *sstp;
len = syn_buf->b_ml.ml_line_count / SST_DIST + Rows * 2;
if (len < SST_MIN_ENTRIES)
len = SST_MIN_ENTRIES;
else if (len > SST_MAX_ENTRIES)
len = SST_MAX_ENTRIES;
if (syn_block->b_sst_len > len * 2 || syn_block->b_sst_l... | false | false | false | false | false | 0 |
gw_menu_action_expand_disks_click ( GtkMenuItem *m, GtkWindow *w)
{
GtkCTree *tree = NULL;
GtkCTreeNode *root = NULL;
GtkCTreeNode *child = NULL;
gboolean result = FALSE;
#ifdef GW_DEBUG_GUI_CALLBACK_COMPONENT
g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
#endif
if ( w != NU... | false | false | false | false | false | 0 |
java_lang_VMClass_getDeclaredMethods(jobject clazz, jboolean public_only)
{
struct vm_class *vmc;
int count;
vmc = vm_object_to_vm_class(clazz);
if (!vmc)
return NULL;
if (vm_class_is_primitive_class(vmc) || vm_class_is_array_class(vmc))
return vm_object_alloc_array(vm_array_of_java_lang_reflect_Method, 0);
... | false | false | false | false | false | 0 |
rgb2cmyk(double r, double g, double b, double *c, double *m,
double *y, double *k)
{
*c = 1.0 - r;
*m = 1.0 - g;
*y = 1.0 - b;
*k = *c < *m ? *c : *m;
*k = *y < *k ? *y : *k;
*c -= *k;
*m -= *k;
*y -= *k;
} | false | false | false | false | false | 0 |
print_stats(isc_time_t *timer_start, isc_time_t *timer_finish,
isc_time_t *sign_start, isc_time_t *sign_finish)
{
isc_uint64_t time_us; /* Time in microseconds */
isc_uint64_t time_ms; /* Time in milliseconds */
isc_uint64_t sig_ms; /* Signatures per millisecond */
FILE *out = output_stdout ? stde... | false | false | false | false | false | 0 |
gtkliststore_gtk_list_store_set_column_types(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj list_store_scm;
GtkListStore* list_store;
ScmObj types_scm;
ScmObj types;
ScmObj SCM_SUBRARGS[2];
int SCM_i;
SCM_ENTER_SUBR("gtk-list-store-set-column-types");
for (SCM_i=0; SCM_i<2; SCM_i++) {
SCM_SUB... | false | false | false | false | false | 0 |
gnm_conf_get_print_settings (void)
{
GtkPrintSettings *settings = gtk_print_settings_new ();
GSList *list = gnm_conf_get_printsetup_gtk_setting ();
while (list && list->next) {
/* For historical reasons, value comes before key. */
const char *value = list->data;
const char *key = list->next->data;
list = ... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
options_type tOptions;
const char *szWordfile;
int iFirst, iIndex, iGoodCount;
BOOL bUsage, bMultiple, bUseTXT, bUseXML;
if (argc <= 0) {
return EXIT_FAILURE;
}
szTask = szBasename(argv[0]);
if (argc <= 1) {
iFirst = 1;
bUsage = TRUE;
} else {
iFirst = iReadOptions(argc... | false | false | false | false | false | 0 |
adjvar2local(void)
{
const Module_table* m;
Var_table* v;
for (m = module_head; m != NULL; m = m->next) {
for (v = m->var_head; v != NULL; v = v->next) {
if (v->name != NULL && v->name[0] == '$'
&& strncmp(v->name, "$ADJ", 4) == 0) {
v->kind = MEM_LM;
}
}
}
} | false | false | false | false | false | 0 |
TagsAdd(const char *FileName) {
int *NewT;
int NewF;
if (!AllocMem(FileName, strlen(FileName) + 1, &NewF))
return 0;
if (!(NewT = (int *)realloc((void *)TagFiles, (TagFileCount + 1) * sizeof(int))))
return 0;
TagFiles = NewT;
TagFiles[TagFileCount++] = NewF;
return 1;
} | false | false | false | false | false | 0 |
print_object(object * obj, int level, dimeModel & model, const char * layername)
{
int i;
const dimeLayer * layer = model.getLayer(layername);
for (i = 0; i < obj->npoly; i++) {
print_triangle(&obj->poly[i], model, layer);
}
} | false | false | false | false | false | 0 |
e_flowlayout_pack_start(Evas_Object *obj, Evas_Object *child)
{
E_Smart_Data *sd;
if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
sd = evas_object_smart_data_get(obj);
if (!sd) return 0;
_e_flowlayout_smart_adopt(sd, child);
sd->items = eina_list_prepend(sd->items, child);
sd->chang... | false | false | false | false | false | 0 |
count_nul_characters()
const
{
size_t result = 0;
const char *cp = buffer;
const char *ep = cp + length;
while (cp < ep)
{
if (!*cp)
++result;
++cp;
}
return result;
} | false | false | false | false | false | 0 |
SetAlive(CContact *contact)
{
wxASSERT(contact != NULL);
// Check if we already have a contact with this ID in the list.
CContact *test = GetContact(contact->GetClientID());
wxASSERT(contact == test);
if (test) {
// Mark contact as being alive.
test->UpdateType();
// Move to the end of the list
PushToBotto... | false | false | false | false | false | 0 |
mono_error_convert_to_exception (MonoError *target_error)
{
MonoError error;
MonoException *ex;
if (mono_error_ok (target_error))
return NULL;
ex = mono_error_prepare_exception (target_error, &error);
if (!mono_error_ok (&error)) {
MonoError second_chance;
/*Try to produce the exception for the second erro... | false | false | false | false | false | 0 |
make_fifo(char *dir)
{
if (mkfifo(dir, leaf_mode)) {
/*
* We failed, remove the directory we created.
*/
fprintf(stderr, "%s: ", progname);
perror(dir);
return -1;
}
return 0;
} | false | false | false | false | false | 0 |
sci_controller_link_up(struct isci_host *ihost, struct isci_port *iport,
struct isci_phy *iphy)
{
switch (ihost->sm.current_state_id) {
case SCIC_STARTING:
sci_del_timer(&ihost->phy_timer);
ihost->phy_startup_timer_pending = false;
ihost->port_agent.link_up_handler(ihost, &ihost->port_agent,
ipor... | false | false | false | false | false | 0 |
dump_doc_list_present_bits(SquatIndex* index,
SquatWordTableLeafDocs* docs) {
int start_present = docs->first_valid_entry;
int end_present = docs->last_valid_entry;
char* buf;
int present_count;
/* If the leaf is empty, we should never get here! */
assert(start_present... | false | false | false | false | false | 0 |
equinox_style_draw_arrow (GtkStyle * style,
GdkWindow * window,
GtkStateType state_type,
GtkShadowType shadow,
GdkRectangle * area,
GtkWidget * widget,
const gchar * detail,
GtkArrowType arrow_type,
gboolean fill,
gint x, gint y, gint width, gint height) {
EquinoxStyle *equinox_styl... | false | false | false | false | false | 0 |
drawruntime (const char *upsrunts, const char *lowbatts)
{
gdImagePtr im;
char utiltxt[16];
int uoutpos, lowbattpos;
double upsrunt;
double lowbatt;
int step, maxt;
upsrunt = strtod(upsrunts, NULL);
lowbatt = strtod(lowbatts, NULL);
im = InitImage();
step = (i... | false | false | false | false | false | 0 |
copy_valid_id_string(struct snd_card *card, const char *src,
const char *nid)
{
char *id = card->id;
while (*nid && !isalnum(*nid))
nid++;
if (isdigit(*nid))
*id++ = isalpha(*src) ? *src : 'D';
while (*nid && (size_t)(id - card->id) < sizeof(card->id) - 1) {
if (isalnum(*nid))
*id++ = *nid;
nid++;
... | false | false | false | false | false | 0 |
param(std::string name, bool init) {
OpParam par;
par._name = name;
par._gimpType.type = GIMP_PDB_INT32;
par._gimpType.data.d_int32 = init ? 1 : 0;
par._guiType = OpParam::Toggle;
_params.push_back(par);
} | 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.