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 |
|---|---|---|---|---|---|---|
DBGridOperation (DBObjData *grdData,DBFloat constant,DBInt oper)
{
DBInt layerID;
DBFloat value;
DBPosition pos;
DBObjRecord *layerRec;
DBGridIF *gridIF = new DBGridIF (grdData);
for (layerID = 0;layerID < gridIF->LayerNum ();++layerID)
{
layerRec = gridIF->Layer (layerID);
if ((layerRec->Flags () & DBOb... | false | false | false | false | false | 0 |
isFunction(const Token *tok, const Scope* outerScope, const Token **funcStart, const Token **argStart)
{
// function returning function pointer? '... ( ... %var% ( ... ))( ... ) {'
if (tok->str() == "(" &&
tok->link()->previous()->str() == ")" &&
tok->link()->next() &&
tok->link()->next(... | false | false | false | false | false | 0 |
H5B2_internal_free(H5B2_internal_t *internal)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
*/
HDassert(internal);
/* Release internal node's native key buffer */
if(internal->int_native)
internal->int_native = (uint8_... | false | false | false | false | false | 0 |
js_GetLocalizedErrorMessage(JSContext* cx, void *userRef, const char *locale,
const uintN errorNumber)
{
const JSErrorFormatString *errorString = NULL;
if (cx->localeCallbacks && cx->localeCallbacks->localeGetErrorMessage) {
errorString = cx->localeCallbacks
... | false | false | false | false | false | 0 |
sim_load_file (sd, myname, callback, prog, prog_bfd, verbose_p, lma_p, do_write)
SIM_DESC sd;
const char *myname;
host_callback *callback;
char *prog;
bfd *prog_bfd;
int verbose_p;
int lma_p;
sim_write_fn do_write;
{
asection *s;
/* Record separately as we don't want to close... | false | false | false | false | false | 0 |
createBufferClone(void * /*stackBuffer*/,
int32_t &bufferSize,
UErrorCode &status)
{
if (U_FAILURE(status)){
return NULL;
}
if (bufferSize == 0) {
bufferSize = 1; // preflighting for deprecated functionality
retu... | false | false | false | false | false | 0 |
srtp_stream_dealloc(srtp_t session, srtp_stream_ctx_t *stream) {
err_status_t status;
/*
* we use a conservative deallocation strategy - if any deallocation
* fails, then we report that fact without trying to deallocate
* anything else
*/
/* deallocate cipher, if it is not the same as that in tem... | false | false | false | false | false | 0 |
config_fname(ConfigArgs *c) {
if(c->op == SLAP_CONFIG_EMIT) {
if (c->ca_private) {
ConfigFile *cf = c->ca_private;
value_add_one( &c->rvalue_vals, &cf->c_file );
return 0;
}
return 1;
}
return(0);
} | false | false | false | false | false | 0 |
main(int argc,
char **argv)
{
l_int32 i;
PIX *pix;
PIXA *pixa;
for (i = 0; i < NTests; i++)
GenerateSplitPlot(i);
/* Read the results back in ... */
pixa = pixaCreate(0);
for (i = 0; i < NTests; i++) {
sprintf(buf, "/tmp/junkplot.%d.png", i);
pix = pixRe... | false | false | false | false | false | 0 |
change_temp_in_subexpression(Module_table*mpt,
Quadruple *qr_head,
int entry,
int *flg)
{
Quadruple *qpt;
Temp_table **tpt;
int i;
tpt = (Temp_table **)malloc(sizeof(Temp_table *));
qpt = qr_head;
while (qpt != NULL) {
for (i = 0; i < 4; i++)
cha... | false | false | false | false | false | 0 |
mdb_monitor_db_init( BackendDB *be )
{
struct mdb_info *mdb = (struct mdb_info *) be->be_private;
if ( mdb_monitor_initialize() == LDAP_SUCCESS ) {
/* monitoring in back-mdb is on by default */
SLAP_DBFLAGS( be ) |= SLAP_DBFLAG_MONITORING;
}
#ifdef MDB_MONITOR_IDX
mdb->mi_idx = NULL;
ldap_pvt_thread_mutex_i... | false | false | false | false | false | 0 |
soup_session_queue_message (SoupSession *session, SoupMessage *msg,
SoupSessionCallback callback, gpointer user_data)
{
g_return_if_fail (SOUP_IS_SESSION (session));
g_return_if_fail (SOUP_IS_MESSAGE (msg));
SOUP_SESSION_GET_CLASS (session)->queue_message (session, msg,
callback, user_data);
/* The ... | false | false | false | true | false | 1 |
hdmi_3d_structure_get_name(enum hdmi_3d_structure s3d_struct)
{
if (s3d_struct < 0 || s3d_struct > 0xf)
return "Invalid";
switch (s3d_struct) {
case HDMI_3D_STRUCTURE_FRAME_PACKING:
return "Frame Packing";
case HDMI_3D_STRUCTURE_FIELD_ALTERNATIVE:
return "Field Alternative";
case HDMI_3D_STRUCTURE_LINE_ALTE... | false | false | false | false | false | 0 |
notice_thread_init()
{
pthread_attr_t attr;
slurm_attr_init(&attr);
if (pthread_create(&lock_warning_thread, &attr,
&_print_lock_warn, NULL))
error ("pthread_create error %m");
slurm_attr_destroy(&attr);
return SLURM_SUCCESS;
} | false | false | false | false | false | 0 |
flipItem(Qt::Orientations orientation) {
int xScale; int yScale;
if(orientation == Qt::Vertical) {
xScale = 1;
yScale = -1;
} else if(orientation == Qt::Horizontal) {
xScale = -1;
yScale = 1;
}
else {
return;
}
transformItem(QTransform().scale(xScale,yScale), false);
} | false | false | false | false | false | 0 |
mask_shift (unsigned long mask)
{
int n = 0;
if (!mask)
return 0;
while (!(mask & 1)) {
n++;
mask >>= 1;
}
return n;
} | false | false | false | false | false | 0 |
bClear( void )
{
bool bRtn=TRUE;
// Clear the base class
if( ! PnlAnaBase::bClear( ) ) bRtn = FALSE;
// Set the sweep parameters to their defaults
m_oPnlStart.bSetValue( (float) 0.0 );
m_oPnlStop .bSetValue( (float) 100.0 );
m_oPnlStep .bSetValue( (float) 10.0 );
// Set the default sweep type
m... | false | false | false | false | false | 0 |
predict_lp420(jxr_image_t image, int tx, int mx, int my, int ch, int mblp_mode)
{
switch (mblp_mode) {
case 0: /* left */
CHECK1(image->lwf_test, MACROBLK_CUR_LP(image,ch,tx,mx,1));
MACROBLK_CUR_LP(image,ch,tx,mx,1) += MACROBLK_CUR(image,ch,tx,mx-1).pred_dclp[2];
break;
... | false | false | false | false | false | 0 |
decode(const EncodedAudioFrame& ef, boost::uint32_t& outputSize)
{
outputSize = 0;
GstBuffer* gstbuf;
EncodedExtraGstData* extradata = dynamic_cast<EncodedExtraGstData*>(ef.extradata.get());
if (extradata) {
gstbuf = extradata->buffer;
} else {
gstbuf = gst_buffer_new... | false | false | false | false | false | 0 |
set_to_null()
{
if (!pd_null) {
setNumComponents(0);
}
pd_null = 1;
pd_curr_index = -1;
} | false | false | false | false | false | 0 |
add_relation_rb(struct btrfs_fs_info *fs_info,
u64 memberid, u64 parentid)
{
struct btrfs_qgroup *member;
struct btrfs_qgroup *parent;
struct btrfs_qgroup_list *list;
member = find_qgroup_rb(fs_info, memberid);
parent = find_qgroup_rb(fs_info, parentid);
if (!member || !parent)
return -ENOENT;
list = k... | false | false | false | false | false | 0 |
get_name_from_windows (WnckClassGroup *class_group)
{
const char *first_name;
GList *l;
/* Try to get the name from windows, following the same rationale as
* get_name_from_applications()
*/
first_name = NULL;
for (l = class_group->priv->windows; l; l = l->next)
{
WnckWindow *window;
... | false | false | false | false | false | 0 |
report_text_subtitle(ReportContext * ctx, gchar * text)
{
gchar *str = ctx->output;
int i = strlen(text);
str = h_strdup_cprintf("\n%s\n", str, text);
for (; i; i--)
str = h_strconcat(str, "-", NULL);
str = h_strconcat(str, "\n\n", NULL);
ctx->output = str;
} | false | false | false | false | false | 0 |
split_cmdline(char *cmdline, const char ***argv)
{
int src, dst, count = 0, size = 16;
char quoted = 0;
*argv = xmalloc(sizeof(char*) * size);
/* split alias_string */
(*argv)[count++] = cmdline;
for (src = dst = 0; cmdline[src];) {
char c = cmdline[src];
if (!quoted && isspace(c)) {
cmdline[dst++] = 0;
... | false | false | false | false | false | 0 |
gs_setpatternspace(gs_state * pgs)
{
int code = 0;
gs_color_space *ccs_old;
if (pgs->in_cachedevice)
return_error(gs_error_undefined);
ccs_old = gs_currentcolorspace_inline(pgs);
if (ccs_old->type->index != gs_color_space_index_Pattern) {
gs_color_space *pcs;
pcs = gs_cspac... | false | false | false | false | false | 0 |
shownum_signed(const long long n, const int padzero, const int numpad, char * const numbuf, const int space) {
unsigned long long m;
int i = 0;
m = (unsigned long long) (n < 0 ? n * -1 : n);
if ((long long) m != n) {
numbuf[0] = '-';
i = shownum_unsigned(m,padzero,numpad - 1,&numbuf[1],space - 1);
if (i == -... | false | false | false | false | false | 0 |
get_swiss_feature(char *line, sint len)
{
char c, s, feature[MAXLINE+1];
int i, start_pos, end_pos;
if (sscanf(line,"%s%d%d",feature,&start_pos,&end_pos) != 3) {
return;
}
if (strcmp(feature,"HELIX") == 0) {
c = 'A';
s = '$';
}
else if (strcmp(feature,"STRAND") == 0) {
c = 'B';
s = '%';
}
else
... | true | true | false | false | true | 1 |
flmUnlinkFileFromNUList(
FFILE * pFile /* File to be unlinked from unused list. */
)
{
if (pFile->uiFlags & DBF_IN_NU_LIST)
{
if (!pFile->pPrevNUFile)
{
gv_FlmSysData.pMrnuFile = pFile->pNextNUFile;
}
else
{
pFile->pPrevNUFile->pNextNUFile = pFile->pNextNUFile;
}
if (!pFile->pNextNUFile)
... | false | false | false | false | false | 0 |
checkfile(std::string &name,DirEntry &info,DirEntry::object_info_level mode) {
std::list<DirectAccess>::iterator i=control_dir(name,true);
if(i==access.end()) return 1; /* error ? */
/* TODO check permissions of higher level directory */
std::string dname=name;
if(!remove_last_name(dname)) {
/* information... | false | false | false | false | false | 0 |
_PLfuse_read (const char *file, char *buf, size_t buflen, off_t off,
struct fuse_file_info *fi) {
int rv;
#ifndef PERL_HAS_64BITINT
char *temp;
#endif
FUSE_CONTEXT_PRE;
DEBUGf("read begin\n");
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(file ? sv_2mortal(newSVpv(file,0)) : &PL_sv_undef);
XPUSHs(sv_2mortal(newSViv(... | false | false | false | false | false | 0 |
setAllInteractingClassesIds(const QVector<int> &ids)
{
d_drug->m_InteractingClasses = ids;
d_drug->m_AllIds = d_drug->m_7CharsAtc + d_drug->m_InteractingClasses;
d_drug->m_AllAtcCodes.clear();
} | false | false | false | false | false | 0 |
destroy_addr_hash_val(gpointer value)
{
GSList *list = (GSList*) value;
GSList *walk;
for(walk = list; walk; walk = walk->next) {
AddrDupListEntry *entry = (AddrDupListEntry*) walk->data;
if(entry && entry->book_path)
g_free(entry->book_path);
if(entry)
g_free(entry);
}
if(list)
g_slist_free(list);
... | false | false | false | false | false | 0 |
OwnPrimarySelection() {
return ((gdk_selection_owner_get(GDK_SELECTION_PRIMARY)
== PWindow(wMain)) &&
(PWindow(wMain) != NULL));
} | false | false | false | false | false | 0 |
draw_background(void)
{
int i;
const int bottom_border = VIDEO_BORDER +
(TEXT_PIXEL_ROWS % __vesacon_font_height);
const int right_border = VIDEO_BORDER + (TEXT_PIXEL_COLS % FONT_WIDTH);
for (i = 0; i < VIDEO_BORDER; i++)
draw_background_line(i, 0, __vesa_info.mi.h_res);
for (i = VIDEO_BORDER; i... | false | false | false | false | false | 0 |
add_channel(char *cname) {
Channel *c;
int fd;
char *name = striplower(cname);
for(c = channels; c; c = c->next)
if(!strcmp(name, c->name))
return; /* already handled */
fd = open_channel(name);
if(fd == -1) {
printf("ii: exiting, cannot create in channel: %s\n", name);
exit(EXIT_FAILURE);
}
c = call... | false | false | false | false | false | 0 |
list(int nlflag)
{
union node *n1, *n2, *n3;
int tok;
checkkwd = CHKNL | CHKKWD | CHKALIAS;
if (nlflag == 2 && tokendlist[peektoken()])
return NULL;
n1 = NULL;
for (;;) {
n2 = andor();
tok = readtoken();
if (tok == TBACKGND) {
if (n2->type == NPIPE) {
n2->npipe.backgnd = 1;
} else {
if (n2-... | false | false | false | false | false | 0 |
fsm_search(Relation rel, uint8 min_cat)
{
int restarts = 0;
FSMAddress addr = FSM_ROOT_ADDRESS;
for (;;)
{
int slot;
Buffer buf;
uint8 max_avail = 0;
/* Read the FSM page. */
buf = fsm_readbuf(rel, addr, false);
/* Search within the page */
if (BufferIsValid(buf))
{
LockBuffer(buf, BUFFE... | false | false | false | false | false | 0 |
usb_set_sens(void)
{
int result;
char* cmd;
if (!usb_read_int_from_ups(ups, CI_SENS, &result)) {
pmsg("\nI don't know how to control the alarm settings on your UPS.\n");
return;
}
pmsg("Current sensitivity setting: ");
switch(result) {
case 0:
pmsg("LOW\n");
break;
c... | false | false | false | false | false | 0 |
paint_ptr(unsigned long ptr, int color)
{
struct kmemleak_object *object;
object = find_and_get_object(ptr, 0);
if (!object) {
kmemleak_warn("Trying to color unknown object "
"at 0x%08lx as %s\n", ptr,
(color == KMEMLEAK_GREY) ? "Grey" :
(color == KMEMLEAK_BLACK) ? "Black" : "Unknown");... | false | false | false | false | false | 0 |
rtw_select_and_join_from_scanned_queue23a(struct mlme_priv *pmlmepriv)
{
struct rtw_adapter *adapter;
struct wlan_network *candidate = NULL;
int ret;
adapter = pmlmepriv->nic_hdl;
candidate = rtw_select_candidate_from_queue(pmlmepriv);
if (!candidate) {
DBG_8723A("%s: return _FAIL(candidate == NULL)\n", __fun... | false | false | false | false | false | 0 |
min_nbuf(const problem_rdft2 *p, INT n, INT vl)
{
INT is, os, ivs, ovs;
if (p->r0 != p->cr)
return 1;
if (X(rdft2_inplace_strides(p, RNK_MINFTY)))
return 1;
A(p->vecsz->rnk == 1); /* rank 0 and MINFTY are inplace */
X(rdft2_strides)(p->kind, p->sz->dims, &is, &os);
X(rdft2_strides... | false | false | false | false | false | 0 |
statement_db_write_tree(
statement* stmt,
FILE* ofile
) { PROFILE(STATEMENT_DB_WRITE_TREE);
if( stmt != NULL ) {
/* Traverse down the rest of the statement block */
if( (stmt->next_true == stmt->next_false) && (stmt->suppl.part.stop_true == 0) ) {
statement_db_write_tree( stmt->next_true, ofi... | false | false | false | false | false | 0 |
l_productMatVec(l_float32 *mat,
l_float32 *vecs,
l_float32 *vecd,
l_int32 size)
{
l_int32 i, j;
PROCNAME("l_productMatVec");
if (!mat)
return ERROR_INT("matrix not defined", procName, 1);
if (!vecs)
return ERROR_INT("input vector not ... | false | false | false | false | false | 0 |
sql_cmd(QString &query, QStringList &results)
{
int conn;
if (!getDirComm(conn)) {
return false;
}
return sql_cmd(conn, query.toUtf8().data(), results, true);
} | false | false | false | false | false | 0 |
isns_get_ip(int fd)
{
int err, i;
uint32_t addr;
union {
struct sockaddr s;
struct sockaddr_storage ss;
struct sockaddr_in s4;
struct sockaddr_in6 s6;
} l;
socklen_t slen = sizeof(l.s);
err = getsockname(fd, &l.s, &slen);
if (err) {
log_error("getsockname error %s!", gai_strerror(err));
return err;
... | false | false | false | false | false | 0 |
au_h_verify_dentry(struct dentry *h_dentry, struct dentry *h_parent,
struct au_branch *br)
{
int err;
struct au_iattr ia;
struct inode *h_inode;
struct dentry *h_d;
struct super_block *h_sb;
err = 0;
memset(&ia, -1, sizeof(ia));
h_sb = h_dentry->d_sb;
h_inode = NULL;
if (d_is_positive(h_dentry)) {
... | false | false | false | false | false | 0 |
sema_msglist_free(sema_msglist *mlist) {
struct sema_msg *pmsg = NULL;
if(mlist == NULL) return;
while( sema_msglist_pop(mlist, &pmsg) == 1 ) {
if(pmsg==NULL) break;
sema_msg_free(pmsg);
pmsg = NULL;
}
gw_free(mlist);
mlist->count = 0;
} | false | false | false | false | false | 0 |
SendRequest() {
std::stringstream ss;
ss << "CONNECT " << dest_.ToString() << " HTTP/1.0\r\n";
ss << "User-Agent: " << agent_ << "\r\n";
ss << "Host: " << dest_.IPAsString() << "\r\n";
ss << "Content-Length: 0\r\n";
ss << "Proxy-Connection: Keep-Alive\r\n";
ss << headers_;
ss << "\r\n";
std::string st... | false | false | false | false | false | 0 |
cl_eos(void) /* free after Robert Viduya */
{
/* must only be called with curx = 1 */
if(nh_CD)
{
xputs(nh_CD);
}
else
{
register int cy = ttyDisplay->cury+1;
while(cy <= LI-2) {
cl_end();
xputc('\n');
cy++;
}
cl_en... | false | false | false | false | false | 0 |
writePrefixForEnd(const SystemResourcesFlash&f)
{
for(int i= 0;i<MAXLEN;i++)
prefix_end[i]= ' ';
double mb= 1024*1024;
SystemResourcesFlash difnow;
difnow.diff(f);
sprintf(prefix_end,"%07.6g",f.elapsed+difnow.elapsed);
sprintf(prefix_end+7,":E%05d",ord);
sprintf(prefix_end+14,":%1.1f",difnow.load_avg);
sprintf(prefix_e... | false | false | false | false | false | 0 |
WritePositionTable(struct _cms_typehandler_struct* self,
cmsIOHANDLER* io,
cmsUInt32Number SizeOfTag,
cmsUInt32Number Count,
cmsUInt32Number BaseOffset,
void *Car... | false | false | false | false | false | 0 |
pipe_error_msg(char *cmd, char *op, char *res)
{
static char ebuf[512];
snprintf(ebuf, 256, "Pipe can't %.256s \"%.32sb\": %.223s",
op ? op : "?", cmd ? cmd : "?", res ? res : "?");
return(ebuf);
} | true | true | false | false | false | 1 |
renderTextNoBidi(const WidgetLookFeel& wlf,
const String& text,
const Rect& text_area,
float text_offset)
{
Font* const font = d_window->getFont();
// setup initial rect for text formatting
... | false | false | false | false | false | 0 |
process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
LETag scriptTag, LETag languageTag,
const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, LEErrorCode &success,
... | false | false | false | false | false | 0 |
parse_time_t_args(PyObject *args, char *format, time_t *pwhen)
{
PyObject *ot = NULL;
time_t whent;
if (!PyArg_ParseTuple(args, format, &ot))
return 0;
if (ot == NULL || ot == Py_None) {
whent = time(NULL);
}
else {
if (_PyTime_ObjectToTime_t(ot, &whent, _PyTime_ROUND_DO... | false | false | false | false | false | 0 |
hw_clock_is_utc(const bool utc, const bool local_opt,
const struct adjtime adjtime)
{
bool ret;
if (utc)
ret = TRUE; /* --utc explicitly given on command line */
else if (local_opt)
ret = FALSE; /* --localtime explicitly given */
else
/* get info from adjtime file - default is UTC */
ret = (adjtime.local... | false | false | false | false | false | 0 |
nntp_folder_info_from_name (CamelNNTPStore *store,
gboolean short_notation,
const gchar *name)
{
CamelFolderInfo *fi;
fi = camel_folder_info_new ();
fi->full_name = g_strdup (name);
if (short_notation)
fi->display_name = nntp_newsgroup_name_short (name);
... | false | false | false | false | false | 0 |
FreeStructFromINCHI( inchi_OutputStruct *out )
{
if ( out->atom ) {
inchi_free( out->atom );
}
if ( out->stereo0D ) {
inchi_free( out->stereo0D );
}
if ( out->szLog ) {
inchi_free( out->szLog );
}
if ( out->szMessage ) {
inchi_free( out->szMessage );
}
... | false | false | false | false | false | 0 |
initds_(doublereal *os, integer *nos, real *eta)
{
/* System generated locals */
integer ret_val, i__1;
real r__1;
/* Local variables */
integer i__ = 0, ii;
real err;
extern /* Subroutine */ int xermsg_(const char *, const char *, const char *, integer *,
integer *, ftnlen, ftn... | false | false | false | false | false | 0 |
get_bytes(unsigned int reader_index, unsigned char *buffer, int length)
{
int offset = serialDevice[reader_index].buffer_offset;
int offset_last = serialDevice[reader_index].buffer_offset_last;
DEBUG_COMM3("available: %d, needed: %d", offset_last-offset,
length);
/* enough data are available */
if (offset + len... | false | true | false | false | false | 1 |
qla4xxx_set_ifcb(struct scsi_qla_host *ha, uint32_t *mbox_cmd,
uint32_t *mbox_sts, dma_addr_t init_fw_cb_dma)
{
memset(mbox_cmd, 0, sizeof(mbox_cmd[0]) * MBOX_REG_COUNT);
memset(mbox_sts, 0, sizeof(mbox_sts[0]) * MBOX_REG_COUNT);
if (is_qla8022(ha))
qla4_82xx_wr_32(ha, ha->nx_db_wr_ptr, 0);
mbox_cmd[0] = MBO... | false | false | false | false | false | 0 |
stmReadTVar(Capability *cap,
StgTRecHeader *trec,
StgTVar *tvar) {
StgTRecHeader *entry_in = NULL;
StgClosure *result = NULL;
TRecEntry *entry = NULL;
TRACE("%p : stmReadTVar(%p)", trec, tvar);
ASSERT (trec != NO_TREC);
ASSERT (trec -> state == TREC_ACTIVE ||
trec -> s... | false | false | false | false | false | 0 |
gf100_fifo_engidx(struct gf100_fifo *fifo, u32 engn)
{
switch (engn) {
case NVKM_ENGINE_GR : engn = 0; break;
case NVKM_ENGINE_MSVLD : engn = 1; break;
case NVKM_ENGINE_MSPPP : engn = 2; break;
case NVKM_ENGINE_MSPDEC: engn = 3; break;
case NVKM_ENGINE_CE0 : engn = 4; break;
case NVKM_ENGINE_CE1 : engn = ... | false | false | false | false | false | 0 |
adlib_init_lists(void)
{
int i;
for(i = 0 ; i < ADLIB_VOICES ; i++) {
oper_note[i] = 255;
oper_chn[i] = 255;
note_time[i] = 0;
}
free_voices = ADLIB_VOICES;
} | false | false | false | false | false | 0 |
tree_nop_conversion (const_tree exp)
{
tree outer_type, inner_type;
if (!CONVERT_EXPR_P (exp)
&& TREE_CODE (exp) != NON_LVALUE_EXPR)
return false;
if (TREE_OPERAND (exp, 0) == error_mark_node)
return false;
outer_type = TREE_TYPE (exp);
inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
if (!i... | false | false | false | false | false | 0 |
elm_toolbar_item_state_add(Elm_Object_Item *it, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
Elm_Toolbar_Item_State *it_state;
Evas_Object *icon_obj;
Evas_Object *obj;
Widget_Data *wd;
Elm_Toolbar_Item *item = (Elm_Toolbar_Item *... | false | false | false | false | false | 0 |
declare_term_attribute_inheritable(int id)
{
if (Attribute_names[id].type != TERM_ATTRIBUTE)
fatal_error("declare_term_attribute_inheritable, bad id");
Attribute_names[id].inheritable = TRUE;
} | false | false | false | false | false | 0 |
jtagmkII_open32(PROGRAMMER * pgm, char * port)
{
int status;
unsigned char buf[6], *resp;
long baud;
if (verbose >= 2)
fprintf(stderr, "%s: jtagmkII_open32()\n", progname);
/*
* The JTAG ICE mkII always starts with a baud rate of 19200 Bd upon
* attaching. If the config file or command-line param... | true | true | false | false | false | 1 |
eq_pset(s1, s2)
Pset s1, s2;
{
return subset_pset(s1, s2) && subset_pset(s2, s1);
} | false | false | false | false | false | 0 |
city_tile_value(const struct city *pcity, const struct tile *ptile,
int foodneed, int prodneed)
{
int food = city_tile_output_now(pcity, ptile, O_FOOD);
int shield = city_tile_output_now(pcity, ptile, O_SHIELD);
int trade = city_tile_output_now(pcity, ptile, O_TRADE);
int value = 0;
/* Ea... | false | false | false | false | false | 0 |
zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func TSRMLS_DC, int num_args, ...)
{
zend_llist_element *element;
va_list args;
va_start(args, num_args);
for (element=l->head; element; element=element->next) {
func(element->data, num_args, args TSRMLS_CC);
}
va_end(args);
} | false | false | false | false | false | 0 |
testSubsumption ( bool upDirection, TaxonomyVertex* cur )
{
const TConcept* testC = static_cast<const TConcept*>(cur->getPrimer());
if ( upDirection )
return testSub ( testC, curConcept() );
else
return testSub ( curConcept(), testC );
} | false | false | false | false | false | 0 |
cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
struct net_device *netdev,
struct cfg80211_pmksa *pmksa)
{
u8 index, blInserted = false;
struct rtw_adapter *padapter = wiphy_to_adapter(wiphy);
struct security_priv *psecuritypriv = &padapter->securitypriv;
DBG_8723A("%s(%s)\n", __func__, netdev->name);
if... | false | true | false | false | false | 1 |
_hash_log2(uint32 num)
{
uint32 i,
limit;
limit = 1;
for (i = 0; limit < num; limit <<= 1, i++)
;
return i;
} | false | false | false | false | false | 0 |
read_one_check_directory(PrintCheckDialog *pcd, GtkListStore *store,
const gchar *groupname, const gchar *dirname)
{
check_format_t *format, *existing;
GDir *dir;
const gchar *filename;
GtkTreeIter iter;
GtkWidget *dialog;
gboolean found = FALSE;
dir = g_dir_open(di... | false | false | false | false | false | 0 |
printtable(Paragraph *pp, MMIOT *f)
{
/* header, dashes, then lines of content */
Line *hdr, *dash, *body;
Istring align;
int start;
int hcols;
char *p;
if ( !(pp->text && pp->text->next) )
return 0;
hdr = pp->text;
dash= hdr->next;
body= dash->next;
/* first figure out ... | false | false | false | false | false | 0 |
settings_window_change_color(GtkColorButton *button)
{
START_FUNC
GdkColor color;
gchar strcolor[8];
enum settings_item item=settings_get_settings_name(GTK_WIDGET(button));
gtk_color_button_get_color(button, &color);
g_sprintf(strcolor, "#%02X%02X%02X", (color.red)>>8, (color.green)>>8, (color.blue)>>8);
setting... | false | false | false | false | false | 0 |
soap_out_ns__getImageResponse(struct soap *soap, const char *tag, int id, const struct ns__getImageResponse *a, const char *type)
{
(void)soap; (void)tag; (void)id; (void)type;
if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns__getImageResponse), type))
return soap->error;
if (a->ima... | false | false | false | false | false | 0 |
parq_probable_slot_time(const struct parq_ul_queue *q)
{
uint e;
double factor;
if (statx_n(q->slot_stats) < STAT_MIN_POINTS)
return 0;
STATIC_ASSERT(STAT_MIN_POINTS >= 2); /* Need 2 to compute variance */
/*
* 95% of the data will fall below the average + 2 standard deviation,
* assuming normal distribut... | false | false | false | false | false | 0 |
Unpack(const Buffer *b)
{
unpack_status_t res;
res=Packet::Unpack(b);
if(res!=UNPACK_SUCCESS)
return res;
int bytes=length+4-unpacked;
bitfield=new BitField(bytes*8);
memcpy(bitfield->get_non_const(),b->Get()+unpacked,bytes);
unpacked+=bytes;
return UNPACK_SUCCESS;
} | false | false | false | false | false | 0 |
subimage2affines(int lp)
{
double *f=sp->transforms[lp].loaded2subimage;
double *b=sp->transforms[lp].subimage2loaded;
gtk_subimage_sel_t *sis= &(sp->subimasel[lp]);
double srcxcen=sis->subimage.x+ (double)sis->subimage.width/2.0,
dstxcen=(double)sp->resulting_width/2.0;
if(image_settings_get_value("pre... | false | false | false | false | false | 0 |
ad5421_probe(struct spi_device *spi)
{
struct ad5421_platform_data *pdata = dev_get_platdata(&spi->dev);
struct iio_dev *indio_dev;
struct ad5421_state *st;
int ret;
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
if (indio_dev == NULL) {
dev_err(&spi->dev, "Failed to allocate iio device\n");
retu... | false | false | false | false | false | 0 |
wstring_list_member(wstring_list_ty *wlp, wstring_ty *w)
{
size_t j;
for (j = 0; j < wlp->nitems; j++)
if (wstr_equal(wlp->item[j], w))
return 1;
return 0;
} | false | false | false | false | false | 0 |
is_tunnel_qp(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp)
{
if (!mlx4_is_master(dev->dev))
return 0;
return qp->mqp.qpn >= dev->dev->phys_caps.base_tunnel_sqpn &&
qp->mqp.qpn < dev->dev->phys_caps.base_tunnel_sqpn +
8 * MLX4_MFUNC_MAX;
} | false | false | false | false | false | 0 |
makeSystem(
IBFabric *p_fabric,
string name,
string master,
map_str_str mods)
{
// ALGO:
// Find the master system definition
IBSysDef *p_sysDef = getSysDef(master);
if (! p_sysDef) {
cout << "-E- Fail to find definition for system:" << master << endl;
return NULL;
}
// Create the top leve... | false | false | false | false | false | 0 |
remove_tree(char *dirname)
{
DIR *sdir;
struct dirent *f;
struct stat dst;
sdir=opendir(dirname);
if(sdir==NULL) { /* Cannot open session directory. */
return -1;
}
while((f=readdir(sdir))!=NULL) {
char fname[255];
if(strcmp(".",f->d_name)==0 || strcmp("..",f->d_name)==0) continue;
sn... | true | true | true | false | false | 1 |
spanish_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c; /* do, line 216 */
{ int ret = r_mark_regions(z);
if (ret == 0) goto lab0; /* call mark_regions, line 216 */
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards,... | false | false | false | false | false | 0 |
print_layout_select_cb(GtkWidget *widget, gpointer data)
{
PrintWindow *pw = data;
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) return;
pw->layout = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "print_layout"));
print_window_layout_sync_layout(pw);
print_window_layout_size(pw);
} | false | false | false | false | false | 0 |
icalrecurrencetype_add_as_xxx(struct icalrecurrencetype *recur, void *obj,
void (*add_int)(void *, const char *, int),
void (*add_str)(void *, const char *,
const char *))
{
int i, j;
if (recur->freq == ICAL_NO_RECURRENCE) return;
add_str(obj, "freq", icalrecur_freq_to_string(recur-... | true | true | false | false | false | 1 |
init_db(const char *template_dir, unsigned int flags)
{
int reinit;
const char *git_dir = get_git_dir();
if (git_link)
separate_git_dir(git_dir);
safe_create_dir(git_dir, 0);
init_is_bare_repository = is_bare_repository();
/* Check to see if the repository version is right.
* Note that a newly created rep... | false | false | false | false | false | 0 |
GFXwritebitmap (int argc, lvar_t *argv) {
int bi, ioi;
if (
getint (argv[0].o, &ioi) == -1 || ioi < 0 || ioi > ion ||
!iop[ioi].inuse || getint (argv[1].o, &bi) == -1 || !ISABITMAP (bi)
)
return L_FAILURE;
Gwritebitmap (iop[ioi].ofp, bi);
return L_SUCCESS;
} | false | false | false | false | false | 0 |
execute()
{
if (access)
reg = cpu_pic->register_bank[register_address];
else if (cpu16->extended_instruction() && register_address < 0x60)
reg = cpu_pic->registers[register_address + cpu16->ind2.fsr_value];
else
reg = cpu_pic->registers[register_address];
reg->put(reg->get_value() | mask); ... | false | false | false | false | false | 0 |
documentLoaded()
{
if ( document()->pageMode() == Poppler::Document::UseAttach ) {
show();
}
} | false | false | false | false | false | 0 |
ldapqry_free_list_name_value( GList *list ) {
GList *node;
node = list;
while( node ) {
NameValuePair *nvp = ( NameValuePair * ) node->data;
ldapqry_free_name_value( nvp );
node->data = NULL;
node = g_list_next( node );
}
g_list_free( list );
} | false | false | false | false | false | 0 |
cell_command_is_var_length(uint8_t command, int linkproto)
{
/* If linkproto is v2 (2), CELL_VERSIONS is the only variable-length cells
* work as implemented here. If it's 1, there are no variable-length cells.
* Tor does not support other versions right now, and so can't negotiate
* them.
*/
switch (li... | false | false | false | false | false | 0 |
gdImageRotate (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent)
{
gdImagePtr pMidImg;
gdImagePtr rotatedImg;
if (src == NULL) {
return NULL;
}
if (!gdImageTrueColor(src) && (clrBack < 0 || clrBack>=gdImageColorsTotal(src))) {
return NULL;
}
while (dAngle >= 360.0) {
dAngle -= 360.0;
}... | false | false | false | false | false | 0 |
budget_ci_detach(struct saa7146_dev *dev)
{
struct budget_ci *budget_ci = (struct budget_ci *) dev->ext_priv;
struct saa7146_dev *saa = budget_ci->budget.dev;
int err;
if (budget_ci->budget.ci_present)
ciintf_deinit(budget_ci);
msp430_ir_deinit(budget_ci);
if (budget_ci->budget.dvb_frontend) {
dvb_unregister... | false | false | false | false | false | 0 |
rb_f_chop()
{
VALUE str = uscore_get();
if (RSTRING(str)->len > 0) {
str = rb_str_dup(str);
rb_str_chop_bang(str);
rb_lastline_set(str);
}
return str;
} | false | false | false | false | false | 0 |
pmbus_add_sensor_attrs_one(struct i2c_client *client,
struct pmbus_data *data,
const struct pmbus_driver_info *info,
const char *name,
int index, int page,
const struct pmbus_sensor_attr *attr)
{
struct pmbus_sensor *base;
int ret;
if (attr->label) {
ret = pmbus_a... | false | false | false | false | false | 0 |
call_frob_new_message (struct default_catalog_reader_ty *this, message_ty *mp,
const lex_pos_ty *msgid_pos,
const lex_pos_ty *msgstr_pos)
{
default_catalog_reader_class_ty *methods =
(default_catalog_reader_class_ty *) this->methods;
if (methods->frob_new_message)
... | 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.