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 |
|---|---|---|---|---|---|---|
PostorderLoopBlocks(HLoopInformation* loop,
BitVector* visited,
ZoneList<HBasicBlock*>* order,
HBasicBlock* loop_header) {
for (int i = 0; i < loop->blocks()->length(); ++i) {
HBasicBlock* b = loop->blocks()->at(i);... | false | false | false | false | false | 0 |
pmdie(SIGNAL_ARGS)
{
int save_errno = errno;
PG_SETMASK(&BlockSig);
ereport(DEBUG2,
(errmsg_internal("postmaster received signal %d",
postgres_signal_arg)));
switch (postgres_signal_arg)
{
case SIGTERM:
/*
* Smart Shutdown:
*
* Wait for children to end their work, then shut down.
... | false | false | false | false | false | 0 |
GetCA(Signer* signers, byte* hash)
{
Signer* ret = 0;
if (LockMutex(&ca_mutex) != 0)
return ret;
while (signers) {
if (XMEMCMP(hash, signers->hash, SHA_DIGEST_SIZE) == 0) {
ret = signers;
break;
}
signers = signers->next;
}
UnLockMutex(&ca_mut... | false | false | false | false | false | 0 |
Java_ncsa_hdf_hdflib_HDFLibrary_SDsetcal
( JNIEnv *env,
jclass clss,
jint sds_id,
jdouble cal,
jdouble cal_err,
jdouble offset,
jdouble offset_err,
jint number_type)
{
intn rval;
rval = SDsetcal((int32) sds_id, (float64) cal, (float64) cal_err,
(float64) offset, (float64) offset_err, (int32) number_typ... | false | false | false | false | false | 0 |
gcm_inspect_print_data_info (const gchar *title, const guint8 *data, gsize length)
{
GcmProfile *profile = NULL;
GError *error = NULL;
gboolean ret;
/* parse the data */
profile = gcm_profile_new ();
ret = gcm_profile_parse_data (profile, data, length, &error);
if (!ret) {
g_warning ("failed to parse data: %s... | false | false | false | false | false | 0 |
mlx4_ib_alloc_xrcd(struct ib_device *ibdev,
struct ib_ucontext *context,
struct ib_udata *udata)
{
struct mlx4_ib_xrcd *xrcd;
struct ib_cq_init_attr cq_attr = {};
int err;
if (!(to_mdev(ibdev)->dev->caps.flags & MLX4_DEV_CAP_FLAG_XRC))
return ERR_PTR(-ENOSYS);
xrcd = kmalloc(sizeof *xrcd, GFP_KER... | false | false | false | false | false | 0 |
sigsegvHandler(int sig, siginfo_t *info, void *secret) {
ucontext_t *uc = (ucontext_t*) secret;
sds infostring, clients;
struct sigaction act;
REDIS_NOTUSED(info);
bugReportStart();
redisLog(REDIS_WARNING,
" Redis %s crashed by signal: %d", REDIS_VERSION, sig);
if (sig == SIGSEGV... | false | false | false | false | false | 0 |
htc_config_pipe_credits(struct htc_target *target)
{
struct sk_buff *skb;
struct htc_config_pipe_msg *cp_msg;
int ret;
unsigned long time_left;
skb = alloc_skb(50 + sizeof(struct htc_frame_hdr), GFP_ATOMIC);
if (!skb) {
dev_err(target->dev, "failed to allocate send buffer\n");
return -ENOMEM;
}
skb_reserve... | false | false | false | false | false | 0 |
hmap_getentry(knh_hmap_t* hmap, khashcode_t hcode)
{
knh_hentry_t **hlist = hmap->hentry;
size_t idx = hcode % hmap->hmax;
knh_hentry_t *e = hlist[idx];
while(e != NULL) {
if(e->hcode == hcode) return e;
e = e->next;
}
return NULL;
} | false | false | false | false | false | 0 |
xbotch (mem, e, s, file, line)
PTR_T mem;
int e;
const char *s;
const char *file;
int line;
{
fprintf (stderr, _("\r\nmalloc: %s:%d: assertion botched\r\n"),
file ? file : _("unknown"), line);
#ifdef MALLOC_REGISTER
if (mem != NULL && malloc_register)
mregister_describe_mem (mem, std... | false | false | false | false | false | 0 |
cmd_objects_delete_undo (GnmCommand *cmd,
G_GNUC_UNUSED WorkbookControl *wbc)
{
CmdObjectsDelete *me = CMD_OBJECTS_DELETE (cmd);
GSList *l;
gint i;
g_slist_foreach (me->objects,
(GFunc) sheet_object_set_sheet, me->cmd.sheet);
for (l = me->objects, i = 0; l; l = l->next, i++)
cmd_objects_restore_location (... | false | false | false | false | false | 0 |
eval_string_expr_noquote(HSCPRC * hp, HSCATTR * dest) {
INFILE *inpf = hp->inpf;
STRPTR eval_result = NULL;
EXPSTR *tmpstr = init_estr(TMP_STEPSIZE);
BOOL end = FALSE;
/*
* read next char from input file until a
* closing quote if found.
* if the arg had no quote, a white space
* or a '>... | false | false | false | false | false | 0 |
G3d__removeTile(G3D_Map * map, int tileIndex)
{
if (!map->useCache)
return 1;
if (!G3d_cache_remove_elt(map->cache, tileIndex)) {
G3d_error("G3d_removeTile: error in G3d_cache_remove_elt");
return 0;
}
return 1;
} | false | false | false | false | false | 0 |
orte_util_convert_string_to_jobid(orte_jobid_t *jobid, const char* jobidstring)
{
if (NULL == jobidstring) { /* got an error */
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
*jobid = ORTE_JOBID_INVALID;
return ORTE_ERR_BAD_PARAM;
}
/** check for wildcard character - handle appropriately */
... | false | false | false | false | false | 0 |
mic_free_interrupts(struct mic_device *mdev, struct pci_dev *pdev)
{
int i;
mdev->intr_ops->disable_interrupts(mdev);
if (mdev->irq_info.num_vectors > 1) {
for (i = 0; i < mdev->irq_info.num_vectors; i++) {
if (mdev->irq_info.mic_msi_map[i])
dev_warn(&pdev->dev, "irq %d may still be in use.\n",
mdev-... | false | false | false | false | false | 0 |
x264_hrd_fullness( x264_t *h )
{
x264_ratecontrol_t *rct = h->thread[0]->rc;
uint64_t denom = (uint64_t)h->sps->vui.hrd.i_bit_rate_unscaled * h->sps->vui.i_time_scale / rct->hrd_multiply_denom;
uint64_t cpb_state = rct->buffer_fill_final;
uint64_t cpb_size = (uint64_t)h->sps->vui.hrd.i_cpb_size_unscaled... | false | false | false | false | false | 0 |
mono_reflection_sighelper_get_signature_local (MonoReflectionSigHelper *sig)
{
MonoReflectionModuleBuilder *module = sig->module;
MonoDynamicImage *assembly = module != NULL ? module->dynamic_image : NULL;
guint32 na = sig->arguments ? mono_array_length (sig->arguments) : 0;
guint32 buflen, i;
MonoArray *result;
... | false | false | false | false | false | 0 |
retrieveModelPart(const QString & moduleID) {
ModelPart * modelPart = m_partHash.value(moduleID, NULL);
if (modelPart != NULL) return modelPart;
if (m_referenceModel != NULL) {
return m_referenceModel->retrieveModelPart(moduleID);
}
return NULL;
} | false | false | false | false | false | 0 |
gw_file_to_str ( gchar *desc)
{
gchar **buf = NULL;
gchar *txt = NULL;
#ifdef GW_DEBUG_TOOLS_COMPONENT
g_print ( "*** GW - %s (%d) :: %s() : decode string=%s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, desc);
#endif
if ( desc != NULL )
{
txt = g_strdup ( desc);
buf = g_strsplit ( txt, "\\n", 0);
if ( bu... | false | false | false | false | false | 0 |
HashExpression(
EXPRESSION *theExp)
{
unsigned long tally = PRIME_THREE;
if (theExp->argList != NULL)
tally += HashExpression(theExp->argList) * PRIME_ONE;
while (theExp != NULL)
{
tally += (unsigned long) (theExp->type * PRIME_TWO);
tally += (unsigned long) theExp->value;
theE... | false | false | false | false | false | 0 |
panel_addto_populate_application_model (GtkTreeStore *store,
GtkTreeIter *parent,
GSList *app_list)
{
PanelAddtoAppList *data;
GtkTreeIter iter;
char *text;
GSList *app;
for (app = app_list; app != NULL; app = app->next) {
data = app->data;
gtk_tree_store_append... | false | false | false | false | false | 0 |
hdp_establish_mcl(struct hdp_device *device,
hdp_continue_proc_f func,
gpointer data,
GDestroyNotify destroy,
GError **err)
{
struct conn_mcl_data *conn_data;
bdaddr_t dst, src;
uuid_t uuid;
device_get_address(device->dev, &dst, NULL);
adapter_get_address(device_get_adapter(device->dev), &... | false | false | false | false | false | 0 |
page_width()
const
{
struct stat st;
if (fstat(fileno(stdout), &st) == 0 && S_ISREG(st.st_mode))
return page_width_get(DEFAULT_PRINTER_WIDTH);
return page_width_get(-1) - 1;
} | false | false | false | false | false | 0 |
message_deserialize (Message *message, AnjutaSerializer *serializer)
{
gint type;
if (!anjuta_serializer_read_int (serializer, "type",
&type))
return FALSE;
message->type = type;
if (!anjuta_serializer_read_string (serializer, "summary",
&message->summary, TRUE))
return FALSE;
if (!anjuta_s... | false | false | false | false | false | 0 |
HENQueueScanner(Display *dpy, XEvent *ev, char *args)
{
if (ev->type == LeaveNotify) {
if (ev->xcrossing.window == ((HENScanArgs *) args)->w &&
ev->xcrossing.mode == NotifyNormal) {
((HENScanArgs *) args)->leaves = True;
/*
* Only the last event found matters for the Inferior field.
*/
... | false | false | false | false | false | 0 |
gigaset_freecs(struct cardstate *cs)
{
int i;
unsigned long flags;
if (!cs)
return;
mutex_lock(&cs->mutex);
spin_lock_irqsave(&cs->lock, flags);
cs->running = 0;
spin_unlock_irqrestore(&cs->lock, flags); /* event handler and timer are
not rescheduled below */
tasklet_kill(&cs->event_tasklet);
... | false | false | false | false | false | 0 |
dump_type_suffix (tree t, int flags)
{
if (TYPE_PTRMEMFUNC_P (t))
t = TYPE_PTRMEMFUNC_FN_TYPE (t);
switch (TREE_CODE (t))
{
case POINTER_TYPE:
case REFERENCE_TYPE:
case OFFSET_TYPE:
if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE
|| TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
pp_cxx_right... | false | false | false | false | false | 0 |
ghw_read_lsleb128 (struct ghw_handler *h, int64_t *res)
{
static const int64_t r_mask = -1;
int64_t r = 0;
unsigned int off = 0;
while (1)
{
int v = fgetc (h->stream);
if (v == EOF)
return -1;
r |= ((int64_t)(v & 0x7f)) << off;
off += 7;
if ((v & 0x80) == 0)
{
if ((v & 0x... | false | true | false | false | true | 1 |
xfs_allocbt_init_ptr_from_cur(
struct xfs_btree_cur *cur,
union xfs_btree_ptr *ptr)
{
struct xfs_agf *agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp);
ASSERT(cur->bc_private.a.agno == be32_to_cpu(agf->agf_seqno));
ASSERT(agf->agf_roots[cur->bc_btnum] != 0);
ptr->s = agf->agf_roots[cur->bc_btnum];
} | false | false | false | false | false | 0 |
load_script(state_t *s, seg_id_t seg)
{
resource_t *script, *heap;
script_t *scr = &(s->seg_manager.heap[seg]->data.script);
scr->buf = (byte *) malloc(scr->buf_size);
script = scir_find_resource(s->resmgr, sci_script, scr->nr, 0);
if (s->version >= SCI_VERSION(1,001,000))
heap = scir_find_resource(s->resmgr, ... | false | false | false | false | false | 0 |
ssl_init_socket_with_method(int sock, const char *host, int port,
SSL_CTX *ssl_ctx, SSLMethod method, void *data)
{
X509 *server_cert;
SSL *ssl;
int res = 0;
ssl = SSL_new(ssl_ctx);
if (ssl == NULL) {
eb_debug(DBG_CORE, "Error creating ssl context\n");
return NULL;
}
switch (method) {
case SSL_METHOD_SS... | false | false | false | false | false | 0 |
sha256d(unsigned char *hash, const unsigned char *data, int len)
{
uint32_t S[16], T[16];
int i, r;
sha256_init(S);
for (r = len; r > -9; r -= 64) {
if (r < 64)
memset(T, 0, 64);
memcpy(T, data + len - r, r > 64 ? 64 : (r < 0 ? 0 : r));
if (r >= 0 && r < 64)
((unsigned char *)T)[r] = 0x80;
for (i = 0... | true | true | false | false | false | 1 |
_wrap_GooCanvasItem__do_button_release_event(PyObject *cls, PyObject *args, PyObject *kwargs)
{
GooCanvasItemIface *iface;
static char *kwlist[] = { "self", "target", "event", NULL };
PyGObject *self, *target;
GdkEvent *event = NULL;
int ret;
PyObject *py_event;
if (!PyArg_ParseTupleAndKeyw... | false | false | false | false | false | 0 |
serial_bm_open(struct ipmi_intf * intf)
{
struct termios ti;
unsigned int rate = 9600;
char *p;
int i;
if (!intf->devfile) {
lprintf(LOG_ERR, "Serial device is not specified");
return -1;
}
is_system = 0;
/* check if baud rate is specified */
if ((p = strchr(intf->devfile, ':'))) {
char * pp;
/* se... | false | false | false | false | true | 1 |
btc8723b2ant_action_pan_hs(struct btc_coexist *btcoexist)
{
u8 wifi_rssi_state;
u32 wifi_bw;
wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist,
0, 2, 15, 0);
btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0);
btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6);
if ((wi... | false | false | false | false | false | 0 |
ComputeRowAMaxImpl(Vector& rows_norms, bool init) const
{
if (!matrices_valid_) {
matrices_valid_ = MatricesValid();
}
DBG_ASSERT(matrices_valid_);
// The vector is assumed to be compound Vectors as well except if
// there is only one component
CompoundVector* comp_vec = dynamic_cast<Co... | false | false | false | false | false | 0 |
ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this_obj, HANDLE process, gint32 ms)
{
guint32 ret;
if(ms<0) {
/* Wait forever */
ret=WaitForInputIdle (process, INFINITE);
} else {
ret=WaitForInputIdle (process, ms);
}
return (ret) ? FALSE : TRUE;
} | false | false | false | false | false | 0 |
scsi_read_capacity_10 ( struct block_device *blockdev ) {
struct scsi_device *scsi = block_to_scsi ( blockdev );
struct scsi_command command;
struct scsi_cdb_read_capacity_10 *cdb = &command.cdb.readcap10;
struct scsi_capacity_10 capacity;
int rc;
/* Issue READ CAPACITY (10) */
memset ( &command, 0, sizeof ( co... | false | false | false | false | false | 0 |
jd_s_channel_read(mud_channel *pc, void *buf, int length, int sec_timeout, int *bytes_read)
{
mud_device *pd = &msp->device[pc->dindex];
int len=0;
struct timeval tmo;
fd_set master;
fd_set readfd;
int maxfd, ret;
enum HPMUD_RESULT stat = HPMUD_R_IO_ERROR;
*bytes_read = 0;
if (pc->socket<0)... | false | false | false | false | false | 0 |
gtk_main_flush(void)
{
gint val = FALSE;
gint i = 0;
while (gtk_events_pending() && i++ < GTK_ITERATION_MAX) {
val = gtk_main_iteration_do(FALSE);
if (val)
break;
}
if (i > GTK_ITERATION_MAX && !val) {
if (GUI_PROPERTY(gui_debug)) {
g_warning("gtk_main_flush: too much work");
}
}
... | false | false | false | false | false | 0 |
stp_get_parameter_active(const stp_vars_t *v, const char *parameter,
stp_parameter_type_t p_type)
{
if (p_type >= STP_PARAMETER_TYPE_STRING_LIST &&
p_type < STP_PARAMETER_TYPE_INVALID)
{
const stp_list_t *list = v->params[p_type];
const stp_list_item_t *item = stp_list_get_item_by_name(list,... | false | false | false | false | false | 0 |
truncate_inode_page(struct address_space *mapping, struct page *page)
{
if (page_mapped(page)) {
unmap_mapping_range(mapping,
(loff_t)page->index << PAGE_CACHE_SHIFT,
PAGE_CACHE_SIZE, 0);
}
return truncate_complete_page(mapping, page);
} | false | false | false | false | false | 0 |
tftp_error(struct inode *inode, uint16_t errnum,
const char *errstr)
{
static __lowmem struct {
uint16_t err_op;
uint16_t err_num;
char err_msg[64];
} __packed err_buf;
static __lowmem struct s_PXENV_UDP_WRITE udp_write;
int len = min(strlen(errstr), sizeof(err_buf.err_msg)-1);
struct px... | false | false | false | false | false | 0 |
put_lut(Display *disp,Colormap cmap,
int ncolors,int lut_start,char overlay,
int *red,int *green,int *blue,
int *intensity_lut,int *red_lut,int *green_lut,int *blue_lut)
{
int i,j;
int index;
int background_index;
int mod_lstart;
#if !(defined(__WIN32__) || defined(macintosh))
int pseu... | false | false | false | false | false | 0 |
invoke(void)
{
myDataMutex.lock();
std::map<int, ArFunctor *>::iterator it;
ArFunctor *functor;
ArLog::log(myLogLevel, "%s: Starting calls", myName.c_str());
for (it = myList.begin();
it != myList.end();
it++)
{
functor = (*it).second;
if (functor == NULL)
continue;
if (f... | false | false | false | false | false | 0 |
escp2_set_printhead_speed(stp_vars_t *v)
{
escp2_privdata_t *pd = get_privdata(v);
const char *direction = stp_get_string_parameter(v, "PrintingDirection");
int unidirectional = -1;
if (direction && strcmp(direction, "Unidirectional") == 0)
unidirectional = 1;
else if (direction && strcmp(direction, "Bidi... | false | false | false | false | false | 0 |
FLAC__metadata_get_picture(const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors)
{
FLAC__Metadata_SimpleIterator *it;
FLAC__uint64 max_area_se... | false | false | false | false | false | 0 |
gwy_app_run_process_func(const gchar *name)
{
GwyRunType run_types[] = { GWY_RUN_INTERACTIVE, GWY_RUN_IMMEDIATE, };
GwyRunType available_run_modes;
gsize i;
gwy_debug("`%s'", name);
available_run_modes = gwy_process_func_get_run_types(name);
g_return_val_if_fail(available_run_modes, 0);
for... | false | false | false | false | false | 0 |
_ast_asprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, ...)
{
int res;
va_list ap;
va_start(ap, fmt);
if ((res = vasprintf(ret, fmt, ap)) == -1) {
MALLOC_FAILURE_MSG;
}
va_end(ap);
return res;
} | false | false | false | false | false | 0 |
SilentChange(UFNumberArray *that, int index, double number) {
if (index < 0 || index >= Size)
that->Throw("index (%d) out of range 0..%d", index, Size - 1);
if (number > Maximum) {
that->Message(_("Value %.*f too large, truncated to %.*f."),
AccuracyDigi... | false | false | false | false | false | 0 |
try_to_del_timer_sync(struct timer_list *timer)
{
struct tvec_base *base;
unsigned long flags;
int ret = -1;
debug_assert_init(timer);
base = lock_timer_base(timer, &flags);
if (base->running_timer != timer) {
timer_stats_timer_clear_start_info(timer);
ret = detach_if_pending(timer, base, true);
}
spin_u... | false | false | false | false | false | 0 |
diagrams(const DiagramVector & diags) const {
Selector<DiagramIndex> sel;
for ( DiagramIndex i = 0; i < diags.size(); ++i ) {
int id=abs(diags[i]->id());
if (id <= 2 ) sel.insert(meInfo()[id- 1],i);
else if(id <= 4 ) sel.insert(meInfo()[id- 3],i);
else if(id <= 6 ) sel.insert(meInfo()[id- 5],i);... | false | false | false | false | false | 0 |
Problem_11(const MATRIX &matrix){
unsigned matrixSize = matrix.size();
vector<vector<pair<int, int> > > matrixPreknowledge(matrixSize, vector<pair<int, int> >(matrixSize));
preprocessMatrix(matrix, matrixPreknowledge);
for(size_t i=matrixSize; i!=0; --i){
bool temp = findSubsquares(matrixPreknowledge, ... | false | false | false | false | false | 0 |
open_logfiles(void)
{
int i;
close_logfiles();
log_main = fopen(logFileName, "a");
/* log_main is handled above, so just do the rest */
for(i = 1; i < LAST_LOGFILE; i++)
{
/* reopen those with paths */
if(!EmptyString(*log_table[i].name))
{
verify_logfile_access(*log_table[i].name);
*log_table[i].l... | false | false | false | false | true | 1 |
ssl2_GetPolicy(PRInt32 which, PRInt32 *oPolicy)
{
PRUint32 bitMask;
PRInt32 policy;
which &= 0x000f;
bitMask = 1 << which;
/* Caller assures oPolicy is not null. */
if (!(bitMask & SSL_CB_IMPLEMENTED)) {
PORT_SetError(SSL_ERROR_UNKNOWN_CIPHER_SUITE);
*oPolicy = SSL_NOT_ALLOWED;
... | false | false | false | false | false | 0 |
nat_new_top_level_command() {
try { // for error handling
interface_label();
match(COMMA);
interface_label();
match(CLOSING_PAREN);
if ( inputState->guessing==0 ) {
#line 2064 "pix.g"
importer->addMessageToLog(
QString("Warning: Import of ASA 8.3 nat command "
"is not supported at this ti... | false | false | false | false | false | 0 |
markBadACELabel(UnicodeString &dest,
int32_t labelStart, int32_t labelLength,
UBool toASCII, IDNAInfo &info) const {
UBool disallowNonLDHDot=(options&UIDNA_USE_STD3_RULES)!=0;
UBool isASCII=TRUE;
UBool onlyLDH=TRUE;
const UChar *label=dest.getBuffer()+labelS... | false | false | false | false | false | 0 |
gwy_null_store_iter_children(GtkTreeModel *model,
GtkTreeIter *iter,
GtkTreeIter *parent)
{
GwyNullStore *store;
store = GWY_NULL_STORE(model);
if (parent || !store->n)
return FALSE;
iter->stamp = store->stamp;
iter->user_data = GUI... | false | false | false | false | false | 0 |
explain_buffer_sockopt_name(explain_string_buffer_t *sb, int level,
int name)
{
switch (level)
{
/* FIXME: add support for SOL_AAL */
/* FIXME: add support for SOL_ATALK */
/* FIXME: add support for SOL_ATM */
/* FIXME: add support for SOL_AX25 */
/* FIXME: add support for SOL_BLUETOOTH ... | false | false | false | false | false | 0 |
WalkLanguageTableElement(RefAST ast)
{
RefAST astLabel = ast->getFirstChild();
std::string staLabel(astLabel->getText().c_str());
RefAST astItem = astLabel->getNextSibling();
// Find or create the language class with that name:
GdlLangClass * plcls;
size_t ilcls;
for (ilcls = 0; ilcls < m_vplcls.size(); ilcls+... | false | false | false | false | true | 1 |
CallbackAlert(const libcec_alert type, const libcec_parameter ¶m)
{
CLockObject lock(m_cbMutex);
if (m_configuration.callbacks &&
m_configuration.callbacks->CBCecAlert)
m_configuration.callbacks->CBCecAlert(m_configuration.callbackParam, type, param);
} | false | false | false | false | false | 0 |
config_layouts_list_remove_iter (GtkListStore *list,
GtkTreeIter *iter)
{
if (!gtk_list_store_remove (list, iter)) {
/* FIXME: Should set iter at the end again? */
return;
}
#if GTK_CHECK_VERSION (3, 0, 0)
if (!gtk_tree_model_iter_previous (GTK_TREE_MODEL (l... | false | false | false | false | false | 0 |
ld10k1_tram_alloc_for_patch(ld10k1_dsp_mgr_t *dsp_mgr, ld10k1_patch_t *patch, ld10k1_dsp_tram_resolve_t *res)
{
int i;
int grp;
int acc;
/* allocate tram grp and acc for patch */
for (i = 0; i < patch->tram_count; i++) {
grp = ld10k1_tram_grp_alloc(dsp_mgr);
patch->tram_grp[i].grp_idx = grp;
dsp_mgr->tram_g... | false | false | false | false | false | 0 |
alloc_buffer(String *res,String *str,String *tmp_value,
ulong length)
{
if (res->alloced_length() < length)
{
if (str->alloced_length() >= length)
{
(void) str->copy(*res);
str->length(length);
return str;
}
if (tmp_value->alloc(length))
return 0;
(void) tmp_value-... | false | false | false | false | false | 0 |
_self_heal_entry (xlator_t *this, afr_crawl_data_t *crawl_data, gf_dirent_t *entry,
loc_t *child, loc_t *parent, struct iatt *iattr)
{
struct iatt parentbuf = {0};
int ret = 0;
dict_t *xattr_rsp = NULL;
if (uuid_is_null (child->gfid))
... | false | false | false | false | false | 0 |
gimmix_window_visible_toggle (void)
{
static int x;
static int y;
if( !GTK_WIDGET_VISIBLE (main_window) )
{
gtk_window_move (GTK_WINDOW(main_window), x, y);
gtk_widget_show (GTK_WIDGET(main_window));
gtk_window_present (GTK_WINDOW(main_window));
}
else
{
gtk_window_get_position (GTK_WINDOW(main_window... | false | false | false | false | false | 0 |
_callbacks_unregister(Evas_Object *obj)
{
ELM_GESTURE_LAYER_DATA_GET(obj, sd);
if (!sd->target) return;
evas_object_event_callback_del
(sd->target, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb);
evas_object_event_callback_del
(sd->target, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb);
evas_object_eve... | false | false | false | false | false | 0 |
_ml_Sock_bind (ml_state_t *msp, ml_val_t arg)
{
int sock = REC_SELINT(arg, 0);
ml_val_t addr = REC_SEL(arg, 1);
int sts;
sts = bind (
sock,
GET_SEQ_DATAPTR(struct sockaddr, addr),
GET_SEQ_LEN(addr));
CHK_RETURN_UNIT(msp, sts);
} | false | false | false | false | false | 0 |
toCtype (void)
{
if (!ctype)
{
if (!isNaked())
{
ctype = castMod(0)->toCtype();
ctype = insert_type_modifiers (ctype, mod);
}
else
{
tree lentype = Type::tsize_t->toCtype();
tree ptrtype = next->toCtype();
ctype = build_two_field_type (lentype, build_pointer_type (ptrtype),
thi... | false | false | false | false | false | 0 |
ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb)
{
struct hardware_scb *hscb;
struct status_pkt *spkt;
uint32_t sgptr;
uint32_t resid_sgptr;
uint32_t resid;
/*
* 5 cases.
* 1) No residual.
* SG_RESID_VALID clear in sgptr.
* 2) Transferless command
* 3) Never performed any transfers.
* ... | false | false | false | false | false | 0 |
gd_spf(DIRFILE* D, const char *field_code_in) gd_nothrow
{
gd_spf_t spf = 0;
gd_entry_t* entry;
char* field_code;
int repr;
dtrace("%p, \"%s\"", D, field_code_in);
if (D->flags & GD_INVALID) {/* don't crash */
_GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL);
dreturn("%u", 0);
return 0;
}... | false | false | false | false | false | 0 |
choplast(mastr * m)
{
if (m && m->len) {
--m->len;
m->dat[m->len] = '\0';
}
} | false | false | false | false | false | 0 |
elf64_section_dump (ElfSection *sect)
{
Elf64_Shdr *secthdrs;
Elf64_Sym *syms;
Elf64_Dyn *dyn;
char *strtab;
size_t i, n;
secthdrs = (Elf64_Shdr *) sect->elfd->secthdrs;
i = sect->index;
printf ("Section name index: %u\n", secthdrs[i].sh_name);
if (sect->name != NULL)
printf ("Section nam... | false | false | false | false | false | 0 |
git_remote_is_valid_name(
const char *remote_name)
{
git_buf buf = GIT_BUF_INIT;
git_refspec refspec;
int error = -1;
if (!remote_name || *remote_name == '\0')
return 0;
git_buf_printf(&buf, "refs/heads/test:refs/remotes/%s/test", remote_name);
error = git_refspec__parse(&refspec, git_buf_cstr(&buf), true);
... | false | false | false | false | false | 0 |
g_auto_pointer_free(GAuto *auto_ptr)
{
AutoPointer *ptr;
AutoPointerRef *ref;
if (auto_ptr == NULL)
return;
ptr = auto_ptr;
ref = ptr->ref;
if (--(ref->cnt) == 0) {
#ifdef REF_DEBUG
G_PRINT_REF ("XXXX FREE(%lx) -- REF (%d)\n", ref->pointer, ref->cnt);
#endif
ref->free(ref->pointer);
g_free(ref);
}
#if... | false | false | false | false | false | 0 |
wnck_workspace_accessible_contains (AtkComponent *component,
int x,
int y,
AtkCoordType coords)
{
int lx, ly, width, height;
wnck_workspace_accessible_get_extents (component, &lx, &ly, ... | false | false | false | false | false | 0 |
gst_level_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstLevel *filter = GST_LEVEL (object);
switch (prop_id) {
case PROP_SIGNAL_LEVEL:
filter->message = g_value_get_boolean (value);
break;
case PROP_SIGNAL_INTERVAL:
filter->interval = g_... | false | false | false | false | false | 0 |
__ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)
{
struct super_block *sb;
int err;
int rc;
if (!ext4_handle_valid(handle)) {
ext4_put_nojournal(handle);
return 0;
}
err = handle->h_err;
if (!handle->h_transaction) {
rc = jbd2_journal_stop(handle);
return err ? err : rc;
}
... | false | false | false | false | false | 0 |
caretSymbolFromString( const QString &symbol )
{
if ( symbol == QLatin1String( "None" ) )
return CaretAnnotation::None;
else if ( symbol == QLatin1String( "P" ) )
return CaretAnnotation::P;
return CaretAnnotation::None;
} | false | false | false | false | false | 0 |
scan_notes(int fd, loff_t start, loff_t lsize)
{
char *buf, *last, *note, *next;
size_t size;
ssize_t ret;
if (lsize > SSIZE_MAX) {
fprintf(stderr, "Unable to handle note section of %llu bytes\n",
(unsigned long long)lsize);
exit(20);
}
size = lsize;
buf = malloc(size);
if (!buf) {
fprintf(stderr, "Ca... | false | false | false | false | false | 0 |
clipRectangles(XRectangle *rects_,int n_,int ordering_)
{
if (data()->shared()==MSTrue)
{
MSMessageLog::warningMessage("MSGC error: setting clip rectangle on a shared GC");
}
XSetClipRectangles(display(),gc(),clipXOrigin(),clipYOrigin(),rects_,n_,ordering_);
} | false | false | false | false | false | 0 |
gap_story_vthumb_add_vthumb(GapStbMainGlobalParams *sgpp
,gint32 framenr
,guchar *th_data
,gint32 th_width
,gint32 th_height
,gint32 th_bpp
... | false | false | false | false | false | 0 |
collection_table_populate(CollectTable *ct, gboolean resize)
{
gint row;
GList *work;
collection_table_verify_selections(ct);
collection_table_clear_store(ct);
if (resize)
{
gint i;
gint thumb_width;
thumb_width = collection_table_get_icon_width(ct);
for (i = 0; i < COLLECT_TABLE_MAX_COLUMNS; i++)
... | false | false | false | false | false | 0 |
handleClientsBlockedOnLists(void) {
while(listLength(server.ready_keys) != 0) {
list *l;
/* Point server.ready_keys to a fresh list and save the current one
* locally. This way as we run the old list we are free to call
* signalListAsReady() that may push new elements in server.re... | false | false | false | false | false | 0 |
e_ascii_dtostr (gchar *buffer,
gint buf_len,
const gchar *format,
gdouble d)
{
struct lconv *locale_data;
const gchar *decimal_point;
gint decimal_point_len;
gchar *p;
gint rest_len;
gchar format_char;
g_return_val_if_fail (buffer != NULL, NULL);
g_return_val_if_... | false | false | false | false | false | 0 |
coq_push_arguments(value args) {
int nargs,i;
nargs = Wosize_val(args) - 2;
coq_sp -= nargs;
print_instr("push_args");print_int(nargs);
for(i = 0; i < nargs; i++) coq_sp[i] = Field(args, i+2);
return Val_unit;
} | false | false | false | false | false | 0 |
privsep_recvfd(const int psfd)
{
char *buf;
int *fdptr;
struct cmsghdr *cmsg;
struct msghdr msg;
struct iovec vec;
const size_t sizeof_buf = CMSG_SPACE(sizeof *fdptr);
size_t sizeof_buf_ = sizeof_buf;
PrivSepCmd fodder = PRIVSEPCMD_NONE;
ssize_t received;
if (sizeof_buf_... | false | false | false | false | false | 0 |
generateLookupTable( void )
{
// Declare Variables
int i,j;
// Allocate memory for lookup table w
w = new double*[kp];
// Traverse through kernel generating weight function
// lookup table w
// Assume kernel is uniform
uniformKernel = true;
for(i = 0; i < kp; i++)
{
switch(kern... | false | false | false | false | false | 0 |
iscsi_sw_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn,
enum iscsi_param param, char *buf)
{
struct iscsi_conn *conn = cls_conn->dd_data;
struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
struct iscsi_sw_tcp_conn *tcp_sw_conn = tcp_conn->dd_data;
struct sockaddr_in6 addr;
int rc, len;
switch(param... | false | false | false | false | false | 0 |
mpicbe_task_write_mf_branch_modules_call(csbe_context *cx, List *list)
{
List *li;
Hmdf_table *hmdf;
csbe_printf(cx, "void %s(int mtg_id, int cl_no, int mt_no, int LAST_BRANCH)\n",
SCHE_FUNC_NAME_MFBS);
csbe_printf(cx, "{\n");
for (li = list; li != NULL; li = li->next) {
hmdf = li->data;... | false | false | false | false | false | 0 |
devm_devfreq_event_add_edev(struct device *dev,
struct devfreq_event_desc *desc)
{
struct devfreq_event_dev **ptr, *edev;
ptr = devres_alloc(devm_devfreq_event_release, sizeof(*ptr), GFP_KERNEL);
if (!ptr)
return ERR_PTR(-ENOMEM);
edev = devfreq_event_add_edev(dev, desc);
if (IS_ERR(edev)) {
devres_fre... | false | false | false | false | false | 0 |
imapx_search_by_uids (CamelFolder *folder,
const gchar *expression,
GPtrArray *uids,
GCancellable *cancellable,
GError **error)
{
CamelIMAPXStore *imapx_store;
CamelIMAPXFolder *imapx_folder;
CamelIMAPXSearch *imapx_search;
Came... | false | false | false | false | false | 0 |
on_local_variables(GArray *nodes)
{
const char *token = parse_grab_token(nodes);
size_t len = *token - '0' + 1;
if (thread_id && frame_id && len == strlen(thread_id) &&
!memcmp(++token, thread_id, len) && !strcmp(token + len, frame_id))
{
GtkTreeIter iter;
LocalData ld = { NULL, stack_entry() };
if (gtk_t... | false | false | false | false | false | 0 |
pkix_pl_CertBasicConstraints_ToString(
PKIX_PL_Object *object,
PKIX_PL_String **pString,
void *plContext)
{
PKIX_PL_String *certBasicConstraintsString = NULL;
PKIX_PL_CertBasicConstraints *certB = NULL;
PKIX_Boolean isCA = PKIX_FALSE;
PKIX_Int32 pathLen = 0;
... | false | false | false | false | false | 0 |
polynomialToFraction(Polynomial const &p)
{
FieldRationalFunctions2Implementation *imp=dynamic_cast<FieldRationalFunctions2Implementation*>(implementingObject);
Polynomial q=Term(imp->getPolynomialRing().getField().zHomomorphism(1),Monomial(imp->getPolynomialRing()));
return new FieldElementRationalFunction2(*im... | false | false | false | false | false | 0 |
ddf_FreeOfImplicitLinearity(ddf_MatrixPtr M, ddf_Arow certificate, ddf_rowset *imp_linrows, ddf_ErrorType *error)
/* 092 */
{
/* Checks whether the matrix M constains any implicit linearity at all.
It returns 1 if it is free of any implicit linearity. This means that
the present linearity rows define the li... | false | false | false | false | false | 0 |
indexOfAny(const UChar* const strings[]) const
{
int result = -1;
for (int i = 0; strings[i]; i++) {
int32_t pos = ruleText.indexOf(*strings[i]);
if (pos != -1 && (result == -1 || pos < result)) {
result = pos;
}
}
return result;
} | false | false | false | false | false | 0 |
validator_step ( struct validator *validator ) {
struct x509_link *link;
struct x509_certificate *cert;
struct x509_certificate *issuer = NULL;
struct x509_certificate *last;
time_t now;
int rc;
/* Try validating chain. Try even if the chain is incomplete,
* since certificates may already have been validated... | false | false | false | false | false | 0 |
handle_used_attribute (tree *pnode, tree name, tree ARG_UNUSED (args),
int ARG_UNUSED (flags), bool *no_add_attrs)
{
tree node = *pnode;
if (TREE_CODE (node) == FUNCTION_DECL
|| (TREE_CODE (node) == VAR_DECL && TREE_STATIC (node)))
{
TREE_USED (node) = 1;
DECL_PRESERVE_P (node) = 1;
... | false | false | false | false | false | 0 |
output_local_subroutine_die (arg)
void *arg;
{
tree decl = arg;
tree origin = decl_ultimate_origin (decl);
ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_subroutine);
sibling_attribute ();
dienum_push ();
if (origin != NULL)
abstract_origin_attribute (origin);
else
{
tree type = TREE_TYPE (de... | 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.