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 |
|---|---|---|---|---|---|---|
PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md)
{
if (PKCS7_type_is_digest(p7))
{
if(!(p7->d.digest->md->parameter = ASN1_TYPE_new()))
{
PKCS7err(PKCS7_F_PKCS7_SET_DIGEST,ERR_R_MALLOC_FAILURE);
return 0;
}
p7->d.digest->md->parameter->type = V_ASN1_NULL;
p7->d.digest->md->algorithm = OBJ_nid2obj(EVP... | false | false | false | false | false | 0 |
obt_xml_load_mem(ObtXmlInst *i,
gpointer data, guint len, const gchar *root_node)
{
gboolean r = FALSE;
g_assert(i->doc == NULL); /* another doc isn't open already? */
xmlResetLastError();
i->doc = xmlParseMemory(data, len);
if (i) {
i->root = xmlDocGetRootElemen... | false | false | false | false | false | 0 |
config_length(GKeyFile *config, const gchar *section, const gchar *name)
{
gchar *key;
gint i = 0;
key = g_strdup_printf("%s%d", name, i);
while (g_key_file_has_key(config, section, key, NULL))
{
i++;
g_free(key);
key = g_strdup_printf("%s%d", name, i);
}
g_free(key);
return i;
} | false | false | false | false | false | 0 |
containsOffset(int32_t offset) const {
int32_t i=start+offset;
if(i>=capacity) {
i-=capacity;
}
return list[i];
} | false | false | false | false | false | 0 |
mpt_work_wrapper(struct work_struct *work)
{
struct work_queue_wrapper *wqw =
container_of(work, struct work_queue_wrapper, work);
struct _MPT_SCSI_HOST *hd = wqw->hd;
MPT_ADAPTER *ioc = hd->ioc;
struct Scsi_Host *shost = ioc->sh;
struct scsi_device *sdev;
int disk = wqw->disk;
struct _CONFIG_PAGE_IOC_3 *pg3;
... | false | false | false | false | false | 0 |
L12__IS_REFERRED__cmpinline()
{register object *base=vs_base;
register object *sup=base+VM12; VC12
vs_check;vs_top=sup;
{object V72=base[0]->c.c_cdr;
base[2]= (V72->c.c_car);
V72=V72->c.c_cdr;
base[3]= (V72->c.c_car);}
base[4]= list(3,((object)VV[20]),base[2],list(2,((object)VV[18]),base[3]));
vs_top=(vs_base=b... | false | false | false | false | false | 0 |
change_param(const String &in_s, Element *e, void *vparam,
ErrorHandler *errh)
{
InfiniteSource *is = (InfiniteSource *)e;
String s = cp_uncomment(in_s);
switch ((intptr_t)vparam) {
case 0: { // data
String data;
if (!cp_string(s, &data))
return errh->error("data parameter must be s... | false | false | false | false | false | 0 |
check_map(keys, mode, exact, ign_mod, abbr, mp_ptr, local_ptr)
char_u *keys;
int mode;
int exact; /* require exact match */
int ign_mod; /* ignore preceding modifier */
int abbr; /* do abbreviations */
mapblock_T **mp_ptr; /* return: pointer to mapblock or NULL */
int *local_ptr; /* r... | false | false | false | false | false | 0 |
block3_data_unref (void * _userdata_) {
Block3Data* _data3_;
_data3_ = (Block3Data*) _userdata_;
#line 325 "/home/treitter/collabora/folks/tests/folks/small-set.vala"
if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 2606 "small-set.c"
SmallSetTests * self;
#line 325 "/home/treitter/collabora/folks/te... | false | false | false | false | false | 0 |
perf_try_init_event(struct pmu *pmu, struct perf_event *event)
{
struct perf_event_context *ctx = NULL;
int ret;
if (!try_module_get(pmu->module))
return -ENODEV;
if (event->group_leader != event) {
/*
* This ctx->mutex can nest when we're called through
* inheritance. See the perf_event_ctx_lock_nested... | false | false | false | false | false | 0 |
copy(const GAGeneticAlgorithm & g){
GAGeneticAlgorithm::copy(g);
const GAIncrementalGA& ga = DYN_CAST(const GAIncrementalGA&, g);
rs = ga.rs;
rf = ga.rf;
noffspr = ga.noffspr;
if(child1) child1->copy(*ga.child1);
else child1 = ga.child1->clone();
if(child2) child2->copy(*ga.child2);
else child2 = ... | false | false | false | false | false | 0 |
zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset);
zval_ptr_dtor(&of... | false | false | false | false | false | 0 |
pv_get_refer_to(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
{
if(msg==NULL)
return -1;
if(parse_refer_to_header(msg)==-1)
{
LM_DBG("no Refer-To header\n");
return pv_get_null(msg, param, res);
}
if(msg->refer_to==NULL || get_refer_to(msg)==NULL)
return pv_get_null(msg, param, res);
retu... | false | false | false | false | false | 0 |
glade_palette_new_item (GladePalette * palette, GladeWidgetAdaptor * adaptor)
{
GtkWidget *item, *button, *label, *box;
item = (GtkWidget *) gtk_toggle_tool_button_new ();
g_object_set_data (G_OBJECT (item), "glade-widget-adaptor", adaptor);
g_object_set_data (G_OBJECT (item), "glade-palette", palette);
but... | false | false | false | false | false | 0 |
test_CisTrans1()
{
obErrorLog.SetOutputLevel(obInfo);
OBConversion conv;
conv.SetInFormat("smi");
OBMol mol;
//
// F F F F 0 3
// \ / | | | |
// C===C | C C | | 1 2 |
// / \ | | | |
// (H) (H) (H)--... | false | false | false | false | false | 0 |
LockPoller(void * arg)
{
cacheDesc * cache = (cacheDesc *)arg;
cacheDesc * sharedCache = cache->sharedCache;
sidCacheLock * pLock;
PRIntervalTime timeout;
PRUint32 now;
PRUint32 then;
int locks_polled = 0;
int locks_to_poll = cache->numS... | false | false | false | false | false | 0 |
cx18_g_selection(struct file *file, void *fh,
struct v4l2_selection *sel)
{
struct cx18 *cx = fh2id(fh)->cx;
if (sel->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
switch (sel->target) {
case V4L2_SEL_TGT_CROP_BOUNDS:
case V4L2_SEL_TGT_CROP_DEFAULT:
sel->r.top = sel->r.left = 0;
sel->r.width =... | false | false | false | false | false | 0 |
array_reset(array *a) {
size_t i;
if (!a) return;
if (!a->is_weakref) {
for (i = 0; i < a->used; i++) {
a->data[i]->reset(a->data[i]);
}
}
a->used = 0;
} | false | false | false | false | false | 0 |
FilesDiffer(const char* source,
const char* destination)
{
#if defined(_WIN32)
WIN32_FILE_ATTRIBUTE_DATA statSource;
if (GetFileAttributesExW(Encoding::ToWide(source).c_str(),
GetFileExInfoStandard,
&statSource) == 0)
{
ret... | false | false | false | false | false | 0 |
GetMuleVersion()
{
wxString ver(wxT(VERSION));
ver += wxT(" compiled with ");
// Figure out the wx build-type
#if defined(__WXGTK20__)
ver += wxT("wxGTK2");
#elif defined(__WXGTK__)
ver += wxT("wxGTK1");
// 2.9 has different builds for OSX: Carbon and Cocoa
#elif defined(__WXOSX_CARBON__)
ver += wxT... | false | false | false | false | false | 0 |
gst_video_overlay_composition_free (GstMiniObject * mini_obj)
{
GstVideoOverlayComposition *comp = (GstVideoOverlayComposition *) mini_obj;
guint num;
num = comp->num_rectangles;
while (num > 0) {
gst_video_overlay_rectangle_unref (comp->rectangles[num - 1]);
--num;
}
g_free (comp->rectangles);
... | false | false | false | false | false | 0 |
cmd_dnssd_user_dir_path(
cmd_parms *cmd,
AVAHI_GCC_UNUSED void *mconfig,
const char *value) {
struct global_config_data *d = GET_CONFIG_DATA(cmd->server);
const char *err;
if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY)))
return err;
if (value[0] == '~')
return "Bad synt... | false | false | false | false | false | 0 |
i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write)
{
uint32_t old_write_domain, old_read_domains;
int ret;
if (obj->base.write_domain == I915_GEM_DOMAIN_CPU)
return 0;
ret = i915_gem_object_wait_rendering(obj, !write);
if (ret)
return ret;
i915_gem_object_flush_gtt_write_domain(... | false | false | false | false | false | 0 |
hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
void *font_data,
hb_codepoint_t unicode,
hb_codepoint_t variation_selector,
hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
FT_Face ft_face = (FT_Face) font_data;
#ifdef HAVE_FT_FACE_GETCHARVARIANTINDEX
if (unlikely (variation_selector)) {
*glyph ... | false | false | false | false | false | 0 |
g_strchr(const Char * str, int ch)
{
do {
if (*str == (Char) ch)
return (str);
} while (*str++);
return NULL;
} | false | false | false | false | false | 0 |
gfs_interpolate (FttCell * cell,
FttVector p,
GfsVariable * v)
{
g_return_val_if_fail (cell != NULL, 0.);
g_return_val_if_fail (v != NULL, 0.);
if (GFS_VALUE (cell, v) == GFS_NODATA)
return GFS_NODATA;
gdouble f[4*(FTT_DIMENSION - 1)];
gfs_cell_corner_values (cell, v, -1, f);
return gfs_interp... | false | false | false | false | false | 0 |
light_init(struct ibm_init_struct *iibm)
{
int rc;
vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n");
if (tpacpi_is_ibm()) {
TPACPI_ACPIHANDLE_INIT(ledb);
TPACPI_ACPIHANDLE_INIT(lght);
}
TPACPI_ACPIHANDLE_INIT(cmos);
INIT_WORK(&tpacpi_led_thinklight.work, light_set_status_worker);
/* light no... | false | false | false | false | false | 0 |
bcmdec_get_buffer(GstBcmDec *bcmdec,
gint size,
GstBuffer **obuf)
{
GstFlowReturn ret;
GST_DEBUG_OBJECT(bcmdec, "%s", __func__);
*obuf = gst_buffer_new_allocate (NULL,
size,
NULL);
if (obuf == NULL) {
GST_ERROR_OBJECT(bcmdec, "gst_pad_alloc_buffer_and_set_caps failed %d ",ret);
return FA... | false | false | false | false | false | 0 |
url_canonize_path(char *path)
{
const char *p;
char c, *q, *ep, *dst = path;
g_assert(path);
/* Scan path */
for (p = path, q = dst; '\0' != (c = *p); q++, p++) {
/* Handle relative paths i.e., /. and /.. */
if ('/' != c) {
*q = c;
continue;
}
/* Special handling for '/' follows */
do {
*q ... | false | false | false | false | false | 0 |
recvfd(int sockfd, void *buf, size_t nbytes, int flags, int *fd)
{
struct msghdr mesg[1];
struct iovec iov[1];
ssize_t rc;
#ifdef HAVE_MSGHDR_MSG_CONTROL
union
{
struct cmsghdr align;
char control[CMSG_SPACE(sizeof(int))];
}
control;
struct cmsghdr *cmsg;
mesg->msg_control = control.control;
mesg->msg... | true | true | false | false | false | 1 |
collectFiles(const QDir & outputFolder, QDomElement & path, QHash<QString, QString> & fzzFilePaths)
{
QList<QDir> dirList;
dirList << outputFolder;
while (!path.isNull()) {
QDomNode node = path.firstChild();
if (!node.isText()) {
DebugDialog::debug(QString("missing text in <path> element"));
return;... | false | false | false | false | false | 0 |
tp_base_connection_get_handles (TpBaseConnection *self,
TpHandleType handle_type)
{
g_return_val_if_fail (TP_IS_BASE_CONNECTION (self), NULL);
if (handle_type >= TP_NUM_HANDLE_TYPES)
return NULL;
return self->priv->handles[handle_type];
} | false | false | false | false | false | 0 |
bnx2_reset_phy(struct bnx2 *bp)
{
int i;
u32 reg;
bnx2_write_phy(bp, MII_BMCR, BMCR_RESET);
#define PHY_RESET_MAX_WAIT 100
for (i = 0; i < PHY_RESET_MAX_WAIT; i++) {
udelay(10);
bnx2_read_phy(bp, MII_BMCR, ®);
if (!(reg & BMCR_RESET)) {
udelay(20);
break;
}
}
if (i == PHY_RESET_MAX_WAIT... | false | false | false | false | false | 0 |
defineDotNodes(pANTLR3_BASE_TREE_ADAPTOR adaptor, void * t, pANTLR3_STRING dotSpec )
{
// How many nodes are we talking about?
//
int nCount;
int i;
pANTLR3_BASE_TREE child;
char buff[64];
pANTLR3_STRING text;
int j;
// Count the nodes
//
nCount = adaptor->getChildCount(adaptor, t);
if (nCount == ... | true | true | false | false | false | 1 |
SetMouseCursor(int sheet_split_mode)
{
if (m_splitCursor == sheet_split_mode)
return;
m_splitCursor = sheet_split_mode;
wxClientDC dc(this);
DrawSash(dc);
switch (sheet_split_mode)
{
case wxSHEET_SPLIT_VERTICAL : SetCursor(wxCURSOR_SIZENS); break;
case wxSHEET_SPL... | false | false | false | false | false | 0 |
setData(const QModelIndex &index, const QVariant &value, int role)
{
if (!index.isValid() || (flags(index) & Qt::ItemIsEditable) == 0)
return false;
BookmarkNode *item = node(index);
switch (role) {
case Qt::EditRole:
case Qt::DisplayRole:
if (index.column() == 0) {
m_b... | false | false | false | false | false | 0 |
RequestData(
vtkInformation *vtkNotUsed(info),
vtkInformationVector **inVector,
vtkInformationVector *outVector)
{
vtkInformation *inInfo = inVector[0]->GetInformationObject(0);
vtkTable* inputMap = vtkTable::GetData(inVector[1]);
vtkAnnotationLayers* input = 0;
vtkSelection* inputSelection = 0;
if (inI... | false | false | false | false | false | 0 |
gst_apexsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
{
GstApExSink *apexsink = (GstApExSink *) asink;
GstApExGeneration gen = gst_apexraop_get_generation (apexsink->gst_apexraop);
apexsink->latency_time = spec->latency_time;
spec->segsize = gen == GST_APEX_GENERATION_ONE
? GST_APEX_RAOP... | false | false | false | false | false | 0 |
method_13(const int *account, int *weight) {
number2Array("121212000", weight);
if (algo01(10, weight, true, 8, account) != AccountNumberCheck::OK) {
// shift left, add 00 as subaccount id and try again
int account_buf[10];
number2Array(array2Number(account).substr(2) + "00", account_buf);
if (AccountNumber... | false | false | false | false | false | 0 |
iexpt10_init(void)
{
int i;
iexpt10_n[0] = SCM_MAKE_INT(1);
iexpt10_n[1] = SCM_MAKE_INT(10);
iexpt10_n[2] = SCM_MAKE_INT(100);
iexpt10_n[3] = SCM_MAKE_INT(1000);
iexpt10_n[4] = SCM_MAKE_INT(10000);
iexpt10_n[5] = SCM_MAKE_INT(100000);
iexpt10_n[6] = SCM_MAKE_INT(1000000);
for (i=7; i... | false | false | false | false | false | 0 |
CreateViewPort(EView *V) {
V->Port = new EEditPort(this, V);
AddView(V);
return V->Port;
} | false | false | false | false | false | 0 |
gnc_tree_control_split_reg_trans_open_and_warn (GncTreeViewSplitReg *view, Transaction *trans)
{
Transaction *dirty_trans;
GtkWidget *window;
GtkWidget *dialog;
gint response;
const char *title = _("Save Transaction before proceeding?");
const char *message =
_("The current transacti... | false | false | false | false | false | 0 |
sigchld_handler(int UNUSED(unused)) {
struct sigaction sa_chld;
while(waitpid(-1, NULL, WNOHANG) > 0);
sa_chld.sa_handler = sigchld_handler;
sa_chld.sa_flags = SA_NOCLDSTOP;
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
dropbear_exit("signal() error");
}
} | false | false | false | false | false | 0 |
__indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences)
{
struct glx_context * const gc = __glXGetCurrentContext();
Display * const dpy = gc->currentDpy;
GLboolean retval = (GLboolean) 0;
const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
if (n < 0) {
__glXSetErr... | false | true | false | false | false | 1 |
netsys_queue_take(struct nqueue *q, void **elem)
{
unsigned long new_start;
if (q->table_start == q->table_end) {
*elem = NULL;
return (-3);
}
new_start = q->table_start + 1;
if (new_start == q->table_size) new_start = 0;
*elem = *(q->table + q->table_start);
q->table_start = new_start;... | false | false | false | false | false | 0 |
__gnat_error_handler (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *ucontext)
{
struct Exception_Data *exception;
const char *msg;
/* Adjusting is required for every fault context, so adjust for this one
now, before we possibly trigger a recursive fault below. */
__gnat_adjust_context_for_raise (sig, uc... | false | false | false | false | false | 0 |
v4l2_probe(int verbose)
{
struct ng_devinfo *info = NULL;
struct v4l2_capability cap;
int i,n,fd;
n = 0;
for (i = 0; NULL != ng_dev.video_scan[i]; i++) {
fd = ng_chardev_open(ng_dev.video_scan[i], O_RDONLY | O_NONBLOCK,
MAJOR_NUM, verbose, 1);
if (-1 == fd)
continue;
if (-1 == xioct... | false | false | false | false | false | 0 |
runOnMachineFunction(MachineFunction &MF) {
if (skipOptnoneFunction(*MF.getFunction()))
return false;
TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>();
// TailMerge can create jump into if branches that make CFG irreducible for
// HW that requires structurized CFG.
bool EnableTailMerge = !... | false | false | false | false | false | 0 |
put_fb_info(struct fb_info *fb_info)
{
if (!atomic_dec_and_test(&fb_info->count))
return;
if (fb_info->fbops->fb_destroy)
fb_info->fbops->fb_destroy(fb_info);
} | false | false | false | false | false | 0 |
omap_hsmmc_disable_boot_regulators(struct omap_hsmmc_host *host)
{
struct mmc_host *mmc = host->mmc;
int ret;
/*
* disable regulators enabled during boot and get the usecount
* right so that regulators can be enabled/disabled by checking
* the return value of regulator_is_enabled
*/
ret = omap_hsmmc_disabl... | false | false | false | false | false | 0 |
loop_giv_reduce_benefit (loop, bl, v, test_reg)
struct loop *loop ATTRIBUTE_UNUSED;
struct iv_class *bl;
struct induction *v;
rtx test_reg;
{
int add_cost;
int benefit;
benefit = v->benefit;
PUT_MODE (test_reg, v->mode);
add_cost = iv_add_mult_cost (bl->biv->add_val, v->mult_val,
... | false | false | false | false | false | 0 |
move_pointer_to_base (struct mem_address *parts, aff_tree *addr)
{
unsigned i;
tree val = NULL_TREE;
for (i = 0; i < addr->n; i++)
{
if (!addr->elts[i].coef.is_one ())
continue;
val = addr->elts[i].val;
if (POINTER_TYPE_P (TREE_TYPE (val)))
break;
}
if (i == addr->n)
return;
... | false | false | false | false | false | 0 |
zl10353_calc_input_freq(struct dvb_frontend *fe,
u16 *input_freq)
{
struct zl10353_state *state = fe->demodulator_priv;
u32 adc_clock = 450560; /* 45.056 MHz */
int if2 = 361667; /* 36.1667 MHz */
int ife;
u64 value;
if (state->config.adc_clock)
adc_clock = state->config.adc_clock;
if (state->config.... | false | false | false | false | false | 0 |
DtLookupLabel (
char *Name)
{
DT_FIELD *LabelField;
/* Skip a leading $ */
if (*Name == '$')
{
Name++;
}
/* Search global list */
LabelField = Gbl_LabelList;
while (LabelField)
{
if (!ACPI_STRCMP (Name, LabelField->Value))
... | false | false | false | false | false | 0 |
set_union(PySetObject *so, PyObject *args)
{
PySetObject *result;
PyObject *other;
Py_ssize_t i;
result = (PySetObject *)set_copy(so);
if (result == NULL)
return NULL;
for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
other = PyTuple_GET_ITEM(args, i);
if ((PyObject *)so == ... | false | false | false | false | true | 1 |
on_pad_added(GstElement *element, GstPad *pad, gboolean arg1, gpointer data)
{
GstStructure *structure;
GstElement *sinkelement;
GstCaps *caps;
GstPad *vpad;
const char *type;
sinkelement = GST_ELEMENT(data);
caps = gst_pad_query_caps(pad, NULL);
if (gst... | false | false | false | false | false | 0 |
unload_deplibs (handle)
lt_dlhandle handle;
{
int i;
int errors = 0;
if (handle->depcount)
{
for (i = 0; i < handle->depcount; ++i)
{
if (!LT_DLIS_RESIDENT (handle->deplibs[i]))
{
errors += lt_dlclose (handle->deplibs[i]);
}
}
}
return errors;
} | false | false | false | false | false | 0 |
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
Eina_Bool remch = ((cfdata->remember_border &&
!((cfdata->border->remember) &&
(cfdata->border->remember->apply & E_REMEMBER_APPLY_BORDER))) ||
(!cfdata->rememb... | false | false | false | false | false | 0 |
convert_charset( char *input )
{
#ifdef HAVE_ICONV
const int expansion_factor = 3;
static char *output = NULL;
static size_t output_size = 0;
char* output_ptr = output;
size_t output_left = output_size;
ICONV_CONST char* input_ptr = input;
size_t input_left = strlen( input ) + 1;
size_t min_output_size ... | false | false | false | false | false | 0 |
parse_lbrace (cfile)
struct parse *cfile;
{
enum dhcp_token token;
const char *val;
token = next_token (&val, (unsigned *)0, cfile);
if (token != LBRACE) {
parse_warn (cfile, "expecting left brace.");
skip_to_semi (cfile);
return 0;
}
return 1;
} | false | false | false | false | false | 0 |
setMaximumValue(double maxValue)
{
if (maxValue != d_maxValue)
{
d_maxValue = maxValue;
WindowEventArgs args(this);
onMaximumValueChanged(args);
}
} | false | false | false | false | false | 0 |
ComputeInteractionState(int X, int Y, int vtkNotUsed(modify))
{
double pos[3], xyz[3];
this->FocalPoint->GetPoint(0,pos);
xyz[0] = static_cast<double>(X);
xyz[1] = static_cast<double>(Y);
xyz[2] = pos[2];
this->VisibilityOn();
double tol2 = this->Tolerance * this->Tolerance;
if ( vtkMath::Distance2Betw... | false | false | false | false | false | 0 |
arp_find(Conn_t *conn)
{
Reg_t *tmp;
Lecdb_t *ltmp;
Debug_unit(&conn_unit, "Arp_find called");
dump_conn(conn);
Debug_unit(&conn_unit,"Arping for:");
dump_addr(&control_packet->target);
dump_printf(EL_CONT,"\n");
/* If requested multicast /broadcast address, respond with BUS address */
if (is_mul... | false | false | false | false | false | 0 |
read_data_block (Epson_Scanner * s, EpsonDataRec * result)
{
SANE_Status status;
u_char param[3];
receive (s, result, s->block ? 6 : 4, &status);
if (SANE_STATUS_GOOD != status)
return status;
if (STX != result->code)
{
DBG (1, "code %02x\n", (int) result->code);
DBG (1, "error, expected ST... | false | false | false | false | false | 0 |
gar_alloc_node(u_int32_t offset)
{
struct node *n;
n = calloc(1, sizeof(*n));
if (!n)
return NULL;
list_init(&n->l);
list_init(&n->lc);
n->offset = offset;
n->value = ~0;
nodetrunklog(n);
return n;
} | false | false | false | false | false | 0 |
fnic_trace_ctrl_read(struct file *filp,
char __user *ubuf,
size_t cnt, loff_t *ppos)
{
char buf[64];
int len;
u8 *trace_type;
len = 0;
trace_type = (u8 *)filp->private_data;
if (*trace_type == fc_trc_flag->fnic_trace)
len = sprintf(buf, "%u\n", fnic_tracing_enabled);
else if (*trace_type == fc_trc_... | true | true | false | false | false | 1 |
NegateValue(Value *V, Instruction *BI) {
if (Constant *C = dyn_cast<Constant>(V)) {
if (C->getType()->isFPOrFPVectorTy()) {
return ConstantExpr::getFNeg(C);
}
return ConstantExpr::getNeg(C);
}
// We are trying to expose opportunity for reassociation. One of the things
// that we want to do ... | false | false | false | false | false | 0 |
appendPsqlMetaConnect(PQExpBuffer buf, const char *dbname)
{
const char *s;
bool complex;
/*
* If the name is plain ASCII characters, emit a trivial "\connect "foo"".
* For other names, even many not technically requiring it, skip to the
* general case. No database has a zero-length name.
*/
complex = fa... | false | false | false | false | false | 0 |
vSet0SummaryInfo(FILE *pFile, const UCHAR *aucHeader)
{
UCHAR *aucBuffer;
ULONG ulBeginSumdInfo, ulBeginNextBlock;
size_t tLen;
USHORT usCodepage, usOffset;
TRACE_MSG("vSet0SummaryInfo");
fail(pFile == NULL || aucHeader == NULL);
/* First check the header */
usCodepage = usGetWord(0x7e, aucHeader);
DBG_DEC(... | false | false | false | false | false | 0 |
umc_bus_post_reset_helper(struct device *dev, void *data)
{
int ret = 0;
if (dev->driver) {
struct umc_dev *umc = to_umc_dev(dev);
struct umc_driver *umc_drv = to_umc_driver(dev->driver);
if (umc_drv->post_reset)
ret = umc_drv->post_reset(umc);
} else
ret = device_attach(dev);
return ret;
} | false | false | false | false | false | 0 |
appendNodelist(nodelist_t * list, nodelistitem_t * one, Agnode_t * n)
{
nodelistitem_t *np = init_nodelistitem(n);
list->sz++;
if (!one)
one = list->last;
if (one == list->last) {
if (one)
one->next = np;
else
list->first = np;
np->prev = one;
np->next = NULL;
list->last = np;
} els... | false | false | false | false | false | 0 |
nilfs_bmap_seek_key(struct nilfs_bmap *bmap, __u64 start, __u64 *keyp)
{
int ret;
down_read(&bmap->b_sem);
ret = bmap->b_ops->bop_seek_key(bmap, start, keyp);
up_read(&bmap->b_sem);
if (ret < 0)
ret = nilfs_bmap_convert_error(bmap, __func__, ret);
return ret;
} | false | false | false | false | false | 0 |
find_one_section (void *data, const char *name, off_t offset, off_t length)
{
struct find_one_section_data *fosd = (struct find_one_section_data *) data;
if (strcmp (name, fosd->name) != 0)
return 1;
*fosd->offset = offset;
*fosd->length = length;
fosd->found = 1;
/* Stop iteration. */
return 0;
} | false | false | false | false | false | 0 |
_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data)
{
FrogrCreateNewSetDialog *self = NULL;
/* Try to save data if response is OK */
self = FROGR_CREATE_NEW_SET_DIALOG (dialog);
if (response == GTK_RESPONSE_ACCEPT && _save_data (self) == FALSE)
return;
/* Destroy the dialog */
gtk_wi... | false | false | false | false | false | 0 |
brasero_file_monitor_moved_from_event (BraseroFileMonitor *self,
BraseroFileMonitorType type,
gpointer callback_data,
const gchar *name,
guint32 cookie)
{
BraseroInotifyMovedData *data = NULL;
BraseroFileMonitorPrivate *priv;
priv = BRASERO_FILE_MONITOR_PRIVATE (self);
... | false | false | false | false | false | 0 |
SetFormula (string entry) throw (parse_error)
{
Entry = entry;
Clear ();
Parse (Entry, Details);
list<FormulaElt *>::iterator i, iend = Details.end();
// now update markups and raw formula
for (i = Details.begin (); i != iend; i++) {
Markup += (*i)->Markup ();
(*i)->BuildRawFormula (Raw);
}
ostringstream os... | false | false | false | false | false | 0 |
FillRowCol_(Index n_entries, const GenTMatrix& matrix, Index row_offset, Index col_offset, Index* iRow, Index* jCol)
{
DBG_ASSERT(n_entries == matrix.Nonzeros());
const Index* irow = matrix.Irows();
const Index* jcol = matrix.Jcols();
for (Index i=0; i<n_entries; i++) {
iRow[i] = irow[i] + row_o... | false | false | false | false | false | 0 |
getDiagrams() const {
// diagrams for q qbar to gamma gamma
tcPDPtr p = getParticleData(ParticleID::gamma);
if(_process==0||_process==1) {
for ( int i = 1; i <= 5; ++i ) {
tcPDPtr q = getParticleData(i);
tcPDPtr qb = q->CC();
// t channel
add(new_ptr((Tree2toNDiagram(3), q, qb, qb, 1, ... | false | false | false | false | false | 0 |
slot_quote_res()
{
assert( m_article );
if( m_str_num.empty() ) return;
#ifdef _DEBUG
std::cout << "ArticleViewBase::slot_quote_res number = " << m_str_num << std::endl;
#endif
CORE::core_set_command( "open_message" ,m_url_article,
">>" + m_str_num + "\n" + m_article->get_r... | false | false | false | false | false | 0 |
array(struct ast_channel *chan, const char *cmd, char *var,
const char *value)
{
AST_DECLARE_APP_ARGS(arg1,
AST_APP_ARG(var)[100];
);
AST_DECLARE_APP_ARGS(arg2,
AST_APP_ARG(val)[100];
);
char *origvar = "", *value2, varname[256];
int i, ishash = 0;
if (!var) {
return -1;
}
value2 = ast_st... | false | false | false | false | false | 0 |
traverse_roles(struct gr_learn_group_node *grouplist,
int (*act)(struct gr_learn_group_node *group, struct gr_learn_user_node *user, FILE *stream),
FILE *stream)
{
struct gr_learn_group_node *tmpgroup;
struct gr_learn_user_node *tmpuser;
for_each_list_entry(tmpgroup, grouplist) {
if (tmpgroup->users ... | false | false | false | false | false | 0 |
mono_mempool_alloc (MonoMemPool *pool, guint size)
{
gpointer rval = pool->pos; // Return value
// Normal case: Just bump up pos pointer and we are done
size = ALIGN_SIZE (size);
pool->pos = (guint8*)rval + size;
#ifdef TRACE_ALLOCATIONS
if (pool == mono_get_corlib ()->mempool) {
mono_backtrace (size);
}
#end... | false | false | false | false | false | 0 |
rb_ary_store(ary, idx, val)
VALUE ary;
long idx;
VALUE val;
{
if (idx < 0) {
idx += RARRAY(ary)->len;
if (idx < 0) {
rb_raise(rb_eIndexError, "index %ld out of array",
idx - RARRAY(ary)->len);
}
}
rb_ary_modify(ary);
if (idx >= RARRAY(ary)->aux.capa) {
long new_capa = RARRAY(... | false | false | false | false | false | 0 |
xadc_zynq_drain_fifo(struct xadc *xadc)
{
uint32_t status, tmp;
xadc_read_reg(xadc, XADC_ZYNQ_REG_STATUS, &status);
while (!(status & XADC_ZYNQ_STATUS_DFIFOE)) {
xadc_read_reg(xadc, XADC_ZYNQ_REG_DFIFO, &tmp);
xadc_read_reg(xadc, XADC_ZYNQ_REG_STATUS, &status);
}
} | false | false | false | false | false | 0 |
assignToSOPFile(const char *referencedFileID,
const char *sourceFileName)
{
errorFlag = EC_Normal;
if (DirRecordType != ERT_root)
{
DCMDATA_DEBUG("DcmDirectoryRecord::assignToSOPFile() old Referenced File ID was " << getReferencedFileName());
... | false | false | false | false | false | 0 |
cx231xx_set_video_input_mux(struct cx231xx *dev, u8 input)
{
int status = 0;
switch (INPUT(input)->type) {
case CX231XX_VMUX_COMPOSITE1:
case CX231XX_VMUX_SVIDEO:
if ((dev->current_pcb_config.type == USB_BUS_POWER) &&
(dev->power_mode != POLARIS_AVMODE_ENXTERNAL_AV)) {
/* External AV */
status = cx23... | false | false | false | false | false | 0 |
hso_serial_close(struct tty_struct *tty, struct file *filp)
{
struct hso_serial *serial = tty->driver_data;
u8 usb_gone;
D1("Closing serial port");
/* Open failed, no close cleanup required */
if (serial == NULL)
return;
mutex_lock(&serial->parent->mutex);
usb_gone = serial->parent->usb_gone;
if (!usb_gon... | false | false | false | false | false | 0 |
fix_master_sid(int a_id)
{
int i;
adapter *ad;
streams *sid;
ad = get_adapter(a_id);
if (!ad || ad->master_sid != -1)
return 0;
if (ad->sid_cnt < 1)
return 0;
for (i = 0; i < MAX_STREAMS; i++)
if ((sid = get_sid_for(i)) && sid->adapter == a_id)
{
LOG("fix master_sid to %d for adapter %d", sid->sid, a... | false | false | false | false | false | 0 |
H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
hid_t lapl_id)
{
H5G_loc_t loc; /* Location of group */
H5G_loc_t grp_loc; /* Location used to open group */
H5G_name_t grp_path; /* Opened object group hier. path */
H5O_loc_t ... | false | false | false | false | false | 0 |
print_rsc_summary(pe_working_set_t * data_set, node_t * node, resource_t * rsc, gboolean all)
{
gboolean printed = FALSE;
time_t last_failure = 0;
int failcount = get_failcount_full(node, rsc, &last_failure, FALSE, data_set);
if (all || failcount || last_failure > 0) {
printed = TRUE;
... | false | false | false | false | false | 0 |
pk_font_not_found (PangoLanguage *language)
{
FcPattern *pat = NULL;
gchar *tag = NULL;
const gchar *lang;
g_return_if_fail (language != NULL);
/* convert to language */
lang = pango_language_to_string (language);
if (lang == NULL || lang[0] == '\0') {
g_warning ("failed to convert language to string");
go... | false | false | false | false | false | 0 |
select_p_select_jobinfo_get(select_jobinfo_t *jobinfo,
enum select_jobdata_type data_type,
void *data)
{
int rc = SLURM_SUCCESS;
uint32_t *uint32 = (uint32_t *) data;
uint64_t *uint64 = (uint64_t *) data;
select_jobinfo_t **select_jobinfo = (select_jobinfo_t **) data;
if (jobinfo == NULL) {
... | false | false | false | false | false | 0 |
gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
{
int p = gdImageGetPixel (im, x, y);
if (!im->trueColor) {
return gdTrueColorAlpha (im->red[p], im->green[p], im->blue[p],
(im->transparent == p) ? gdAlphaTransparent :
im->alpha[p]);
} else {
return p;
... | false | false | false | false | false | 0 |
unparse_interval() const
{
StringAccum sa;
if (sec() == 0) {
uint32_t ss = subsec();
uint32_t ms = ss / subsec_per_msec;
if (ms * subsec_per_msec == ss)
sa << ms << 'm' << 's';
else {
#if TIMESTAMP_NANOSEC
uint32_t us = ss / subsec_per_usec;
if (us * subsec_per_usec == ss)
sa << us << 'u' <... | false | false | false | false | false | 0 |
ComputeRealConstExpr() const
{
float a = left->ComputeRealConstExpr();
float b = right->ComputeRealConstExpr();
switch (token.GetValue())
{
case TOK_PLUS:
return a + b;
break;
case TOK_MINUS:
return a - b;
break;
case TOK_MULT:
... | false | false | false | false | false | 0 |
CreateMultiXactId(int nxids, TransactionId *xids)
{
MultiXactId multi;
MultiXactOffset offset;
XLogRecData rdata[2];
xl_multixact_create xlrec;
debug_elog3(DEBUG2, "Create: %s",
mxid_to_string(InvalidMultiXactId, nxids, xids));
/*
* See if the same set of XIDs already exists in our cache; if so, just
* ... | false | false | false | false | false | 0 |
kings_move(struct state *s) {
int i;
int ev = 0;
for(i=0; i<s->kings_num; ++i) {
int pl = s->king[i].pl;
place_flags(&s->king[i], &s->grid, &s->fg[pl]);
int code = builder_default(&s->king[i], &s->country[pl], &s->grid, &s->fg[pl]);
ev = ev || (code == 0);
}
if (ev) {
for(i=0; i<s->kings_n... | false | false | false | false | false | 0 |
put_revision_mark(const struct rev_info *revs, const struct commit *commit)
{
char *mark = get_revision_mark(revs, commit);
if (!strlen(mark))
return;
fputs(mark, stdout);
putchar(' ');
} | false | false | false | false | false | 0 |
show_ref(struct refinfo *info, const char *format, int quote_style)
{
const char *cp, *sp, *ep;
for (cp = format; *cp && (sp = find_next(cp)); cp = ep + 1) {
ep = strchr(sp, ')');
if (cp < sp)
emit(cp, sp);
print_value(info, parse_atom(sp + 2, ep), quote_style);
}
if (*cp) {
sp = cp + strlen(cp);
emit... | false | false | false | false | false | 0 |
CallSubr(subrno)
int subrno;
{
IfTrace2((FontDebug), "CallSubr %d (CallStackSize=%d)\n", subrno, CallTop);
if ((subrno < 0) || (subrno >= SubrsP->len))
Error0i("CallSubr: subrno out of range\n");
PushCall(CharStringP, strindex, r);
CharStringP = &SubrsP->data.arrayP[subrno];
StartDecrypt();
return(0);... | 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.