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 |
|---|---|---|---|---|---|---|
InsertEndChild( XMLNode* addThis )
{
TIXMLASSERT( addThis );
if ( addThis->_document != _document ) {
TIXMLASSERT( false );
return 0;
}
InsertChildPreamble( addThis );
if ( _lastChild ) {
TIXMLASSERT( _firstChild );
TIXMLASSERT( _lastChild->_next == 0 );
... | false | false | false | false | false | 0 |
buf_printf_markup(struct buf *buf, unsigned level, const char *fmt, ...)
{
va_list args;
const char *eol = "\n";
if (!config_httpprettytelemetry) {
level = 0;
eol = "";
}
va_start(args, fmt);
buf_printf(buf, "%*s", level * MARKUP_INDENT, "");
buf_vprintf(buf, fmt, args);
buf_appendc... | false | false | false | false | false | 0 |
getCmd()
{
int ret;
if(currentCmd == CMDNull) {
ret = receiveCmd();
} else {
ret = currentCmd;
}
currentCmd = CMDNull;
return ret;
} | false | false | false | false | false | 0 |
excuse_me(symtab_ty *stp, string_ty *key, void *data, void *aux)
{
graph_ty *gp;
graph_file_ty *gfp;
trace(("excuse_me()\n{\n"));
(void)stp;
(void)key;
gp = aux;
gfp = data;
/*
* Print a nice warm fuzzy message when a top-level target
* can not be built.
*/
... | false | false | false | false | false | 0 |
testHashSTL(int, char*[])
{
bool result = true;
result = test_hash_map() && result;
result = test_hash_set() && result;
return result? 0:1;
} | false | false | false | false | false | 0 |
is_legal(int pos, int color)
{
/* 0. A pass move is always legal. */
if (pos == PASS_MOVE)
return 1;
/* 1. The move must be inside the board. */
ASSERT_ON_BOARD1(pos);
/* 2. The location must be empty. */
if (board[pos] != EMPTY)
return 0;
/* 3. The location must not be the ko point. */
if (... | false | false | false | false | false | 0 |
giggle_view_shell_find_view (GiggleViewShell *shell,
GType type)
{
int n_pages, i;
GtkWidget *page;
g_return_val_if_fail (GIGGLE_IS_VIEW_SHELL (shell), NULL);
g_return_val_if_fail (g_type_is_a (type, GIGGLE_TYPE_VIEW), NULL);
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (shell));
... | false | false | false | false | false | 0 |
ToLowerRune(Rune r) {
if (r < Runeself) {
if ('A' <= r && r <= 'Z')
r += 'a' - 'A';
return r;
}
const CaseFold *f = LookupCaseFold(unicode_tolower, num_unicode_tolower, r);
if (f == NULL || r < f->lo)
return r;
return ApplyFold(f, r);
} | false | false | false | false | false | 0 |
zmod_poly_mul_classical_trunc(zmod_poly_t res, zmod_poly_t poly1, zmod_poly_t poly2, unsigned long trunc)
{
if (!poly1->length || !poly2->length || !trunc)
{
// one of the polys is zero
res->length = 0;
return;
}
/*if (poly1 == poly2)
{
// polys are identical, so call speciali... | false | false | false | false | false | 0 |
insert_ordered_array (type_t item, struct ordered_array_t *array)
{
uint32_t iterator = 0;
ASSERT (array->less_than);
while (iterator < array->size && array->less_than (array->array[iterator], item))
iterator++;
if (iterator == array->size) /* Just add at the end of the array */
arra... | false | false | false | true | false | 1 |
mask_password(int argc, char ***argv)
{
char **temp_argv;
temp_argv= (char **)(my_malloc(sizeof(char *) * argc, MYF(MY_WME)));
argc--;
while (argc > 0)
{
temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE));
if (find_type((*argv)[argc - 1],&command_typelib, FIND_TYPE_BASIC) == ADMIN_PASSWORD ||
... | false | false | false | false | false | 0 |
uoutput(char c)
{
static char buf[MAX_LL];
static int col = 0;
static int maxcol = 0;
int i;
switch (c) {
case '\r':
col = 0;
break;
case '\n':
for (i = 0; i < maxcol; i++) {
if (stash(buf[i]) < 0)
return -1;
}
if (crlf) {
if (stash('\r') < 0)
return -1;
}
if (stash(c) < 0)
... | false | false | false | false | false | 0 |
filter_func (GdkXEvent *gdkxevent,
GdkEvent *event,
gpointer data)
{
XEvent *xevent = gdkxevent;
#ifdef HAVE_STARTUP_NOTIFICATION
int i;
Display *display;
#endif /* HAVE_STARTUP_NOTIFICATION */
switch (xevent->type)
{
case PropertyNotify:
{
WnckScreen *scre... | false | false | false | false | false | 0 |
BuildArrayLiteralBoilerplateLiterals(ZoneList<Expression*>* values,
Handle<FixedArray> literals,
bool* is_simple,
int* depth) {
// Fill in the literals.
// Accumulate... | false | false | false | false | false | 0 |
CreateEscapeSequences( wxString& dst_str, wxString& src_str )
{
if ( src_str.length() == 0 )
{
dst_str = src_str;
return src_str;
}
wxString::const_iterator i = src_str.begin();
dst_str.clear();
for ( ; i != src_str.end(); i++ )
{
wxChar a = wxPGGetIterChar(src_str... | false | false | false | false | false | 0 |
var_in_context(Term t, Context c)
{
DEREFERENCE(t, c);
return VARIABLE(t);
} | false | false | false | false | false | 0 |
Release(GlobalHandles* global_handles) {
ASSERT(state_ != FREE);
if (IsWeakRetainer()) {
global_handles->number_of_weak_handles_--;
if (object_->IsJSGlobalObject()) {
global_handles->number_of_global_object_weak_handles_--;
}
}
state_ = FREE;
parameter_or_next_free_.next_fr... | false | false | false | false | false | 0 |
_set_priority (GESTimelineElement * element, guint32 priority)
{
GESTrackElement *object = GES_TRACK_ELEMENT (element);
if (priority < MIN_GNL_PRIO) {
GST_INFO_OBJECT (element, "Priority (%d) < MIN_GNL_PRIO, setting it to %d",
priority, MIN_GNL_PRIO);
priority = MIN_GNL_PRIO;
}
GST_DEBUG ("obj... | false | false | false | false | false | 0 |
snd_compr_calc_avail(struct snd_compr_stream *stream,
struct snd_compr_avail *avail)
{
memset(avail, 0, sizeof(*avail));
snd_compr_update_tstamp(stream, &avail->tstamp);
/* Still need to return avail even if tstamp can't be filled in */
if (stream->runtime->total_bytes_available == 0 &&
stream->runtime->state... | false | false | false | false | false | 0 |
ChangeSecurityCode(gn_data *data, struct gn_statemachine *state)
{
unsigned char req[32] = {FBUS_FRAME_HEADER, 0x04};
unsigned char *pos;
int len1, len2;
if (!data->security_code) return GN_ERR_INTERNALERROR;
len1 = strlen(data->security_code->code);
len2 = strlen(data->security_code->new_code);
if (len1 < 0 |... | true | true | false | false | false | 1 |
bignum_add_unsigned(bignum * x, bignum * y, int negative_p)
{
GC_BIGNUM(x); GC_BIGNUM(y);
if ((BIGNUM_LENGTH (y)) > (BIGNUM_LENGTH (x)))
{
bignum * z = x;
x = y;
y = z;
}
{
bignum_length_type x_length = (BIGNUM_LENGTH (x));
bignum * r = (allot_bignum ((x_length + 1), negative_p));
bignum_digit_type... | false | false | false | false | false | 0 |
flag(const QString& theFlagFileName, BackGnd *backGnd)
{
// kDebug() << "Country("<<m_name<<", "<<this<<")::flag flagFileName " << theFlagFileName << endl;
if (m_flag)
{
m_flag->hide();
delete m_flag;
m_flag = 0;
}
m_flag = new FlagSprite(theFlagFileName, backGnd->onu()->zoom(), backGnd);
m_... | false | false | false | false | false | 0 |
xioctl(int fd, int cmd, void *arg, int mayfail)
{
int rc;
#ifndef USE_LIBV4L
rc = ioctl(fd,cmd,arg);
#else /* USE_LIBV4L */
rc = v4l2_ioctl(fd,cmd,arg);
#endif /* USE_LIBV4L */
if (rc >= 0 && ng_debug < 2)
return rc;
if (mayfail && ((errno == EINVAL) || (errno == ENOTTY)) && ng_debug < 2)
return ... | false | false | false | false | false | 0 |
check_protect_ro_rw_err(void)
{
const char * fcn_name = "check_protect_ro_rw_err()";
H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
void * thing_ptr = NULL;
TESTING("protect a read only entry rw error");
pass = TRUE;
/* allocate a cache, protect an entry read only, and then try to pro... | false | false | false | false | false | 0 |
tspInsertInBrokerList(tBrokerList *new_element, tBrokerList **sorted_list) {
tBrokerList *compared_broker = NULL;
tBrokerList *precedent_broker = NULL;
/* If the list is empty, the inserted element becomes the list */
if (*sorted_list == NULL) {
*sorted_list = new_element;
}
else {
compared_broker = *sorted_... | false | false | false | false | false | 0 |
qlcnic_sriov_pf_add_guest_vlan(struct qlcnic_adapter *adapter,
struct qlcnic_vf_info *vf,
struct qlcnic_cmd_args *cmd)
{
struct qlcnic_sriov *sriov = adapter->ahw->sriov;
int err = -EIO;
u16 vlan;
if (qlcnic_83xx_pf_check(adapter) && qlcnic_sriov_check_any_vlan(vf))
return err;
vlan = cmd->req.ar... | false | false | false | false | false | 0 |
IDirectFBInputDevice_GetKeyState( IDirectFBInputDevice *thiz,
DFBInputDeviceKeyIdentifier key_id,
DFBInputDeviceKeyState *state )
{
unsigned int index = key_id - DFB_KEY(IDENTIFIER, 0);
DIRECT_INTERFACE_GET_DATA(IDirectFBInputDev... | false | false | false | false | false | 0 |
send_to(tid, shost, cid_port, tpname, tpvalue, tpsize)
char *tid, *tpname;
ulong shost;
int cid_port;
char *tpvalue;
long tpsize;
{
int id, sock;
char mapid[MAP_LEN] ;
char host[MAP_LEN], login[MAP_LEN];
u_short this_op = TSH_OP_PUT;
sng_map *link_pt;
tsh_put_it out;
tsh_put_o... | false | false | false | false | false | 0 |
LI4(V54,V55)
object V54;object V55;
{ VMB4 VMS4 VMV4
goto TTL;
TTL:;
princ_str("\n bds_bind(",((object)VV[1]));
base[0]= (V55);
vs_top=(vs_base=base+0)+1;
(void) (*Lnk21)();
vs_top=sup;
V56= vs_base[0];
(void)((*(LnkLI20))(V56));
princ_char(44,((object)VV[1]));
(void)((*(LnkLI20))((V54)));
princ_str(");",(... | false | false | false | false | false | 0 |
free_ap_element(Element *curr)
{
int i;
if (curr == NULL) return;
for (i = 0; i < 3; i++) {
free_all_ap_range (curr->ses[i]);
}
free_element (curr);
} | false | false | false | false | false | 0 |
gigolo_backend_gvfs_browse_network(GigoloBackendGVFS *backend, GtkWindow *parent, GtkTreeStore *store)
{
BrowseData *bd = g_new0(BrowseData, 1);
GigoloBackendGVFSPrivate *priv;
g_return_if_fail(backend != NULL);
bd->mode = BROWSE_MODE_DOMAINS;
bd->parent_path = NULL;
bd->parent = parent;
bd->store = store;
bd... | false | false | false | false | false | 0 |
__ioat_issue_pending(struct ioatdma_chan *ioat_chan)
{
ioat_chan->dmacount += ioat_ring_pending(ioat_chan);
ioat_chan->issued = ioat_chan->head;
writew(ioat_chan->dmacount,
ioat_chan->reg_base + IOAT_CHAN_DMACOUNT_OFFSET);
dev_dbg(to_dev(ioat_chan),
"%s: head: %#x tail: %#x issued: %#x count: %#x\n",
__... | false | false | false | false | false | 0 |
XML_GetBuffer(XML_Parser parser, int len)
{
/* BEGIN MOZILLA CHANGE (sanity check len) */
if (len < 0) {
errorCode = XML_ERROR_NO_MEMORY;
return NULL;
}
/* END MOZILLA CHANGE */
switch (ps_parsing) {
case XML_SUSPENDED:
errorCode = XML_ERROR_SUSPENDED;
return NULL;
case XML_FINISHED:
error... | false | false | false | false | false | 0 |
TIFF_n_irregs(Byte * p1, int nb)
/**
** There are "nb" bytes in buffer "p1"
** Return number of irregular (non-identical) bytes
** in a sequence (0, 1, 2 ... nb)
**/
{
int i;
Byte *p2;
if (nb < 2)
return nb; /* 0 or 1 */
p2 = p1 + 1;
for (i = 1; i < nb && *p1 != *p2; p1++, p2++)
i++;
return (i == nb) ... | false | false | false | false | false | 0 |
MakeInformationVector(
vtkInformationVector *outputVector, const vtkStdString& procName)
{
*this->FileNameOld = vtkStdString(this->FileName);
// clear prior case information
this->Readers->RemoveAllItems();
// recreate case information
vtkStdString casePath, controlDictPath;
this->CreateCasePath(caseP... | false | false | false | false | false | 0 |
getElementAsAPFloat(unsigned Elt) const {
const char *EltPtr = getElementPointer(Elt);
switch (getElementType()->getTypeID()) {
default:
llvm_unreachable("Accessor can only be used when element is float/double!");
case Type::FloatTyID: {
auto EltVal = *reinterpret_cast<const uint32_t *>(EltPtr);
re... | false | false | false | false | false | 0 |
nc4_field_list_add(NC_FIELD_INFO_T **list, int fieldid, const char *name,
size_t offset, hid_t field_hdf_typeid, hid_t native_typeid,
nc_type xtype, int ndims, const int *dim_sizesp)
{
NC_FIELD_INFO_T *field, *f;
int i;
/* Name has already been checked and UTF8 normalized... | false | true | false | false | false | 1 |
userTaskCallback(void)
{
if ((myRobot->getFaultFlags() & ArUtil::BIT4) && myGyroWorking)
{
ArLog::log(ArLog::Normal, "ArAnalogGyro: Gyro failed");
myGyroWorking = false;
}
if (!(myRobot->getFaultFlags() & ArUtil::BIT4) && !myGyroWorking)
{
ArLog::log(ArLog::Normal, "ArAnalogGyro: Gyro recovered")... | false | false | false | false | false | 0 |
bookmarks_delete_bookmark (void)
{
GtkTreeIter iter;
GtkTreePath *path;
gint *indices, row, rows;
g_assert (GTK_IS_TREE_VIEW (bookmark_list_widget));
if (!gtk_tree_selection_get_selected (bookmark_selection, NULL, &iter))
return;
/* Remove the selected item from the list store. on_row_deleted() will
rem... | false | false | false | false | false | 0 |
adf_remove(struct pci_dev *pdev)
{
struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
if (!accel_dev) {
pr_err("QAT: Driver removal failed\n");
return;
}
if (adf_dev_stop(accel_dev))
dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
adf_dev_shutdown(accel_dev);
adf_cleanup_... | false | false | false | false | false | 0 |
particular_demod(Topform c, Topform demodulator, int target, int direction,
Ilist *fpos, Ilist *ipos)
{
Literals lit;
int n = 0;
int sequence = 0;
for (lit = c->literals, *ipos = NULL; lit && *ipos == NULL; lit=lit->next) {
n++;
part_recurse(lit->atom, lit->atom, demodulator, target, direction,... | false | false | false | false | false | 0 |
at76_mod_init(void)
{
int result;
printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " loading\n");
mutex_init(&fw_mutex);
/* register this driver with the USB subsystem */
result = usb_register(&at76_driver);
if (result < 0)
printk(KERN_ERR DRIVER_NAME
": usb_register failed (status %d)\n", result);
... | false | false | false | false | false | 0 |
acerhdf_get_mode(struct thermal_zone_device *thermal,
enum thermal_device_mode *mode)
{
if (verbose)
pr_notice("kernel mode fan control %d\n", kernelmode);
*mode = (kernelmode) ? THERMAL_DEVICE_ENABLED
: THERMAL_DEVICE_DISABLED;
return 0;
} | false | false | false | false | false | 0 |
get_fixed_message_size(const char * message, size_t size,
uint32_t uid, int force_no_uid)
{
size_t fixed_size;
size_t cur_token;
size_t left;
const char * next;
const char * cur;
int end;
int r;
uint32_t tmp_uid;
cur_token = 0;
fixed_size = 0;
/* headers */
end = FALSE;
while (!en... | false | false | false | false | false | 0 |
WriteHeaderEntries(string *outstring,
const string& filename) const {
WriteOneHeaderEntry(outstring, string(token_.text, token_.textlen),
filename);
} | false | false | false | false | false | 0 |
check_alloc_area(const char *filename,
int line)
#else
static void
check_alloc_area(filename,
line)
const char *filename;
int line;
#endif
{
if (strcmp(ZERO_ALLOC_POINTER, ALLOC_AREA_CHECK_SUM)) {
fprintf(stderr,
"Allocated area for 0 size has broken at : %s(%d).\n",
filename, line);
e... | false | false | false | false | false | 0 |
OnChangeAtom ()
{
if (m_bLoading || !m_Atom)
return;
Document *pDoc = (Document*) GetDocument ();
if (!pDoc) return;
string sym = m_Atom->GetSymbol ();
m_TextItem->ReplaceText (sym, m_BeginAtom, m_EndAtom - m_BeginAtom);
m_EndAtom = m_BeginAtom + sym.length ();
// FIXME: we probably need to insert a tag there
... | false | false | false | false | false | 0 |
objc_next_runtime_abi_01_init (objc_runtime_hooks *rthooks)
{
if (flag_objc_exceptions
&& !flag_objc_sjlj_exceptions)
{
warning_at (UNKNOWN_LOCATION, OPT_Wall,
"%<-fobjc-sjlj-exceptions%> is the only supported exceptions "
"system for %<-fnext-runtime%> with %<-fobjc-abi-version%> < 2");
}
... | false | false | false | false | false | 0 |
_identify(time_t modtime, const string &checksum)
{
// old path but modtime has changed - update checksum
if (uid != -1)
{
Q q("UPDATE Identify SET modtime = ?, "
"checksum = ? WHERE path = ?;");
q << modtime << checksum << path;
q.execute();
return;
}
... | false | false | false | false | false | 0 |
gmarker(double c, double r, int color, int type)
{
if (!m->active) return;
commandwrite(20);
longwrite(c);
longwrite(r);
shortwrite(color);
shortwrite(type);
if (!m->recording && m->device && m->device->marker)
m->device->marker(m->device->data,c,r,color,type);
} | false | false | false | false | false | 0 |
isl_map_set_tuple_id(__isl_take isl_map *map,
enum isl_dim_type type, __isl_take isl_id *id)
{
map = isl_map_cow(map);
if (!map)
goto error;
map->dim = isl_space_set_tuple_id(map->dim, type, id);
return isl_map_reset_space(map, isl_space_copy(map->dim));
error:
isl_id_free(id);
return NULL;
} | false | false | false | false | false | 0 |
TarjanVisit(int i)
{
// We are now visiting this node.
this->TarjanVisited[i] = this->TarjanWalkId;
// Initialize the entry.
this->TarjanEntries[i].Root = i;
this->TarjanComponents[i] = -1;
this->TarjanEntries[i].VisitIndex = ++this->TarjanIndex;
this->TarjanStack.push(i);
// Follow outgoing edges.
... | false | false | false | false | false | 0 |
ClearCastItem()
{
if (m_CastItem == m_targets.getItemTarget())
{ m_targets.setItemTarget(NULL); }
m_CastItem = NULL;
} | false | false | false | false | false | 0 |
UpdatePartsInfo()
{
// Cache part count
uint16 partcount = GetPartCount();
bool flag = (time(NULL) - m_nCompleteSourcesTime > 0);
// Ensure the frequency-list is ready
if ( m_AvailPartFrequency.size() != GetPartCount() ) {
m_AvailPartFrequency.clear();
m_AvailPartFrequency.insert(m_AvailPartFrequency.begin()... | false | false | false | false | false | 0 |
button_print(int row, int col)
{
int j;
button_start = col;
for (j = 0; j < button_num; j++)
c_put_str(TERM_SLATE, button_mse[j].label, row, col + button_mse[j].left);
return button_length;
} | true | true | false | false | false | 1 |
check_header(char x) {
if (tolower(x) >= 'a' && tolower(x) <= 'z') return 1;
if (x == '_' || x == '-' || x == '.') return 1;
if (isdigit(x)) return 1;
return 0;
} | false | false | false | false | false | 0 |
S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize)
{
dVAR;
STRLEN i = 0;
char *a = (char*) HvARRAY(hv);
HE **aep;
PERL_ARGS_ASSERT_HSPLIT;
/*PerlIO_printf(PerlIO_stderr(), "hsplit called for %p which had %d\n",
(void*)hv, (int) oldsize);*/
PL_nomemok = TRUE;
Renew(a, P... | false | false | false | false | false | 0 |
process_wait (gpointer handle, guint32 timeout, gboolean alertable)
{
WapiHandle_process *process_handle;
pid_t pid G_GNUC_UNUSED, ret;
int status;
guint32 start;
guint32 now;
struct MonoProcess *mp;
/* FIXME: We can now easily wait on processes that aren't our own children,
* but WaitFor*Object won't call us... | false | false | false | false | false | 0 |
bgzf_read_block(BGZF* fp)
{
bgzf_byte_t header[BLOCK_HEADER_LENGTH];
int count, size = 0, block_length, remaining;
#ifdef _USE_KNETFILE
int64_t block_address = knet_tell(fp->x.fpr);
if (load_block_from_cache(fp, block_address)) return 0;
count = knet_read(fp->x.fpr, header, sizeof(header));
#else
int6... | false | true | false | false | false | 1 |
executionPaths()
{
// Check for null pointer errors..
Nullpointer c(this);
checkExecutionPaths(_tokenizer->tokens(), &c);
} | false | false | false | false | false | 0 |
BeginFileX()
{
byte line[cchSzDef];
if (us.fNoWrite)
return;
#ifndef WIN
if (gi.szFileOut == NULL && (
#ifdef PS
gi.fEps ||
#endif
gs.fMeta || (gs.fBitmap && gs.chBmpMode == 'B'))) {
sprintf(line, "(It is recommended to specify an extension of '.%s'.)\n",
gs.fBitmap ? "bmp" :
#ifdef PS
... | false | true | false | false | true | 1 |
event_music_get_info(char *outbuf)
{
if ( Event_music_enabled == FALSE || Event_music_level_inited == FALSE || Current_pattern == -1 ) {
strcpy(outbuf,XSTR( "Event music is not playing", 213));
}
else {
sprintf(outbuf,XSTR( "soundtrack: %s [%s]", 214), Soundtracks[Current_soundtrack_num].name, Pattern_info[Curr... | false | false | false | false | false | 0 |
config_setting_get_elem(const config_setting_t *vector,
unsigned int idx)
{
config_list_t *list = vector->value.list;
if(((vector->type != CONFIG_TYPE_ARRAY)
&& (vector->type != CONFIG_TYPE_LIST)
&& (vector->type != CONFIG_TYPE_GROUP)) || ! list)
return(NUL... | false | false | false | false | false | 0 |
nve0_bo_move_init(struct nouveau_channel *chan, u32 handle)
{
int ret = RING_SPACE(chan, 2);
if (ret == 0) {
BEGIN_NVC0(chan, NvSubCopy, 0x0000, 1);
OUT_RING (chan, handle & 0x0000ffff);
FIRE_RING (chan);
}
return ret;
} | false | false | false | false | false | 0 |
hx509_certs_ref(hx509_certs certs)
{
if (certs == NULL)
return NULL;
if (certs->ref == 0)
_hx509_abort("certs refcount == 0 on ref");
if (certs->ref == UINT_MAX)
_hx509_abort("certs refcount == UINT_MAX on ref");
certs->ref++;
return certs;
} | false | false | false | false | false | 0 |
ssl_bio_read (char * buf,
size_t len,
int & errval)
{
// We do not have to acquire mutex
// as we called already with locked mutex
// from do_SSL_state_machine()
errval = 0;
size_t cur_len = this->bio_inp_msg_.length ();
if (cur_le... | false | false | false | false | false | 0 |
snd_pcm_shm_hw_refine_cchange(snd_pcm_t *pcm ATTRIBUTE_UNUSED, snd_pcm_hw_params_t *params,
snd_pcm_hw_params_t *sparams)
{
int err;
unsigned int links = ~SND_PCM_HW_PARBIT_ACCESS;
snd_pcm_access_mask_t access_mask;
snd_mask_copy(&access_mask, snd_pcm_hw_param_get_mask(sparams, SND_PCM_HW_PARAM_ACCESS));
sn... | false | false | false | false | false | 0 |
__url_default_port(URL this)
{
switch(this->scheme){
case FTP:
return 21;
case HTTP:
return 80;
case HTTPS:
return 443;
case UNSUPPORTED:
default:
return 80;
}
} | false | false | false | false | false | 0 |
check_error(GError **error)
{
if (error != NULL && *error != NULL)
{
/* imitate the GLib warning */
g_warning(
"GError set over the top of a previous GError or uninitialized memory.\n"
"This indicates a bug in someone's code. You must ensure an error is NULL "
"before it's set.");
/* after returning th... | false | false | false | false | false | 0 |
PyvtkvmtkCenterlineUtilities_GetCenterlineCellIds_s2(PyObject *, PyObject *args)
{
vtkPythonArgs ap(args, "GetCenterlineCellIds");
vtkPolyData *temp0 = NULL;
char *temp1 = NULL;
char *temp2 = NULL;
vtkIdType temp3;
vtkIdList *temp4 = NULL;
PyObject *result = NULL;
if (ap.CheckArgCount(5) &&
ap.G... | false | false | false | false | false | 0 |
bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end;
DBUG_ASSERT(map1->bitmap && map2->bitmap &&
map1->n_bits==map2->n_bits);
end= map1->last_word_ptr;
for (; m1 < end; m1++, m2++)
if (*m1 & ~(*m2))
return FALSE;
... | false | false | false | false | false | 0 |
add_handlers()
{
add_read_handler("active", read_handler, (void *)H_ACTIVE, Handler::CHECKBOX);
add_write_handler("active", write_handler, (void *)H_ACTIVE);
add_read_handler("encap", read_handler, (void *)H_ENCAP);
_ff.add_handlers(this);
if (output_is_push(0))
add_task_handlers(&_task);
} | false | false | false | false | false | 0 |
FT_Get_Font_Info(FontInfo *fontinfo, const char *filepath, int index)
{
FT_Face face;
FT_Library library;
FT_Error error;
TT_OS2 *os2;
PS_FontInfoRec ps_info;
gsize filesize = 0;
gchar *font = NULL,
*checksum = NU... | false | false | false | false | false | 0 |
screenShots() const
{
return m_reader->screenShots(data(UuidOrAbsPath).toString());
} | false | false | false | false | false | 0 |
collect_columns_cb (gpointer ref,
gint col,
gchar **cols,
gchar **name)
{
GList **columns = (GList **) ref;
gint i;
for (i = 0; i < col; i++) {
if (strcmp (name[i], "name") == 0) {
if (strcmp (cols[i], "vcard") != 0 &&
strcmp (cols[i], "bdata... | false | false | false | false | false | 0 |
insert_ln ( LIST * l, LISTNODE * ln, void * data_ptr )
{
LISTNODE * lnptr;
CKLMAGIC(l);
if (ln==NULL) {
ladd ( l, data_ptr );
CKLMAGIC(l);
return 0;
}
lnptr = get_listnode(l);
if (lnptr == NULL) {
#ifdef BOS
breakpoint();
#endif
return -1;
}
CKMAGIC(lnptr);
lnptr->data = data_... | false | false | false | false | false | 0 |
bc_handler(struct hrtimer *t)
{
ce_broadcast_hrtimer.event_handler(&ce_broadcast_hrtimer);
if (clockevent_state_oneshot(&ce_broadcast_hrtimer))
if (ce_broadcast_hrtimer.next_event.tv64 != KTIME_MAX)
return HRTIMER_RESTART;
return HRTIMER_NORESTART;
} | false | false | false | false | false | 0 |
registerDocumentImpl( DOM::DocumentImpl *doc )
{
//kDebug(6000) << doc;
if ( !s_docs )
s_docs = new QLinkedList<DOM::DocumentImpl*>;
if ( !s_docs->contains( doc ) ) {
s_docs->append( doc );
ref();
}
} | false | false | false | false | false | 0 |
lt_trie_replace(lt_trie_t *trie,
const char *key,
lt_pointer_t data,
lt_destroy_func_t func)
{
lt_return_val_if_fail (trie != NULL, FALSE);
lt_return_val_if_fail (key != NULL, FALSE);
lt_return_val_if_fail (data != NULL, FALSE);
if (!trie->root) {
if ((trie->root = lt_trie_node_new(0)... | false | false | false | false | false | 0 |
childproc_delete_all(void (*cb)(pid_t pid, int status, void *data))
{
mowgli_node_t *n, *tn;
struct childproc *p;
MOWGLI_ITER_FOREACH_SAFE(n, tn, childproc_list.head)
{
p = n->data;
if (p->cb == cb)
{
mowgli_node_delete(&p->node, &childproc_list);
childproc_free(p);
}
}
} | false | false | false | false | false | 0 |
regclassout(PG_FUNCTION_ARGS)
{
Oid classid = PG_GETARG_OID(0);
char *result;
HeapTuple classtup;
if (classid == InvalidOid)
{
result = pstrdup("-");
PG_RETURN_CSTRING(result);
}
classtup = SearchSysCache(RELOID,
ObjectIdGetDatum(classid),
0, 0, 0);
if (HeapTupleIsValid(classtup))
... | false | false | false | false | false | 0 |
Scm_VectorSet(ScmVector *vec, int i, ScmObj obj)
{
if (i >= 0 && i < vec->size) vec->elements[i] = obj;
return obj;
} | false | false | false | false | false | 0 |
add_assoc_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate) /* {{{ */
{
zval *tmp;
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
} | false | false | false | false | false | 0 |
NCfileListFree (char **fileList, size_t n)
{
int i;
if (fileList == (char **) NULL) return;
for (i = 0 ;i < n;++i) if (fileList [i] != (char *) NULL) free (fileList [i]);
free (fileList);
} | true | true | false | false | false | 1 |
find_sha1_pack(const unsigned char *sha1,
struct packed_git *packs)
{
struct packed_git *p;
for (p = packs; p; p = p->next) {
if (find_pack_entry_one(sha1, p))
return p;
}
return NULL;
} | false | false | false | false | false | 0 |
_Filter_Group (Group obj, Filter *filter, char *component)
{
FilterTask ft;
Error ret = ERROR;
int n;
ft.obj = (Object) obj;
ft.class = DXGetObjectClass ((Object) obj);
if (ft.class == CLASS_GROUP)
ft.class = DXGetGroupClass (obj);
ft.filter = filter;
ft.component = compo... | false | false | false | false | false | 0 |
bendout_new(t_floatarg channel)
{
t_bendout *x = (t_bendout *)pd_new(bendout_class);
if (channel <= 0) channel = 1;
x->x_channel = channel;
floatinlet_new(&x->x_obj, &x->x_channel);
return (x);
} | false | false | false | false | false | 0 |
near_end(const char *s)
{
for (;;)
{
unsigned char c = *s++;
if (!c)
return true;
if (!isspace(c))
return false;
}
} | false | false | false | false | true | 1 |
engine()
{
QLuaApplication *app = instance();
return (app) ? app->d->theEngine : 0;
} | false | false | false | false | false | 0 |
_ircserver_stoned(struct ircproxy *p, void *data) {
/* Server is, like, stoned. Yeah man! */
if (IS_SERVER_READY(p)) {
debug("Server is stoned, reconnecting");
ircserver_send_command(p, "QUIT", ":Getting off stoned server - %s %s",
PACKAGE, VERSION);
_ircserver_close(p);
}
... | false | false | false | false | false | 0 |
col_iterate_up(struct collection_iterator *iterator, unsigned level)
{
TRACE_FLOW_STRING("iterate_up", "Entry");
if (iterator == NULL) {
TRACE_ERROR_NUMBER("Invalid parameter.", EINVAL);
return EINVAL;
}
TRACE_INFO_NUMBER("Going up:", level);
TRACE_INFO_NUMBER("Current stack depth:... | false | false | false | false | false | 0 |
nsInfo(const std::string& prefix)
{
const XmpNsInfo::Prefix pf(prefix);
const XmpNsInfo* xn = lookupNsRegistry(pf);
if (!xn) xn = find(xmpNsInfo, pf);
if (!xn) throw Error(35, prefix);
return xn;
} | false | false | false | false | false | 0 |
camel_search_words_split (const guchar *in)
{
gint type = CAMEL_SEARCH_WORD_SIMPLE, all = 0;
GString *w;
struct _camel_search_words *words;
GPtrArray *list = g_ptr_array_new ();
guint32 c;
gint inquote = 0;
words = g_malloc0 (sizeof (*words));
w = g_string_new ("");
do {
c = camel_utf8_getc (&in);
if (c... | false | false | false | false | false | 0 |
crtc_free (GnomeRRCrtc *crtc)
{
g_free (crtc->current_outputs);
g_free (crtc->possible_outputs);
g_slice_free (GnomeRRCrtc, crtc);
} | false | false | false | false | false | 0 |
gutils_init (void)
{
char const *home_dir;
#ifdef G_OS_WIN32
gchar *dir = g_win32_get_package_installation_directory_of_module (NULL);
gnumeric_lib_dir = g_build_filename (dir, "lib",
"gnumeric", GNM_VERSION_FULL,
NULL);
gnumeric_data_dir = g_build_filename (dir, "share",
"gnumeric", ... | false | false | false | false | false | 0 |
e_action_combo_box_set_current_value (EActionComboBox *combo_box,
gint current_value)
{
g_return_if_fail (E_IS_ACTION_COMBO_BOX (combo_box));
g_return_if_fail (combo_box->priv->action != NULL);
gtk_radio_action_set_current_value (
combo_box->priv->action, current_value);
} | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
PfPvDoubleClickPicker *_t = static_cast<PfPvDoubleClickPicker *>(_o);
switch (_id) {
case 0: _t->doubleClicked((*reinterpret_cas... | false | false | false | false | false | 0 |
iscsit_get_inactive_connection_recovery_entry(
struct iscsi_session *sess,
u16 cid)
{
struct iscsi_conn_recovery *cr;
spin_lock(&sess->cr_i_lock);
list_for_each_entry(cr, &sess->cr_inactive_list, cr_list) {
if (cr->cid == cid) {
spin_unlock(&sess->cr_i_lock);
return cr;
}
}
spin_unlock(&sess->cr_i_loc... | false | false | false | false | false | 0 |
ce_check_route_names(void)
{
queue* elem, *tmp;
QUEUE_FOR_EACH(&ce_route_head, elem, tmp) {
ce_route* route = (ce_route*) elem;
if (route->r->rte_name == NULL) {
*cdatastr = '\0';
strcat(cdatastr, ((ce_mark*) QUEUE_FIRST(&route->ce_mark_head))->wp->shortname);
strcat(cdatastr, "->");
... | false | true | false | false | false | 1 |
Z_scoringButton()
{
int i, j;
if(mainwindow->signalcomp[signal_nr]->ecg_filter != NULL)
{
QMessageBox messagewindow(QMessageBox::Critical, "Error", "Heartrate detection is active for this signal!");
messagewindow.exec();
return;
}
if(mainwindow->signalcomp[signal_nr]->zratio_filter ... | 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.