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 |
|---|---|---|---|---|---|---|
gsb_data_budget_update_counters ( void )
{
GSList *list_tmp_transactions;
gsb_data_budget_reset_counters ();
if ( etat.add_archive_in_total_balance )
list_tmp_transactions = gsb_data_transaction_get_complete_transactions_list ();
else
list_tmp_transactions = gsb_data_transaction_get_tr... | false | false | false | false | false | 0 |
on_motion_notify (GtkWidget *win,
GdkEventMotion *ev,
gpointer user_data)
{
AnnotateData *data = (AnnotateData *) user_data;
/* Get the data for this device. */
AnnotateDeviceData *devdata = g_hash_table_lookup(data->devdatatable, ev->device);
GdkMo... | false | false | false | false | false | 0 |
id_show(struct device *cdev,
struct device_attribute *attr,
char *buf)
{
struct enclosure_device *edev = to_enclosure_device(cdev);
if (edev->cb->show_id)
return edev->cb->show_id(edev, buf);
return -EINVAL;
} | false | false | false | false | false | 0 |
pub_or_sub_set_key_caps (GcrRecord *record,
guint8 key_flags)
{
GString *string;
GQuark schema;
schema = _gcr_record_get_schema (record);
if (schema == GCR_RECORD_SCHEMA_SEC || schema == GCR_RECORD_SCHEMA_SSB)
return;
string = g_string_sized_new (8);
if (key_flags & 0x02)
g_string_a... | false | false | false | false | false | 0 |
GCGMultchecksum(char **seqs, int nseq)
{
int chk = 0;
int idx;
for (idx = 0; idx < nseq; idx++)
chk = (chk + GCGchecksum(seqs[idx], strlen(seqs[idx]))) % 10000;
return chk;
} | false | false | false | false | false | 0 |
find_decomposable_shift_zext (rtx insn)
{
rtx set;
rtx op;
rtx op_operand;
set = single_set (insn);
if (!set)
return 0;
op = SET_SRC (set);
if (GET_CODE (op) != ASHIFT
&& GET_CODE (op) != LSHIFTRT
&& GET_CODE (op) != ZERO_EXTEND)
return 0;
op_operand = XEXP (op, 0);
if (!REG_P (... | false | false | false | false | false | 0 |
mv88e6060_phy_read(struct dsa_switch *ds, int port, int regnum)
{
int addr;
addr = mv88e6060_port_to_phy_addr(port);
if (addr == -1)
return 0xffff;
return reg_read(ds, addr, regnum);
} | false | false | false | false | false | 0 |
read_message_area(Processor *cpu)
{
#define MAX_STRING_LEN 255 /* Maximum length of a debug message */
char DebugType,DebugMessage[MAX_STRING_LEN];
unsigned short i, j, start_block, end_block;
unsigned short laddress;
// If the .cod file contains a simulation script, then we'll
// pass it to the command li... | false | false | false | false | true | 1 |
sanei_w_get_devices_reply (Wire *w, SANE_Get_Devices_Reply *reply)
{
SANE_Word len;
if (w->direction != WIRE_DECODE)
{
if (reply->device_list)
{
for (len = 0; reply->device_list[len]; ++len);
++len;
}
else
len = 0;
}
sanei_w_status (w, &reply->status);
sanei_w_array (w, &len, (void... | false | false | false | false | false | 0 |
on_timetableViewRoomsAction_activated()
{
if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
return;
}
if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
QMessageBox::warning(this, tr("... | false | false | false | false | false | 0 |
ks8842_reset_hw(struct ks8842_adapter *adapter)
{
/* reset the HW */
ks8842_reset(adapter);
/* Enable QMU Transmit flow control / transmit padding / Transmit CRC */
ks8842_write16(adapter, 16, 0x000E, REG_TXCR);
/* enable the receiver, uni + multi + broadcast + flow ctrl
+ crc strip */
ks8842_write16(adapter,... | false | false | false | false | false | 0 |
hostnames_matching (text)
char *text;
{
register int i, len, nmatch, rsize;
char **result;
if (hostname_list_initialized == 0)
initialize_hostname_list ();
if (hostname_list_initialized == 0)
return ((char **)NULL);
/* Special case. If TEXT consists of nothing, then the whole list is
wha... | false | false | false | false | false | 0 |
rpcsvc_submit_generic (rpcsvc_request_t *req, struct iovec *proghdr,
int hdrcount, struct iovec *payload, int payloadcount,
struct iobref *iobref)
{
int ret = -1, i = 0;
struct iobuf *replyiob = NULL;
struct iov... | false | false | false | false | false | 0 |
degree() const
{
unsigned int d=0;
for (unsigned int i=0; i<nterms_; i++)
{
unsigned int dt=0;
for (unsigned int j=0; j<nvar_; j++)
dt+=polyn_(i,j);
if (dt>d) d=dt;
}
return d;
} | false | false | false | false | false | 0 |
operator+=(const BaseMatrix& X)
{
REPORT
Tracer tr("GeneralMatrix::operator+=");
// MatrixConversionCheck mcc;
Protect(); // so it cannot get deleted
// during Evaluate
GeneralMatrix* gm = ((BaseMatrix&)X).Evaluate();
AddedMatrix am(this,gm);
if (gm==this) Re... | false | false | false | false | false | 0 |
output_commit_title(struct commit *commit)
{
int i;
flush_output();
for (i = call_depth; i--;)
fputs(" ", stdout);
if (commit->util)
printf("virtual %s\n", (char *)commit->util);
else {
printf("%s ", find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
if (parse_commit(commit) != 0)
printf("(bad c... | false | false | false | false | false | 0 |
xdb_set(void *noop, jid fn, char *ns, xmlnode x) {
extern jcr_instance jcr;
char buf[512];
xmlnode n, s, xdb;
int rc;
n = xdb_get(noop, fn, NULL);
if (n == NULL) {
memset(buf, 0, 512);
snprintf(buf, 511, "%s/%s.xml", jcr->spool_dir, fn->user);
xdb = xmlnode_new_tag("xdb");
if (ns != NULL)
... | true | true | false | false | false | 1 |
gdl_dock_param_get_type (void)
{
static GType our_type = 0;
if (our_type == 0) {
GTypeInfo tinfo = { 0, };
our_type = g_type_register_static (G_TYPE_STRING, "GdlDockParam", &tinfo, 0);
/* register known transform functions */
/* exporters */
g_value_register_transform_f... | false | false | false | false | false | 0 |
force_update_now (WnckWindow *window)
{
WnckWindowState old_state;
WnckWindowState new_state;
WnckWindowActions old_actions;
unqueue_update (window);
/* Name must be done before all other stuff,
* because we have iconsistent state across the
* update_name/update_icon_name functions (no window name),
... | false | false | false | false | false | 0 |
ssh_handler_unlock (ctrl_t ctrl, estream_t request, estream_t response)
{
gpg_error_t ret_err;
gpg_error_t err;
(void)ctrl;
(void)request;
err = ssh_unlock ();
if (! err)
ret_err = stream_write_byte (response, SSH_RESPONSE_SUCCESS);
else
ret_err = stream_write_byte (response, SSH_RESPONSE_FAILU... | false | false | false | false | false | 0 |
gpio_vbus_set_peripheral(struct usb_otg *otg,
struct usb_gadget *gadget)
{
struct gpio_vbus_data *gpio_vbus;
struct gpio_vbus_mach_info *pdata;
struct platform_device *pdev;
int gpio;
gpio_vbus = container_of(otg->usb_phy, struct gpio_vbus_data, phy);
pdev = to_platform_device(gpio_vbus->dev);
pdata = dev_... | false | false | false | false | false | 0 |
predict_row_size( x264_t *h, int y, float qscale )
{
/* average between two predictors:
* absolute SATD, and scaled bit cost of the colocated row in the previous frame */
x264_ratecontrol_t *rc = h->rc;
float pred_s = predict_size( rc->row_pred[0], qscale, h->fdec->i_row_satd[y] );
if( h->sh.i_type... | false | false | false | false | false | 0 |
setNextMix(XERCES_CPP_NAMESPACE::DOMDocument* doc)
{
CAMsg::printMsg(LOG_DEBUG,"setNextMix() - start\n");
DOMElement* elemRoot = doc->getDocumentElement();
//getCertificates if given...
DOMElement* elemSig;
getDOMChildByName(elemRoot, OPTIONS_NODE_SIGNATURE, elemSig, false);
//Own Certiticate fi... | false | false | false | false | false | 0 |
i915_gem_cleanup_engines(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_engine_cs *engine;
for_each_engine(engine, dev_priv)
dev_priv->gt.cleanup_engine(engine);
if (i915.enable_execlists)
/*
* Neither the BIOS, ourselves or any other kernel
* expects the sy... | false | false | false | false | false | 0 |
sim_room_button_pressed(int n)
{
switch (n) {
case SCROLL_UP_BUTTON:
sim_room_scroll_screen_up();
Sim_room_slider.forceUp();
break;
case SCROLL_DOWN_BUTTON:
sim_room_scroll_screen_down();
Sim_room_slider.forceDown();
break;
case MISSION_TAB:
Simroom_show_all = 0;
Player->readyroom_listi... | false | false | false | false | false | 0 |
hmc5983ReliablySetReg(uint8_t reg, uint8_t val) {
uint8_t ret;
do {
delay(10);
hmc5983SetReg(reg, val);
delay(10);
ret = hmc5983GetReg(reg);
} while (ret != val);
} | false | false | false | false | false | 0 |
__sensors_get_value(const sensors_chip_name *name, int subfeat_nr,
int depth, double *result)
{
const sensors_chip_features *chip_features;
const sensors_subfeature *subfeature;
const sensors_expr *expr = NULL;
double val;
int res, i;
if (depth >= DEPTH_MAX)
return -SENSORS_ERR_RECURSION;
if (sensor... | false | false | false | false | false | 0 |
exif_mnote_data_pentax_identify (const ExifData *ed, const ExifEntry *e)
{
if ((e->size >= 8) && !memcmp (e->data, "AOC", 4)) {
if (((e->data[4] == 'I') && (e->data[5] == 'I')) ||
((e->data[4] == 'M') && (e->data[5] == 'M')))
return pentaxV3;
else
/* Uses Casio v2 tags */
return pentaxV2;
}
if ((... | false | false | false | false | false | 0 |
EndElement(const char *name)
{
if(!strcmp(name,"data"))
{
m_NewResources->AddUuid(m_CurrentValue);
}
RestXMLParser::EndElement(name);
} | false | false | false | false | false | 0 |
open_metadata(struct era_metadata *md)
{
int r;
struct dm_block *sblock;
struct superblock_disk *disk;
r = superblock_read_lock(md, &sblock);
if (r) {
DMERR("couldn't read_lock superblock");
return r;
}
disk = dm_block_data(sblock);
r = dm_tm_open_with_sm(md->bm, SUPERBLOCK_LOCATION,
disk->metad... | false | false | false | false | false | 0 |
cdda_sample_rate(input_object *obj)
{
struct cdda_local_data *data;
if (!obj)
return 0;
data = (struct cdda_local_data *)obj->local_data;
return (data ? data->samplerate : 0);
} | false | false | false | false | false | 0 |
icalcomponent_count_errors(icalcomponent* component)
{
int errors = 0;
icalproperty *p;
icalcomponent *c;
pvl_elem itr;
struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
for( itr = pvl_head(impl->properties);
itr != 0;
itr = pvl_next(itr))
{
p = (icalproperty*)p... | false | false | false | false | false | 0 |
fi_gui_select_by_regex(const char *regex)
{
struct select_by_regex ctx;
gboolean case_sensitive;
int ret, flags;
ctx.matches = 0;
ctx.total_nodes = 0;
fi_gui_files_unselect_all();
if (NULL == regex || '\0' == regex[0])
return;
ctx.invert = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(gui_main_wind... | false | false | false | false | false | 0 |
RegisterFormat(const char* ID, const char* MIME)
{
GetMap()[ID] = this;
if (MIME)
FormatsMIMEMap()[MIME] = this;
if(Flags() & DEFAULTFORMAT)
Default() = this;
//ensure "formats" is registered as a plugin
PluginMap()[TypeID()] =this;
_id=ID;
return GetMap().size();
} | false | false | false | false | false | 0 |
EncoderSession_process(EncoderSession *e, const FLAC__int32 * const buffer[], unsigned samples)
{
if(e->replay_gain) {
if(!grabbag__replaygain_analyze(buffer, e->info.channels==2, e->info.bits_per_sample, samples)) {
flac__utils_printf(stderr, 1, "%s: WARNING, error while calculating ReplayGain\n", e->inbasefilen... | false | false | false | false | false | 0 |
vidioc_g_dv_timings(struct file *file, void *_fh,
struct v4l2_dv_timings *timings)
{
struct hdpvr_device *dev = video_drvdata(file);
struct hdpvr_fh *fh = _fh;
fh->legacy_mode = false;
if (dev->options.video_input)
return -ENODATA;
*timings = dev->cur_dv_timings;
return 0;
} | false | false | false | false | false | 0 |
gserv(char *name)
{
struct servent *sp;
if (isdigit(name[0]))
return htons((SHORT) atoi(name));
if (!(sp = getservbyname(name, "tcp")) && !(sp = getservbyname(name, "TCP"))) {
fprintf(stderr, "%s: Unknown service %s\n", progname, name);
exit(50);
}
return sp->s_port;
} | false | false | false | false | false | 0 |
clr(gdImagePtr im, const char *s, revision_t *r, branch_t *b, int idx)
{
int i;
color_t *c = get_colorref(s, idx);
if(!c)
c = &black_color;
if(c->node)
c = eval_color(c->node, r, b);
for(i = 0; i < nclr_id; i++)
{
if(c->r == clr_id[i].r && c->g == clr_id[i].g && c->b == clr_id[i].b)
return &clr_id[i];
}... | false | false | false | false | false | 0 |
create_expression(ExtractElementInst* E) {
Expression e;
e.varargs.push_back(lookup_or_add(E->getOperand(0)));
e.varargs.push_back(lookup_or_add(E->getOperand(1)));
e.function = 0;
e.type = E->getType();
e.opcode = Expression::EXTRACT;
return e;
} | false | false | false | false | false | 0 |
facebook_service_list_photos (FacebookService *self,
FacebookAlbum *album,
int limit,
const char *after,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
char *uri;
GHashT... | false | false | false | false | false | 0 |
setPixmap(const QPixmap &pixmap)
{
//TODO: check if pixmap is already the same - if yes, return without emitting pixmapChanged()
setIcon(QIcon(pixmap));
m_isDefaultGender = false;
m_pixmap = pixmap;
m_deletePhotoAction->setEnabled(!pixmap.isNull());
Q_EMIT pixmapChanged(pixmap);
} | false | false | false | false | false | 0 |
bch_bkey_try_merge(struct btree_keys *b, struct bkey *l, struct bkey *r)
{
if (!b->ops->key_merge)
return false;
/*
* Generic header checks
* Assumes left and right are in order
* Left and right must be exactly aligned
*/
if (!bch_bkey_equal_header(l, r) ||
bkey_cmp(l, &START_KEY(r)))
return false... | false | false | false | false | false | 0 |
compile_pattern(pattern, search_type, comp_pattern)
char *pattern;
int search_type;
void **comp_pattern;
{
char *cvt_pattern;
int result;
if (caseless != OPT_ONPLUS)
cvt_pattern = pattern;
else
{
cvt_pattern = (char*) ecalloc(1, cvt_length(strlen(pattern), CVT_TO_LC));
cvt_text(cvt_pattern, pattern, (int... | false | false | false | false | false | 0 |
_dxf_GetXTranslation(Object o)
{
translationT *d;
if(o) {
d = (translationT *) DXGetPrivateData((Private)o);
return d;
} else
return NULL;
} | false | false | false | false | false | 0 |
OnFileSave ()
{
if (!m_pActiveDoc)
return;
if (m_pActiveDoc->GetFileName ())
m_pActiveDoc->Save ();
else
OnFileSaveAs ();
} | false | false | false | false | false | 0 |
gth_menu_button_get_stock_id (GthMenuButton *self)
{
char *stock_id;
g_return_val_if_fail (GTH_IS_MENU_BUTTON (self), NULL);
gtk_image_get_stock (GTK_IMAGE (self->priv->icon_widget),
&stock_id,
NULL);
return stock_id;
} | false | false | false | false | false | 0 |
finish_struct_bits (tree t)
{
int i, n_baseclasses = CLASSTYPE_N_BASECLASSES (t);
/* Fix up variants (if any). */
tree variants = TYPE_NEXT_VARIANT (t);
while (variants)
{
/* These fields are in the _TYPE part of the node, not in
the TYPE_LANG_SPECIFIC component, so they are not shared. */
... | false | false | false | false | true | 1 |
Add(PG_Widget* rect, bool front) {
if(rect->next() != NULL || rect->prev() != NULL) {
PG_LogWRN("PG_RectList::Add(...) Trying to add a linked PG_Rect object");
return;
}
Uint32 index = 2^31;
my_count++;
// get highest index
if(my_last != NULL) {
index = my_last->index;
}
index++;
if(front) {
if(my_f... | false | false | false | true | false | 1 |
drv_FutabaVFD_writeChar(const unsigned char c)
{
int i;
unsigned char status;
drv_generic_parport_data(c);
drv_generic_parport_control(SIGNAL_WR | SIGNAL_SELECT, 0);
ndelay(60);
drv_generic_parport_control(SIGNAL_WR, 0xFF);
/*wait <=60ns till busy */
for (i = 0; i < 60; i++) {
status... | false | false | false | false | false | 0 |
proxy(int fd, short ev, void *data)
{
struct proxydesc *d = (struct proxydesc *)data;
int ret;
/*
* XXX - what happens when socket errors ... eofpending() on
* read, then what happens on write? should we perhaps
* shutdown() on failure/eofpending?
*/
if (ev & EV_READ) {
/* Read into dst's buffer */
r... | false | false | false | false | false | 0 |
mlx4_ib_master_tunnels(struct mlx4_ib_dev *dev, int do_init)
{
int i;
if (!mlx4_is_master(dev->dev))
return;
/* initialize or tear down tunnel QPs for the master */
for (i = 0; i < dev->dev->caps.num_ports; i++)
mlx4_ib_tunnels_update(dev, mlx4_master_func_num(dev->dev), i + 1, do_init);
return;
} | false | false | false | false | false | 0 |
Include(
TNodeList* nodes,
Alignment na1, TElement* e1, Alignment na2, TElement* e2, TElement* tg
) {
if (e1->owner == e2->owner && na1 == na2) {
/* aligned a node to itself; do nothing */
} else if (tg == nil) {
nodes->Include(na1, e1, na2, e2);
} else if (na1 == BottomLeft && na2 == TopRi... | false | false | false | true | false | 1 |
create_isatap_tunnel(uint32_t saddr)
{
/* Create tunnel */
if (tunnel_add(tunnel_name, interface_name, saddr, ttl, pmtudisc) < 0) {
if (verbose >= -1)
syslog(LOG_ERR, "tunnel_add: %s\n", strerror(errno));
exit(1);
}
if (verbose >= 1) {
struct in_addr addr;
addr.s_addr = saddr;
syslog(LOG_INFO, "%s cre... | false | false | false | false | false | 0 |
emoticon_expand(const char *s) {
emoticon_t *el = NULL;
const char *ss;
char *ms;
size_t n = 0;
if (!s)
return NULL;
for (ss = s; *ss; ss++) {
emoticon_t *e = NULL;
size_t ns = xstrlen(ss);
int ret = 1;
for (el = emoticons; el && ret; el = (ret ? el->next : el)) {
size_t nn;
e = el;
nn = xs... | false | false | false | false | false | 0 |
filter_filter (GMimeFilter *filter, char *in, size_t len, size_t prespace,
char **out, size_t *outlen, size_t *outprespace)
{
GMimeFilterCharset *charset = (GMimeFilterCharset *) filter;
size_t inleft, outleft, converted = 0;
char *inbuf;
char *outbuf;
if (charset->cd == (iconv_t) -1)
goto noop;
g_m... | false | false | false | false | false | 0 |
rebuildWithoutConstOffset() {
distributeExtsAndCloneChain(UserChain.size() - 1);
// Remove all nullptrs (used to be s/zext) from UserChain.
unsigned NewSize = 0;
for (auto I = UserChain.begin(), E = UserChain.end(); I != E; ++I) {
if (*I != nullptr) {
UserChain[NewSize] = *I;
NewSize++;
}
... | false | false | false | false | false | 0 |
gdnsd_logf_dname(const uint8_t* dname) {
if(!dname)
return generic_nullstr;
char* dnbuf = dmn_fmtbuf_alloc(1024);
char* dnptr = dnbuf;
dname++; // skip initial OAL byte
unsigned llen;
while(1) {
llen = *dname++;
// Handle terminal cases
if(llen == 255)
... | false | false | false | false | false | 0 |
widget_pokemem_draw( void *data GCC_UNUSED )
{
if( !store ) {
pokemem_autoload_pokfile();
widget_pokemem_store_new();
}
menu_width = widget_pokemem_calculate_width();
menu_left_edge_x = DISPLAY_WIDTH_COLS / 2 - menu_width / 2;
widget_dialog_with_border( menu_left_edge_x, 2, menu_width, page_size + 4... | false | false | false | false | false | 0 |
QueryProcessorBySysconf()
{
#if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN)
// IRIX names this slightly different
#define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN
#endif
#ifdef _SC_NPROCESSORS_ONLN
long c = sysconf(_SC_NPROCESSORS_ONLN);
if (c <= 0) {
return false;
}
this->NumberOfPhysicalCPU = s... | false | false | false | false | false | 0 |
butEnv_charWidth(ButEnv *env, const char *text, int fnum) {
uchar c, special;
int width;
c = text[0];
assert(c != '\0');
switch(c) {
case '\1':
case '\2':
special = 256 * (c - 1) + text[1];
assert(env->write[special].draw != NULL);
width = (env->fonts[fnum]->ascent + env->fonts[fnum]->d... | false | false | false | false | false | 0 |
slapi_sdn_get_ndn_len(const Slapi_DN *sdn)
{
int r = 0;
(void)slapi_sdn_get_dn(sdn); /* does the normalization if needed */
if(sdn->dn || sdn->ndn)
{
r = sdn->ndn_len;
}
return r;
} | false | false | false | false | false | 0 |
byteArray(const QString& key)
{
return value(key, QByteArray()).toByteArray();
} | false | false | false | false | false | 0 |
InitializeMemory(const Constant *Init, void *Addr) {
DEBUG(dbgs() << "JIT: Initializing " << Addr << " ");
DEBUG(Init->dump());
if (isa<UndefValue>(Init)) {
return;
} else if (const ConstantVector *CP = dyn_cast<ConstantVector>(Init)) {
unsigned ElementSize =
getTargetData()->getTypeAllocSize(CP->... | false | false | false | false | false | 0 |
my_strseg(char *buf, unsigned int buflen,
const char **arg, char delim)
{
const char *sep;
if (*arg == NULL || **arg == '\0')
return NULL;
sep = strchr(*arg, delim);
if (sep == NULL) {
snprintf(buf, buflen, "%s", *arg);
*arg = NULL;
return buf;
}
snprintf(buf, buflen, "%.*s", (unsigned int)(sep - *ar... | false | false | false | false | false | 0 |
FindDeepestBitDepth(const std::string &s1, const std::string &s2)
{
if(s1 == kOfxBitDepthNone) {
return s2;
}
else if(s1 == kOfxBitDepthByte) {
if(s2 == kOfxBitDepthShort || s2 == kOfxBitDepthFloat)
return s2;
return s1;
}
else if(s1 == kOfxBitDepthShort) {
if(s2 ==... | false | false | false | false | false | 0 |
xmlSecNssKeySlotCopy(
xmlSecNssKeySlotPtr newKeySlot ,
xmlSecNssKeySlotPtr keySlot
) {
CK_MECHANISM_TYPE_PTR mech ;
int counter ;
xmlSecAssert2( newKeySlot != NULL , -1 ) ;
xmlSecAssert2( keySlot != NULL , -1 ) ;
if( keySlot->slot != NULL && newKeySlot->slot != keySlot->slot ) {
if... | false | false | false | false | false | 0 |
compress_row(unsigned char *row, int length)
{
int rle_type = 0;
int compressed_length = 0;
int pixel = 0, compressed_run = 0, rle_compression = 0;
unsigned char *uncompressed_row = NULL, *uncompressed_rowp = NULL, *uncompressed_start = NULL;
uncompressed_row = (unsigned char *) gdMalloc(length);
if (!uncompress... | false | true | false | false | false | 1 |
ath6kl_usb_bmi_read(struct ath6kl *ar, u8 *buf, u32 len)
{
struct ath6kl_usb *ar_usb = ar->hif_priv;
int ret;
/* get response */
ret = ath6kl_usb_submit_ctrl_in(ar_usb,
ATH6KL_USB_CONTROL_REQ_RECV_BMI_RESP,
0, 0, buf, len);
if (ret) {
ath6kl_err("Unable to read the bmi data from the device: %d\n",
... | false | false | false | false | false | 0 |
anysee_ci_write_attribute_mem(struct dvb_ca_en50221 *ci, int slot,
int addr, u8 val)
{
struct dvb_usb_device *d = ci->data;
int ret;
u8 buf[] = {CMD_CI, 0x03, 0x40 | addr >> 8, addr & 0xff, 0x00, 1, val};
ret = anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0);
if (ret)
return ret;
return 0;
} | false | false | false | false | false | 0 |
lf_convert_8_24(
cct_8_true_conversion_table table,
unsigned char *input,
unsigned char *output,
int pixel_count)
{
int x;
for(x = pixel_count; x; x--)
{
unsigned int t = table->pixel_values[input[0]];
# ifdef CHIMERA_LITTLE_ENDIAN
output[0] = t & 255;
output[1] = (t >> 8) & 255;
o... | false | false | false | false | false | 0 |
Java_org_gdal_gdal_gdalJNI_FileFromMemBuffer(JNIEnv *jenv, jclass jcls, jstring jarg1, jbyteArray jarg2) {
char *arg1 = (char *) 0 ;
int arg2 ;
GByte *arg3 = (GByte *) 0 ;
(void)jenv;
(void)jcls;
arg1 = 0;
if (jarg1) {
arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
if (!arg1) return ;
}
... | false | false | false | false | false | 0 |
metrics(MetricsInfo & mi, Dimension & dim) const
{
FontSetChanger dummy(mi.base, key_->name);
cell(0).metrics(mi, dim);
metricsMarkers(dim);
} | false | false | false | false | false | 0 |
_ctl_btdh_mapping(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
{
struct mpt3_ioctl_btdh_mapping karg;
int rc;
if (copy_from_user(&karg, arg, sizeof(karg))) {
pr_err("failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
return -EFAULT;
}
dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
... | false | false | false | false | false | 0 |
nhrp_interface_get_by_nbma(struct nhrp_address *addr)
{
struct nhrp_interface *match = NULL;
struct nhrp_interface *iface;
list_for_each_entry(iface, &name_list, name_list_entry) {
if (!(iface->flags & NHRP_INTERFACE_FLAG_CONFIGURED))
continue;
if ((nhrp_address_cmp(addr, &iface->nbma_address) == 0) ||
... | false | false | false | false | false | 0 |
verify_memory(void)
{
int cpunum;
/* zap the bank data */
memset(&bankdata, 0, sizeof(bankdata));
/* loop over CPUs */
for (cpunum = 0; cpunum < cpu_gettotalcpu(); cpunum++)
{
const struct Memory_ReadAddress *mra = Machine->drv->cpu[cpunum].memory_read;
const struct Memory_WriteAddress *mwa = Mac... | false | false | false | false | false | 0 |
wordgraph_save(WordGraph *wg, WordGraph *right, WordGraph **root)
{
if (wg != NULL) {
wg->next = *root;
*root = wg;
wg->saved = TRUE;
wordgraph_add_leftword(right, wg, wg->lscore_tmp);
wordgraph_add_rightword(wg, right, wg->lscore_tmp);
}
} | false | false | false | false | false | 0 |
df_get_bb_dirty (basic_block bb)
{
return bitmap_bit_p ((df_live
? df_live : df_lr)->out_of_date_transfer_functions,
bb->index);
} | false | false | false | false | false | 0 |
print_buttons (GsdWacomDevice *device)
{
GList *buttons, *l;
buttons = gsd_wacom_device_get_buttons (device);
if (buttons == NULL)
return;
for (l = buttons; l != NULL; l = l->next) {
GsdWacomTabletButton *button = l->data;
g_print ("\tButton: %s (%s)\n", button->name, button->id);
g_print ("\t\tType: %s\... | false | false | false | false | false | 0 |
bits_ulong(char *s,
long unsigned int *np)
{
int i;
unsigned long n;
n = 0;
for(i = 0 ; s[i] == '0' || s[i] == '1'; i++)
n = n * 2 + s[i] - '0';
*np = n;
return(s[i] == '\0');
} | false | false | false | false | false | 0 |
socket_tos_default(const struct gnutella_socket *s)
{
socket_check(s);
switch (s->type) {
case SOCK_TYPE_DOWNLOAD: /* ACKs w/ low latency => higher transfer rates */
socket_tos_lowdelay(s);
break;
case SOCK_TYPE_UPLOAD:
socket_tos_throughput(s);
break;
case SOCK_TYPE_CONTROL:
case SOCK_TYPE_HTTP:
case SO... | false | false | false | false | false | 0 |
name_to_res(const char *name)
{
int i;
for (i = 0; i < SIZE(rlim_table); i++) {
if (!rlim_table[i])
continue;
if (!strcmp(rlim_table[i], name))
return i;
}
fprintf(stderr, "Invalid resource name: %s "
"found on line %lu of %s.\n", name, lineno, current_acl_file);
exit(EXIT_FAILURE);
return 0;
} | false | false | false | false | false | 0 |
DISParseEntityID (dis_entity_id *p,
const char * buf,
int bufsize,
const char *delim)
{
char pdelim[DMAX+1];
char tbuf[BMAX+1];
char *cur, *next, *endptr;
long rval;
int result = 1;
memset ( p, 0, sizeof(dis_entity_id));
/*
* Buffer too large?
*/
if (bufsize > BMAX ) {
return 2;
}... | false | false | false | false | false | 0 |
FullTag(const Item *Stop) const
{
if (Parent == 0 || Parent->Parent == 0 || Parent == Stop)
return Tag;
return Parent->FullTag(Stop) + "::" + Tag;
} | false | false | false | false | false | 0 |
rsi_91x_deinit(struct rsi_hw *adapter)
{
struct rsi_common *common = adapter->priv;
u8 ii;
rsi_dbg(INFO_ZONE, "%s: Performing deinit os ops\n", __func__);
rsi_kill_thread(&common->tx_thread);
for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
skb_queue_purge(&common->tx_queue[ii]);
common->init_done = false;
kfree(... | false | false | false | false | false | 0 |
do_box(int x, int y, int, float* param)
{
int xr = x - (int)param[3];
int yr = y - (int)param[4];
if (xr < -(int)param[1] || xr > (int)param[1] ||
yr < -(int)param[2] || yr > (int)param[2])
return 0;
else
return param[0];
} | false | false | false | false | false | 0 |
DumpSegment64Command(MachOObject &Obj,
const MachOObject::LoadCommandInfo &LCI) {
InMemoryStruct<macho::Segment64LoadCommand> SLC;
Obj.ReadSegment64LoadCommand(LCI, SLC);
if (!SLC)
return Error("unable to read segment load command");
DumpSegmentCommandData(StringRef(SLC->Name... | false | false | false | false | false | 0 |
Pk11Install_PlatformName_lteq(Pk11Install_PlatformName* _this,
Pk11Install_PlatformName* cmp)
{
return (Pk11Install_PlatformName_equal(_this,cmp) ||
Pk11Install_PlatformName_lt(_this,cmp)) ? PR_TRUE : PR_FALSE;
} | false | false | false | false | false | 0 |
f_stringcolumn(union argument *arg)
{
struct value a;
int column;
(void) arg; /* avoid -Wunused warning */
(void) pop(&a);
if (!evaluate_inside_using || df_matrix)
int_error(c_token-1, "stringcolumn() called from invalid context");
if (a.type == STRING) {
int j;
char *name ... | false | false | false | false | false | 0 |
gfs_getattrplus_caching(const char *path, char **patterns, int npatterns,
struct gfs_stat *st, int *nattrsp,
char ***attrnamesp, void ***attrvaluesp, size_t **attrsizesp)
{
gfarm_error_t e;
struct timeval now;
e = gfs_getattrplus(path, patterns, npatterns, 0,
st, nattrsp, attrnamesp, attrvaluesp, attrsizesp)... | false | false | false | false | false | 0 |
auth_handle_reply(struct connection *pconn, char *password)
{
char msg[MAX_LEN_MSG];
if (pconn->server.status == AS_REQUESTING_NEW_PASS) {
/* check if the new password is acceptable */
if (!is_good_password(password, msg)) {
if (pconn->server.auth_tries++ >= MAX_AUTH_TRIES) {
reject_new_conn... | true | true | false | false | false | 1 |
clutter_stage_real_foreach (ClutterContainer *container,
ClutterCallback callback,
gpointer user_data)
{
ClutterActorIter iter;
ClutterActor *child;
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (container));
while (clutter_actor_iter_next (&i... | false | false | false | false | false | 0 |
ignorecase(pat)
char_u *pat;
{
char_u *p;
int ic;
ic = p_ic;
if (ic && !no_smartcase && p_scs
#ifdef FEAT_INS_EXPAND
&& !(ctrl_x_mode && curbuf->b_p_inf)
#endif
)
{
/* don't ignore case if pattern has uppercase */
for (p = pat; *p; )
{
#ifdef FEAT_MBYTE
int l;
if... | false | false | false | false | true | 1 |
movechangelist(count)
int count;
{
int n;
if (curbuf->b_changelistlen == 0) /* nothing to jump to */
return (pos_T *)NULL;
n = curwin->w_changelistidx;
if (n + count < 0)
{
if (n == 0)
return (pos_T *)NULL;
n = 0;
}
else if (n + count >= curbuf->b_changelistlen)
{
if... | false | false | false | false | false | 0 |
HandleAuraModResistance(bool apply, bool /*Real*/)
{
for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; ++x)
{
if (m_modifier.m_miscvalue & int32(1 << x))
{
GetTarget()->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), TOTAL_VALUE, float(m_modifier.m_amount), apply);... | false | false | false | false | false | 0 |
movavg_series (const double *x, double *y, const DATASET *dset,
int k, int center)
{
int t1 = dset->t1;
int t2 = dset->t2;
int k1 = k-1, k2 = 0;
int i, s, t, T;
int err;
err = series_adjust_sample(x, &t1, &t2);
if (err) {
return err;
}
T = t2 - t1 + 1;
if (T < k) {
retur... | false | false | false | false | false | 0 |
setupLocalFile()
{
if( m_localUrl.isEmpty() || !QFileInfo( m_localUrl.toLocalFile() ).exists() )
return;
MetaProxy::TrackPtr proxyTrack( new MetaProxy::Track( m_localUrl, MetaProxy::Track::ManualLookup ) );
m_localFile = Meta::TrackPtr( proxyTrack.data() ); // avoid static_cast
/* following won... | false | false | false | false | false | 0 |
rle_encode(char *output, unsigned int outputlength, const char *input, unsigned int inputlength)
{
char *pout = output;
const char *pin = input;
unsigned int length = inputlength;
while( pin != input + inputlength )
{
assert( length <= inputlength );
assert( pin <= input + inputlength );
int cou... | false | false | false | false | false | 0 |
getFragFromPosition(PT_DocPosition docPos,
pf_Frag ** ppf,
PT_BlockOffset * pFragOffset) const
{
// return the frag at the given doc position.
//
// Sevior do a binary search here now
//
pf_Frag * pfLast = m_fragments.findFirstFragBeforePos(docPos);
if(pfLast)
{
xxx_UT_DEBUGMSG(("_findFr... | false | false | false | false | false | 0 |
xml_element_append_child (xmlrpc_env *env,
xml_element *elem,
xml_element *child)
{
XMLRPC_ASSERT_ENV_OK(env);
XMLRPC_ASSERT_ELEM_OK(elem);
XMLRPC_ASSERT_ELEM_OK(child);
XMLRPC_ASSERT(child->_parent == NULL);
XMLRPC_TYPED_M... | false | false | false | false | false | 0 |
rq_vcv_line (const MODEL *pmod, PRN *prn)
{
int robust = gretl_model_get_int(pmod, "rq_nid");
double a = gretl_model_get_double(pmod, "rq_alpha");
int free_s = 0;
char *s;
if (!na(a)) {
if (robust) {
s = g_strdup_printf(N_("With robust %g percent confidence intervals"),
100 * (1 - a));
... | 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.