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 |
|---|---|---|---|---|---|---|
doPoly(QDomElement & polygon, ForWhy forWhy, bool closedCurve,
QHash<QString, QString> & apertureMap, QString & current_dcode, int & dcode_index)
{
//QString temp;
//QTextStream tempStream(&temp);
//polygon.save(tempStream, 1);
QString points = polygon.attribute("points");
QStringList pointList = points.sp... | false | false | false | false | false | 0 |
mark_inessential_stones(int color, signed char safe_stones[BOARDMAX])
{
int ii;
for (ii = BOARDMIN; ii < BOARDMAX; ii++)
if (IS_STONE(board[ii])
&& (DRAGON2(ii).safety == INESSENTIAL
|| (worm[ii].inessential
/* FIXME: Why is the check below needed?
* Why does it use .safety, not .status? /ab
... | false | false | false | false | false | 0 |
ndmda_copy_environment (struct ndm_session *sess,
ndmp9_pval *env, unsigned n_env)
{
struct ndm_data_agent * da = &sess->data_acb;
int i;
unsigned int j;
ndmp9_pval * src_pv;
ndmp9_pval * dst_pv;
for (j = 0; j < n_env; j++) {
src_pv = &env[j];
dst_pv = &da->env_tab.env[da->env_tab.n_env];
dst_pv->n... | false | false | false | false | false | 0 |
hdp_channel_ref(struct hdp_channel *chan)
{
if (chan == NULL)
return NULL;
chan->ref++;
DBG("health_channel_ref(%p): ref=%d", chan, chan->ref);
return chan;
} | false | false | false | false | false | 0 |
EventTriggerSQLDrop(Node *parsetree)
{
List *runlist;
EventTriggerData trigdata;
/*
* See EventTriggerDDLCommandStart for a discussion about why event
* triggers are disabled in single user mode.
*/
if (!IsUnderPostmaster)
return;
/*
* Use current state to determine whether this event fires at all. ... | false | false | false | false | false | 0 |
makedir(struct request *r)
{
int l;
if (r->args)
l = snprintf(r->newloc, PATHLEN, "%s/?%s", r->url, r->args);
else
l = snprintf(r->newloc, PATHLEN, "%s/", r->url);
if (l >= PATHLEN) {
log_d("makedir: url too large");
r->status = 500;
return 0;
}
if (debug)
log_d("makedir: redirecting to %s", r->newlo... | false | false | false | false | false | 0 |
operator<<= (cdrStream& _n)
{
(HowManyProps&)_pd__d <<= _n;
switch(_pd__d) {
case some:
_pd__default = 0;
(PropertyNameSeq&)_pd_prop_names <<= _n;
break;
default:
_pd__default = 1;
break;
}
_pd__initialised = 1;
} | false | false | false | false | false | 0 |
irafgetc (
char *irafheader, /* IRAF image header */
int offset, /* Number of bytes to skip before string */
int nc) /* Maximum number of characters in string */
{
char *ctemp, *cheader;
int i;
cheader = irafheader;
ctemp = (char *) calloc (nc+1, 1);
if (ctemp == NULL) {
ffpmsg("IRAFGETC Canno... | false | false | false | false | false | 0 |
ToLogicalAddresses(const CECDEVICEVEC &devices)
{
cec_logical_addresses addresses;
addresses.Clear();
for (CECDEVICEVEC::const_iterator it = devices.begin(); it != devices.end(); it++)
addresses.Set((*it)->GetLogicalAddress());
return addresses;
} | false | false | false | false | false | 0 |
rt5645_jack_detect_work(struct work_struct *work)
{
struct rt5645_priv *rt5645 =
container_of(work, struct rt5645_priv, jack_detect_work.work);
int val, btn_type, gpio_state = 0, report = 0;
if (!rt5645->codec)
return;
switch (rt5645->pdata.jd_mode) {
case 0: /* Not using rt5645 JD */
if (rt5645->gpiod_hp_... | false | false | false | false | false | 0 |
__ziplistDelete(unsigned char *zl, unsigned char *p, unsigned int num) {
unsigned int i, totlen, deleted = 0;
size_t offset;
int nextdiff = 0;
zlentry first, tail;
first = zipEntry(p);
for (i = 0; p[0] != ZIP_END && i < num; i++) {
p += zipRawEntryLength(p);
deleted++;
}
... | false | false | false | false | false | 0 |
complete_from_variables(const char *text, const char *prefix, const char *suffix,
bool need_value)
{
char **matches;
char **varnames;
int nvars = 0;
int maxvars = 100;
int i;
struct _variable *ptr;
static const char *const known_varnames[] = {
"AUTOCOMMIT", "COMP_KEYWORD_CASE", "DBNAME", "ECHO... | false | false | false | false | false | 0 |
param_name(int i)const
{
switch (COMMON_BUILT_IN_BJT::param_count() - 1 - i) {
case 0: return "area";
case 1: return "off";
case 2: return "icvbe";
case 3: return "icvce";
case 4: return "temp";
default: return COMMON_COMPONENT::param_name(i);
}
} | false | false | false | false | false | 0 |
rpl_read_packet(AVFormatContext *s, AVPacket *pkt)
{
RPLContext *rpl = s->priv_data;
ByteIOContext *pb = s->pb;
AVStream* stream;
AVIndexEntry* index_entry;
uint32_t ret;
if (rpl->chunk_part == s->nb_streams) {
rpl->chunk_number++;
rpl->chunk_part = 0;
}
stream = s->str... | false | false | false | false | false | 0 |
channel_dimm_label_store(struct device *dev,
struct device_attribute *mattr,
const char *data, size_t count)
{
struct csrow_info *csrow = to_csrow(dev);
unsigned chan = to_channel(mattr);
struct rank_info *rank = csrow->channels[chan];
size_t copy_count = count;
if (count == 0)
return -EINVAL;
if (d... | false | false | false | false | false | 0 |
mono_debug_add_type (MonoClass *klass)
{
MonoDebugHandle *handle;
MonoDebugClassEntry *entry;
guint8 buffer [BUFSIZ];
guint8 *ptr, *oldptr;
guint32 size, total_size, max_size;
int base_offset = 0;
if (klass->generic_class || klass->rank ||
(klass->byval_arg.type == MONO_TYPE_VAR) || (klass->byval_arg.type ... | false | false | false | false | false | 0 |
ttm_mem_global_release(struct ttm_mem_global *glob)
{
unsigned int i;
struct ttm_mem_zone *zone;
/* let the page allocator first stop the shrink work. */
ttm_page_alloc_fini();
ttm_dma_page_alloc_fini();
flush_workqueue(glob->swap_queue);
destroy_workqueue(glob->swap_queue);
glob->swap_queue = NULL;
for (i =... | false | false | false | false | true | 1 |
createParameters(void)
{
// Default implementation simply returns standard parameters.
GpuProgramParametersSharedPtr ret =
GpuProgramManager::getSingleton().createParameters();
// optionally load manually supplied named constants
if (!mManualNamedConsta... | false | false | false | false | false | 0 |
RegisterEditorClass( wxPGEditor* editorclass,
const wxString& name,
bool noDefCheck )
{
wxASSERT( editorclass );
if ( !noDefCheck && wxPGGlobalVars->m_mapEditorClasses.empty() )
RegisterDefaultEditors();
... | false | false | false | false | false | 0 |
sub_big(bignum_t *x, bignum_t *y, bignum_t *z)
{
int xl, yl, zl, b, i;
uint64 *xp, *yp, *zp;
safety_assert(x->l < BIGSIZE);
safety_assert(x->l >= 0);
safety_assert(y->l < BIGSIZE);
safety_assert(y->l >= 0);
xl = x->l;
yl = y->l;
if (yl > xl)
return 1;
xp = &x->d[0];
yp = &y->d[0];
zp = &z->d[0];
for (... | false | false | false | false | false | 0 |
cray_skel_UseVColor(int sel, Geom *geom, va_list *args)
{
Skel *s = (Skel *)geom;
int i, j, k, ic;
ColorA *def;
def = va_arg(*args, ColorA *);
if (s->vc == NULL) {
s->vc = OOGLNewNE(ColorA, s->nvert, msg);
}
/* install the given default colour */
for (i = 0; i < s->nvert; i++) s->vc[i] = *def;
... | false | false | false | false | false | 0 |
unity_webapps_context_set_preview_requested_callback (UnityWebappsContext *context,
UnityWebappsContextPreviewCallback callback,
gpointer user_data)
{
g_return_if_fail (context != NULL);
g_return_if_fail (UNITY_WEBAPPS_IS_CONTEXT (context));
g_return_if_fail (callback != NULL);
if (cont... | false | false | false | false | false | 0 |
EvictRandomSizeClass(
int locked_size_class, bool force) {
static int race_counter = 0;
int t = race_counter++; // Updated without a lock, but who cares.
if (t >= kNumClasses) {
while (t >= kNumClasses) {
t -= kNumClasses;
}
race_counter = t;
}
ASSERT(t >= 0);
ASSERT(t < kNumClasses);... | false | false | false | false | false | 0 |
define_isoceles_SA(_param p)
{
double t, u;
if (p.addr < 2) {
t = POPn;
u = POPn;
a = POPn;
x = Cos(t);
y = Sin(t);
} else u = POPn;
if (u>=90 || u<=-90) runtime_error(_("invalid angle"));
assign_A_B(p.addr);
a /= 2;
assign_C(a, a*Tan(u));
} | false | false | false | false | false | 0 |
alc_fixup_sku_ignore(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->cdefine.fixup = 1;
spec->cdefine.sku_cfg = ALC_FIXUP_SKU_IGNORE;
}
} | false | false | false | false | false | 0 |
extension (const std::string& str) {
size_t idx = str.rfind('.');
std::string s;
if (idx == std::string::npos)
s = std::string();
s = str.substr(idx);
std::transform(s.begin(), s.end(), s.begin(), tolower());
return s;
} | false | false | false | false | false | 0 |
strmap_remove(strmap_t *map, const char *key)
{
strmap_entry_t *resolve;
strmap_entry_t search;
void *oldval;
tor_assert(map);
tor_assert(key);
search.key = (char*)key;
resolve = HT_REMOVE(strmap_impl, &map->head, &search);
if (resolve) {
oldval = resolve->val;
tor_free(resolve->key);
tor_fr... | false | false | false | false | false | 0 |
writeHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
client c = privdata;
REDIS_NOTUSED(el);
REDIS_NOTUSED(fd);
REDIS_NOTUSED(mask);
/* Initialize request when nothing was written. */
if (c->written == 0) {
/* Enforce upper bound to number of requests. */
if (config... | false | false | false | false | false | 0 |
setup_alarm(int fd, time_t *wakeup)
{
struct tm *tm;
struct rtc_wkalrm wake;
/* The wakeup time is in POSIX time (more or less UTC).
* Ideally RTCs use that same time; but PCs can't do that
* if they need to boot MS-Windows. Messy...
*
* When clock_mode == CM_UTC this process's timezone is UTC,
* so we'... | false | false | false | false | false | 0 |
ippAddRanges(ipp_t *ipp, /* I - IPP message */
ipp_tag_t group, /* I - IPP group */
const char *name, /* I - Name of attribute */
int num_values, /* I - Number of values */
const int *lower, /* I - Lower values */
const int *upper) /* I - Upper values */
{
int ... | false | false | false | false | false | 0 |
sys_filename_suffix(const char *fn)
{
const char *s = NULL;
while (fn && *fn) {
if (sys_is_path_delim(*fn)) s = fn+1;
fn++;
}
const char *p = s ? strrchr(s, '.') : NULL;
return p ? p+1 : NULL;
} | false | false | false | false | false | 0 |
format_uuid(exec_options *eo, uint8_t *uuid) {
char *ret = format_uuid_buffers[format_uuid_which++];
if ( format_uuid_which >= FORMAT_NBUFS )
format_uuid_which = 0;
snprintf(ret, FORMAT_UUID_LENGTH,
"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hh... | false | false | false | false | false | 0 |
copy( FILE * in, FILE * out )
{
unsigned bytes_read;
long total = 0;
do
{
bytes_read = fread( buf, 1, BUFSIZE, in );
if ( bytes_read > 0 )
if ( fwrite( buf, 1, bytes_read, out ) != bytes_read )
{
fprintf( stderr, "Write error on file %s\n", out_name );
... | false | false | false | false | false | 0 |
main(int argc, char *argv[]) {
/* Add here test code found to be problematic in some gcc platform. */
/* Off_t/off_t is a struct in Solaris with largefiles, and with gcc -ansi
* that struct cannot be compared in some gcc releases with a flat
* integer, such as a STRLEN. */
IV iv;
Off_t t0a = 2;
STRLEN t0b = ... | false | false | false | false | false | 0 |
resize_shrink_to_window (rp_frame *frame)
{
rp_window *win;
if (frame->win_number == EMPTY) return;
win = find_window_number (frame->win_number);
resize_frame_horizontally (frame, win->width + win->border*2 - frame->width);
resize_frame_vertically (frame, win->height + win->border*2 - frame->height);
} | false | false | false | false | false | 0 |
cogl_pango_glyph_cache_add_to_local_atlas (CoglPangoGlyphCache *cache,
PangoFont *font,
PangoGlyph glyph,
CoglPangoGlyphCacheValue *value)
{
CoglAtlas *atlas = NULL;
GSList *l;
/* Look... | false | false | false | false | false | 0 |
BuildFields(Data &data, size_t &offset, const IConverter *ic) const
{
data.Zap();
//
// Note: we do not use the FieldLink table, since the firmware
// on many devices apears flakey, so we try to write as close to
// the same order as we see coming from the device. Unfortunately,
// this doesn't really help, for... | false | false | false | false | false | 0 |
gtkmorph_image_settings_callback(GtkWidget* thismenu, gpointer userdata)
{
int i=
GPOINTER_TO_UINT(userdata);
//userdata==gtk_widget_get_data_top(thismenu,"userdata"));
g_assert(i>0);
if (sp->im_widget[i] && GTK_WIDGET_DRAWABLE(sp->im_widget[i]))
{
render_pixmap(i, PIXSUBIMAGE);
render_pixma... | false | false | false | false | false | 0 |
__mmu_notifier_invalidate_range(struct mm_struct *mm,
unsigned long start, unsigned long end)
{
struct mmu_notifier *mn;
int id;
id = srcu_read_lock(&srcu);
hlist_for_each_entry_rcu(mn, &mm->mmu_notifier_mm->list, hlist) {
if (mn->ops->invalidate_range)
mn->ops->invalidate_range(mn, mm, start, end);
}
... | false | false | false | false | false | 0 |
get_car_cdr_value(xmlNodePtr node, GConfValue** ret_value)
{
xmlNodePtr iter;
iter = node->xmlChildrenNode;
while (iter != NULL)
{
if (strcmp((char *)iter->name, "value") == 0)
get_first_value_from_xml(iter, ret_value);
iter = iter->next;
}
} | false | false | false | false | false | 0 |
getHostByAddr( const char* addr,
int len,
int type )
{
#ifdef HAVE_GETHOSTBYADDR_R
unsigned size = 32;
char* tmp = new char[size];
hostent* res = NULL;
hostent buf;
int err = 0;
while( gethostbyaddr_r( addr, len, type, &bu... | false | false | false | false | false | 0 |
open_continue(gpointer user_data)
{
struct serial_port *port = user_data;
int fd;
static int ntries = MAX_OPEN_TRIES;
if (!port->listener_id)
return FALSE; /* Owner exited */
fd = open(port->dev, O_RDONLY | O_NOCTTY);
if (fd < 0) {
int err = -errno;
error("Could not open %s: %s (%d)",
port->dev, strer... | false | false | false | false | false | 0 |
eventFilter(QObject* object, QEvent* event)
{
if ( event->type() == QEvent::MouseButtonPress ) {
const int id = d->id(object);
if (id > -1) {
emit pressed( d->id( object ) );
return true;
}
}
else if ( event->type() == QEvent::MouseButtonRelease ) {
co... | false | false | false | false | false | 0 |
add(const char* pragmaText, const char* file, int line)
{
if (Decl::mostRecent())
Decl::mostRecent()->addPragma(pragmaText, file, line);
else
AST::tree()->addPragma(pragmaText, file, line);
} | false | false | false | false | false | 0 |
signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
{
int i;
for (i=0;i<len;i++)
y[i] = scale*x[i];
} | false | false | false | false | false | 0 |
zxid_extract_body(zxid_conf* cf, char* enve)
{
char* p;
char* q;
if (!p)
goto nobody;
for (p = enve; p; p+=4) {
p = strstr(p, "Body");
if (!p) {
nobody:
ERR("Response does not contain <Body> res(%s)", STRNULLCHKD(enve));
return 0;
}
if (p > enve && ONE_OF_2(p[-1], '<', ':') && O... | false | true | false | false | true | 1 |
fm10k_configure_tx(struct fm10k_intfc *interface)
{
int i;
/* Setup the HW Tx Head and Tail descriptor pointers */
for (i = 0; i < interface->num_tx_queues; i++)
fm10k_configure_tx_ring(interface, interface->tx_ring[i]);
/* poll here to verify that Tx rings are now enabled */
for (i = 0; i < interface->num_tx_... | false | false | false | false | false | 0 |
renderings_set_zoom(renderings_t * renderings, gdouble zoom) {
while (renderings != NULL) {
rendering_set_image(renderings->rendering,
renderings->rendering->pixel_type,
zoom);
renderings = renderings->next;
}
return;
} | false | false | false | false | false | 0 |
eb_reset_text_context(EB_Book *book)
{
LOG(("in: eb_reset_text_context(book=%d)", (int)book->code));
eb_finalize_text_context(book);
book->text_context.out = NULL;
book->text_context.out_rest_length = 0;
book->text_context.unprocessed = NULL;
book->text_context.unprocessed_size = 0;
book->... | false | false | false | false | false | 0 |
git_merge_bases(git_oidarray *out, git_repository *repo, const git_oid *one, const git_oid *two)
{
int error;
git_revwalk *walk;
git_commit_list *result, *list;
git_array_oid_t array;
git_array_init(array);
if ((error = merge_bases(&result, &walk, repo, one, two)) < 0)
return error;
list = result;
w... | false | false | false | false | false | 0 |
ExecuteOnScene( Importer* pImp)
{
ai_assert(NULL != pImp && NULL != pImp->Pimpl()->mScene);
progress = pImp->GetProgressHandler();
ai_assert(progress);
SetupProperties( pImp );
// catch exceptions thrown inside the PostProcess-Step
try
{
Execute(pImp->Pimpl()->mScene);
} catch( const std::exception& err )... | false | false | false | false | false | 0 |
rightchar(VOID_A)
{
int rw, vw;
getcharwidth(inputbuf, rptr, &rw, &vw);
if (rptr + rw > inputlen) {
ringbell();
return;
}
rptr += rw;
vptr += vw;
#ifdef DEP_ORIGSHELL
if (dumbmode) rewritecursor(rptr, vptr);
else
#endif
if (within(vptr) && ptr2col(vptr) < vw) setcursor(rptr, vptr);
else while (vw--) righ... | false | false | false | false | false | 0 |
loadFromSourceModel()
{
DEBUG_BLOCK
slotModelReset();
} | false | false | false | false | false | 0 |
resp_ctrl_m_pg(unsigned char * p, int pcontrol, int target)
{ /* Control mode page for mode_sense */
unsigned char ch_ctrl_m_pg[] = {/* 0xa, 10, */ 0x6, 0, 0, 0, 0, 0,
0, 0, 0, 0};
unsigned char d_ctrl_m_pg[] = {0xa, 10, 2, 0, 0, 0, 0, 0,
0, 0, 0x2, 0x4b};
if (scsi_debug_dsense)
ctrl_m_pg[2]... | false | false | false | false | false | 0 |
krb5_ldap_delete_krbcontainer(krb5_context context, const char *dn)
{
LDAP *ld=NULL;
krb5_error_code st=0;
kdb5_dal_handle *dal_handle=NULL;
krb5_ldap_context *ldap_context=NULL;
krb5_ldap_server_handle *ldap_server_handle=NULL;
SETUP... | false | false | false | false | false | 0 |
k5_seconds_since_1970_to_time(krb5_timestamp elapsedSeconds,
krb5_ui_8 *ntTime)
{
*ntTime = elapsedSeconds;
if (elapsedSeconds > 0)
*ntTime += NT_TIME_EPOCH;
*ntTime *= 10000000;
return 0;
} | false | false | false | false | false | 0 |
findMissingMinimum(const CharsetInfo &charset,
ISet<WideChar> &missing)
{
Char to;
size_t i;
for (i = 0; i < 26; i++) {
if (!univToDescCheck(charset, UnivCharsetDesc::A + i, to))
missing += UnivCharsetDesc::A + i;
if (!univToDescCheck(charset, UnivCharsetDesc::a + i, to))
missing += UnivCh... | false | false | false | false | false | 0 |
backsql_FreeRow_x( BACKSQL_ROW_NTS *row, void *ctx )
{
if ( row->cols == NULL ) {
return SQL_ERROR;
}
ber_bvarray_free_x( row->col_names, ctx );
ber_memfree_x( row->col_prec, ctx );
ber_memfree_x( row->col_type, ctx );
ber_memvfree_x( (void **)row->cols, ctx );
ber_memfree_x( row->value_len, ctx );
return S... | false | false | false | false | false | 0 |
find_file_next(pCPP_ char *name)
{
int i;
size_t nl = strlen(name);
FILE *f;
struct found_file *ff;
find_file_error = FF_ERROR;
protect_detect.state = -1;
protect_detect.macro = 0;
for (i = current_incdir + 1; (size_t)i < include_path_nb; i ++) {
char *s;
size_t ni = strlen(include_path[i]);
s = getmem(... | false | false | false | false | false | 0 |
get_text(t_TEXT *Text, int_text n, int_text text){
int i = 0;
for(i = 0;i<n; i++){
if(text < Text[i].n_start){
return i-1;
}
}
return i-1;
} | false | false | false | false | false | 0 |
next_in_thread_wrap(ARTICLE *art)
{
int height = 0;
int flag = FALSE;
do {
while (!A_SIBLING(art) && A_PARENT(art)) {
art = A_PARENT(art);
height++;
}
if (A_SIBLING(art))
art = A_SIBLING(art);
else {
if (flag)
return NULL;
art = art->subject->thread;
flag = True;
h... | false | false | false | false | false | 0 |
select_instructions(struct compilation_unit *cu)
{
struct basic_block *bb;
int err = 0;
cu->frame_ptr = get_fixed_var(cu, MACH_REG_xBP);
if (!cu->frame_ptr) {
err = -ENOMEM;
goto out;
}
cu->stack_ptr = get_fixed_var(cu, MACH_REG_xSP);
if (!cu->stack_ptr) {
err = -ENOMEM;
goto out;
}
/*
* Let the l... | false | false | false | false | false | 0 |
GetHandlePosition(int handle, double xyz[3])
{
if ( handle < 0 || handle >= this->NumberOfHandles )
{
vtkErrorMacro(<<"vtkSplineWidget: handle index out of range.");
return;
}
this->HandleGeometry[handle]->GetCenter(xyz);
} | false | false | false | false | false | 0 |
boxes_display_page_get_size (BoxesDisplayPage* self, gint* width, gint* height) {
gint _vala_width = 0;
gint _vala_height = 0;
gint tb_height = 0;
BoxesApp* _tmp0_ = NULL;
GtkApplicationWindow* _tmp1_ = NULL;
gint _tmp2_ = 0;
gint _tmp3_ = 0;
BoxesApp* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
gboolean _tmp6_ =... | false | false | false | false | false | 0 |
packLOCAL(action* a,buffer *b)
{
grib_int_t localDefinitionNumber;
grib_int_t length;
action* local;
action next;
grib_int_t* lengthValue = (b->values) - 1;
grib_octet_t* packedLengthValue = (b->packed) - 2;
/*
// Setup ccc = 98, sss = 000, nnn = number
*/
localDefinitionNumber = *(b->values);
localDefinitionNumbe... | false | false | false | false | false | 0 |
cs_entry_no_extend (cs *T, int i, int j, double x)
{
// if (!CS_TRIPLET (T) || i < 0 || j < 0) return (0) ; /* check inputs */
if (T->nz >= T->nzmax && !cs_sprealloc (T,2*(T->nzmax))) return (0) ;
if (T->x) T->x [T->nz] = x ;
T->i [T->nz] = i ;
T->p [T->nz++] = j ;
// T->m = CS_MAX (T->m, i+1)... | false | false | false | false | false | 0 |
AddBadMembers(const QVector<int> &more) {
for(int i=0; i<more.count(); i++) {
const int member_idx = more[i];
AddBadMember(member_idx);
}
} | false | false | false | false | false | 0 |
_dbus_watch_list_toggle_watch (DBusWatchList *watch_list,
DBusWatch *watch,
dbus_bool_t enabled)
{
enabled = !!enabled;
if (enabled == watch->enabled)
return;
watch->enabled = enabled;
if (watch_list->w... | false | false | false | false | false | 0 |
external_video_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
{
const Elm_Params_Video *p;
if (to_params) p = to_params;
else if (from_params) p = from_params;
else return;
if (p->file) elm_video_file_set(obj, p->file);
if (p-... | false | false | false | false | false | 0 |
dbmny4cmp(DBPROCESS * dbproc, DBMONEY4 * m1, DBMONEY4 * m2)
{
tdsdump_log(TDS_DBG_FUNC, "dbmny4cmp(%p, %p, %p)\n", dbproc, m1, m2);
CHECK_PARAMETER(dbproc, SYBENULL, 0);
CHECK_NULP(m1, "dbmny4cmp", 2, 0);
CHECK_NULP(m2, "dbmny4cmp", 3, 0);
if (m1->mny4 < m2->mny4) {
return -1;
}
if (m1->mny4 > m2->mny4) {
... | false | false | false | false | false | 0 |
drawTileRect(TileRect & tileRect, QColor & color)
{
QRectF r;
tileRectToQRect(tileRect, r);
GridEntry * gridEntry = new GridEntry(r, NULL);
gridEntry->setZValue(m_sketchWidget->getTopZ());
gridEntry->setPen(color);
gridEntry->setBrush(QBrush(color));
m_sketchWidget->scene()->addItem(gridEntry);
gridEntry->show(... | false | false | false | false | false | 0 |
__pyx_tp_dealloc_9lightning_4impl_12dataset_fast_CSCDataset(PyObject *o) {
struct __pyx_obj_9lightning_4impl_12dataset_fast_CSCDataset *p = (struct __pyx_obj_9lightning_4impl_12dataset_fast_CSCDataset *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyO... | false | false | false | false | false | 0 |
pkix_pl_AiaMgr_FindLDAPClient(
PKIX_PL_AIAMgr *aiaMgr,
char *domainName,
PKIX_PL_LdapClient **pClient,
void *plContext)
{
PKIX_PL_String *domainString = NULL;
PKIX_PL_LdapDefaultClient *client = NULL;
PKIX_ENTER(AIAMGR, "pkix_pl_AiaMgr_FindLDAPClient");
P... | false | false | false | false | false | 0 |
wl1273_fm_set_rx_freq(struct wl1273_device *radio, unsigned int freq)
{
struct wl1273_core *core = radio->core;
int r, f;
unsigned long t;
if (freq < radio->rangelow) {
dev_err(radio->dev,
"Frequency out of range: %d < %d\n", freq,
radio->rangelow);
r = -ERANGE;
goto err;
}
if (freq > radio->rangehi... | false | false | false | false | false | 0 |
table_interface_get_n_columns (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EaCalendarItem * ea_calitem = EA_CALENDAR_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_calitem);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
if (!g_obj)
return -1;
return EA_CALENDAR_COLUMN_NUM;... | false | false | false | false | false | 0 |
get_interpreter(const char *name)
{
PyObject *p;
PyThreadState *tstate;
interpreterdata *idata = NULL;
if (! name)
name = MAIN_INTERPRETER;
#if APR_HAS_THREADS
apr_thread_mutex_lock(interpreters_lock);
#endif
#ifdef WITH_THREAD
PyEval_AcquireLock();
#endif
if (!interpreters) {... | false | false | false | false | false | 0 |
macSkein(uint8_t* key, int32_t key_length,
const uint8_t* data[], uint32_t data_length[],
uint8_t* mac, int32_t mac_length, SkeinSize_t skeinSize)
{
SkeinCtx_t ctx;
skeinCtxPrepare(&ctx, skeinSize);
skeinMacInit(&ctx, key, key_length, mac_length);
while (*data) {
... | false | false | false | false | false | 0 |
cls()
{
register int c;
c = gchar_cursor();
#ifdef KANJI
if (ISkanji(c))
{
int ret;
if ((stype != 0) && (p_ww & 64))
return 1;
if ((stype != 0) && (p_ww & 32))
return JPC_HIRA;
if ((ret = jpcls((char_u)c, *(ml_get_cursor() + 1))) >= 0)
{
if (ret != JPC_KIGOU && stype != 0)
return JPC_HIRA;... | false | false | false | false | false | 0 |
gst_multipart_demux_change_state (GstElement * element,
GstStateChange transition)
{
GstMultipartDemux *multipart;
GstStateChangeReturn ret;
multipart = GST_MULTIPART_DEMUX (element);
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
if (ret == GST_STATE_CHANGE_FAILURE)
ret... | false | false | false | false | false | 0 |
GetScale( int *pbSuccess )
{
if( pbSuccess != NULL )
*pbSuccess = TRUE;
return dfScale;
} | false | false | false | false | false | 0 |
i40e_set_pci_config_data(struct i40e_hw *hw, u16 link_status)
{
hw->bus.type = i40e_bus_type_pci_express;
switch (link_status & PCI_EXP_LNKSTA_NLW) {
case PCI_EXP_LNKSTA_NLW_X1:
hw->bus.width = i40e_bus_width_pcie_x1;
break;
case PCI_EXP_LNKSTA_NLW_X2:
hw->bus.width = i40e_bus_width_pcie_x2;
break;
case P... | false | false | false | false | false | 0 |
efreet_icon_extension_add(const char *ext)
{
Eina_List *l;
EINA_SAFETY_ON_NULL_RETURN(ext);
ext = eina_stringshare_add(ext);
if ((l = eina_list_data_find_list(efreet_icon_extensions, ext)))
{
efreet_icon_extensions = eina_list_promote_list(efreet_icon_extensions, l);
eina_stringsh... | true | true | false | false | false | 1 |
uc_add_command(name, name_len, rep, argt, def, flags, compl, compl_arg, force)
char_u *name;
size_t name_len;
char_u *rep;
long argt;
long def;
int flags;
int compl;
char_u *compl_arg;
int force;
{
ucmd_T *cmd = NULL;
char_u *p;
int i;
int cmp = 1;
char_u *re... | false | false | false | false | false | 0 |
java_replace_references (tree *tp, int *walk_subtrees,
void *data ATTRIBUTE_UNUSED)
{
if (TREE_CODE (*tp) == MODIFY_EXPR)
{
source_location loc = EXPR_LOCATION (*tp);
tree lhs = TREE_OPERAND (*tp, 0);
/* This is specific to the bytecode compiler. If a variable has
LOCAL_SLOT_P set, replac... | false | false | false | false | true | 1 |
mlx4_dev_cap_dump(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
{
if (dev_cap->bf_reg_size > 0)
mlx4_dbg(dev, "BlueFlame available (reg size %d, regs/page %d)\n",
dev_cap->bf_reg_size, dev_cap->bf_regs_per_page);
else
mlx4_dbg(dev, "BlueFlame not available\n");
mlx4_dbg(dev, "Base MM extensions: flags... | false | false | false | false | false | 0 |
Curl_fnmatch(void *ptr, const char *pattern, const char *string)
{
(void)ptr; /* the argument is specified by the curl_fnmatch_callback
prototype, but not used by Curl_fnmatch() */
if(!pattern || !string) {
return CURL_FNMATCH_FAIL;
}
return loop((unsigned char *)pattern, (unsigned char *)st... | false | false | false | false | false | 0 |
create_leaf_node(Parser *parser,
enum Oper oper,
SgrepString *phrase, int phrase_label)
{
ParseTreeNode *n;
SgrepData *sgrep=parser->sgrep;
/* Create a leaf node */
n=create_tree_node(parser,oper);
if (!n) return NULL;
n->label_left=phrase_label;
/* Now create a phrase node ... | false | false | false | false | false | 0 |
stepd_signal(int fd, int signal)
{
int req = REQUEST_SIGNAL_PROCESS_GROUP;
int rc;
safe_write(fd, &req, sizeof(int));
safe_write(fd, &signal, sizeof(int));
/* Receive the return code */
safe_read(fd, &rc, sizeof(int));
return rc;
rwfail:
return -1;
} | false | false | false | false | false | 0 |
unlink(const char *pathname) {
int result;
instw_t instw;
REFCOUNT;
if (!libc_handle)
initialize();
#if DEBUG
debug(2,"unlink(%s)\n",pathname);
#endif
/* We were asked to work in "real" mode */
if( !(__instw.gstatus & INSTW_INITIALIZED) ||
!(__instw.gstatus & INSTW_OKWRAP) ) {
result=true_unlink(p... | false | false | false | false | false | 0 |
ucs4_to_utf8 (FcChar32 ucs4,
FcChar8 dest[FC_UTF8_MAX_LEN])
{
int bits;
FcChar8 *d = dest;
if (ucs4 < 0x80) { *d++= ucs4; bits= -6; }
else if (ucs4 < 0x800) { *d++= ((ucs4 >> 6) & 0x1F) | 0xC0; bits= 0; }
else if (ucs4 < 0x10000) { *d++= ... | false | false | false | false | false | 0 |
EnsureFromSpaceIsCommitted() {
if (new_space_.CommitFromSpaceIfNeeded()) return;
// Committing memory to from space failed.
// Try shrinking and try again.
Shrink();
if (new_space_.CommitFromSpaceIfNeeded()) return;
// Committing memory to from space failed again.
// Memory is exhausted and we will die.... | false | false | false | false | false | 0 |
g3d_stream_zlib_close(gpointer data)
{
G3DStreamZlib *sz = data;
if(sz->inbuf)
g_free(sz->inbuf);
if(sz->buffer)
g_free(sz->buffer);
inflateEnd(sz->zstream);
g_free(sz->zstream);
g_free(sz->uri);
g_free(sz);
return 0;
} | false | false | false | false | false | 0 |
ixgbevf_reset_subtask(struct ixgbevf_adapter *adapter)
{
if (!test_and_clear_bit(__IXGBEVF_RESET_REQUESTED, &adapter->state))
return;
/* If we're already down or resetting, just bail */
if (test_bit(__IXGBEVF_DOWN, &adapter->state) ||
test_bit(__IXGBEVF_RESETTING, &adapter->state))
return;
adapter->tx_ti... | false | false | false | false | false | 0 |
fiasco_c_options_set_comment (fiasco_c_options_t *options, const char *comment)
/*
* Define `comment' of FIASCO stream.
*
* Return value:
* 1 on success
* 0 otherwise
*/
{
c_options_t *this = (c_options_t *) cast_c_options (options);
if (!this)
{
return 0;
}
else if (!comment)
{
... | false | false | false | false | false | 0 |
Deflate(uint8 level)
{
if( _iscompressed || (!size()) || level>9 )
return;
char *buf;
buf=new char[size()+8];
uint32 newsize=size(),oldsize=size();
reserve(size()+8);
_compress((void*)buf, &newsize, (void*)contents(),size(),level);
if(!newsize)
return;
... | false | false | false | false | false | 0 |
list_resort(list_t *list, int (*comparision)(void *, void *)) {
list_t tmplist = NULL;
list_t l = *list;
while (l) {
list_t cur = l;
l = l->next;
list_add_sorted(&tmplist, cur->data, comparision);
xfree(cur);
}
*list = tmplist;
} | false | false | false | false | false | 0 |
get_format(struct parse_state *ps,char **p,int *format,ByteOrder *order)
{
char *t;
t = *p;
L_CASE(t);
*p = t;
/* Parse the byte order if present (ok for it to not be present) */
if (!strcmp("lsb", *p) ) {
*format = BINARY;
*order = BO_LSB;
} else if (!strcmp("msb", *p) ) {
*format = BINARY... | false | false | false | false | false | 0 |
_CATCH(CTX ctx, kStmtExpr *stmt, tkitr_t *itr)
{
kStmtExpr *stmtHEAD = NULL;
while(ITR_is(itr, TT_CATCH)) {
ITR_next(itr);
if(ITR_is(itr, TT_PARENTHESIS)) {
tkitr_t pbuf, *pitr = ITR_new(ITR_nextTK(itr), &pbuf);
kStmtExpr *stmtCATCH = new_Stmt2(ctx, STT_CATCH, NULL);
Stmt_tadd(ctx, stmtCATCH, pitr, isEVE... | false | false | false | false | false | 0 |
subst(sub_context_ty *scp, wstring_ty *s)
{
collect_ty buf;
wchar_t c;
wstring_ty *result;
table_ty *tp;
table_ty *the_end;
int error_count;
trace(("subst(scp = %08lX, s = %8.8lX)\n{\n", (long)scp, (long)s));
collect_constructor(&buf);
sub... | false | false | false | false | false | 0 |
tab_left( const bool updated )
{
SKELETON::View *view = get_current_view();
if( view ) view->set_command( "tab_left" );
} | 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.