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 |
|---|---|---|---|---|---|---|
entry_activate_callback (GtkEntry *entry,
void *data)
{
EggFindBar *find_bar = EGG_FIND_BAR (data);
if (find_bar->priv->search_string != NULL)
egg_find_bar_emit_next (find_bar);
} | false | false | false | false | false | 0 |
ExtSmooth(unsigned char *data, int len, int x, int y, int layer) {
static int dx[8] = { 0, 1, 1, 1, 0, -1, -1, -1, };
static int dy[8] = { -1, -1, 0, 1, 1, 1, 0, -1, };
int i, rx, ry;
int newsm;
if (len < 1) {
return 0;
}
x += pl_pos.x;
y += pl_pos.y;
newsm = GetChar_String... | false | false | false | false | false | 0 |
slotTriggered()
{
if( m_albums.isEmpty() || m_albums.first()->tracks().isEmpty() )
return;
const QString& startPath = m_albums.first()->tracks().first()->playableUrl().directory();
const QStringList mimetypes( KImageIO::mimeTypes( KImageIO::Reading ) );
KFileDialog dlg( startPath,
... | false | false | false | false | false | 0 |
visibilitymap_pin(Relation rel, BlockNumber heapBlk, Buffer *buf)
{
BlockNumber mapBlock = HEAPBLK_TO_MAPBLOCK(heapBlk);
/* Reuse the old pinned buffer if possible */
if (BufferIsValid(*buf))
{
if (BufferGetBlockNumber(*buf) == mapBlock)
return;
ReleaseBuffer(*buf);
}
*buf = vm_readbuf(rel, mapBlock, tru... | false | false | false | false | false | 0 |
ipow(int i1, int i2)
{
int i;
int i3 = 1;
for ( i = 0; i < i2; ++i ) i3 *= i1;
return (i3);
} | false | false | false | false | false | 0 |
sample_signal_handler(int signal, siginfo_t* siginfo, void* uap) {
factor_vm* vm = current_vm_p();
bool foreign_thread = false;
if (vm == NULL) {
foreign_thread = true;
vm = thread_vms.begin()->second;
}
if (atomic::load(&vm->sampling_profiler_p))
vm->safepoint.enqueue_samples(vm, 1, (cell)UAP_PRO... | false | false | false | false | false | 0 |
_send_eof_msg(struct task_read_info *out)
{
struct client_io_info *client;
struct io_buf *msg = NULL;
eio_obj_t *eio;
ListIterator clients;
struct slurm_io_header header;
Buf packbuf;
debug4("Entering _send_eof_msg");
out->eof_msg_sent = true;
if (_outgoing_buf_free(out->job)) {
msg = list_dequeue(out->job... | false | false | false | false | false | 0 |
write_pbl(struct c4iw_rdev *rdev, __be64 *pbl,
u32 pbl_addr, u32 pbl_size)
{
int err;
PDBG("%s *pdb_addr 0x%x, pbl_base 0x%x, pbl_size %d\n",
__func__, pbl_addr, rdev->lldi.vr->pbl.start,
pbl_size);
err = write_adapter_mem(rdev, pbl_addr >> 5, pbl_size << 3, pbl);
return err;
} | false | false | false | false | false | 0 |
dbiblast_parseId(const AjPStr line, AjPFile * alistfile,
AjBool systemsort, AjPStr const * fields,
ajint* maxFieldLen,
ajuint* countfield,
AjPStr* myid,
AjPList * myfdl)
{
static AjPRegexp idexp = NULL;
static AjBool reset = AJTRUE;
(void) alistfile;
(v... | false | false | false | false | false | 0 |
bnx2fc_percpu_thread_destroy(unsigned int cpu)
{
struct bnx2fc_percpu_s *p;
struct task_struct *thread;
struct bnx2fc_work *work, *tmp;
BNX2FC_MISC_DBG("destroying io thread for CPU %d\n", cpu);
/* Prevent any new work from being queued for this CPU */
p = &per_cpu(bnx2fc_percpu, cpu);
spin_lock_bh(&p->fp_work... | false | false | false | false | false | 0 |
makeprint_for_mb(char *s, size_t l)
{
char *t = s;
wchar_t *wp = wbuf;
size_t wl;
if ((wl = xmbstowcs(wbuf, t, sizeof wbuf)) == (size_t)-1)
return;
while (wl--) {
if (!iswprint(*wp) && *wp != L'\n' && *wp != L'\r'
&& *wp != L'\b' && *wp != L'\t')
*wp = L'?';
wp++;
}
wp = wbuf;
wcstombs(s, wp, l)... | false | false | false | false | false | 0 |
showMessage(const QString &message, const QString & id, int alignment)
{
MessageThing * itemMessageThing = m_items.value(id);
if (itemMessageThing == NULL) return;
MessageThing * messageThing = new MessageThing;
messageThing->alignment = alignment;
messageThing->color = itemMessageThing->color;
messageThing->rec... | false | false | false | false | false | 0 |
_DBCreateDataBlockContours ()
{
DBTableFieldDefinition fieldDefs [] =
{ DBTableFieldDefinition (DBrNFromNode, DBTableFieldTableRec,DBHiddenField, sizeof (DBAddress),true),
DBTableFieldDefinition (DBrNToNode, DBTableFieldTableRec,DBHiddenField, sizeof (DBAddress),true),
DBTableFieldDefinition (DBrNLe... | false | false | false | false | false | 0 |
index_load(const char* indexname, int flags, index_t* dest) {
index_t* allocd = NULL;
if (flags & INDEX_ONLY_LOAD_METADATA)
logverb("Loading metadata for %s...\n", indexname);
if (!dest)
allocd = dest = calloc(1, sizeof(index_t));
else
memset(dest, 0, sizeof(index_t));
dest->indexname = strdup(indexname);... | false | false | false | false | false | 0 |
opStroke(Object args[], int numArgs) {
if (!state->isCurPt()) {
//error(getPos(), "No path in stroke");
return;
}
if (state->isPath() && !contentIsHidden()) {
if (state->getStrokeColorSpace()->getMode() == csPattern) {
doPatternStroke();
} else {
out->stroke(state);
}
}
doEndPa... | false | false | false | false | false | 0 |
srpt_unmap_sg_to_ib_sge(struct srpt_rdma_ch *ch,
struct srpt_send_ioctx *ioctx)
{
struct scatterlist *sg;
enum dma_data_direction dir;
BUG_ON(!ch);
BUG_ON(!ioctx);
BUG_ON(ioctx->n_rdma && !ioctx->rdma_ius);
while (ioctx->n_rdma)
kfree(ioctx->rdma_ius[--ioctx->n_rdma].sge);
kfree(ioctx->rdma_ius);
i... | false | false | false | false | false | 0 |
memStringStats(StoreEntry * sentry)
{
const char *pfmt = "%-20s\t %d\t %d\n";
int i;
int pooled_count = 0;
size_t pooled_volume = 0;
/* heading */
storeAppendPrintf(sentry,
"String Pool\t Impact\t\t\n"
" \t (%%strings)\t (%%volume)\n");
/* table body */
for (i = 0; i < mem_str_pool_cou... | false | false | false | false | false | 0 |
parse_port_config(const char *string)
{
smartlist_t *sl;
int virtport;
int realport;
uint16_t p;
tor_addr_t addr;
const char *addrport;
rend_service_port_config_t *result = NULL;
sl = smartlist_new();
smartlist_split_string(sl, string, " ",
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK... | false | false | false | false | false | 0 |
copyarray(Object *src, int start1, Object *dest, int start2, int length) {
ClassBlock *scb, *dcb;
char *sdata, *ddata;
Object **sob, **dob;
int i;
if((src == NULL) || (dest == NULL)) {
signalException(java_lang_NullPointerException, NULL);
return;
}
scb = CLASS_CB(src->clas... | false | false | false | false | false | 0 |
pr_byname(struct irs_pr *this, const char *name) {
struct protoent *p;
char **cp;
pr_rewind(this);
while ((p = pr_next(this))) {
if (!strcmp(p->p_name, name))
goto found;
for (cp = p->p_aliases; *cp; cp++)
if (!strcmp(*cp, name))
goto found;
}
found:
return (p);
} | false | false | false | false | false | 0 |
showToolTip()
{
if (state != ToolTipManager::Activated ||
!currentWidget ||
QApplication::activePopupWidget() ||
QApplication::activeModalWidget()) {
return;
}
PopupApplet *popup = qobject_cast<PopupApplet*>(currentWidget);
if (popup && popup->isPopupShowing()) {
... | false | false | false | false | false | 0 |
xen_parse_512gb(void)
{
bool val = false;
char *arg;
arg = strstr(xen_start_info->cmd_line, "xen_512gb_limit");
if (!arg)
return;
arg = strstr(xen_start_info->cmd_line, "xen_512gb_limit=");
if (!arg)
val = true;
else if (strtobool(arg + strlen("xen_512gb_limit="), &val))
return;
xen_512gb_limit = val;
... | false | false | false | false | false | 0 |
bthci_ResetBtExtInfo(struct bt_mgnt *pBtMgnt)
{
u8 i;
for (i = 0; i < MAX_BT_ASOC_ENTRY_NUM; i++) {
pBtMgnt->ExtConfig.linkInfo[i].ConnectHandle = 0;
pBtMgnt->ExtConfig.linkInfo[i].IncomingTrafficMode = 0;
pBtMgnt->ExtConfig.linkInfo[i].OutgoingTrafficMode = 0;
pBtMgnt->ExtConfig.linkInfo[i].BTProfile = BT_P... | false | true | false | false | false | 1 |
fwdStart(int fd, StoreEntry * e, request_t * r)
{
aclCheck_t *ch;
FwdState *fwdState;
fwdState = cbdataAlloc(FwdState);
fwdState->client_fd = fd;
fwdState->entry = e;
fwdState->request = r; /* XXX: requestLink? */
/*
* client_addr == no_addr indicates this is an "internal" request
... | false | false | false | false | false | 0 |
chunked(uh, s)
int uh;
CONST char *s;
{
if (Xstrcasecmp(s, CHUNKEDSTR)) return(0);
(urlhostlist[uh].http) -> chunk = 0;
(urlhostlist[uh].http) -> flags |= HFL_CHUNKED;
return(0);
} | false | false | false | false | false | 0 |
ekiga_main_window_init_status_toolbar (EkigaMainWindow *mw)
{
GtkToolItem *item = NULL;
g_return_if_fail (EKIGA_IS_MAIN_WINDOW (mw));
/* The main horizontal toolbar */
mw->priv->status_toolbar = gtk_toolbar_new ();
gtk_toolbar_set_style (GTK_TOOLBAR (mw->priv->status_toolbar), GTK_TOOLBAR_ICONS);
gtk_tool... | false | false | false | false | false | 0 |
e_mod_kbd_fullscreen_set(E_Zone *zone, int fullscreen)
{
if (!_e_illume_kbd->border) return;
if (_e_illume_kbd->border->zone != zone) return;
if ((!!fullscreen) != _e_illume_kbd->fullscreen)
_e_illume_kbd->fullscreen = fullscreen;
} | false | false | false | false | false | 0 |
on_item_activate (GtkMenuItem *item,
gpointer /*data*/)
{
Action *action = NULL;
action = (Action *)g_object_get_data (G_OBJECT (item),
"menu-builder-gtk-action");
if (action != NULL) {
action->callback ();
}
} | false | false | false | false | false | 0 |
newForsPAF(const char *name, const char *type, const char *id,
const char *desc)
{
ForsPAF *paf;
int pos = 0;
if (!name || !type)
return NULL;
paf = (ForsPAF *)cpl_malloc(sizeof(ForsPAF));
if (paf) {
paf->header = _forsPAFHeaderCreate(name, type, id, desc, &... | false | false | false | false | false | 0 |
get_promoters_included_in( int32_t pos_1, int32_t pos_2, ae_list<ae_rna*>** promoters )
{
assert( pos_1 >= 0 && pos_1 <= _dna->get_length() && pos_2 >= 0 && pos_2 <= _dna->get_length() );
if ( pos_1 < pos_2 )
{
int32_t seg_length = pos_2 - pos_1;
if ( seg_length >= PROM_SIZE )
{
get_lead... | false | false | false | false | false | 0 |
BitReverseArray( N, T )
int N;
COMPLEX *T;
{
COMPLEX swap;
int i;
int j;
int k;
int n;
int logN;
log2( logN, N );
logN--;
for( k = 0; k < N; k++ ) {
BitReverse( n, k, logN );
if ( n > k ) {
swap = T[k];
T[k] = T[n];
T[n... | false | false | false | false | false | 0 |
translate(const QString &string)
{
QString translatedString = trUtf8(string.toUtf8().constData());
// If the translation is the same as the original string
// it could not be translated. In that case
// try to translate using the QApplication domain
if (translatedString != string)
return t... | false | false | false | false | false | 0 |
staleFiles(const KUrl &filename, const QString &applicationName)
{
KGlobal::dirs()->addResourceType("stale", 0, QString::fromLatin1("data/stalefiles"));
QString appName(applicationName);
if (appName.isEmpty()) {
appName = QCoreApplication::instance()->applicationName();
}
QString url = fil... | false | false | false | false | false | 0 |
awt_openURL(AW_root *aw_root, GBDATA *gb_main, const char *url) {
// if gb_main == 0 -> normal system call is used
GB_ERROR error = 0;
GB_CSTR ka;
char *browser = aw_root->awar(AWAR_WWW_BROWSER)->read_string();
while ( (ka = GBS_find_string(browser,"$(URL)",0)) ) {
char *start ... | false | false | false | false | false | 0 |
bdb_get(char *key, size_t nkey){
item *it = NULL;
DBT dbkey, dbdata;
DB_TXN *txn = NULL;
queue_rec_t queue_rec;
DB *queue_dbp = NULL;
db_recno_t recno;
int ret;
/* first, alloc a fixed size */
it = item_alloc2();
if (it == 0) {
return NULL;
}
BDB_CLEANUP_DBT();
... | false | false | false | false | false | 0 |
idxleaf(const void *av, unsigned char *outbuf)
{
const struct indexrec *a = (const struct indexrec *)av;
int len = 1+strlen(a->term);
memcpy(outbuf, a->term, len);
PUT_16BIT_LSB_FIRST(outbuf+len, a->count);
PUT_32BIT_LSB_FIRST(outbuf+len+2, a->offset);
return len+6;
} | false | true | false | false | false | 1 |
init_mteEventTable(void)
{
static oid mteEventTable_oid[] = { 1, 3, 6, 1, 2, 1, 88, 1, 4, 2 };
size_t mteEventTable_oid_len = OID_LENGTH(mteEventTable_oid);
netsnmp_handler_registration *reg;
/*
* Ensure the (combined) table container is available...
*/
init_event_table_data();... | false | false | false | false | false | 0 |
qh_check_points (void) {
facetT *facet, *errfacet1= NULL, *errfacet2= NULL;
realT total, maxoutside;
pointT *point, **pointp, *pointtemp;
maxoutside= fmax_(qh max_outside, qh DISTround);
maxoutside += 2* qh DISTround;
/* 1 DISTround to actual point and another DISTround to computed point */
if (qh RANDOM... | false | false | false | false | true | 1 |
cominterop_class_guid_equal (guint8* guid, MonoClass* klass)
{
guint8 klass_guid [16];
if (cominterop_class_guid (klass, klass_guid))
return !memcmp (guid, klass_guid, sizeof (klass_guid));
return FALSE;
} | false | false | false | false | false | 0 |
gst_level_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstLevel *filter = GST_LEVEL (object);
switch (prop_id) {
case PROP_POST_MESSAGES:
/* fall-through */
case PROP_MESSAGE:
g_value_set_boolean (value, filter->post_messages);
break;
case P... | false | false | false | false | false | 0 |
nc4_rec_read_types(NC_GRP_INFO_T *grp)
{
hsize_t num_obj, i;
NC_HDF5_FILE_INFO_T *h5 = grp->file->nc4_info;
NC_GRP_INFO_T *child_grp;
hsize_t idx = 0;
struct nc_hdf5_link_info link_info;
int ordering_checked = 0;
int creation_ordering = 1; /* Assume we have it. */
int retval = NC_NOERR;
asse... | false | false | false | false | false | 0 |
gphoto_button_press(GtkWidget *w, GdkEventButton *e, gpointer data) {
g_return_val_if_fail (w && e, FALSE);
switch (e->button) {
case 3:
gphoto_context_menu_init(GPOINTER_TO_INT(data));
return TRUE;
default:
break;
}
return FALSE;
} | false | false | false | false | false | 0 |
parent(const QModelIndex &child) const
{
QModelIndex mi = d->proxySourceParent.value(child);
if (mi.isValid())
return mapFromSource(mi);
return QModelIndex();
} | false | false | false | false | false | 0 |
pad_full_pages(struct logfs_area *area)
{
struct super_block *sb = area->a_sb;
struct logfs_super *super = logfs_super(sb);
u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes);
u32 len = super->s_segsize - area->a_used_bytes;
pgoff_t index = PAGE_CACHE_ALIGN(ofs) >> PAGE_CACHE_SHIFT;
pgoff_t no_indizes = len... | false | false | false | false | false | 0 |
mk_followpos_1(e, fpos)
Re_node e;
Pset_array fpos;
{
Pset pos;
int i;
switch (Op(e)) {
case EOS:
break;
case OPSTAR:
pos = Lastpos(e);
while (pos != NULL) {
i = pos->posnum;
(*fpos)[i] = pset_union(Firstpos(e), (*fpos)[i], 1);
pos = pos->nextpos;
}
mk_followpos_1(Child(e), fpos);
break;
ca... | false | false | false | false | false | 0 |
RTC_GetFlagStatus(uint32_t RTC_FLAG)
{
FlagStatus bitstatus = RESET;
uint32_t tmpreg = 0;
/* Check the parameters */
assert_param(IS_RTC_GET_FLAG(RTC_FLAG));
/* Get all the flags */
tmpreg = (uint32_t)(RTC->ISR & RTC_FLAGS_MASK);
/* Return the status of the flag */
if ((tmpreg & RTC... | false | false | false | false | false | 0 |
evtStdin()
{
int cc;
char buf[raw_data_len];
if(mode == MODE_TALK){
cc = read(0, buf, raw_data_len);
buf[cc-1] = 0;
if(strncmp(buf, "send ", 5)==0){
fd_trans = open(buf+5, O_RDONLY);
if(fd_trans<0){
perror("pingtalk: open");
fd_trans = 0;
return;
}
... | false | false | false | false | false | 0 |
ProcessSourceExpression(std::string const& expr)
{
if(strncmp(expr.c_str(), "$<TARGET_OBJECTS:", 17) == 0 &&
expr[expr.size()-1] == '>')
{
std::string objLibName = expr.substr(17, expr.size()-18);
this->ObjectLibraries.push_back(objLibName);
}
else
{
cmOStringStream e;
e << "Unrecog... | false | false | false | false | false | 0 |
DoFileSet(TiXmlElement* parentNode)
{
TiXmlElement* node = parentNode->FirstChildElement("FileSet");
while (node)
{
FileSet fs;
if (node->Attribute("name"))
fs.name = cbC2U(node->Attribute("name"));
if (node->Attribute("title"))
fs.title = cbC2U(node->Attribut... | false | false | false | false | false | 0 |
setActivation(Uint16 group, const char *layer)
{
/* first we make sure we have a valid overlay group */
OFBool result = OFFalse;
if ((group < 0x6020)&&(group >= 0x6000)&&((group & 1) == 0)) result = OFTrue;
if ((group < 0x5020)&&(group >= 0x5000)&&((group & 1) == 0)) result = OFTrue;
if (!result) return EC_Il... | false | false | false | false | false | 0 |
getSTMUseCycle(const InstrItineraryData *ItinData,
const MCInstrDesc &UseMCID,
unsigned UseClass,
unsigned UseIdx, unsigned UseAlign) const {
int RegNo = (int)(UseIdx+1) - UseMCID.getNumOperands() + 1;
if (RegNo <= 0)... | false | false | false | false | false | 0 |
sb16_set_mpu_port(sb_devc * devc, struct address_info *hw_config)
{
/*
* This routine initializes new MIDI port setup register of SB Vibra (CT2502).
*/
unsigned char bits = sb_getmixer(devc, 0x84) & ~0x06;
switch (hw_config->io_base)
{
case 0x300:
sb_setmixer(devc, 0x84, bits | 0x04);
break;
case ... | false | false | false | false | false | 0 |
GetConfigDir(const wxString &configFileBase)
{
// Cache the path.
static wxString configPath;
if (configPath.IsEmpty()) {
// "Portable aMule" - Use aMule from an external USB drive
// Check for ./config/amule.conf (or whatever gets passed as configFile)
// and use this configuration if found
const wxString ... | false | false | false | false | false | 0 |
my3126_get_link_status(struct cphy *cphy,
int *link_ok, int *speed, int *duplex, int *fc)
{
u32 val;
u16 val16;
adapter_t *adapter;
adapter = cphy->adapter;
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val);
val16 = (u16) val;
/* Populate elmer_gpo with the register value */
t1_tpi_read(adapter, A_EL... | false | false | false | false | false | 0 |
close_g3d_file(void *map)
{
/* close opened g3d file */
if (G3d_closeCell((G3D_Map *) map) != 1) {
G_warning(_("Unable to close 3D raster map <%s>"),
((G3D_Map *) map)->fileName);
return (-1);
}
return (1);
} | false | false | false | false | false | 0 |
Synchronize()
{
if( !GetUpdatable() )
return;
/* -------------------------------------------------------------------- */
/* Flush out last line caching stuff for pixel interleaved data. */
/* -------------------------------------------------------------------- */
FlushBlock();
/* -------------... | false | false | false | false | false | 0 |
pulse_queue_dequeue(struct pri_detector *pde)
{
struct pulse_elem *p = pulse_queue_get_tail(pde);
if (p != NULL) {
list_del_init(&p->head);
pde->count--;
/* give it back to pool */
pool_put_pulse_elem(p);
}
return (pde->count > 0);
} | false | false | false | false | false | 0 |
get_host(const char* URL,int isReal,int* phishy,const char **hstart, const char **hend)
{
int rc,ismailto = 0;
const char* start;
const char* end=NULL;
if(!URL) {
*hstart=*hend=NULL;
return 0;
}
start = strstr(URL,"://");
if(!start) {
if(!strncmp(URL,mailto,mailto_len)) {
start = URL + mailto_len;
is... | false | false | false | false | false | 0 |
switchOutputFormatTOC(HookTOCData *hookData,
NMEBoolean heading)
{
if (heading)
{
*hookData->outputFormat = NMEOutputFormatHTML;
hookData->outputFormat->beginHeading
= "%%{l} %%<a href=\"#h%{o}\">%%{i>0}%{i}. %%";
hookData->outputFormat->endHeading = "</a><br />\n";
hookData->outputFormat->lineBrea... | false | false | false | false | false | 0 |
paint ( Surface& s, SPoint pos ) const
{
for ( int x = 0; x < 4; x++ )
for ( int y = 0; y < 6; y++ )
if ( fieldExists(LocalCoordinate(x,y) ))
paintSingleField(s,pos,LocalCoordinate(x,y));
} | false | false | false | false | false | 0 |
s48_bignum_test(bignum_type bignum)
{
return
((BIGNUM_ZERO_P (bignum))
? bignum_comparison_equal
: (BIGNUM_NEGATIVE_P (bignum))
? bignum_comparison_less
: bignum_comparison_greater);
} | false | false | false | false | false | 0 |
ab306_write (Port *p, const void *buf, size_t len)
{
u_long base = p->base;
u_int i;
int cksum = 0;
DBG(3, "ab306_write: waiting for scanner to be ready %02x\n",
ab306_inb (p, base + 1));
while ((ab306_inb (p, base + 1) & 0x20) == 0);
usleep (10000);
DBG(4, "ab306_write: writing data\n");
for (i... | false | false | false | false | false | 0 |
add_admin_princs(void *handle, krb5_context context, char *realm)
{
krb5_error_code ret = 0;
char *service_name = 0, *p;
char localname[MAXHOSTNAMELEN];
struct addrinfo *ai, ai_hints;
int gai_error;
if (gethostname(localname, MAXHOSTNAMELEN)) {
ret = errno;
perror("gethostname")... | true | true | false | false | false | 1 |
lwo_cb_COLR(G3DIffGlobal *global, G3DIffLocal *local)
{
G3DMaterial *material;
material = (G3DMaterial *)local->object;
g_return_val_if_fail(material != NULL, FALSE);
if(global->flags & LWO_FLAG_LWO2)
{
material->r = g3d_stream_read_float_be(global->stream);
material->g = g3d_stream_read_float_be(global->str... | false | false | false | false | false | 0 |
cfg_read(int uid)
{
Draw *ptr;
if (!(cfgfile=fopen(cfgname,"r"))) {
gpm_report(GPM_PR_ERR, "%s: %s", cfgname, strerror(errno));
return NULL;
}
gpm_report(GPM_PR_INFO,"Reading file %s",cfgname);
cfglineno=1;
if (yyparse()) {
cfg_free(cfgall);
cfgall=NULL;
r... | false | false | false | false | true | 1 |
anwcs_print(const anwcs_t* anwcs, FILE* fid) {
assert(anwcs);
assert(fid);
ANWCS_DISPATCH(anwcs, , , print, fid);
} | false | false | false | false | false | 0 |
initio_state_2(struct initio_host * host)
{
struct scsi_ctrl_blk *scb = host->active;
struct target_control *active_tc = host->active_tc;
#if DEBUG_STATE
printk("-s2-");
#endif
initio_unlink_pend_scb(host, scb);
initio_append_busy_scb(host, scb);
outb(active_tc->sconfig0, host->addr + TUL_SConfig);
if (host->... | false | false | false | false | false | 0 |
slirp_send(struct cpssp *cpssp, uint8_t data)
{
int ret;
if (cpssp->child_fd == -1) {
faum_log(FAUM_LOG_WARNING, "node-isp", "slirp",
"slirp fd is closed, dropping data.\n");
return;
}
ret = io_write(cpssp->child_fd, &data, sizeof(data));
if (ret != sizeof(data)) {
faum_log(FAUM_LOG_WARNING, COMP, __fun... | false | false | false | false | false | 0 |
start_check_task(struct check *check, int mininter,
int nbcheck, int srvpos)
{
struct task *t;
/* task for the check */
if ((t = task_new()) == NULL) {
Alert("Starting [%s:%s] check: out of memory.\n",
check->server->proxy->id, check->server->id);
return 0;
}
check->task = t;
t->process = proc... | false | false | false | false | false | 0 |
cnic_ulp_start(struct cnic_dev *dev)
{
struct cnic_local *cp = dev->cnic_priv;
int if_type;
for (if_type = 0; if_type < MAX_CNIC_ULP_TYPE; if_type++) {
struct cnic_ulp_ops *ulp_ops;
mutex_lock(&cnic_lock);
ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type],
lockdep_is_held(&cnic_lock));
if ... | false | false | false | false | false | 0 |
Execute () {
Clipboard* cb = GetClipboard();
if (cb == nil) {
SetClipboard(cb = new Clipboard);
Editor* ed = GetEditor();
Selection* s = ed->GetSelection();
if (s->Number() > 1) {
Iterator i;
GraphicView* views = ed->GetViewer()->GetGraphicView();
... | false | false | false | false | false | 0 |
ecalcomp_get_href (ECalComponent *comp)
{
icalcomponent *icomp;
gchar *str;
str = NULL;
icomp = e_cal_component_get_icalcomponent (comp);
g_return_val_if_fail (icomp != NULL, NULL);
str = icomp_x_prop_get (icomp, X_E_CALDAV "HREF");
return str;
} | false | false | false | false | false | 0 |
__my_vpi_chk_error(void)
{
struct t_vpi_error_info einfotab;
struct t_vpi_error_info *einfop;
__acc_vpi_erroff = FALSE;
if (!vpi_chk_error(&einfotab)) return(FALSE);
einfop = &einfotab;
/* notices and warning are not acc_ problems */
if (einfop->level == vpiNotice || einfop->level == vpiWarning)
return(FALSE)... | false | false | false | false | false | 0 |
git_futils_mktmp(git_buf *path_out, const char *filename)
{
int fd;
git_buf_sets(path_out, filename);
git_buf_puts(path_out, "_git2_XXXXXX");
if (git_buf_oom(path_out))
return -1;
if ((fd = p_mkstemp(path_out->ptr)) < 0) {
giterr_set(GITERR_OS,
"Failed to create temporary file '%s'", path_out->ptr);
re... | false | false | false | false | false | 0 |
_priv_gst_pad_invalidate_cache (GstPad * pad)
{
GstPadPushCache *cache;
gpointer *cache_ptr;
GST_LOG_OBJECT (pad, "Invalidating pad cache");
/* we hold the pad lock here so we can get the peer and it stays
* alive during this call */
if (GST_PAD_IS_SINK (pad)) {
if (!(pad = GST_PAD_PEER (pad)))
... | false | false | false | false | false | 0 |
egg_tree_multi_drag_source_drag_data_get (EggTreeMultiDragSource *drag_source,
GList *path_list,
GtkSelectionData *selection_data)
{
EggTreeMultiDragSourceIface *iface = EGG_TREE_MULTI_DRAG_SOURCE_GET_IFACE (drag_source);
g_return_val_if_fail (EGG_IS_TREE_MULTI_DRAG_SOURCE ... | false | false | false | false | false | 0 |
mailmime_multiple_new(const char * type)
{
struct mailmime_fields * mime_fields;
struct mailmime_content * content;
struct mailmime * mp;
mime_fields = mailmime_fields_new_empty();
if (mime_fields == NULL)
goto err;
content = mailmime_content_new_with_str(type);
if (content == NULL)
goto free_... | false | false | false | false | false | 0 |
gog_axis_del_contributor (GogAxis *axis, GogObject *contrib)
{
gboolean update = FALSE;
g_return_if_fail (GOG_IS_AXIS (axis));
g_return_if_fail (g_slist_find (axis->contributors, contrib) != NULL);
if (axis->min_contrib == contrib) {
axis->min_contrib = NULL;
update = TRUE;
}
if (axis->max_contrib == contri... | false | false | false | false | false | 0 |
midgard_core_query_constraint_parse_property (MidgardCoreQueryConstraint **constraint, MidgardDBObjectClass *klass, const gchar *name)
{
g_assert(name != NULL);
if (!klass)
klass = MIDGARD_DBOBJECT_CLASS((*constraint)->priv->klass);
(*constraint)->priv->current->table = midgard_core_class_get_table(MIDGARD_DBOBJ... | false | false | false | false | false | 0 |
WriteMolecule(OBBase* pOb, OBConversion* pConv)
{
OBMol* pmol = dynamic_cast<OBMol*>(pOb);
if(pmol==NULL)
return false;
//Define some references so we can use the old parameter names
ostream &ofs = *pConv->GetOutStream();
OBMol &mol = *pmol;
// unsigned int i;
char buffer[BUFF_SI... | false | false | false | false | false | 0 |
glusterd_store_rbstate_write (int fd, glusterd_volinfo_t *volinfo)
{
int ret = -1;
char buf[PATH_MAX] = {0, };
GF_ASSERT (fd > 0);
GF_ASSERT (volinfo);
snprintf (buf, sizeof (buf), "%d", volinfo->rb_status);
ret = glusterd_store_save_value (fd, GLUS... | false | false | false | false | false | 0 |
jump(const char *name, int distance)
{
JUMP(name);
return 0;
} | false | false | false | false | false | 0 |
stv090x_set_mis(struct stv090x_state *state, int mis)
{
u32 reg;
if (mis < 0 || mis > 255) {
dprintk(FE_DEBUG, 1, "Disable MIS filtering");
reg = STV090x_READ_DEMOD(state, PDELCTRL1);
STV090x_SETFIELD_Px(reg, FILTER_EN_FIELD, 0x00);
if (STV090x_WRITE_DEMOD(state, PDELCTRL1, reg) < 0)
goto err;
} else {
... | false | false | false | false | false | 0 |
on_tab_button_press_event(GtkWidget* widget, GdkEventButton* event, AnjutaMsgman* msgman)
{
if (event->type == GDK_BUTTON_PRESS)
{
if (event->button == 3)
{
gtk_menu_popup(GTK_MENU(msgman->priv->tab_popup), NULL, NULL, NULL, NULL,
event->button, event->time);
return TRUE;
}
}
return FALSE;
} | false | false | false | false | false | 0 |
mboot_map_stack(void)
{
addr_t start, len;
if (syslinux_memmap_largest(amap, SMT_FREE, &start, &len) || len < 64)
return; /* Not much we can do, here... */
regs.esp = (start + len - 32) & ~15;
dprintf("Mapping stack at 0x%08x\n", regs.esp);
syslinux_add_memmap(&mmap, regs.esp, 32, SMT_ZERO);
} | false | false | false | false | false | 0 |
Curl_sec_end(struct connectdata *conn)
{
if(conn->mech != NULL && conn->mech->end)
conn->mech->end(conn->app_data);
if(conn->app_data) {
free(conn->app_data);
conn->app_data = NULL;
}
if(conn->in_buffer.data) {
free(conn->in_buffer.data);
conn->in_buffer.data = NULL;
conn->in_buffer.size... | false | false | false | false | false | 0 |
garcon_menu_merger_find_menu (GNode *node,
gchar **path,
gint position,
gint depth,
GNode **parent)
{
GNode *result = NULL;
GNode *child;
g_return_val_if_fail (position <= depth, NULL);
... | false | false | false | false | false | 0 |
ufshcd_system_suspend(struct ufs_hba *hba)
{
int ret = 0;
if (!hba || !hba->is_powered)
return 0;
if (pm_runtime_suspended(hba->dev)) {
if (hba->rpm_lvl == hba->spm_lvl)
/*
* There is possibility that device may still be in
* active state during the runtime suspend.
*/
if ((ufs_get_pm_lvl_to_... | false | false | false | false | false | 0 |
__btrfs_set_prop(struct btrfs_trans_handle *trans,
struct inode *inode,
const char *name,
const char *value,
size_t value_len,
int flags)
{
const struct prop_handler *handler;
int ret;
if (strlen(name) <= XATTR_BTRFS_PREFIX_LEN)
return -EINVAL;
handler = find_prop_handler(name... | false | false | false | false | false | 0 |
slapi_rdn_init_all_dn(Slapi_RDN *rdn, const char *dn)
{
int rc = 0; /* success */
Slapi_DN sdn;
if (NULL == rdn || NULL == dn)
{
return -1;
}
slapi_rdn_init(rdn);
slapi_sdn_init(&sdn);
slapi_sdn_set_dn_byval(&sdn, dn);
rc = _slapi_rdn_init_all_dn_ext(rdn, (const Slapi_DN *)&sdn);
slapi_sdn_done(&sdn);
ret... | false | false | false | false | false | 0 |
resolve_one_addr (rtx *addr, void *data ATTRIBUTE_UNUSED)
{
rtx rtl = *addr;
if (GET_CODE (rtl) == CONST_STRING)
{
size_t len = strlen (XSTR (rtl, 0)) + 1;
tree t = build_string (len, XSTR (rtl, 0));
tree tlen = size_int (len - 1);
TREE_TYPE (t)
= build_array_type (char_type_node, buil... | false | false | false | false | false | 0 |
process_dellink(unsigned short type, int index, unsigned flags,
unsigned change, struct ifinfomsg *msg, int bytes)
{
struct rtnl_link_stats stats;
unsigned char operstate = 0xff;
const char *ifname = NULL;
GSList *list;
memset(&stats, 0, sizeof(stats));
if (extract_link(msg, bytes, NULL, &ifname, NULL, &opers... | false | false | false | false | false | 0 |
remap_hint_predicate_after_duplication (struct predicate **p,
clause_t possible_truths,
struct inline_summary *info)
{
struct predicate new_predicate;
if (!*p)
return;
new_predicate = remap_predicate_after_duplication (*p,
possible_truths, info);
/* We do not want to free previous pre... | false | false | false | false | false | 0 |
snd_pcm_oss_proc_free_setup_list(struct snd_pcm_str * pstr)
{
struct snd_pcm_oss_setup *setup, *setupn;
for (setup = pstr->oss.setup_list, pstr->oss.setup_list = NULL;
setup; setup = setupn) {
setupn = setup->next;
kfree(setup->task_name);
kfree(setup);
}
pstr->oss.setup_list = NULL;
} | false | false | false | false | false | 0 |
last_uniq_key(TABLE *table,uint keynr)
{
/*
When an underlying storage engine informs that the unique key
conflicts are not reported in the ascending order by setting
the HA_DUPLICATE_KEY_NOT_IN_ORDER flag, we cannot rely on this
information to determine the last key conflict.
The information ... | false | false | false | false | false | 0 |
recentFilesMenuAboutToShow()
{
QStringList recentFiles;
QMenu *popup = _recentFilesMenuAction->menu();
popup->clear();
ConfigGroup* generalConfig = ConfigStorage::group("GeneralSettings");
recentFiles = generalConfig->value("RecentFiles",
QStringList()).toStringList();
delete genera... | false | false | false | false | false | 0 |
x264_ratecontrol_delete( x264_t *h )
{
x264_ratecontrol_t *rc = h->rc;
int b_regular_file;
if( rc->p_stat_file_out )
{
b_regular_file = x264_is_regular_file( rc->p_stat_file_out );
fclose( rc->p_stat_file_out );
if( h->i_frame >= rc->num_entries && b_regular_file )
i... | false | false | false | false | false | 0 |
zsquaremod(ZVALUE z1, ZVALUE z2, ZVALUE *res)
{
ZVALUE tmp;
FULL prod;
FULL digit;
if (ziszero(z2) || zisneg(z2))
math_error("Mod of non-positive integer");
/*NOTREACHED*/
if (ziszero(z1) || zisunit(z2)) {
*res = _zero_;
return;
}
/*
* If the modulus is a single digit number, then do the result
* c... | false | false | false | false | false | 0 |
str_charAt(JSContext *cx, uintN argc, jsval *vp)
{
jsval t;
JSString *str;
jsint i;
jsdouble d;
t = vp[1];
if (JSVAL_IS_STRING(t) && argc != 0 && JSVAL_IS_INT(vp[2])) {
str = JSVAL_TO_STRING(t);
i = JSVAL_TO_INT(vp[2]);
if ((size_t)i >= str->length())
goto ou... | false | false | false | false | false | 0 |
ir_set_termios_callback(struct urb *urb)
{
kfree(urb->transfer_buffer);
if (urb->status)
dev_dbg(&urb->dev->dev, "%s - non-zero urb status: %d\n",
__func__, urb->status);
} | 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.