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 |
|---|---|---|---|---|---|---|
bcma_find_core_by_index(struct bcma_bus *bus,
u16 index)
{
struct bcma_device *core;
list_for_each_entry(core, &bus->cores, list) {
if (core->core_index == index)
return core;
}
return NULL;
} | false | false | false | false | false | 0 |
html_indent(FILTER_S *f, int val, int func)
{
int old = HD(f)->indent_level;
/* flush pending data at old indent level */
switch(func){
case HTML_ID_INC :
html_output_flush(f);
if((HD(f)->indent_level += val) < 0)
HD(f)->indent_level = 0;
break;
case HTML_ID_SET :
html_output_flush(f);... | false | false | false | false | false | 0 |
shuffle (int arr[], int len) {
int t, i, j, s;
for(t=0; t<len; ++t){
i = rand() % len;
j = rand() % len;
s = arr[i];
arr[i] = arr[j];
arr[j] = s;
}
} | false | false | false | false | false | 0 |
mono_loader_set_error_from_mono_error (MonoError *oerror)
{
MonoErrorInternal *error = (MonoErrorInternal*)oerror;
switch (error->error_code) {
case MONO_ERROR_MISSING_METHOD:
mono_loader_set_error_method_load (get_type_name (error), error->member_name);
break;
case MONO_ERROR_MISSING_FIELD:
mono_loader_set_... | false | false | false | false | false | 0 |
sync_ptr(snd_pcm_hw_t *hw, unsigned int flags)
{
return hw->sync_ptr ? sync_ptr1(hw, flags) : 0;
} | false | false | false | false | false | 0 |
set_sampler_min_lod(struct gl_context *ctx, struct gl_sampler_object *samp,
GLfloat param)
{
if (samp->MinLod == param)
return GL_FALSE;
flush(ctx);
samp->MinLod = param;
return GL_TRUE;
} | false | false | false | false | false | 0 |
_eio_monitor_send(Eio_Monitor *monitor, const char *filename, int event_code)
{
Eio_Monitor_Event *ev;
ev = calloc(1, sizeof (Eio_Monitor_Event));
if (!ev) return ;
ev->monitor = monitor;
EINA_REFCOUNT_REF(ev->monitor);
ev->filename = eina_stringshare_add(filename);
ecore_event_add(event_code, e... | false | false | false | false | false | 0 |
skk_state_isupper (SkkState* self, SkkKeyEvent* key, gunichar* lower_code) {
gunichar _vala_lower_code = 0U;
gboolean result = FALSE;
SkkKeyEvent* _tmp0_;
gchar* _tmp1_ = NULL;
gchar* command;
gboolean _tmp2_ = FALSE;
const gchar* _tmp3_;
gboolean _tmp6_;
SkkKeyEvent* _tmp17_;
gunichar _tmp18_;
gunichar _tmp... | false | false | false | false | false | 0 |
pager_wait_on_lock(Pager *pPager, int locktype){
int rc; /* Return code */
do {
rc = pager_lock_db(pPager,locktype);
}while( rc==UNQLITE_BUSY && pPager->xBusyHandler && pPager->xBusyHandler(pPager->pBusyHandlerArg) );
return rc;
} | false | false | false | false | false | 0 |
alx_alloc_rings(struct alx_priv *alx)
{
int err;
err = alx_alloc_descriptors(alx);
if (err)
return err;
alx->int_mask &= ~ALX_ISR_ALL_QUEUES;
alx->int_mask |= ALX_ISR_TX_Q0 | ALX_ISR_RX_Q0;
alx->tx_ringsz = alx->tx_ringsz;
netif_napi_add(alx->dev, &alx->napi, alx_poll, 64);
alx_reinit_rings(alx);
return ... | false | false | false | false | false | 0 |
upsdrv_initups(void)
{
struct termios tio;
const char *val;
/*
* Open and lock the serial port and set the speed to 1200 baud.
*/
upsfd = ser_open(device_path);
ser_set_speed(upsfd, device_path, B1200);
if (tcgetattr(upsfd, &tio)) {
fatal_with_errno(EXIT_FAILURE, "tcgetattr");
}
/*
* Use canonical mo... | false | false | false | false | false | 0 |
iwl_rx_ant_restriction(struct iwl_priv *priv)
{
struct iwl_tt_mgmt *tt = &priv->thermal_throttle;
struct iwl_tt_restriction *restriction;
if (!priv->thermal_throttle.advanced_tt)
return IWL_ANT_OK_MULTI;
restriction = tt->restriction + tt->state;
return restriction->rx_stream;
} | false | false | false | false | false | 0 |
killAnnotationPreview()
{
UT_DEBUGMSG(("killAnnotationPreview: Deleting annotation preview...\n"));
XAP_Frame * pFrame = static_cast<XAP_Frame *>(getParentData());
XAP_DialogFactory * pDialogFactory
= static_cast<XAP_DialogFactory *>(pFrame->getDialogFactory());
AP_Preview_Annotation * pPview
= static_cast<AP_... | false | false | false | false | false | 0 |
_sw_client_service_setup (SwClientService *service,
const gchar *service_name,
GError **error_out)
{
SwClientServicePrivate *priv = GET_PRIVATE (service);
GError *error = NULL;
if (!_sw_client_service_setup_proxy_for_iface (service,
... | false | false | false | false | false | 0 |
mlog_parse_nbytes(
/*==============*/
ulint type, /*!< in: log record type: MLOG_1BYTE, ... */
byte* ptr, /*!< in: buffer */
byte* end_ptr,/*!< in: buffer end */
byte* page, /*!< in: page where to apply the log record, or NULL */
void* page_zip)/*!< in/out: compressed page, or NULL */
{
ulint offset;
ulint val... | false | false | false | false | false | 0 |
vstrf(const char *format, va_list argPtr) {
static size_t buf_size = 256;
static char *buffer = new char[buf_size];
size_t length;
while (1) {
if (!buffer) {
h2x_assert(buffer); // to stop when debugging
throw string("out of memory");
}
length =... | false | false | false | false | false | 0 |
element(AD_SPECIES *ad_species,AD_ALI *ad_ali)
{
// testet ob ad_ptr in CONTLIST vorhanden
CLISTENTRY *a;
if (anzahl == 0) { return 0; }
a = first;
do {
if (a->entry ==ad_species && a->entry2 ==ad_ali) return 1;
a = a->next;
} while ( a != 0);
return 0; // nicht element... | false | false | false | false | false | 0 |
format_sax_error(GF_SAXParser *parser, u32 linepos, const char* fmt, ...)
{
va_list args;
u32 len;
char szM[20];
va_start(args, fmt);
vsprintf(parser->err_msg, fmt, args);
va_end(args);
sprintf(szM, " - Line %d: ", parser->line + 1);
strcat(parser->err_msg, szM);
len = strlen(parser->err_msg);
strncpy(pars... | false | false | false | false | false | 0 |
mat_need_expand (GelMatrixW *m)
{
int i, j;
for (i = 0; i < gel_matrixw_width (m); i++) {
for (j = 0; j < gel_matrixw_height (m); j++) {
GelETree *et = gel_matrixw_get_index (m, i, j);
if G_UNLIKELY (et != NULL &&
(et->type == GEL_MATRIX_NODE ||
et->type == GEL_NULL_NODE))
return TRUE;
}... | false | false | false | false | false | 0 |
attribute_lookup_func (gconstpointer data,
gconstpointer user_data)
{
AtkAttribute *lookup_attr = (AtkAttribute*) user_data;
AtkAttribute *at = (AtkAttribute *) data;
if (!data)
return -1;
if (!g_strcmp0 (at->name, lookup_attr->name))
return g_strcmp0 (at->value, l... | false | false | false | false | false | 0 |
jcr_walk_start()
{
JCR *jcr;
lock_jcr_chain();
jcr = (JCR *)jcrs->first();
if (jcr) {
jcr->inc_use_count();
if (jcr->JobId > 0) {
Dmsg3(dbglvl, "Inc walk_start jid=%u use_count=%d Job=%s\n",
jcr->JobId, jcr->use_count(), jcr->Job);
}
}
unlock_jcr_chain();
re... | false | false | false | false | false | 0 |
lvds_identify_integratedlvds(void)
{
if (viafb_display_hardware_layout == HW_LAYOUT_LCD_EXTERNAL_LCD2) {
/* Two dual channel LCD (Internal LVDS + External LVDS): */
/* If we have an external LVDS, such as VT1636, we should
have its chip ID already. */
if (viaparinfo->chip_info->lvds_chip_info.lvds_chip_name... | false | false | false | false | false | 0 |
free_patline(PAT_LINE_S **patline)
{
if(patline && *patline){
free_patline(&(*patline)->next);
if((*patline)->filename)
fs_give((void **)&(*patline)->filename);
if((*patline)->filepath)
fs_give((void **)&(*patline)->filepath);
free_pat(&(*patline)->first);
fs_give((void **)patline);
}
} | false | false | false | false | false | 0 |
setRowUpper( int elementIndex, double elementValue )
{
if (elementValue > 1.0e27)
elementValue = COIN_DBL_MAX;
rowUpper_[elementIndex] = elementValue;
whatsChanged_ = 0; // Can't be sure (use ClpSimplex to keep)
} | false | false | false | false | false | 0 |
get_containing_mtt(struct mlx4_dev *dev, int slave, int start,
int len, struct res_mtt **res)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_resource_tracker *tracker = &priv->mfunc.master.res_tracker;
struct res_mtt *mtt;
int err = -EINVAL;
spin_lock_irq(mlx4_tlock(dev));
list_for_each_entry(mt... | false | false | false | false | false | 0 |
server_dispose(sasl_conn_t *pconn)
{
sasl_server_conn_t *s_conn= (sasl_server_conn_t *) pconn;
context_list_t *cur, *cur_next;
/* Just sanity check that sasl_server_done wasn't called yet */
if (_sasl_server_active != 0) {
if (s_conn->mech) {
void (*mech_dispose)(void *conn_context, const sasl_u... | false | false | false | false | false | 0 |
GMT_gmonth_length (GMT_LONG year, GMT_LONG month) {
/* Return the number of days in a month,
using the gregorian leap year rule.
Months are numbered from 1 to 12. */
GMT_LONG k;
if (month < 1 || month > 12) return 0;
if (month != 2) {
k = month%2;
if (month < 8) {
return (30 + k);
}
else {
... | false | false | false | false | false | 0 |
iio_device_register(struct iio_dev *indio_dev)
{
int ret;
/* If the calling driver did not initialize of_node, do it here */
if (!indio_dev->dev.of_node && indio_dev->dev.parent)
indio_dev->dev.of_node = indio_dev->dev.parent->of_node;
ret = iio_check_unique_scan_index(indio_dev);
if (ret < 0)
return ret;
... | false | false | false | false | false | 0 |
_backup_cogorc_planar_chroma_420_422 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
int n = ex->n;
int m = ex->params[ORC_VAR_A1];
orc_int8 * ORC_RESTRICT ptr0;
orc_int8 * ORC_RESTRICT ptr1;
const orc_int8 * ORC_RESTRICT ptr4;
orc_int8 var32;
orc_int8 var33;
orc_int8 var34;
orc_int8 var35;
for... | false | false | false | false | false | 0 |
collect_manager_process_cb(gpointer data)
{
if (collection_manager_action_list) collect_manager_refresh();
collect_manager_process_actions(COLLECT_MANAGER_ACTIONS_PER_IDLE);
if (collection_manager_action_list) return TRUE;
if (collect_manager_process_entry_list()) return TRUE;
DEBUG_1("collection manager is up t... | false | false | false | false | false | 0 |
utf8_write_char(uchar_t unicode, char *out)
{
unsigned char *o = (unsigned char*) out;
if (unicode <= 0x7F) {
/* U+0000..U+007F */
*o++ = unicode;
return 1;
} else if (unicode <= 0x7FF) {
/* U+0080..U+07FF */
*o++ = 0xC0 | unicode >> 6;
*o++ = 0x80 | (unicode & 0x3F);
return 2;
} else if (unicode <= ... | false | false | false | false | false | 0 |
has(Kind kind, Attribute sym) const
{
for (int i = 0; i < count(); ++i) {
if (iSheets[i]->has(kind, sym))
return true;
}
return false;
} | false | false | false | false | false | 0 |
xlog_recover_ra_pass2(
struct xlog *log,
struct xlog_recover_item *item)
{
switch (ITEM_TYPE(item)) {
case XFS_LI_BUF:
xlog_recover_buffer_ra_pass2(log, item);
break;
case XFS_LI_INODE:
xlog_recover_inode_ra_pass2(log, item);
break;
case XFS_LI_DQUOT:
xlog_recover_dquot_ra_pass2(log, item);
break;
... | false | false | false | false | false | 0 |
HT_destroy( HashTable table, HTDestroyFunc destroy )
{
DEBUG( MAIN, ("HT_destroy( %p )\n", table) );
if( table == NULL )
return;
AssertValidPtr( table );
AssertValidPtr( table->root );
CHANGE_STATE(table);
HT_flush( table, destroy );
Free( table->root );
Free( table );
DEBUG( MAIN, ("destroy... | false | false | false | false | false | 0 |
catch_signal(int signo)
{
switch (signo) {
case SIGSEGV:
log_flush();
break;
case SIGTERM:
log_stop_daemon = 1;
break;
}
log_debug(1, "pid %d caught signal -%d", getpid(), signo);
} | false | false | false | false | false | 0 |
ext4_groupinfo_destroy_slabs(void)
{
int i;
for (i = 0; i < NR_GRPINFO_CACHES; i++) {
if (ext4_groupinfo_caches[i])
kmem_cache_destroy(ext4_groupinfo_caches[i]);
ext4_groupinfo_caches[i] = NULL;
}
} | false | false | false | false | false | 0 |
L9()
{register object *VOL base=vs_base;
register object *VOL sup=base+VM9; VC9
vs_check;
bds_check;
{VOL object V29;
V29=(base[0]);
bds_bind(((object)VV[2]),base[1]);
vs_top=sup;
goto TTL;
TTL:;
{VOL object V30;
V30= Cnil;
goto T87;
T87:;
if(((((object)VV[2])->s.s_dbind))==Cnil){
goto T90;}
frs_push(FRS_... | false | false | false | false | false | 0 |
eat_special_food(object *who, object *food) {
object *force;
int i, did_one = 0;
sint8 k;
force = create_archetype(FORCE_NAME);
for (i = 0; i < NUM_STATS; i++) {
k = get_attr_value(&food->stats, i);
if (k) {
set_attr_value(&force->stats, i, k);
did_one = 1;
... | false | false | false | false | false | 0 |
ClientAddrOK(struct sockaddr_in *saPtr, const char *clientList)
{
int result = FALSE;
char *clientListCopy, *cur, *next;
if (clientList == NULL || *clientList == '\0') {
return TRUE;
}
clientListCopy = str_dup(clientList);
for (cur = clientListCopy; cur != NULL; cur = next) {
... | false | false | false | false | false | 0 |
dis_stringify_token (MonoImage *m, guint32 token)
{
guint idx = token & 0xffffff;
switch (token >> 24) {
case MONO_TABLE_TYPEDEF: return get_typedef (m, idx);
case MONO_TABLE_TYPEREF: return get_typeref (m, idx);
case MONO_TABLE_TYPESPEC: return get_typespec (m, idx, FALSE, NULL);
default:
break;
}
return g_... | false | false | false | false | false | 0 |
error_ctor(const fn_call& fn)
{
as_object* err = fn.this_ptr;
if (!err) return as_value();
VM& vm = getVM(fn);
if (fn.nargs && !fn.arg(0).is_undefined()) {
err->set_member(getURI(vm, "message"), fn.arg(0));
}
return as_value();
}
}
} | false | false | false | false | false | 0 |
ap_remove_output_filter(ap_filter_t *f)
{
remove_any_filter(f, f->r ? &f->r->output_filters : NULL,
f->r ? &f->r->proto_output_filters : NULL,
&f->c->output_filters);
} | false | false | false | false | false | 0 |
hash_pjw_bare (const void *x, size_t n)
{
const unsigned char *s = x;
size_t h = 0;
unsigned i;
for (i = 0; i < n; i++)
h = s[i] + ((h << 9) | (h >> (SIZE_BITS - 9)));
return h;
} | false | false | false | false | false | 0 |
f81232_port_probe(struct usb_serial_port *port)
{
struct f81232_private *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
mutex_init(&priv->lock);
INIT_WORK(&priv->interrupt_work, f81232_interrupt_work);
usb_set_serial_port_data(port, priv);
port->port.drain_delay = 256;
priv->... | false | false | false | false | false | 0 |
standardise (double *y, int before, int after, int *p)
{
int j;
double f, g = 1.0, h;
for (j = 0; j < before; j++) {
g *= 10.0;
}
h = g / 10.0;
while (*y >= g) {
*y *= 0.1;
(*p)++;
}
if (*y != 0.0) {
while (*y < h) {
*y *= 10.0;
(*p)--;
}
}
f = 1.0;
for (j = 0; j < ... | false | false | false | false | false | 0 |
glXQueryExtensionsString(Display * dpy, int screen)
{
struct glx_screen *psc;
struct glx_display *priv;
if (GetGLXPrivScreenConfig(dpy, screen, &priv, &psc) != Success) {
return NULL;
}
if (!psc->effectiveGLXexts) {
if (!psc->serverGLXexts) {
psc->serverGLXexts =
__glXQ... | false | false | false | false | false | 0 |
kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
int len, struct kvm_io_device *dev)
{
struct kvm_io_bus *new_bus, *bus;
bus = kvm->buses[bus_idx];
if (!bus)
return -ENOMEM;
/* exclude ioeventfd which is limited by maximum fd */
if (bus->dev_count - bus->ioeventfd_count > NR_IO... | false | true | false | false | false | 1 |
AH_Bpd_Dump(const AH_BPD *bpd, int insert) {
uint32_t k;
unsigned int i;
for (k=0; k<insert; k++)
fprintf(stderr, " ");
fprintf(stderr, "Bpd:\n");
for (k=0; k<insert; k++)
fprintf(stderr, " ");
fprintf(stderr, "Version : %d\n", bpd->bpdVersion);
for (k=0; k<insert; k++)
fprintf(stderr, " ")... | false | false | false | false | false | 0 |
add
(
int id
)
{
for (vector<int>::const_iterator it = begin(); it != end(); ++it)
if ((*it) == id)
return; // Already there.
push_back(id);
file->modified = true;
} | false | false | false | false | false | 0 |
add_securid_pin(char *token, char *pin)
{
int i;
/* If PIN longer than original token, move token up to cope */
if (strlen(pin) > strlen(token)) {
int extend = strlen(token) - strlen(pin);
memmove(token, token + extend, strlen(token)+1);
for (i=0; i<extend; i++)
token[i] = '0';
}
token += strlen(token) -... | false | false | false | false | false | 0 |
printUnexpectedValueMessage(const DcmTagKey &key,
const char *filename,
const OFBool errorMsg)
{
OFString str;
if (filename != NULL)
{
str = " in file: ";
str += filename;
}
if (er... | false | false | false | false | false | 0 |
dundi_do_query(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
int res;
char tmp[256];
char *context;
dundi_eid eid;
struct dundi_entity_info dei;
switch (cmd) {
case CLI_INIT:
e->command = "dundi query";
e->usage =
"Usage: dundi query <entity>[@context]\n"
" Attempts to retrieve cont... | false | false | false | false | false | 0 |
get_thread_mutex_locker_v1(PSI_mutex_locker_state *state,
PSI_mutex *mutex, PSI_mutex_operation op)
{
PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex);
DBUG_ASSERT((int) op >= 0);
DBUG_ASSERT((uint) op < array_elements(mutex_operation_map));
DBUG_ASSERT(pfs_mutex != NULL);
... | false | false | false | false | false | 0 |
getCurPt(SplashCoord *x, SplashCoord *y) {
if (noCurrentPoint()) {
return gFalse;
}
*x = pts[length - 1].x;
*y = pts[length - 1].y;
return gTrue;
} | false | false | false | false | false | 0 |
operator== (const wxSwitcherItem& item) const
{
return (
m_id == item.m_id &&
m_name == item.m_name &&
m_title == item.m_title &&
m_description == item.m_description &&
m_isGroup == item.m_isGroup &&
m_breakColumn == item.m_breakColumn &&
m_rect == item.m_rect &&
m_font == item.m_fon... | false | false | false | false | false | 0 |
AddCellList(vtkIdList *l)
{
if (l == NULL)
{
return;
}
vtkIdType ncells = l->GetNumberOfIds();
if (ncells == 0)
{
return;
}
for (int i=0; i<ncells; i++)
{
this->CellList->IdTypeSet.insert(l->GetId(i));
}
this->Modified();
return;
} | false | false | false | false | false | 0 |
nvme_trans_bdev_char_page(struct nvme_ns *ns, struct sg_io_hdr *hdr,
int alloc_len)
{
u8 *inq_response;
int res;
int xfer_len;
inq_response = kzalloc(EXTENDED_INQUIRY_DATA_PAGE_LENGTH, GFP_KERNEL);
if (inq_response == NULL) {
res = -ENOMEM;
goto out_mem;
}
inq_response[1] = INQ_BDEV_CHARACTERISTICS_PA... | false | false | false | false | false | 0 |
agent_by_name(const char *agent_name)
{
int i;
for (i = 0; i < agents.entries_used; i++) {
if (strcmp(agent_name, agents.entries[i].agent.name) == 0)
return &agents.entries[i];
}
return NULL;
} | false | false | false | false | false | 0 |
setvar(const char *name, const char *val, int flags)
{
char *p, *q;
size_t namelen;
char *nameeq;
size_t vallen;
struct var *vp;
q = endofname(name);
p = strchrnul(q, '=');
namelen = p - name;
if (!namelen || p != q)
sh_error("%.*s: bad variable name", namelen, name);
vallen = 0;
if (val == NULL) {
flag... | false | false | false | false | false | 0 |
set_numofvoices(int number) {
// we create one additional voice for channel 2 (bass pedal)
if (number < 1)
number = 1;
if (number>MAXVOICES)
number = MAXVOICES;
for (x = 0; x <= MAXVOICES;x++) {
if (voices[x] != NULL) {
delete voices[x];
}
voices[x] = NULL;
age[x] = 0;
... | false | false | false | false | false | 0 |
il3945_hw_reg_get_matched_power_idx(struct il_priv *il, s8 requested_power,
s32 setting_idx, s32 *new_idx)
{
const struct il3945_eeprom_txpower_group *chnl_grp = NULL;
struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom;
s32 idx0, idx1;
s32 power = 2 * requested_power;
s32 i;
const struct il... | false | false | false | false | false | 0 |
getCentroid(Coordinate& ret) const
{
if ( areasum2 ) {
ret = Coordinate(cg3.x/3.0/areasum2, cg3.y/3.0/areasum2);
} else if ( totalLength ) {
ret = Coordinate(centSum.x/totalLength, centSum.y/totalLength);
} else {
return false;
}
return true;
} | false | false | false | false | false | 0 |
_group_rd(struct lib_context *lc, struct raid_set *rs,
struct raid_set **ss, struct raid_dev *rd, struct pdc *pdc)
{
if (!init_raid_set(lc, rs, rd, stride(pdc), pdc->raid.type, handler))
return 0;
list_add_sorted(lc, &rs->devs, &rd->devs, dev_sort);
switch (pdc->raid.type) {
case PDC_T_SPAN:
case PDC_T_RAID... | false | false | false | false | false | 0 |
SetupGUILogging()
{
// allow new docked windows to use be 3/4 of the available space, the default (0.3) is sometimes too small, especially for "Logs & others"
m_LayoutManager.SetDockSizeConstraint(0.75,0.75);
int bottomH = Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/main_frame/layout/bottom_b... | false | false | false | false | false | 0 |
createNewImage(const char* pszName, const UT_ByteBuf* pBB, const std::string& mimetype,
UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight, GR_Image::GRType iType)
{
GR_VectorImage * vectorImage = NULL;
if (iType == GR_Image::GRT_Unknown) {
if (GR_Image::getBufferType(pBB) == GR_Image::GRT_Vector... | false | false | false | false | false | 0 |
accept_insert(const char *insert, size_t insert_len,
Random &rgen) const
{
size_t gc_count = 0;
for (size_t i = 0; i < insert_len; i++)
gc_count += char_to_gc_count_tab[(unsigned char)insert[i]];
size_t gc_percent = (100 * gc_count) / insert_len;
// decide whether ignore this insert based on the GC conte... | false | false | false | false | false | 0 |
CGUISpinBox(const wchar_t* text, bool border,IGUIEnvironment* environment,
IGUIElement* parent, s32 id, const core::rect<s32>& rectangle)
: IGUISpinBox(environment, parent, id, rectangle),
EditBox(0), ButtonSpinUp(0), ButtonSpinDown(0), StepSize(1.f),
RangeMin(-FLT_MAX), RangeMax(FLT_MAX), FormatString(L"%f"),... | false | false | false | false | false | 0 |
summary(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group)
{
struct api_data *root = NULL;
char buf[TMPBUFSIZ];
bool io_open;
double utility, mhs, work_utility;
message(io_data, MSG_SUMM, 0, NULL, isjson);
io_open = io_add(io_data, isjson ? C... | true | true | false | false | false | 1 |
x264_threadpool_init( x264_threadpool_t **p_pool, int threads,
void (*init_func)(void *), void *init_arg )
{
if( threads <= 0 )
return -1;
x264_threadpool_t *pool;
CHECKED_MALLOCZERO( pool, sizeof(x264_threadpool_t) );
*p_pool = pool;
pool->init_func = init_func;
... | false | false | false | false | false | 0 |
OutputMessageEnds()
{
if (m_pad)
{
PaddingRemover paddingRemover(new Redirector(*AttachedTransformation()));
m_queue.TransferAllTo(paddingRemover);
}
if (GetAutoSignalPropagation() != 0)
AttachedTransformation()->MessageEnd(GetAutoSignalPropagation()-1);
} | false | false | false | false | false | 0 |
f7188x_gpio_direction_out(struct gpio_chip *chip,
unsigned offset, int value)
{
int err;
struct f7188x_gpio_bank *bank =
container_of(chip, struct f7188x_gpio_bank, chip);
struct f7188x_sio *sio = bank->data->sio;
u8 dir, data_out;
err = superio_enter(sio->addr);
if (err)
return err;
superio_select... | false | false | false | false | false | 0 |
net_output(void)
{
#define BSTART ((IN_TN3270E || IN_SSCP) ? obuf_base : obuf)
/* Set the TN3720E header. */
if (IN_TN3270E || IN_SSCP) {
tn3270e_header *h = (tn3270e_header *)obuf_base;
/* Check for sending a TN3270E response. */
if (response_required == TN3270E_RSF_ALWAYS_RESPONSE) {
tn3270e_ack();
re... | false | false | false | false | false | 0 |
write_scan_header (j_compress_ptr cinfo)
{
my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
int i;
jpeg_component_info *compptr;
if (cinfo->arith_code) {
/* Emit arith conditioning info. We may have some duplication
* if the file has multiple scans, but it's so small it's hardly
* worth wor... | false | false | false | false | false | 0 |
removeInput(FXInputHandle fd,FXuint mode){
if(mode==INPUT_NONE) return false;
#ifndef WIN32
if(fd<0 || fd>maxinput) return false;
if(mode&INPUT_READ){
inputs[fd].read.target=NULL;
inputs[fd].read.message=0;
FD_CLR(fd,(fd_set*)r_fds);
}
if(mode&INPUT_WRITE){
inputs[fd].write.target=NULL;
... | false | false | false | false | false | 0 |
_db_print(const char *format,...)
{
#else
_db_print(va_alist)
va_dcl
{
const char *format = NULL;
#endif
LOCAL_ARRAY(char, f, BUFSIZ);
va_list args1;
#if STDC_HEADERS
va_list args2;
va_list args3;
#else
#define args2 args1
#define args3 args1
#endif
#ifdef _SQUID_MSWIN_
/* Multiple WIN32 th... | false | false | false | false | false | 0 |
replace_dead_reg (rtx x, const_rtx old_rtx ATTRIBUTE_UNUSED, void *data)
{
rtx *replacements = (rtx *) data;
if (REG_P (x)
&& REGNO (x) >= FIRST_PSEUDO_REGISTER
&& replacements[REGNO (x)] != NULL_RTX)
{
if (GET_MODE (x) == GET_MODE (replacements[REGNO (x)]))
return replacements[REGNO (x)];
... | false | false | false | false | false | 0 |
decode_CosNaming_NamingContext_list(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, proto_item *item _U_, int *offset _U_, MessageHeader *header, const gchar *operation _U_, gboolean stream_is_big_endian _U_)
{
/* Operation specific Variable declarations Begin */
guint32 u_octet4_loop_CosNami... | false | false | false | false | false | 0 |
gst_rtp_L16_pay_getcaps (GstBaseRTPPayload * rtppayload, GstPad * pad)
{
GstCaps *otherpadcaps;
GstCaps *caps;
otherpadcaps = gst_pad_get_allowed_caps (rtppayload->srcpad);
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
if (otherpadcaps) {
if (!gst_caps_is_empty (otherpadcaps)) {
GstS... | false | false | false | false | false | 0 |
soap_outliteral(struct soap *soap, const char *tag, char *const*p, const char *type)
{ int i;
const char *t = NULL;
if (tag && *tag != '-')
{ if (soap->local_namespaces && (t = strchr(tag, ':')))
{ strncpy(soap->tmpbuf, tag, t-tag);
soap->tmpbuf[t-tag] = '\0';
for (i = 0; soap->local_namespaces[i]... | false | false | false | false | false | 0 |
goa_realm_object_proxy_get_property (GObject *gobject,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GoaRealmObjectProxy *object = GOA_REALM_OBJECT_PROXY (gobject);
GDBusInterface *interface;
switch (prop_id)
{
case 1:
interface = g_dbus_object_get_interface (G_DBUS_... | false | false | false | false | false | 0 |
thread_data_remove_jobs_func (G_GNUC_UNUSED GThread *key, ThreadData *td, G_GNUC_UNUSED gpointer data)
{
if (td->jobs) {
GSList *list;
for (list = td->jobs; list; list = list->next) {
Job *job = JOB (list->data);
if (job->processed) {
/* we can't free that job because it is probably being used by the
... | false | false | false | false | false | 0 |
ReadVariableLengthNumber ( unsigned char **in )
{
unsigned long num = 0;
unsigned char *t = *in;
do
{
num <<= 7;
num |= ( *t );
}
while ( ( *t++ ) & 0x80 );
*in = t;
return num;
} | false | false | false | false | false | 0 |
reset_cmp_localize_blocks(List *head)
{
List *li;
for (li = head; li != NULL; li = li->next) {
Block *b = li->data;
b->cmp_localize = NULL;
}
} | false | false | false | false | false | 0 |
scale_calculate_coefficients(
jack_mixer_scale_t scale)
{
struct threshold * threshold_ptr;
struct threshold * prev_ptr;
struct list_head * node_ptr;
prev_ptr = NULL;
list_for_each(node_ptr, &scale_ptr->thresholds)
{
threshold_ptr = list_entry(node_ptr, struct threshold, scale_siblings);
LOG_DE... | false | false | false | false | false | 0 |
addToIndex (PR *pr, ErrorDesc *err)
{
FILE *fp;
char *path;
IndexDesc indexDesc = getIndexDesc (pr->database);
buildIndexEntry (pr);
block_signals ();
path = gnats_adm_dir (pr->database, indexDesc->path);
if (indexIsBinary (pr->database) && ! fileExists (path))
{
unsigned char fieldCount = i... | false | false | false | false | false | 0 |
netsnmp_cache_find_by_oid(const oid * rootoid, int rootoid_len)
{
netsnmp_cache *cache;
for (cache = cache_head; cache; cache = cache->next) {
if (0 == netsnmp_oid_equals(cache->rootoid, cache->rootoid_len,
rootoid, rootoid_len))
return cache;
}
... | false | false | false | false | false | 0 |
_get_tracks_cb (RestProxyCall *call,
const GError *error,
GObject *weak_object,
gpointer user_data)
{
SwLastfmItemView *item_view = SW_LASTFM_ITEM_VIEW (weak_object);
SwLastfmItemViewPrivate *priv = GET_PRIVATE (item_view);
RestXmlNode *user_node = user... | false | false | false | false | false | 0 |
operator=(const StringSearch &that)
{
if ((*this) != that) {
UErrorCode status = U_ZERO_ERROR;
m_text_ = that.m_text_;
m_breakiterator_ = that.m_breakiterator_;
m_pattern_ = that.m_pattern_;
// all m_search_ in the parent class is linked up with m_strsrch_
... | false | false | false | false | false | 0 |
jgdi_get_logger(JNIEnv *env , const char* name) {
jmethodID mid = NULL;
jclass clazz = NULL;
jstring name_obj = NULL;
jobject temp = NULL;
clazz = find_logger_class(env);
if (clazz == NULL) {
return NULL;
}
if (mid == NULL) {
mid = (*env)->GetStaticMethodID(env, clazz, "getLo... | false | false | false | false | false | 0 |
tty_key_human2machine(key_seq)
unsigned char *key_seq;
{
unsigned char *first;
unsigned char *second;
first = second = key_seq;
if (tty_kbdmode == TTY_RESTRICTED_INPUT && *key_seq != '^')
return NULL;
while (*second)
{
if (*second == '^')
{
if (*++second)
{
/* ^G is the int... | false | false | false | false | false | 0 |
gst_base_sink_wait_clock (GstBaseSink * sink, GstClockTime time,
GstClockTimeDiff * jitter)
{
GstClockReturn ret;
GstClock *clock;
GstClockTime base_time;
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (time)))
goto invalid_time;
GST_OBJECT_LOCK (sink);
if (G_UNLIKELY (!sink->sync))
goto no_sync;
... | false | false | false | false | false | 0 |
__connman_ntp_start(char *server)
{
DBG("%s", server);
if (server == NULL)
return -EINVAL;
if (timeserver != NULL)
g_free(timeserver);
timeserver = g_strdup(server);
start_ntp(timeserver);
return 0;
} | false | false | false | false | false | 0 |
gst_rtsp_session_pool_create_watch (GstRTSPSessionPool * pool)
{
GstPoolSource *source;
g_return_val_if_fail (GST_IS_RTSP_SESSION_POOL (pool), NULL);
source = (GstPoolSource *) g_source_new (&gst_pool_source_funcs,
sizeof (GstPoolSource));
source->pool = g_object_ref (pool);
return (GSource *) source... | false | false | false | false | false | 0 |
getConstraintType(const std::string &Constraint) const {
if (Constraint.size() == 1) {
switch (Constraint[0]) {
case 'r':
return C_RegisterClass;
default:
break;
}
}
return TargetLowering::getConstraintType(Constraint);
} | false | false | false | false | false | 0 |
dolog(int prio, const char *fmt, va_list ap)
{
if (log_daemon)
vsyslog(prio, fmt, ap);
else {
struct timeval time;
gettimeofday(&time, NULL);
fprintf(stderr, "%ld.%06ld: ", time.tv_sec, time.tv_usec);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
fflush(stderr);
}
} | false | false | false | false | false | 0 |
schedule_ebb (head, tail)
rtx head, tail;
{
int n_insns;
struct deps tmp_deps;
if (no_real_insns_p (head, tail))
return;
init_deps_global ();
/* Compute LOG_LINKS. */
init_deps (&tmp_deps);
sched_analyze (&tmp_deps, head, tail);
free_deps (&tmp_deps);
/* Compute INSN_DEPEND. */
comput... | false | false | false | false | false | 0 |
configuration(Vector<String> &conf) const
{
conf.push_back(String(_min_thresh));
conf.push_back(String(_max_thresh));
conf.push_back(cp_unparse_real2(_max_p, 16));
StringAccum sa;
sa << "QUEUES";
for (int i = 0; i < _queue_elements.size(); i++)
sa << ' ' << _queue_elements[i]->name();
conf... | false | false | false | false | false | 0 |
MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated st... | false | false | false | false | false | 0 |
print_idecode_lookups (lf *file, gen_entry *table, cache_entry *cache_rules)
{
int depth;
/* output switch function declarations where needed by tables */
gen_entry_traverse_tree (file, table, 1, idecode_declare_if_switch, /* START */
NULL, NULL, NULL);
/* output tables where needed */
for (depth = ge... | false | false | false | false | false | 0 |
PAM_conv (int num_msg, const struct pam_message **msg,
struct pam_response **resp, void *appdata_ptr)
{
struct pam_response *repl = NULL;
int retval, count = 0, replies = 0;
int size = sizeof(struct pam_response);
#define GET_MEM \
if (!(repl = realloc(repl, size))) \
return PAM_CONV_ERR; \
size += sizeo... | 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.