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 |
|---|---|---|---|---|---|---|
grcan_transmit_catch_up(struct net_device *dev, int budget)
{
struct grcan_priv *priv = netdev_priv(dev);
unsigned long flags;
int work_done;
spin_lock_irqsave(&priv->lock, flags);
work_done = catch_up_echo_skb(dev, budget, true);
if (work_done) {
if (!priv->resetting && !priv->closing &&
!(priv->can.ct... | false | false | false | false | false | 0 |
texture_dump(const char *maptype, Lib3dsTextureMap *texture)
{
ASSERT(texture);
if (strlen(texture->name)==0) {
return;
}
printf(" %s:\n", maptype);
printf(" name: %s\n", texture->name);
printf(" flags: %X\n", (unsigned)texture->flags);
printf(" percent: %f\n", texture->perc... | false | false | false | false | false | 0 |
Term_erase(int x, int y, int n)
{
int i;
int w = Term->wid;
/* int h = Term->hgt; */
int x1 = -1;
int x2 = -1;
byte na = Term->attr_blank;
char nc = Term->char_blank;
byte *scr_aa;
char *scr_cc;
byte *scr_taa;
char *scr_tcc;
/* Place cursor */
if (Term_gotoxy(x, y)) return (-1);
/* Force legal size... | false | false | false | false | false | 0 |
failure() const
{
return !isRunning() && !d->success;
} | false | false | false | false | false | 0 |
H5S_hyper_free_span_info (H5S_hyper_span_info_t *span_info)
{
H5S_hyper_span_t *span, *next_span;
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_free_span_info)
HDassert(span_info);
/* Decrement the span tree's reference count */
span_info->count--;
... | false | false | false | false | false | 0 |
readADF(VimosTable *adf, VimosImage *adfImage)
{
char descVal[81];
/* validate input */
if (adf == NULL) {
return(VM_FALSE);
}
copyAllDescriptors(adfImage->descs, &(adf->descs));
readStringDescriptor(adf->descs, "ESO INS ADF TYPE", descVal, NULL);
/* make sure ADF types are ok */
if ( !strncmp(de... | true | true | false | false | false | 1 |
set_feature(char ***l, char *f, int v)
{
char **list = l ? *l : NULL, newval[256];
int count = 0;
snprintf(newval, sizeof(newval), "%s%s", v ? "" : "no-", f);
for(; list && *list; list++, count++)
if((**list == '\0') /* anything can replace an empty value */
|| !strucmp... | false | false | false | true | false | 1 |
_FSQRT_(const double x, const double missval1)
{
return FSQRT(x);
} | false | false | false | false | false | 0 |
PyVTKClass_vtkTIFFWriterNew(const char *modulename)
{
PyObject *cls = PyVTKClass_New(&PyvtkTIFFWriter_StaticNew,
PyvtkTIFFWriter_Methods,
"vtkTIFFWriter", modulename,
NULL, NULL,
PyvtkTIFFWriter_Doc(),
PyVTKClass_vtkImageWriterNew(modulename));
if (cls)
{
PyObject *d = PyVTKClass_GetDic... | false | false | false | false | false | 0 |
Itcl_IsClassCmd(clientData, interp, objc, objv)
ClientData clientData; /* class/object info */
Tcl_Interp *interp; /* current interpreter */
int objc; /* number of arguments */
Tcl_Obj *CONST objv[]; /* argument objects */
{
char *cname;
char *name;
... | false | false | false | false | false | 0 |
unmarshaltype_id(cdrStream& s) {
CORBA::ULong idlen;
CORBA::String_var id;
idlen <<= s;
if (!s.checkInputOverrun(1,idlen))
OMNIORB_THROW(MARSHAL,MARSHAL_SequenceIsTooLong,
(CORBA::CompletionStatus)s.completion());
switch (idlen) {
case 0:
#ifdef NO_SLOPPY_NIL_REFERENCE
OMNIORB_THROW(MARSHAL,... | false | false | false | false | false | 0 |
CommitToFile()
{
int nStatus = 0;
CPLErrorReset();
if ( m_pabyBuf == NULL )
{
CPLError(CE_Failure, CPLE_AssertionFailed,
"CommitToFile(): Block has not been initialized yet!");
return -1;
}
/*-----------------------------------------------------------------
... | false | false | false | false | false | 0 |
luaD_travstack (int (*fn)(TObject *))
{
StkId i;
for (i = (L->stack.top-1)-L->stack.stack; i>=0; i--)
fn(L->stack.stack+i);
} | false | false | false | false | false | 0 |
transaction1_read(struct tdb_context *tdb, tdb1_off_t off, void *buf,
tdb1_len_t len, int cv)
{
uint32_t blk;
/* break it down into block sized ops */
while (len + (off % tdb->tdb1.transaction->block_size) > tdb->tdb1.transaction->block_size) {
tdb1_len_t len2 = tdb->tdb1.transaction->block_size - (off % ... | false | true | false | false | false | 1 |
LF_LF_minus_LF (const cl_LF& x1, const cl_LF& x2)
{
// Methode:
// (- x1 x2) = (+ x1 (- x2))
if (TheLfloat(x2)->expo == 0)
{ return x1; }
else
{ var uintC len2 = TheLfloat(x2)->len;
var Lfloat mx2 = allocate_lfloat(len2, TheLfloat(x2)->expo, ~ TheLfloat(x2)->sign);
copy... | false | false | false | false | false | 0 |
soup_body_input_stream_can_seek (GSeekable *seekable)
{
SoupBodyInputStreamPrivate *priv = SOUP_BODY_INPUT_STREAM (seekable)->priv;
return priv->encoding == SOUP_ENCODING_CONTENT_LENGTH
&& G_IS_SEEKABLE (priv->base_stream)
&& g_seekable_can_seek (G_SEEKABLE (priv->base_stream));
} | false | false | false | false | false | 0 |
has_reschedule_unknown_change(lList *theOldConfEntries, lList *theNewConfEntries)
{
lListElem *old_elem = NULL;
lListElem *new_elem = NULL;
const char *old_value = NULL;
const char *new_value = NULL;
bool res = false;
DENTER(TOP_LAYER, "has_reschedule_unknown_change");
old_elem = lGetElemSt... | false | false | false | false | false | 0 |
DSDPDataMatGetRank(DSDPDataMat A, int *rank, int n){
int info;
DSDPFunctionBegin;
if (A.dsdpops->matgetrank){
info=(A.dsdpops->matgetrank)(A.matdata,rank,n); DSDPChkDataError(A,info);
} else {
DSDPNoOperationError(A);
}
DSDPFunctionReturn(0);
} | false | false | false | false | false | 0 |
igb_transmit ( struct net_device *netdev, struct io_buffer *iobuf )
{
struct igb_adapter *adapter = netdev_priv( netdev );
struct e1000_hw *hw = &adapter->hw;
uint32_t tx_curr = adapter->tx_tail;
struct e1000_tx_desc *tx_curr_desc;
DBGP ("igb_transmit\n");
if ( adapter->tx_fill_ctr == NUM_TX_DESC ) {
DBG ("TX... | false | false | false | false | false | 0 |
max8998_get_voltage_sel(struct regulator_dev *rdev)
{
struct max8998_data *max8998 = rdev_get_drvdata(rdev);
struct i2c_client *i2c = max8998->iodev->i2c;
int reg, shift = 0, mask, ret;
u8 val;
ret = max8998_get_voltage_register(rdev, ®, &shift, &mask);
if (ret)
return ret;
ret = max8998_read_reg(i2c, reg... | false | false | false | false | false | 0 |
loins_max_RC(loins_list* loins, char* output)
{
cell_list* cell;
char* ck=NULL;
int flip_flop=0;
double delay, max_delay=-1;
ptype_list* ptype;
port_list* port;
locon_list* locon;
char* input;
biabl_list* biabl;
if (!loins || !output) {
fprintf(stderr,"loins_max_RC: NULL pointer\... | false | false | false | true | false | 1 |
Realloc(void *old, size_t n)
{
char *s, *r;
unsigned long *x;
size_t nn;
s = (char *)old - 8;
x = (unsigned long *) s;
bytes_in_use -= *x;
bytes_in_use += n;
if (bytes_in_use > max_bytes_in_use) {
max_bytes_in_use = bytes_in_use;
}
nn = n + 8;
s = (char *) realloc(s, nn);
x = (unsigned lo... | false | false | false | false | false | 0 |
bfd_fill_in_gnu_debuglink_section (bfd *abfd,
struct bfd_section *sect,
const char *filename)
{
bfd_size_type debuglink_size;
unsigned long crc32;
char * contents;
bfd_size_type crc_offset;
FILE * handle;
static unsigned char buffer[8 * 1024];
size_t count;
size_t filelen;
if (abfd == N... | true | true | false | false | false | 1 |
post(Home home, NodeType t, SetVarArgs& b, int& i) const {
if (this->t != t) {
switch (this->t) {
case SetExpr::NT_VAR:
if (neg) {
SetVar xc(home,IntSet::empty,
IntSet(Set::Limits::min,Set::Limits::max));
rel(home, xc, SRT_CMPL, u.a.x->x);
... | false | false | false | false | false | 0 |
fpixRotate180(FPIX *fpixd,
FPIX *fpixs)
{
PROCNAME("fpixRotate180");
if (!fpixs)
return (FPIX *)ERROR_PTR("fpixs not defined", procName, NULL);
/* Prepare pixd for in-place operation */
if ((fpixd = fpixCopy(fpixd, fpixs)) == NULL)
return (FPIX *)ERROR_PTR("fpixd no... | false | false | false | false | false | 0 |
rcu_seq_start(unsigned long *sp)
{
WRITE_ONCE(*sp, *sp + 1);
smp_mb(); /* Ensure update-side operation after counter increment. */
WARN_ON_ONCE(!(*sp & 0x1));
} | false | false | false | false | false | 0 |
GetHash(const char * pat, ACE_UINT8 mymd5[MD5_DIGEST_LENGTH])
{
for (Patches::iterator i = patches_.begin (); i != patches_.end (); i++)
if (!stricmp(pat, i->first.c_str ()))
{
memcpy(mymd5, i->second->md5, MD5_DIGEST_LENGTH);
return true;
}
return false;
} | false | false | false | false | false | 0 |
newStream(QPDF* qpdf)
{
QTC::TC("qpdf", "QPDFObjectHandle newStream");
QPDFObjectHandle stream_dict = newDictionary();
QPDFObjectHandle result = qpdf->makeIndirectObject(
QPDFObjectHandle(
new QPDF_Stream(qpdf, 0, 0, stream_dict, 0, 0)));
result.dereference();
QPDF_Stream* stream = dynamic_cas... | false | false | false | false | false | 0 |
embPatBYGSearch(const AjPStr str, const AjPStr name,
ajuint begin, ajuint plen,
const ajuint *table, ajuint limit, AjPList l,
AjBool amino, AjBool carboxyl)
{
register ajuint state;
register ajuint initial;
const char *p;
const char *q;
ajuint pos;
ajuint matches;
aju... | false | false | false | false | false | 0 |
est_bzdecode(const char *ptr, int size, int *sp){
#if ESTUSEBZIP
bz_stream zs;
char *buf, obuf[ESTIOBUFSIZ];
int rv, asiz, bsiz, osiz;
zs.bzalloc = NULL;
zs.bzfree = NULL;
zs.opaque = NULL;
if(BZ2_bzDecompressInit(&zs, 0, 0) != BZ_OK) return NULL;
asiz = size * 2 + 16;
if(asiz < ESTIOBUFSIZ) asiz = ES... | false | false | false | false | false | 0 |
main(int argc,
char **argv)
{
PIX *pix;
PIXA *pixa;
L_REGPARAMS *rp;
if (regTestSetup(argc, argv, &rp))
return 1;
pixa = TestHardlight("hardlight1_1.jpg", "hardlight1_2.jpg", rp);
pix = pixaDisplay(pixa, 0, 0);
regTestWritePixAndCheck(rp, pix, IFF_PNG);
pixDis... | false | false | false | false | false | 0 |
asn1PE_H225EndpointIdentifier (OOCTXT* pctxt, H225EndpointIdentifier value)
{
static Asn1SizeCnst lsize1 = { 0, 1, 128, 0 };
int stat = ASN_OK;
addSizeConstraint (pctxt, &lsize1);
stat = encodeBMPString (pctxt, value, 0);
if (stat != ASN_OK) return stat;
return (stat);
} | false | false | false | false | false | 0 |
rtw_android_cmdstr_to_num(char *cmdstr)
{
int cmd_num;
for (cmd_num = 0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++)
if (0 == strncasecmp(cmdstr, android_wifi_cmd_str[cmd_num],
strlen(android_wifi_cmd_str[cmd_num])))
break;
return cmd_num;
} | false | false | false | false | false | 0 |
ipv6addrstruct_maskprefix(ipv6calc_ipv6addr *ipv6addrp) {
unsigned int nbit, nword;
uint16_t mask, newword;
int i;
if ( (ipv6calc_debug & DEBUG_libipv6addr) != 0 ) {
fprintf(stderr, "%s: called\n", DEBUG_function_name);
};
if (ipv6addrp->flag_prefixuse != 1) {
/* hmm, no prefix specified. skip */
retur... | false | false | false | false | false | 0 |
add_target(const char *n, // I - Name of target
int yy) // I - Y position of target
{
Fl_Help_Target *temp; // New target
if (ntargets_ >= atargets_)
{
atargets_ += 16;
if (atargets_ == 16)
targets_ = (Fl_Help_Target *)malloc(sizeof(Fl_Help_Target) * atargets_);
else
t... | false | false | false | false | false | 0 |
syntax_present(win)
win_T *win;
{
return (win->w_s->b_syn_patterns.ga_len != 0
|| win->w_s->b_syn_clusters.ga_len != 0
|| win->w_s->b_keywtab.ht_used > 0
|| win->w_s->b_keywtab_ic.ht_used > 0);
} | false | false | false | false | false | 0 |
DecodeWebPHeaders(WebPIDecoder* const idec) {
MemBuffer* const mem = &idec->mem_;
const uint8_t* data = mem->buf_ + mem->start_;
size_t curr_size = MemDataSize(mem);
VP8StatusCode status;
WebPHeaderStructure headers;
headers.data = data;
headers.data_size = curr_size;
status = WebPParseHeaders(&headers... | false | false | false | false | false | 0 |
haswell_set_bclk(struct hda_intel *hda)
{
struct azx *chip = &hda->chip;
int cdclk_freq;
unsigned int bclk_m, bclk_n;
if (!hda->need_i915_power)
return;
cdclk_freq = snd_hdac_get_display_clk(azx_bus(chip));
switch (cdclk_freq) {
case 337500:
bclk_m = 16;
bclk_n = 225;
break;
case 450000:
default: /*... | false | false | false | false | false | 0 |
rest_xml_node_add_child (RestXmlNode *parent, const char *tag)
{
RestXmlNode *node;
char *escaped;
g_return_val_if_fail (tag && *tag, NULL);
escaped = g_markup_escape_text (tag, -1);
node = _rest_xml_node_new ();
node->name = (char *) g_intern_string (escaped);
if (parent)
{
RestXmlNo... | false | false | false | false | false | 0 |
PyvtkParametricFunction_EvaluateScalar(PyObject *self, PyObject *args)
{
vtkPythonArgs ap(self, args, "EvaluateScalar");
vtkObjectBase *vp = ap.GetSelfPointer(self, args);
vtkParametricFunction *op = static_cast<vtkParametricFunction *>(vp);
double temp0[3];
double save0[3];
const int size0 = 3;
double t... | false | false | false | false | false | 0 |
gnet_stats_gui_recv_init(void)
{
GtkTreeView *treeview;
GtkTreeModel *model;
GType types[] = {
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING
};
guint32 width[G_N_ELEMENTS(types)];
guint n;
... | false | false | false | false | false | 0 |
gkrellm_destroy_krell(GkrellmKrell *k)
{
if (!k)
return;
gkrellm_remove_krell((GkrellmPanel *) k->panel, k);
_destroy_krell(k);
} | false | false | false | false | false | 0 |
createToolBars()
{
infoLine = new InfoLine();
infoLine->setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
infoLine->setLineWidth( 0 );
lineNbField = new QLabel( );
lineNbField->setText( "Line 0" );
lineNbField->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
lineNbField->setMinimumSize(... | false | false | false | false | false | 0 |
GetCurrentMarker() const
{
if ( !file_loaded )
{
return -1;
}
// find marker with largest time that
// is before cur_time
MIDIClockTime cur_time = seq.GetCurrentMIDIClockTime();
cur_time += 20;
int last = -1;
for ( int i = 0; i < num_markers; ++i )
{
if ( marker... | false | false | false | false | false | 0 |
algo_names(void) {
int i, n, bytes, size;
char *buf;
struct algo_s a;
size = MAX_BUF;
buf = malloc(size);
bytes = 0;
for (i = 0; i < sizeof(algorithms) / sizeof(struct algo_s); ++i) {
a = algorithms[i];
n = snprintf(buf+bytes, size-bytes, " '%s'\n", a.name);
if ... | false | false | false | false | false | 0 |
snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
const char *identifier,
const char **list[])
{
char *str, *str1;
int err;
if (uc_mgr == NULL || identifier == NULL)
return uc_mgr_scan_master_configs(list);
pthread_mutex_lock(&uc_mgr->mutex);
if (strcmp(identifier, "_verbs") == 0)
err = get_verb_lis... | false | false | false | false | false | 0 |
rb_reg_prepare_re(re)
VALUE re;
{
int need_recompile = 0;
int state;
rb_reg_check(re);
state = FL_TEST(re, REG_CASESTATE);
/* ignorecase status */
if (ruby_ignorecase && !state) {
FL_SET(re, REG_CASESTATE);
RREGEXP(re)->ptr->options |= RE_OPTION_IGNORECASE;
need_recompile = 1;
}
... | false | false | false | false | false | 0 |
t30_set_minimum_scan_line_time(t30_state_t *s, int min_time)
{
/* There are only certain possible times supported, so we need to select
the code which best matches the request. */
if (min_time == 0)
s->local_min_scan_time_code = 7;
else if (min_time <= 5)
s->local_min_scan_time_code =... | false | false | false | false | false | 0 |
consumeKeyRelease(int key) {
switch(key) {
case Qt::Key_Shift:
//printf("KeyController: shift up\n");
return !(keyShift = false);
case Qt::Key_Control:
//printf("KeyController: ctrl up\n");
return !(keyCtrl = false);
}
return false;
} | false | false | false | false | false | 0 |
__memp_fcreate(env, retp)
ENV *env;
DB_MPOOLFILE **retp;
{
DB_MPOOLFILE *dbmfp;
int ret;
/* Allocate and initialize the per-process structure. */
if ((ret = __os_calloc(env, 1, sizeof(DB_MPOOLFILE), &dbmfp)) != 0)
return (ret);
dbmfp->ref = 1;
dbmfp->lsn_offset = DB_LSN_OFF_NOTSET;
dbmfp->env = env;
dbmfp... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
if (argc >= 2) {
int i;
for (i = 1; i < argc; i++) {
if(strcmp(argv[i], "--all-symbols") == 0)
all_symbols = 1;
else if (strcmp(argv[i], "--absolute-percpu") == 0)
absolute_percpu = 1;
else if (strncmp(argv[i], "--symbol-prefix=", 16) == 0) {
char *p = &argv[i][16... | false | false | false | false | false | 0 |
Save (xmlDocPtr xml) const
{
xmlNodePtr node;
node = xmlNewDocNode (xml, NULL, (xmlChar*) "mesomery-arrow", NULL);
if (!node)
return NULL;
if (!Arrow::Save (xml, node)) {
xmlFreeNode (node);
return NULL;
}
if (m_Start)
xmlNewProp (node, (xmlChar*) "start", (xmlChar*) m_Start->GetId ());
if (m_End)
xml... | false | false | false | false | false | 0 |
visit_enter(ir_dereference_array *ir)
{
ir_variable *var = ir->variable_referenced();
if (!var || var->data.mode != this->mode)
return visit_continue;
if (this->find_frag_outputs && var->data.location == FRAG_RESULT_DATA0) {
this->fragdata_array = var;
ir_constant *ind... | false | false | false | false | false | 0 |
glusterd_volinfo_find (char *volname, glusterd_volinfo_t **volinfo)
{
glusterd_volinfo_t *tmp_volinfo = NULL;
int32_t ret = -1;
xlator_t *this = NULL;
glusterd_conf_t *priv = NULL;
GF_ASSERT (volname);
this = THIS;
GF_... | false | false | false | true | true | 1 |
compareGrids(int gridID1, int gridID2)
{
/* compare grids of first variable */
int xsize, ysize;
int i;
if ( gridInqType(gridID1) == gridInqType(gridID2) )
{
if ( gridInqType(gridID1) == GRID_GAUSSIAN || gridInqType(gridID1) == GRID_LONLAT )
{
xsize = gridInqXsize(gridID1);
ysize = gridInqYsiz... | false | false | false | false | false | 0 |
w83627ehf_init_device(struct w83627ehf_data *data,
enum kinds kind)
{
int i;
u8 tmp, diode;
/* Start monitoring is needed */
tmp = w83627ehf_read_value(data, W83627EHF_REG_CONFIG);
if (!(tmp & 0x01))
w83627ehf_write_value(data, W83627EHF_REG_CONFIG,
tmp | 0x01);
/* Enable temperature sensor... | false | false | false | false | false | 0 |
getNextFreeTextureCoordinate() const
{
unsigned short texCoord = 0;
for (VertexElementList::const_iterator i = mElementList.begin();
i != mElementList.end(); ++i)
{
const VertexElement& el = *i;
if (el.getSemantic() == VES_TEXTURE_COORDINATES)
... | false | false | false | false | false | 0 |
camFreeKeypoints(CamKeypoints *fpoints)
{
CAM_CHECK_ARGS(camKeypointsDeallocate, fpoints != NULL);
if (fpoints->keypoint) free(fpoints->keypoint);
if (fpoints->bag)
#ifdef __SSE2__
_mm_free(fpoints->bag);
#else
free(fpoints->bag);
#endif
fpoints->keypoint = NULL;
fpoints->bag = NULL;
... | false | false | false | false | false | 0 |
file_oflags_to_string(int flags)
{
static char buf[64];
/* We assume there will be at least one of O_RDWR, O_RDONLY or O_WRONLY */
str_bprintf(buf, sizeof buf, "%s%s%s%s%s",
(flags & O_RDWR) ? "O_RDWR"
: (flags & O_WRONLY) ? "O_WRONLY"
: (flags & O_RDONLY) ? "O_RDONLY"
: (0 == O_RDONLY) ? "O_RDONLY" : "... | false | false | false | false | false | 0 |
gm_fetch(const GList *source, const GList *dest,
GFunc cb, gpointer user_data) {
GmFetchHandle *g = gm_fetch_handle_create(cb, user_data);
gchar *uri;
GnomeVFSResult ret;
for (; source; source = source->next) {
uri = (gchar *)(source->data);
g->source_uri = g_list_append(g->source_uri, gnome_vf... | false | false | false | false | false | 0 |
cs4245_read_spi(struct oxygen *chip, u8 addr)
{
struct dg *data = chip->model_data;
int ret;
ret = oxygen_write_spi(chip, OXYGEN_SPI_TRIGGER |
OXYGEN_SPI_DATA_LENGTH_2 |
OXYGEN_SPI_CEN_LATCH_CLOCK_HI |
OXYGEN_SPI_CLOCK_1280 | (0 << OXYGEN_SPI_CODEC_SHIFT),
((CS4245_SPI_ADDRESS | CS4245_SPI_WRITE) << 8) | ad... | false | false | false | false | false | 0 |
iscsi_check_proposer_for_optional_reply(struct iscsi_param *param,
bool keys_workaround)
{
if (IS_TYPE_BOOL_AND(param)) {
if (!strcmp(param->value, NO))
SET_PSTATE_REPLY_OPTIONAL(param);
} else if (IS_TYPE_BOOL_OR(param)) {
if (!strcmp(param->value, YES))
SET_PSTATE_REPLY_OPTIONAL(param);
if (k... | false | false | false | false | false | 0 |
DropLastRange()
{
#ifdef WITH_THREADS
boost::mutex::scoped_lock lock(m_mutex);
#endif
while(m_lastDropped != m_lastSaved)
DropRange(++m_lastDropped);
} | false | false | false | false | false | 0 |
context_change_helper(const std::string& prev_context, const std::string& curr_context) const
{
bool result = false;
if (prev_context.empty()) {
if (curr_context.empty()) {
// both contexts are empty, nothing has happened, no
// change happened
result = false;
} else {
// current cont... | false | false | false | false | false | 0 |
finalize()
{
// Close connection
if (status_ == Incoming) {
reject_call();
}
else if (status_ == InProgress || status_ == Calling || status_ == Accepting || status_ == Accepted) {
terminate_call();
}
// Disconnect signals
disconnect(voiceCaller_,SIGNAL(accepted(const Jid&)),this,SLOT(accepted(const Jid&)));... | false | false | false | false | false | 0 |
SetInputRepresentation(Representation r) {
input_representation_ = r;
if (r.IsDouble()) {
SetFlag(kDeoptimizeOnUndefined);
} else {
ASSERT(r.IsInteger32());
}
} | false | false | false | false | false | 0 |
checkXrayAngiographicAttributes(DcmItem *dataset,
const OFString &sopClass,
const OFFilename &filename)
{
OFCondition result = EC_Normal;
/* requirements depend on SOP class */
if (c... | false | false | false | false | false | 0 |
GuessPhysicalMemory() {
#if defined(_WIN32) || defined(_WIN64)
return 0;
#elif defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE)
long pages = sysconf(_SC_PHYS_PAGES);
if (pages == -1) return 0;
long page_size = sysconf(_SC_PAGESIZE);
if (page_size == -1) return 0;
return static_cast<uint64_t>(pages) * static... | false | false | false | false | false | 0 |
lmmove(But *but, int x, int y) {
ButOut result = 0;
int msel, m_y, newflags = but->flags, otval;
Menu *m = but->iPacket;
ButEnv *env = but->win->env;
int butbw = env->stdButBw;
bool click = TRUE;
StdInt32 netNewVal;
if (m->skip_clicks) {
click = FALSE;
}
if (but->flags & BUT_PRESSED)
... | false | false | false | false | false | 0 |
okeys_object_field_start(void *state, char *fname, bool isnull)
{
OkeysState *_state = (OkeysState *) state;
/* only collecting keys for the top level object */
if (_state->lex->lex_level != 1)
return;
/* enlarge result array if necessary */
if (_state->result_count >= _state->result_size)
{
_state->result_... | false | false | false | false | false | 0 |
parse_tcp_option(const char *option, uint8_t *result)
{
unsigned int ret;
if (!xtables_strtoui(option, NULL, &ret, 1, UINT8_MAX))
xtables_error(PARAMETER_PROBLEM, "Bad TCP option \"%s\"", option);
*result = ret;
} | false | false | false | false | false | 0 |
get_level_name (int level)
{
switch (level) {
case 0:
return "0";
case 1:
return "1";
case 128:
return "128";
default:
break;
}
/* need to add it to template caps, so return 0 for now */
GST_WARNING ("unhandled dirac level %u", level);
return "0";
} | false | false | false | false | false | 0 |
ifile_get_file (IAnjutaFile* plugin, GError** e)
{
AnjutaDocman *docman;
IAnjutaDocument *doc;
docman = ANJUTA_DOCMAN ((ANJUTA_PLUGIN_DOCMAN (plugin)->docman));
doc = anjuta_docman_get_current_document (docman);
if (doc != NULL)
return ianjuta_file_get_file (IANJUTA_FILE (doc), NULL);
else
return NULL;
} | false | false | false | false | false | 0 |
motion_notify_cb (GtkWidget * w, GdkEventMotion * event, splotd * sp)
{
ggobid *gg = GGobiFromSPlot (sp);
displayd *display = sp->displayptr;
gg->current_splot = sp->displayptr->current_splot = sp;/*-- just in case --*/
/*
* allow point motion only for
* scatterplots
* the splotd members of a sc... | false | false | false | false | false | 0 |
e1000_tbi_sbp_enabled_82543(struct e1000_hw *hw)
{
struct e1000_dev_spec_82543 *dev_spec = &hw->dev_spec._82543;
bool state = false;
DEBUGFUNC("e1000_tbi_sbp_enabled_82543");
if (hw->mac.type != e1000_82543) {
DEBUGOUT("TBI compatibility workaround for 82543 only.\n");
goto out;
}
state = (dev_spec->tbi_co... | false | false | false | false | false | 0 |
_dl_show_scope (struct link_map *l, int from)
{
_dl_debug_printf ("object=%s [%lu]\n",
DSO_FILENAME (l->l_name), l->l_ns);
if (l->l_scope != NULL)
for (int scope_cnt = from; l->l_scope[scope_cnt] != NULL; ++scope_cnt)
{
_dl_debug_printf (" scope %u:", scope_cnt);
for (unsigned int cnt = 0; cnt < ... | false | false | false | false | false | 0 |
scm_register_funcs(const struct scm_func_registration_info *table)
{
const struct scm_func_registration_info *info;
for (info = &table[0]; info->funcname; info++) {
scm_register_func(info->funcname, info->c_func, info->typecode);
}
} | false | false | false | false | false | 0 |
acct_storage_p_get_usage(void *db_conn, uid_t uid,
void *in, slurmdbd_msg_type_t type,
time_t start, time_t end)
{
slurmdbd_msg_t req, resp;
dbd_usage_msg_t get_msg;
dbd_usage_msg_t *got_msg;
slurmdb_association_rec_t *got_assoc = (slurmdb_association_rec_t *)in;
slurmdb_wckey_rec_t *got_wckey = (s... | false | false | false | false | false | 0 |
mmc_apply_rel_rw(struct mmc_blk_request *brq,
struct mmc_card *card,
struct request *req)
{
if (!(card->ext_csd.rel_param & EXT_CSD_WR_REL_PARAM_EN)) {
/* Legacy mode imposes restrictions on transfers. */
if (!IS_ALIGNED(brq->cmd.arg, card->ext_csd.rel_sectors))
brq->data.blocks = 1;
if (brq-... | false | false | false | false | false | 0 |
setTempCaseMap(UCaseMap *csm, const char *locale) {
if(csm->csp==NULL) {
csm->csp=ucase_getSingleton();
}
if(locale!=NULL && locale[0]==0) {
csm->locale[0]=0;
} else {
ustrcase_setTempCaseMapLocale(csm, locale);
}
} | false | false | false | false | false | 0 |
apply(
FILE *fin,
const char *rewriteContext,
const char *arg
)
{
struct rewrite_info *info;
char *string, *sep, *result = NULL;
int rc;
void *cookie = &info;
info = rewrite_info_init( REWRITE_MODE_ERR );
if ( rewrite_read( fin, info ) != 0 ) {
exit( EXIT_FAILURE );
}
rewrite_param_set( info, "prog... | false | false | false | false | false | 0 |
LogTransform(void)
{ int row, column;
for (row = 0; row < _rows; row++)
{ /* Log transformation */
for (column = 0; column < _columns; column++)
{ if (_mask[row][column] && _data[row][column] > 0)
_data[row][column] = log(_data[row][column])/log(2.);
else _mask[row][column]=0;
}
}
retu... | false | false | false | false | false | 0 |
__ecereMethod_IDEWorkSpace_FindWindow(struct __ecereNameSpace__ecere__com__Instance * this, char * filePath)
{
struct IDEWorkSpace * __ecerePointer_IDEWorkSpace = (struct IDEWorkSpace *)(this ? (((char *)this) + __ecereClass_IDEWorkSpace->offset) : 0);
struct __ecereNameSpace__ecere__com__Instance * document = (((void ... | false | false | false | false | false | 0 |
arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb)
{
u32 outbound_write_pointer, doneq_index, index_stripped, toggle;
uint32_t addressLow, ccb_cdb_phy;
int error;
struct MessageUnit_D *pmu;
struct ARCMSR_CDB *arcmsr_cdb;
struct CommandControlBlock *ccb;
unsigned long flags;
spin_lock_irqsave(&acb->don... | false | false | false | false | false | 0 |
soundTimer(xTimerHandle timer)
{
int effect;
counter++;
if (sys_effect != 0) {
effect = sys_effect;
} else {
effect = user_effect;
}
if (effects[effect].call != 0) {
effects[effect].call(counter * 10, &effects[effect].mi, effects[effect].melody);
}
} | false | false | false | false | false | 0 |
_gtk_pango_is_inside_word (PangoLayout *layout,
gint offset)
{
const PangoLogAttr *attrs;
gint n_attrs;
attrs = pango_layout_get_log_attrs_readonly (layout, &n_attrs);
while (offset >= 0 &&
!(attrs[offset].is_word_start || attrs[offset].is_word_end))
offset--;... | false | false | false | false | false | 0 |
slotReplaceNext()
{
if (!d->replace)
return;
d->lastReplacedPosition = -1;
if (!(d->replace->options() & KReplaceDialog::PromptOnReplace)) {
textCursor().beginEditBlock(); // #48541
viewport()->setUpdatesEnabled(false);
}
KFind::Result res = KFind::NoMatch;
if (d->repl... | false | false | false | false | false | 0 |
startup()
{
CGuard gcinit(m_InitLock);
if (m_iInstanceCount++ > 0)
return 0;
// Global initialization code
#ifdef WIN32
WORD wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD(2, 2);
if (0 != WSAStartup(wVersionRequested, &wsaData))
throw CUDTException... | false | false | false | false | false | 0 |
brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
{
struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
struct brcmf_cfg80211_security *sec;
s32 val = 0;
s32 err = 0;
if (sme->crypto.n_akm_suites) {
err = brcmf_fil_bsscfg_int_get(netdev_priv(ndev),
"wpa_auth",... | false | false | false | false | false | 0 |
arrow_type_tee(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag)
{
pointf m, n, q, v, a[4];
v.x = -u.y;
v.y = u.x;
q.x = p.x + u.x;
q.y = p.y + u.y;
m.x = p.x + u.x * 0.2;
m.y = p.y + u.y * 0.2;
n.x = p.x + u.x * 0.6;
n.y = p.y + u.y * 0.6;
a[0].x = m... | false | false | false | false | false | 0 |
adjust_cmp_localize_blocks(Block *block_head, const int amax)
{
Block *bpt;
for (bpt = block_head; bpt != NULL; bpt = bpt->next) {
if (bpt->cmp_localize != NULL) {
remake_local_array_and_ya_template_body(bpt->cmp_localize, amax);
}
if (bpt->inner != NULL) {
adjus... | false | false | false | false | false | 0 |
do_sieve(struct dlist *kin)
{
const char *userid;
const char *filename;
time_t last_update;
const char *content;
size_t len;
if (!dlist_getatom(kin, "USERID", &userid))
return IMAP_PROTOCOL_BAD_PARAMETERS;
if (!dlist_getatom(kin, "FILENAME", &filename))
return IMAP_PROTOCOL_BAD_PARAMETERS... | false | false | false | false | false | 0 |
mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable* value) {
GVariant *_arguments;
GVariant *_reply;
GVariantBuilder _arguments_builder;
GVariantBuilder _tmp5_;
GHashTableIter _tmp6_;
gpointer _tmp7_;
gpointer _tmp8_;
g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
g_varian... | false | false | false | false | false | 0 |
notifylist_add_config(NOTIFYLIST_REC *rec)
{
CONFIG_NODE *node;
node = iconfig_node_traverse("notifies", TRUE);
node = config_node_section(node, rec->mask, NODE_TYPE_BLOCK);
if (rec->away_check)
iconfig_node_set_bool(node, "away_check", TRUE);
else
iconfig_node_set_str(node, "away_check", NULL);
iconfig_no... | false | false | false | false | false | 0 |
lsegsexfun2(first,second)
unsigned first, second;
{
int g1, g2; /*two gene numbers*/
int j, k; /* loop indices*/
int s1, s2; /*haplotype numbers*/
int FORLIM1, FORLIM2; /*loop bounds*/
int *TEMPGENE1; /* store pointers into genenumber*/
unsigned char *tempflag3; /*stores sparsity pattern for child's genarra... | false | false | false | false | false | 0 |
args_map_init(struct vm_method *method)
{
struct vm_method_arg *arg;
enum vm_type vm_type;
int idx;
int gpr_count = 0, xmm_count = 0, stack_count = 0;
struct vm_args_map *map;
size_t size;
/* If the method isn't static, we have a *this. */
size = method->args_count + !vm_method_is_static(method);
if (vm_meth... | false | true | false | false | false | 1 |
dof_nrm2_d(const DOF_REAL_D_VEC *x)
{
FUNCNAME("dof_nrm2_d");
REAL nrm;
int n;
const DOF_ADMIN *admin = nil;
TEST_EXIT(x && x->fe_space && (admin = x->fe_space->admin),
"pointer is nil: %p, %p\n", x, admin);
TEST_EXIT(x->size >= admin->size_used,
"x->size = %d too small: admi... | false | false | false | true | false | 1 |
clear_more(int new)
{
PhysLine *pl;
int use_insert, need_redraw = 0, scrolled = 0;
if (new < 0) {
if (!visual /* XXX || !can_scrollback */) return 0;
use_insert = insert_line && -new < winlines();
setscroll(1, out_bot);
while (scrolled > new && prevtop(display_screen)) {
pl = display_screen->top->... | false | false | false | false | false | 0 |
strtr_char_in(void *arg)
{
int ch;
Strtr_state *state;
state = (Strtr_state *) arg;
if ((ch = *state->input) == '\0')
return(EOF);
state->input++;
return(ch);
} | false | false | false | false | false | 0 |
PlaceWidget(double bds[6])
{
int i;
double bounds[6], center[3];
this->AdjustBounds(bds, bounds, center);
this->Cursor3D->SetModelBounds(bounds);
this->Cursor3D->SetFocalPoint(center);
this->Cursor3D->Update();
for (i=0; i<6; i++)
{
this->InitialBounds[i] = bounds[i];
}
this->InitialLen... | 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.