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 |
|---|---|---|---|---|---|---|
do_timerfd_settime(int ufd, int flags,
const struct itimerspec *new,
struct itimerspec *old)
{
struct fd f;
struct timerfd_ctx *ctx;
int ret;
if ((flags & ~TFD_SETTIME_FLAGS) ||
!timespec_valid(&new->it_value) ||
!timespec_valid(&new->it_interval))
return -EINVAL;
ret = timerfd_fget(ufd, &f);
i... | false | false | false | false | false | 0 |
action_view_radio_changed (GtkRadioAction *action,
GtkRadioAction *current,
NautilusWindow *window)
{
const gchar *name;
NautilusWindowSlot *slot;
name = gtk_action_get_name (GTK_ACTION (current));
slot = nautilus_window_get_active_slot (window);
if (g_strcmp0 (name, NAUTILUS_ACTION_VIEW_LIST) == 0) ... | false | false | false | false | false | 0 |
ucs4cmp(ucs4 const *s1, ucs4 const *s2)
{
int retval;
while ((retval = (*s1 - *s2)) && (*s1++) && (*s2++))
;
return retval;
} | false | false | false | false | false | 0 |
add_new_fd(int fd, sock_type type)
{
int i;
for (i=0; i<MAX_CONNECTIONS; i++)
{
if (fdarray[i].type == INACTIVE)
{
fdarray[i].fd = fd;
fdarray[i].type = type;
break;
}
}
} | false | false | false | false | false | 0 |
appendChild ( NodeImpl *newChild, int &exceptioncode )
{
exceptioncode = 0;
// Make sure adding the new child is ok
checkAddChild(newChild, exceptioncode);
if (exceptioncode)
return 0;
if ( newChild == _last ) // nothing to do
return newChild;
bool isFragment = newChild->nodeType() =... | false | false | false | false | false | 0 |
rqs_diff_projects(const lListElem *new_rqs, const lListElem *old_rqs, lList **new_list,
lList **old_list, lList *master_project_list)
{
bool ret = true;
DENTER(TOP_LAYER, "rqs_diff_projects");
if (old_rqs && old_list) {
const lListElem *rule;
for_each(rule, lGetList(old_rq... | false | false | false | true | false | 1 |
zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
{
struct zoran *zr = fh->zr;
unsigned long flags;
int res = 0;
if (!fh->buffers.allocated) {
dprintk(1,
KERN_ERR
"%s: %s - buffers not yet allocated\n",
ZR_DEVNAME(zr), __func__);
res = -ENOMEM;
}
/* No grabbing outside the buffer range! */
if (n... | false | false | false | false | false | 0 |
fuse_statfs (xlator_t *this, fuse_in_header_t *finh, void *msg)
{
fuse_state_t *state = NULL;
int32_t ret = -1;
GET_STATE (this, finh, state);
ret = fuse_loc_fill (&state->loc, state, finh->nodeid, 0, NULL);
if ((state->loc.inode == NULL) ||
(ret < 0)) {
... | false | false | false | false | false | 0 |
speakup_win_set(struct vc_data *vc)
{
char info[40];
if (win_start > 1) {
synth_printf("%s\n", spk_msg_get(MSG_WINDOW_ALREADY_SET));
return;
}
if (spk_x < win_left || spk_y < win_top) {
synth_printf("%s\n", spk_msg_get(MSG_END_BEFORE_START));
return;
}
if (win_start && spk_x == win_left && spk_y == win_t... | false | false | false | false | false | 0 |
removeBodyElement(BodyElement* be, bool remove_subs)
{
be->checkLastTag(true);
be->checkLastBoundaryTag(true);
// Remove all sub elements
if ( remove_subs ) {
int nof_subs = be->getNofSubElements();
for (int i = 0; i < nof_subs; i++) {
BodyElement* se = be->getSubElement(i);
if ( se != NU... | false | false | false | false | false | 0 |
SerializeUnknownFields(const UnknownFieldSet& unknown_fields,
io::CodedOutputStream* output) {
for (int i = 0; i < unknown_fields.field_count(); i++) {
const UnknownField& field = unknown_fields.field(i);
switch (field.type()) {
case UnknownField::TYPE_VARINT:
... | false | false | false | false | false | 0 |
PromoteIntOp_CONCAT_VECTORS(SDNode *N) {
SDLoc dl(N);
unsigned NumElems = N->getNumOperands();
EVT RetSclrTy = N->getValueType(0).getVectorElementType();
SmallVector<SDValue, 8> NewOps;
NewOps.reserve(NumElems);
// For each incoming vector
for (unsigned VecIdx = 0; VecIdx != NumElems; ++VecIdx) {
S... | false | false | false | false | false | 0 |
usage() {
LOG(ERROR) << " interest_points ImageNameIn.pgm ImageNameOut.pgm " <<std::endl
<< " ImageNameIn.pgm : the input image on which surf features will be extrated, " << std::endl
<< " ImageNameOut.pgm : the surf keypoints will be displayed on it. " << std::endl
<< " INFO : work with pgm image only."... | false | false | false | false | false | 0 |
setupUart(mipsCpu* cpu, u32 baseAddr)
{
if(mapMemory(cpu, baseAddr, 0xF, FLAG_RAM) < 0) {
#ifdef DEBUG
printf("Cannot allocate space for UART buffer\n");
#endif
return -1;
}
_uartAddress = baseAddr;
/* Set up parameters. */
cpu->writeByte(cpu, _uartAddress + UART_REG_LCR, 0xE0);
return 1;
} | false | false | false | false | false | 0 |
CSLLoad2(const char *pszFname, int nMaxLines, int nMaxCols, char** papszOptions)
{
VSILFILE *fp;
const char *pszLine;
char **papszStrList=NULL;
int nLines = 0;
int nAllocatedLines = 0;
fp = VSIFOpenL(pszFname, "rb");
if (fp)
{
CPLErrorReset();
... | false | false | false | false | false | 0 |
cartproduct1_maxpairs(GtBUstate_maxpairs *state,
unsigned long fatherdepth,
const GtBUinfo_maxpairs *ninfo,
unsigned int base,
unsigned long leafnumber,GtError *err)
{
Listtype *pl;
un... | false | false | false | false | false | 0 |
setup_pgdata(void)
{
char *pgdata_get_env,
*pgdata_set_env;
if (strlen(pg_data) == 0)
{
pgdata_get_env = getenv("PGDATA");
if (pgdata_get_env && strlen(pgdata_get_env))
{
/* PGDATA found */
pg_data = pg_strdup(pgdata_get_env);
}
else
{
fprintf(stderr,
_("%s: no data directory spec... | false | false | false | false | true | 1 |
main(int argc, char **argv)
{
Octstr *data, *filename, *mac, *key;
unsigned char macbuf[EVP_MAX_MD_SIZE], *p;
int mac_len;
#ifdef HAVE_LIBSSL
HMAC_CTX ctx;
#endif
gwlib_init();
get_and_set_debugs(argc, argv, NULL);
if (argc < 3)
panic(0, "Syntax: %s <key> <file>\n", argv[0]);
... | false | false | false | false | false | 0 |
GetStrTagValue(const wxString& tagname) const
{
for (TagPtrList::const_iterator it = m_taglist.begin(); it != m_taglist.end(); ++it) {
if (((*it)->GetName() == tagname) && (*it)->IsStr()) {
return (*it)->GetStr();
}
}
return wxEmptyString;
} | false | false | false | false | false | 0 |
DSDPEventLogBegin(int eventid){
double tt;
DSDPTime(&tt);
if (eventid<=0){return 0;}
if (eventlog.event[eventid].begintime!=0 && eventid!=DSDP_MAX_EVENTS-1){
DSDPPrintf("Timing error: id: %d %s. Call begin without calling end.%4.4e\n",eventid,eventlog.event[eventid].ename,eventlog.event[eventid].begintime)... | false | false | false | false | false | 0 |
ajSeqallDel(AjPSeqall *Pseq)
{
if(!*Pseq)
return;
if(!(*Pseq)->Returned)
ajSeqDel(&(*Pseq)->Seq);
ajDebug("ajSeqallDel\n");
ajSeqinDel(&(*Pseq)->Seqin);
AJFREE(*Pseq);
return;
} | false | false | false | false | false | 0 |
il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
{
struct il_priv *il;
u8 valid_tx_ant;
u8 ant_sel_tx;
il = lq_sta->drv;
valid_tx_ant = il->hw_params.valid_tx_ant;
if (lq_sta->dbg_fixed_rate) {
ant_sel_tx =
((lq_sta->
dbg_fixed_rate & RATE_MCS_ANT_ABC_MSK) >>
... | false | false | false | false | false | 0 |
direct_malloc( const char* file, int line, const char *func, size_t bytes )
{
void *mem;
MemDesc *desc;
D_DEBUG_AT( Direct_Mem, " +%6zu bytes [%s:%d in %s()]\n", bytes, file, line, func );
mem = malloc( bytes );
if (!mem)
return NULL;
if (!direct_config->debugmem)
... | false | false | false | false | true | 1 |
find_extable_entry_size(const char* const sec, const Elf_Rela* r)
{
/*
* If we're currently checking the second relocation within __ex_table,
* that relocation offset tells us the offsetof(struct
* exception_table_entry, fixup) which is equal to sizeof(struct
* exception_table_entry) divided by two. We use th... | false | false | false | false | false | 0 |
ReadMolecule(OBBase* pOb, OBConversion* pConv)
{
OBMol* pmol = pOb->CastAndClear<OBMol>();
if(pmol==NULL)
return false;
//Define some references so we can use the old parameter names
istream &ifs = *pConv->GetInStream();
OBMol &mol = *pmol;
const char* title = pConv->GetTitle();
i... | false | false | false | false | false | 0 |
status(char *format, ...) {
static char s1[LINELENGTH+24], s2[LINELENGTH], mess[LINELENGTH+4];
int i, j;
va_list arg;
im_va_start (arg, format);
// add lines one by one
vsnprintf(s2, LINELENGTH, format, arg);
for (i=0, j= 0; ((i < LINELENGTH) && (s2[i] != '\0')); i++, j++) {
mess[j] = s2... | false | false | false | false | false | 0 |
get_valid_src_pad (GnlSource * source, GstElement * element, GstPad ** pad)
{
GstIterator *srcpads;
g_return_val_if_fail (pad, FALSE);
srcpads = gst_element_iterate_src_pads (element);
*pad = (GstPad *) gst_iterator_find_custom (srcpads,
(GCompareFunc) compare_src_pad, GNL_OBJECT (source)->caps);
gst_... | false | false | false | false | false | 0 |
on_signal (GDBusProxy *proxy,
char *sender_name,
char *signal_name,
GVariant *parameters,
gpointer user_data)
{
if (g_strcmp0 (signal_name, "Progress") == 0) {
double fraction;
char *details;
g_variant_get (parameters, "(ds)", &fraction, &details);
g_print ("Progress: %f (%... | false | false | false | false | false | 0 |
enter_system_variable (name, value)
char *name;
char *value;
{
Node *n, *old_val;
n = node_alloc (nSTRING);
n->u.str.len = strlen (value);
n->u.str.data = xstrdup (value);
if (!strhash_put (ns_vars, name, strlen (name), n, (void **) &old_val))
{
fprintf (stderr, _("%s: out of memory\n"), ... | false | false | false | false | false | 0 |
eventfd_file_create(unsigned int count, int flags)
{
struct file *file;
struct eventfd_ctx *ctx;
/* Check the EFD_* constants for consistency. */
BUILD_BUG_ON(EFD_CLOEXEC != O_CLOEXEC);
BUILD_BUG_ON(EFD_NONBLOCK != O_NONBLOCK);
if (flags & ~EFD_FLAGS_SET)
return ERR_PTR(-EINVAL);
ctx = kmalloc(sizeof(*ctx)... | false | false | false | false | false | 0 |
lj_ctype_size(CTState *cts, CTypeID id)
{
CType *ct = ctype_raw(cts, id);
return ctype_hassize(ct->info) ? ct->size : CTSIZE_INVALID;
} | false | false | false | false | false | 0 |
setkeybind(argc, argv)
int argc;
char *CONST argv[];
{
bindtable bind;
char *cp, *func1, *func2;
int n, no;
if ((no = parsekeybind(argc, argv, &bind)) < 0) {
builtinerror(argv,
(bind.f_func) ? argv[bind.f_func] : NULL, bind.key);
return(-1);
}
if (bind.f_func == FNO_NONE) {
if (no >= maxbind) {
buil... | false | false | false | false | false | 0 |
make_bundle_links(int append)
{
TDB_DATA key, rec;
char *p;
char entry[32];
int l;
key.dptr = blinks_id;
key.dsize = strlen(blinks_id);
slprintf(entry, sizeof(entry), "%s;", db_key);
p = entry;
if (append) {
rec = tdb_fetch(pppdb, key);
if (rec.dptr != NULL && rec.dsize > 0) {
rec.dptr[rec.dsize-1] = 0... | true | true | false | false | false | 1 |
gw_properties_box_folder_category_check ( GtkWidget *w, GWDBFile *folder) {
gint result = -1;
#ifdef GW_DEBUG_GUI_CALLBACK_COMPONENT
g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
#endif
if ( w != NULL ) {
if ( gw_properties_box_get_folder_category_ref ( w) != gw_db_file_get_c... | false | false | false | false | false | 0 |
del_typestr(len)
int len;
{
struct noremap *p;
STRCPY(typestr, typestr + len);
/* remove chars from the buffer */
if ((typemaplen -= len) < 0) /* adjust typemaplen */
typemaplen = 0;
if ((no_abbr_cnt -= len) < 0) /* adjust no_abbr_cnt */
no_abbr_cnt = 0;
while (len) /* adjust noremaplist *... | false | false | false | false | false | 0 |
mmo_write_category(const char* sobj, const char* name)
{
char* key;
gbuint16 nr;
if (avltree_find(category_names, name, (const void**)&key)) {
nr = (unsigned)atoi(key);
gbfputuint16(nr & 0x7FFF, fout);
} else {
mmo_write_obj_mark(sobj, name);
mmo_register_category_names(name);
}
} | false | false | false | false | false | 0 |
si_vm_packet3_ce_check(struct radeon_device *rdev,
u32 *ib, struct radeon_cs_packet *pkt)
{
switch (pkt->opcode) {
case PACKET3_NOP:
case PACKET3_SET_BASE:
case PACKET3_SET_CE_DE_COUNTERS:
case PACKET3_LOAD_CONST_RAM:
case PACKET3_WRITE_CONST_RAM:
case PACKET3_WRITE_CONST_RAM_OFFSET:
case PACKET3_DUMP_CON... | false | false | false | false | false | 0 |
isl_map_is_bijective(__isl_keep isl_map *map)
{
int sv;
sv = isl_map_is_single_valued(map);
if (sv < 0 || !sv)
return sv;
return isl_map_is_injective(map);
} | false | false | false | false | false | 0 |
send_messages(SMPP *smpp, Connection *conn, long *pending_submits)
{
Msg *msg;
SMPP_PDU *pdu;
Octstr *os;
double delay = 0;
if (*pending_submits == -1)
return;
if (smpp->conn->throughput > 0) {
delay = 1.0 / smpp->conn->throughput;
}
while (*pending_submits < smpp->max... | true | true | false | false | false | 1 |
coadd_debug(coadd_t* co) {
int i;
double mn,mx;
mn = 1e300;
mx = -1e300;
for (i=0; i<(co->W*co->H); i++) {
mn = MIN(mn, co->img[i]);
mx = MAX(mx, co->img[i]);
}
logmsg("Coadd img min,max %g,%g\n", mn,mx);
mn = 1e300;
mx = -1e300;
for (i=0; i<(co->W*co->H); i++) {
mn = MIN(mn, co->weight[i]);
mx = MAX(... | false | false | false | false | false | 0 |
findseen (txtnode_t *cnode) {
int i;
for (i = 0; i < seeni; i++)
if (seenp[i]->vo == cnode->vo)
return seenp[i];
return NULL;
} | false | false | false | false | false | 0 |
multi_create_list_do()
{
int idx;
int start_index,stop_index;
char selected_name[255];
// bail early if there aren't any selectable items
if(Multi_create_list_count == 0){
return;
}
// first check to see if the user has clicked on an item
if(Multi_create_list_select_button.pressed()){
int y,item;
... | false | false | false | false | false | 0 |
main( int argc, char *argv[] )
{
if (argc<4)
{
cout<<"Usage : png2raw fileprefix initial_index number_of_images"<<endl;
exit(1);
}
int StartImage=atoi(argv[2]);
int NumberOfImages=atoi(argv[3]);
fstream binary_file("volume.raw",ios::out|ios::binary);
int CurrentImage=StartImage;
for (int i=0;i<NumberOfI... | false | false | false | false | false | 0 |
tea5767_standby(struct dvb_frontend *fe)
{
unsigned char buffer[5];
struct tea5767_priv *priv = fe->tuner_priv;
unsigned div, rc;
div = (87500 * 4 + 700 + 225 + 25) / 50; /* Set frequency to 87.5 MHz */
buffer[0] = (div >> 8) & 0x3f;
buffer[1] = div & 0xff;
buffer[2] = TEA5767_PORT1_HIGH;
buffer[3] = TEA5767_P... | false | false | false | false | false | 0 |
ScalarVectorFormFactor(Energy2 q2,unsigned int mode,
int, int id1, Energy mY, Energy mX,
Complex & A0,Complex & A1,Complex & A2,
Complex & V) const {
useMe();
// constants
double r(mX/mY),y(q2/mY/mY);
// V form-factor
V =-double((1.+r)*_RV0/pow((1.-q2/_MV/_MV),_nV));
// A_1 form-factor
... | false | false | false | false | false | 0 |
add_submodule_with_commit(const char *name)
{
git_submodule *sm;
git_repository *smrepo;
git_index *idx;
git_buf p = GIT_BUF_INIT;
cl_git_pass(git_submodule_add_setup(&sm, g_repo,
"https://github.com/libgit2/libgit2.git", name, 1));
assert_submodule_exists(g_repo, name);
cl_git_pass(git_submodule_open(&smre... | false | false | false | false | false | 0 |
extract_macbin(Doc *doc, LPCTSTR outname, BOOL preview)
{
unsigned long pos;
unsigned long len;
unsigned int count;
char *buffer;
GFile* epsfile;
GFile *outfile;
CDSC *dsc = doc->dsc;
CMACFILE *mac;
if ((dsc == (CDSC *)NULL) || (dsc->macbin == (CDSCMACBIN *)NULL)) {
app_csmsgf(doc->app,
TEXT("Document \042%s\0... | false | false | false | false | false | 0 |
g_reset_message() {
bool res = g.console_output;
if (g.console_output) {
cerr << endl;
}
g.console_output = false;
return res;
} | false | false | false | false | false | 0 |
updateDebugInfo(Instruction *Inst) const {
for (SmallVector<DbgDeclareInst *, 4>::const_iterator I = DDIs.begin(),
E = DDIs.end(); I != E; ++I) {
DbgDeclareInst *DDI = *I;
if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
ConvertDebugDeclareToDebugValue(DDI, SI, *DIB);
else if (Lo... | false | false | false | false | false | 0 |
drv_HD_defchar(const int ascii, const unsigned char *matrix)
{
int i;
char buffer[8];
for (i = 0; i < 8; i++) {
buffer[i] = matrix[i] & 0x1f;
}
/* define chars on *all* controllers! */
drv_HD_command(allControllers, 0x40 | 8 * ascii, T_EXEC);
drv_HD_data(allControllers, buffer, 8, T_WRCG)... | true | true | false | false | false | 1 |
SetDownsample(const unsigned int downsample)
{
if (downsample == 0) {
throw PCIDSKException("Invalid downsample factor provided: %u", downsample);
}
pimpl_->downsample = downsample;
mbModified = true;
} | false | false | false | false | false | 0 |
GotoBookMark(gint iBookMark)
{
gint iLine,iLinesVisible,iLineCount,iPosition,iEndOfLine;
ScintillaObject* sci=document_get_current()->editor->sci;
FileData *fd;
fd=GetFileData(document_get_current()->file_name);
iLine=scintilla_send_message(sci,SCI_MARKERNEXT,0,1<<(fd->iBookmarkMarkerUsed[iBookMark]));
/* igno... | false | false | false | false | false | 0 |
next() {
while (true) {
/* If the line pointed to by section() is not named sectName,
advance both section() and label() to the next section of that
name. */
if (!rightSection) {
if (sectionIter.nextSection(sectionStr) == configFile->end()) {
// No more sections found
label... | false | false | false | false | false | 0 |
baseadaptorRetrieveAllStatement(
EnsPBaseadaptor ba,
const AjPStr tablename,
const AjPStr columnname,
AjPStr *Pstatement)
{
if (!ba)
return ajFalse;
if (!tablename)
return ajFalse;
if (!Pstatement)
return ajFalse;
if (*Pstatement)
ajStrAssignClear(Pstat... | false | false | false | false | false | 0 |
removeIconExtension(const QString &name) const
{
if (name.endsWith(QLatin1String(".png"))
|| name.endsWith(QLatin1String(".xpm"))
|| name.endsWith(QLatin1String(".svg"))) {
return name.left(name.length() - 4);
} else if (name.endsWith(QLatin1String(".svgz"))) {
return name.left(n... | false | false | false | false | false | 0 |
tmg_hour_wrap (GtkWidget *widget, gpointer data)
{
GtkSatModule *mod = GTK_SAT_MODULE (data);
gint hour;
hour = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgHour));
if (hour == 0) {
/* 23 -> 0 wrap: increment date */
tmg_cal_add_one_day (mod);
}
else {
/* 0 -> 2... | false | false | false | false | false | 0 |
huffman_look_for_code(
uint8_t* symbol, huffman_t* t, FILE* f)
{
unsigned int cycle, status = 0;
uint64_t value = 0;
uint8_t old_code_size = 0;
huffman_t row;
for (cycle = 0 ; t[cycle].code_size ; cycle++) {
row = t[cycle];
/* is useless to re-read the value*/
if (row.code_size != old_code_size) {
old_c... | false | false | false | false | false | 0 |
parse_tempo(place)
char* place;
/* parse tempo descriptor i.e. Q: field */
{
char* p;
int a, b;
int n;
int relative;
char *pre_string;
char *post_string;
relative = 0;
p = place;
pre_string = NULL;
if (*p == '"') {
p = p + 1;
pre_string = p;
while ((*p != '"') && (*p != '\0')) {
p... | false | false | false | false | false | 0 |
hue_to_color (int m1, int m2, int h)
{
if (h < 0)
h += HLSMAX;
if (h > HLSMAX)
h -= HLSMAX;
/* return r,g, or b value from this tridrant */
if (h < (HLSMAX/6))
return m1 + (((m2 - m1)*h + (HLSMAX/12))/(HLSMAX/6));
if (h < (HLSMAX/2))
return m2;
if (h < ((HLSMAX*2)/3))
return m1 + (((m2 - m1)*(((HLSMAX*... | false | false | false | false | false | 0 |
openErrorDetails()
{
ExtensionSystem::PluginSpec *spec = m_view->currentPlugin();
if (!spec)
return;
QDialog dialog(this);
dialog.setWindowTitle(tr("Plugin Errors of %1").arg(spec->name()));
QVBoxLayout *layout = new QVBoxLayout;
dialog.setLayout(layout);
ExtensionSystem::PluginError... | false | false | false | false | false | 0 |
pixUnsharpMaskingGray(PIX *pixs,
l_int32 halfwidth,
l_float32 fract)
{
l_int32 w, h, d;
PIX *pixc, *pixd;
PIXACC *pixacc;
PROCNAME("pixUnsharpMaskingGray");
if (!pixs)
return (PIX *)ERROR_PTR("pixs not defined", procName, NULL);
pixGetDim... | false | false | false | false | false | 0 |
camif_get_dma_burst(u32 width, u32 ybpp, u32 *mburst, u32 *rburst)
{
unsigned int nwords = width * ybpp / 4;
unsigned int div, rem;
if (WARN_ON(width < 8 || (width * ybpp) & 7))
return;
for (div = 16; div >= 2; div /= 2) {
if (nwords < div)
continue;
rem = nwords & (div - 1);
if (rem == 0) {
*mburs... | false | false | false | false | false | 0 |
output_body_path(request_rec *r, SV *body)
{
dTHX;
int count;
apr_status_t rc;
SV *path_sv;
char *path = NULL;
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(body);
PUTBACK;
count = call_method("path", G_EVAL|G_SCALAR|G_KEEPERR);
SPAGAIN;
if (SvTRUE(ERRSV)) {
... | false | false | false | false | false | 0 |
errdetail_recovery_conflict(void)
{
switch (RecoveryConflictReason)
{
case PROCSIG_RECOVERY_CONFLICT_BUFFERPIN:
errdetail("User was holding shared buffer pin for too long.");
break;
case PROCSIG_RECOVERY_CONFLICT_LOCK:
errdetail("User was holding a relation lock for too long.");
break;
case PROCSIG_... | false | false | false | false | false | 0 |
drbd_bm_total_weight(struct drbd_device *device)
{
unsigned long s;
/* if I don't have a disk, I don't know about out-of-sync status */
if (!get_ldev_if_state(device, D_NEGOTIATING))
return 0;
s = _drbd_bm_total_weight(device);
put_ldev(device);
return s;
} | false | false | false | false | false | 0 |
single_queue_underrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
{
gboolean empty = TRUE;
GstMultiQueue *mq = sq->mqueue;
GList *tmp;
if (sq->srcresult == GST_FLOW_NOT_LINKED) {
GST_LOG_OBJECT (mq, "Single Queue %d is empty but not-linked", sq->id);
return;
} else {
GST_LOG_OBJECT (mq,
"... | false | false | false | false | false | 0 |
ipmi_sel_get_oem_sensor_type_offset(IPMI_OEM iana, uint8_t code, uint8_t offset)
{
struct ipmi_event_sensor_types *st = NULL;
switch(iana){
case IPMI_OEM_KONTRON:
st = oem_kontron_event_types;
break;
/* add you oem sensor type lookup assignement here */
default:
lprintf(LOG_DEBUG,
... | false | false | false | false | false | 0 |
fcoe_ctlr_select(struct fcoe_ctlr *fip)
{
struct fcoe_fcf *fcf;
struct fcoe_fcf *best = fip->sel_fcf;
list_for_each_entry(fcf, &fip->fcfs, list) {
LIBFCOE_FIP_DBG(fip, "consider FCF fab %16.16llx "
"VFID %d mac %pM map %x val %d "
"sent %u pri %u\n",
fcf->fabric_name, fcf->vfid, fcf->fcf_mac,
fcf-... | false | false | false | false | false | 0 |
onFacebookToken(const QString &token)
{
PlexyDesk::DataSource *fbSource = dataSource();
QVariantMap request;
QVariant arg;
request["command"] = QVariant("friends");
request["token"] = token;
arg = request;
mToken = token;
if (fbSource)
fbSource->setArguments(arg);
} | false | false | false | false | false | 0 |
match (const unsigned char *line, const char *word)
{
size_t len = strlen (word);
boolean matched = (strncmp ((const char*) line, word, len) == 0);
if (matched)
{
/* check that the word is followed by a space to avoid detecting something
* like "proc_new ..." */
matched = isspace (*(line + len));
}
return... | false | false | false | false | false | 0 |
rg_analysis_analyze_stereo_float (RgAnalysisCtx * ctx, gconstpointer data,
gsize size, guint depth)
{
gfloat conv_samples_l[256];
gfloat conv_samples_r[256];
const gfloat *samples = (gfloat *) data;
guint n_frames = size / (sizeof (gfloat) * 2);
gint i;
g_return_if_fail (depth == 32);
g_return_if_fai... | false | false | false | false | false | 0 |
read_a_line(FILE *file) {
/* Read a line in, and return a malloc'ed buffer with the line contents.
Any newline at the end is stripped.
If there's nothing left to read, returns NULL. */
/* We'll create a monstrously long buffer to make life easy for us: */
char buffer[10000];
char *returnval;
char *newline... | false | false | false | false | false | 0 |
avl_print_tree (avl_tree * tree, avl_key_printer_fun_type key_printer)
{
link_node top = {NULL, 0, 0};
if (!key_printer) {
key_printer = default_key_printer;
}
if (tree->length) {
print_node (key_printer, tree->root->right, &top);
} else {
fprintf (stdout, "<empty tree>\n");
}
} | false | false | false | false | false | 0 |
isci_remote_device_deconstruct(struct isci_host *ihost, struct isci_remote_device *idev)
{
dev_dbg(&ihost->pdev->dev,
"%s: isci_device = %p\n", __func__, idev);
/* There should not be any outstanding io's. All paths to
* here should go through isci_remote_device_nuke_requests.
* If we hit this condition, we wi... | false | false | false | false | false | 0 |
grab_buster_watch(int parent, char *dstr) {
#if NO_X11
RAWFB_RET_VOID
if (!parent || !dstr) {}
return;
#else
Atom ticker_atom = None;
int sleep = sync_tod_delay * 921 * 1000;
char propval[200];
int ev, er, maj, min;
int db = 0;
char *ticker_str = "X11VNC_TICKER";
RAWFB_RET_VOID
if (grab_buster > 1) {
db ... | false | false | false | false | false | 0 |
gyrus_dialog_find_mailbox_on_button_find_clicked (GtkButton *button,
gpointer user_data)
{
GtkTreeSelection *selection;
GtkTreeView *treeview;
GtkTreeModel *model;
GtkTreeIter iter;
GtkTreePath *path;
gchar *mailbox;
gboolean found, more_mailboxes, wrap_around, search_from_beginning;
const gchar *key;
... | false | false | false | false | false | 0 |
test_record_padding(gnutls_session_t session)
{
int ret;
sprintf(prio_str,
INIT_STR BLOCK_CIPHERS ":" ALL_COMP ":" ALL_CERTTYPES
":+VERS-TLS1.0:" ALL_MACS ":" ALL_KX ":%s", rest);
_gnutls_priority_set_direct(session, prio_str);
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
ret = do_handshak... | false | false | false | false | false | 0 |
buildMap()
{
kDebug() << "with zoom="<< m_zoom;
//QSize size((int)(m_automaton->rendererFor(m_skin).defaultSize().width()*m_zoom),(int)(m_automaton->rendererFor(m_skin).defaultSize().height()*m_zoom));
if (!m_automaton->pixmapCache().find(m_skin+"map"+QString::number(m_width)+QString::number(m_height), m_map))
... | false | false | false | false | false | 0 |
mwifiex_set_vht_width(struct mwifiex_private *priv,
enum nl80211_chan_width width,
bool ap_11ac_enable)
{
struct mwifiex_adapter *adapter = priv->adapter;
struct mwifiex_11ac_vht_cfg vht_cfg;
vht_cfg.band_config = VHT_CFG_5GHZ;
vht_cfg.cap_info = adapter->hw_dot_11ac_dev_cap;
if (!ap_11ac_enable) {
... | false | false | false | false | false | 0 |
gst_base_sink_get_times (GstBaseSink * basesink, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end)
{
GstClockTime timestamp, duration;
timestamp = GST_BUFFER_TIMESTAMP (buffer);
if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
/* get duration to calculate end time */
duration = GST_BUFFER_DURA... | false | false | false | false | false | 0 |
__fm10k_uc_sync(struct net_device *dev,
const unsigned char *addr, bool sync)
{
struct fm10k_intfc *interface = netdev_priv(dev);
struct fm10k_hw *hw = &interface->hw;
u16 vid, glort = interface->glort;
s32 err;
if (!is_valid_ether_addr(addr))
return -EADDRNOTAVAIL;
/* update table with current entries ... | false | false | false | false | false | 0 |
pxebs_exec ( int argc, char **argv ) {
static struct option longopts[] = {
{ "help", 0, NULL, 'h' },
{ NULL, 0, NULL, 0 },
};
const char *netdev_txt;
const char *pxe_type_txt;
struct net_device *netdev;
unsigned int pxe_type;
char *end;
int c;
int rc;
/* Parse options */
while ( ( c = getopt_long ( argc... | false | false | false | false | false | 0 |
__env_read_db_config(env)
ENV *env;
{
FILE *fp;
int lc, ret;
char *p, buf[256];
/* Parse the config file. */
p = NULL;
if ((ret = __db_appname(env,
DB_APP_NONE, "DB_CONFIG", NULL, &p)) != 0)
return (ret);
if (p == NULL)
fp = NULL;
else {
fp = fopen(p, "r");
__os_free(env, p);
}
if (fp == NULL)... | false | false | false | false | true | 1 |
race_report_verbose(
FILE* ofile, /*!< Pointer to output file to use */
funit_link* head /*!< Pointer to head of functional unit list being reported */
) { PROFILE(RACE_REPORT_VERBOSE);
race_blk* curr_race; /* Pointer to current race condition block */
while( head != NULL ) {
if( (head->funit-... | false | false | false | false | false | 0 |
add_actions(std::list<RequestTuple*>& reqtuples,Subject* subject,Resource* resource,ActList& actions,CtxList& contexts) {
if(actions.empty()) {
add_contexts(reqtuples,subject,resource,NULL,contexts);
return;
}
ActList::iterator ait = actions.begin();
for(;ait != actions.end();++ait) {
add_contexts(r... | false | false | false | false | false | 0 |
cleanZarg(char *input)
{
char *pcbuf;
int k = 0;
pcbuf = strdup(input); // the caller will need to free this later on
while ((pcbuf[k] != '\0') && (pcbuf[k] != '\"'))
k++;
pcbuf[k] = '\0';
return pcbuf;
} | false | false | false | false | false | 0 |
find_closing_curly(char *s)
{
unsigned depth;
for (depth = 1; *s; ++s) {
if (*s == RIGHT_CURLY && --depth == 0) {
return s;
}
else if (*s == LEFT_CURLY) {
++depth;
}
}
return NULL;
} | false | false | false | false | false | 0 |
acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc)
{
if (!table_desc->pointer && !acpi_gbl_verify_table_checksum) {
/*
* Only validates the header of the table.
* Note that Length contains the size of the mapping after invoking
* this work around, this value is required by
* acpi_tb_release... | false | false | false | false | false | 0 |
ktest_empty_authenticator(krb5_authenticator *a)
{
if (a->client)
ktest_destroy_principal(&a->client);
if (a->checksum)
ktest_destroy_checksum(&a->checksum);
if (a->subkey)
ktest_destroy_keyblock(&a->subkey);
if (a->authorization_data)
ktest_destroy_authorization_data(&a-... | false | false | false | false | false | 0 |
contextMenuEvent( QContextMenuEvent *e )
{
QMenu menu;
menu.setTitle( i18n( "Volume" ) );
menu.addAction( i18n( "100%" ) )->setData( 100 );
menu.addAction( i18n( "80%" ) )->setData( 80 );
menu.addAction( i18n( "60%" ) )->setData( 60 );
menu.addAction( i18n( "40%" ) )->setData(... | false | false | false | false | false | 0 |
smaction(int port, Packet *p)
{
_total_packets++;
if (Flow *f = find_flow(AGGREGATE_ANNO(p))) {
if (_anno >= 0)
f->add(p->anno_u32(_anno), port);
else
f->add(0, port);
}
} | false | false | false | false | false | 0 |
PreventDestroy()
{
CPLMutexHolderD( GDALGetphDLMutex() );
if (! singleton)
return;
singleton->refCountOfDisableRefCount ++;
} | false | false | false | false | false | 0 |
fs_rtp_bin_error_downgrade_handle_message (GstBin* bin,
GstMessage* message)
{
if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR)
{
GError *error = NULL;
gchar *debug = NULL;
gchar *debug2;
GstMessage *message2;
gst_message_parse_error (message, &error, &debug);
debug2 = g_strdup_pri... | false | false | false | false | false | 0 |
disconnect_all(void)
{
GSList *tmp, *next;
for (tmp = lookup_servers; tmp != NULL; tmp = next) {
next = tmp->next;
if (IS_XMPP_SERVER(tmp->data))
server_connect_failed(SERVER(tmp->data), NULL);
}
for (tmp = servers; tmp != NULL; tmp = next) {
next = tmp->next;
if (IS_XMPP_SERVER(tmp->data))
server_di... | false | false | false | false | false | 0 |
rawWrite(uint8_t *bytes, int size) // unix!!
{
int rc=0;
#ifdef WIN32
switch (usbMode) {
case USB1:
rc = USBXpress::write(&devicePort, bytes, size);
break;
case USB2:
rc = usb2->write((char *)bytes, size);
break;
default:
rc = 0;
break;
}
if ... | false | false | false | false | false | 0 |
add_inc_dir(const char *src)
{
size_t have = CHUNK(num_inc_dir);
size_t need = CHUNK(num_inc_dir + 1);
size_t used = (need * sizeof(char *));
char *save;
if (inc_dir == 0) {
inc_dir = (char **) malloc(used);
} else if (have != need) {
inc_dir = (char **) realloc(inc_dir, used);
}
swi... | false | false | false | false | false | 0 |
gst_a2dp_sink_init_dynamic_elements(GstA2dpSink *self,
GstCaps *caps)
{
GstStructure *structure;
GstEvent *event;
GstPad *capsfilterpad;
gboolean crc;
gchar *mode = NULL;
structure = gst_caps_get_structure(caps, 0);
/* before everything we need to remove fakesink */
gst_a2dp_sink_remove_fakesink(self);
... | false | false | false | false | false | 0 |
write_one_revoke_record(journal_t *journal,
transaction_t *transaction,
struct list_head *log_bufs,
struct buffer_head **descriptorp,
int *offsetp,
struct jbd2_revoke_record_s *record,
int write_op)
{
int csum_size = 0;
struct buffer_head *descriptor;
int sz, offset;
... | false | false | false | false | false | 0 |
is_centerpoint_elem( U_CHAR el_number )
{
static U_CHAR el_numb[12];
static int len;
int i;
if ( !el_numb[0] && !len ) {
el_numb[len++] = (U_CHAR)get_periodic_table_number( "C" );
el_numb[len++] = (U_CHAR)get_periodic_table_number( "N" );
el_numb[len++] = (U_CHAR)get_periodic_tab... | false | false | false | false | false | 0 |
set_symmetric_difference(PySetObject *so, PyObject *other)
{
PyObject *rv;
PySetObject *otherset;
otherset = (PySetObject *)make_new_set(Py_TYPE(so), other);
if (otherset == NULL)
return NULL;
rv = set_symmetric_difference_update(otherset, (PyObject *)so);
if (rv == NULL)
return... | 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.