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 |
|---|---|---|---|---|---|---|
extendBottom()
{
SubCost most;
TraceFunction* f;
if (!_calls.isEmpty())
f = _calls.last()->called();
else
f = _top;
if (!f) return;
// do not follow calls from cycles
if (f->cycle() == f) return;
// event type to use for the "most probable" call stack
// we simply take the first real event ... | false | false | false | false | false | 0 |
tda10071_get_frontend(struct dvb_frontend *fe)
{
struct tda10071_dev *dev = fe->demodulator_priv;
struct i2c_client *client = dev->client;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int ret, i;
u8 buf[5], tmp;
if (!dev->warm || !(dev->fe_status & FE_HAS_LOCK)) {
ret = 0;
goto error;
}
re... | false | false | false | false | false | 0 |
find_next_best_node(int node, nodemask_t *used_node_mask)
{
int n, val;
int min_val = INT_MAX;
int best_node = NUMA_NO_NODE;
const struct cpumask *tmp = cpumask_of_node(0);
/* Use the local node if we haven't already */
if (!node_isset(node, *used_node_mask)) {
node_set(node, *used_node_mask);
return node;
... | false | false | false | false | false | 0 |
skk_file_dict_strcmp_prefix (const gchar* a, const gchar* b) {
gint result = 0;
const gchar* _tmp0_;
const gchar* _tmp1_;
gboolean _tmp2_ = FALSE;
GCompareFunc _tmp3_;
const gchar* _tmp4_;
const gchar* _tmp5_;
gint _tmp6_ = 0;
g_return_val_if_fail (a != NULL, 0);
g_return_val_if_fail (b != NULL, 0);
_tmp0_ =... | false | false | false | false | false | 0 |
saveDipole(const BasisInfoStruct& bis, FILE *f)
{
int comp;
unsigned n = bis.noOfBasisFuncs;
ergo_real *mat= new ergo_real[n*n];
for(comp=0; comp<3; comp++) {
int d[3];
d[0] = d[1] = d[2] = 0;
d[comp] = 1;
if(compute_operator_matrix_full(bis, bis, d[0], d[1], d[2], mat))
break;
c... | false | false | false | false | false | 0 |
click_read_router(String filename, bool is_expr, ErrorHandler *errh, bool initialize, Master *master)
{
if (!errh)
errh = ErrorHandler::silent_handler();
int before = errh->nerrors();
// read file
String config_str;
if (is_expr) {
config_str = filename;
filename = "config";
} else {
config_... | false | false | false | false | false | 0 |
cl_get_struct(struct ha_msg *msg, const char* name)
{
struct ha_msg* ret;
int type = -1;
size_t vallen;
ret = cl_get_value_mutate(msg, name, &vallen, &type);
if (ret == NULL ){
return(NULL);
}
switch(type){
case FT_UNCOMPRESS:
case FT_STRUCT:
break;
default:
cl_log(LOG_ERR, "%s: field %s i... | false | false | false | false | false | 0 |
cgi_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)
{
cgi_pfn_reg_with_ssi = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler);
cgi_pfn_gtv = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_get_tag_and_value);
cgi_pfn_ps = APR_RETRIEVE_OP... | false | false | false | false | false | 0 |
write_metadata_block_data_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Write write_cb, const FLAC__StreamMetadata *block)
{
FLAC__ASSERT(0 != block);
switch(block->type) {
case FLAC__METADATA_TYPE_STREAMINFO:
return write_metadata_block_data_streaminfo_cb_(handle, write_cb, &block->data.stream_info);
case FLAC... | false | false | false | false | false | 0 |
WidgetActivated( Widget *widget, Window *win ) {
switch( widget->ID() ) {
case B_ID_EVENT:
new ListSelectWindow( "Select event", tlist,
event.GetData(0), false, this, B_ID_EVENT_OK, view );
break;
case B_ID_EVENT_OK: {
TLWNode *n = static_cast<ListSelectWindow *>(win)->Selected();
if ( n ... | false | false | false | false | false | 0 |
ath6kl_init_hw_stop(struct ath6kl *ar)
{
int err;
err = __ath6kl_init_hw_stop(ar);
if (err)
return err;
ar->state = ATH6KL_STATE_OFF;
return 0;
} | false | false | false | false | false | 0 |
generate_random_string_array(size_t arraylen, size_t stringlen) {
std::string* ret = new std::string[arraylen];
for (size_t i = 0; i != arraylen; ++i)
ret[i] = generate_random_string(stringlen);
return ret;
} | false | false | false | false | false | 0 |
velocity_init_rd_ring(struct velocity_info *vptr)
{
int ret = -ENOMEM;
vptr->rx.info = kcalloc(vptr->options.numrx,
sizeof(struct velocity_rd_info), GFP_KERNEL);
if (!vptr->rx.info)
goto out;
velocity_init_rx_ring_indexes(vptr);
if (velocity_rx_refill(vptr) != vptr->options.numrx) {
VELOCITY_PRT(MSG_LEV... | false | false | false | false | false | 0 |
cs_pg_cluster_cpus(pgsql_conn_t *pg_conn, char *cluster_nodes,
uint32_t cpus, time_t event_time)
{
PGresult *result = NULL;
char* query;
int rc = SLURM_SUCCESS, got_cpus = 0, first = 0;
if(check_db_connection(pg_conn) != SLURM_SUCCESS)
return ESLURM_DB_CONNECTION;
if (!cluster_in_db(pg_conn, pg_conn->clus... | false | false | false | false | false | 0 |
ixgbe_free_desc_rings(struct ixgbe_adapter *adapter)
{
struct ixgbe_ring *tx_ring = &adapter->test_tx_ring;
struct ixgbe_ring *rx_ring = &adapter->test_rx_ring;
struct ixgbe_hw *hw = &adapter->hw;
u32 reg_ctl;
/* shut down the DMA engines now so they can be reinitialized later */
/* first Rx */
hw->mac.ops.dis... | false | false | false | false | false | 0 |
sqliteAuthRead(
Parse *pParse, /* The parser context */
Expr *pExpr, /* The expression to check authorization on */
SrcList *pTabList /* All table that pExpr might refer to */
){
sqlite *db = pParse->db;
int rc;
Table *pTab; /* The table being read */
const char *zCol; /* ... | false | false | false | false | false | 0 |
FcValueListPrint (FcValueListPtr l)
{
for (; l != NULL; l = FcValueListNext(l))
{
FcValuePrint (FcValueCanonicalize (&l->value));
FcValueBindingPrint (l);
}
} | false | false | false | false | false | 0 |
__iobuf_arena_prune (struct iobuf_pool *iobuf_pool,
struct iobuf_arena *iobuf_arena, int index)
{
GF_VALIDATE_OR_GOTO ("iobuf", iobuf_pool, out);
/* code flow comes here only if the arena is in purge list and we can
* free the arena only if we have atleast one arena in 'ar... | false | false | false | false | false | 0 |
RestartScanners()
{
if ( DeadScanner ) return false;
int ret;
for ( int i = 0; i < totalscanners; i++ )
{
while ((ret = write(Scanner[i].toscanner, (const char*)"c", 1)) < 0 && errno == EINTR);
if (ret <= 0)
{
LogFile::ErrorMessage("Detected crashed %s process (res... | false | false | false | false | false | 0 |
ShallowCopy(vtkProp *prop)
{
vtkAbstractPolygonalHandleRepresentation3D *rep =
vtkAbstractPolygonalHandleRepresentation3D::SafeDownCast(prop);
if ( rep )
{
this->SetProperty(rep->GetProperty());
this->SetSelectedProperty(rep->GetSelectedProperty());
this->Actor->SetProperty(this->Property);
... | false | false | false | false | false | 0 |
doarg(BW *bw, unsigned char *s, void *object, int *notify)
{
long num;
if (notify)
*notify = 1;
num = calc(bw, s);
if (merr) {
msgnw(bw->parent, merr);
return -1;
}
arg = num;
argset = 1;
vsrm(s);
return 0;
} | false | false | false | false | false | 0 |
evd_connection_tls_handshake (EvdConnection *self)
{
GError *error = NULL;
GIOCondition direction;
gint result;
GSimpleAsyncResult *res;
direction = evd_tls_session_get_direction (TLS_SESSION (self));
if ( (direction == G_IO_IN && self->priv->read_src_id != 0) ||
(direction == G_IO_OUT && self->priv... | false | false | false | false | false | 0 |
sqliteVdbeAggReset(Agg *pAgg){
int i;
HashElem *p;
for(p = sqliteHashFirst(&pAgg->hash); p; p = sqliteHashNext(p)){
AggElem *pElem = sqliteHashData(p);
assert( pAgg->apFunc!=0 );
for(i=0; i<pAgg->nMem; i++){
Mem *pMem = &pElem->aMem[i];
if( pAgg->apFunc[i] && (pMem->flags & MEM_AggCtx)!=0 ... | false | false | false | false | false | 0 |
max3421_reset_hcd(struct usb_hcd *hcd)
{
struct spi_device *spi = to_spi_device(hcd->self.controller);
struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd);
int timeout;
/* perform a chip reset and wait for OSCIRQ signal to appear: */
spi_wr8(hcd, MAX3421_REG_USBCTL, BIT(MAX3421_USBCTL_CHIPRES_BIT));
/* clear r... | false | false | false | false | false | 0 |
md4_finish(struct md4_ctx *mctx)
{
const unsigned int offset = mctx->byte_count & 0x3f;
char *p = (char *)mctx->block + offset;
int padding = 56 - (offset + 1);
*p++ = 0x80;
if (padding < 0) {
memset(p, 0x00, padding + sizeof (uint64_t));
md4_transform_helper(mctx);
p = (char *)mctx->block;
padding = 56;
... | false | false | false | false | false | 0 |
AddFileToDownloadByHash(const CMD4Hash& hash, uint8 cat)
{
ResultMap::iterator it = m_results.begin();
for ( ; it != m_results.end(); ++it ) {
CSearchResultList& list = it->second;
for ( unsigned int i = 0; i < list.size(); ++i ) {
if ( list[i]->GetFileHash() == hash ) {
CoreNotify_Search_Add_Download( l... | false | false | false | false | false | 0 |
stmFreeAbortedTRec(Capability *cap,
StgTRecHeader *trec) {
TRACE("%p : stmFreeAbortedTRec", trec);
ASSERT (trec != NO_TREC);
ASSERT ((trec -> state == TREC_CONDEMNED) ||
(trec -> state == TREC_ABORTED));
free_stg_trec_header(cap, trec);
TRACE("%p : stmFreeAbortedTRec done", trec);
} | false | false | false | false | false | 0 |
pit_note_list(PTask pt)
{
if (!notes) pit_db_load();
if (notes->number_of_records > 0) {
PFormat pf = pit_format_initialize(FORMAT_NOTE, pt ? 4 : 0, notes->number_of_records);
if (!pt) pt = (PTask)pit_table_current(tasks);
for_each_note(pn) {
if (pt && pn->task_id != pt->id)... | false | false | false | false | false | 0 |
merge_trans_var(list<Trans>& trans, State *state)
{
if (!trans.begin()->is_var_trans()) {
/* If we don't have a variable transition in this state yet then create a
new one. */
Trans tr(NULL);
trans.push_front(tr);
}
list<Trans>::const_iterator t;
Tree x;
Node op(0);
for (t = trans.begin()... | false | false | false | false | false | 0 |
readBasis(const char *fileName)
{
int status = 0;
if (strcmp(fileName, "-") != 0 && strcmp(fileName, "stdin") != 0) {
FILE *fp = fopen(fileName, "r");
if (fp) {
// can open - lets go for it
fclose(fp);
} else {
handler_->message(CLP_UN... | false | false | false | false | false | 0 |
CreateDungeonMap(uint32 id, uint32 InstanceId, Difficulty difficulty, DungeonPersistentState* save)
{
// make sure we have a valid map id
if (!sMapStore.LookupEntry(id))
{
sLog.outError("CreateDungeonMap: no entry for map %d", id);
MANGOS_ASSERT(false);
}
if (!ObjectMgr::GetInstanceT... | false | false | false | false | false | 0 |
kmPlaneClassifyPoint(const kmPlane* pIn, const kmVec3* pP)
{
/* This function will determine if a point is on, in front of, or behind*/
/* the plane. First we store the dot product of the plane and the point.*/
kmScalar distance = pIn->a * pP->x + pIn->b * pP->y + pIn->c * pP->z + pIn->d;
/* Simply put if... | false | false | false | false | false | 0 |
probe_ext4(blkid_probe pr,
const struct blkid_idmag *mag __attribute__((__unused__)))
{
struct ext2_super_block *es;
uint32_t fc, frc, fi;
es = ext_get_super(pr, &fc, &fi, &frc);
if (!es)
return -1;
/* Distinguish from jbd */
if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return -BLKID_ERR_PARAM;
/*
* If... | false | false | false | false | false | 0 |
horSbSlidingDone( )
{
if ( testTableFlags(Tbl_snapToHGrid) &&
testTableFlags(Tbl_smoothHScrolling) )
snapToGrid( true, false );
} | false | false | false | false | false | 0 |
ide_read_sector(Bit8u channel, Bit8u *buffer, Bit32u buffer_size)
{
Bit64s logical_sector = 0;
Bit64s ret;
int sector_count = (buffer_size / 512);
Bit8u *bufptr = buffer;
do {
if (!calculate_logical_address(channel, &logical_sector)) {
BX_ERROR(("ide_read_sector() reached invalid sector %lu, aborti... | false | false | false | false | false | 0 |
draw_footer(Graphs gs, int pp)
{
FILE *f;
char c;
if (gs->epilogue != CNULL) {
if (gs->epifile) {
f = fopen(gs->epilogue, "r");
if (f == NULL) {
fprintf(stderr, "Error: epilogue file %s couldn't be opened\n",
gs->epilogue);
exit(1);
}
for (c = getc(f); ... | false | true | false | false | true | 1 |
e_cal_client_modify_object_sync (ECalClient *client,
icalcomponent *icalcomp,
ECalObjModType mod,
GCancellable *cancellable,
GError **error)
{
GSList link = { icalcomp, NULL };
g_return... | false | false | false | false | false | 0 |
ddb_device_create(struct ddb *dev)
{
dev->nr = ddb_num++;
dev->ddb_dev = device_create(ddb_class, NULL,
MKDEV(ddb_major, dev->nr),
dev, "ddbridge%d", dev->nr);
ddbs[dev->nr] = dev;
if (IS_ERR(dev->ddb_dev))
return -1;
return 0;
} | false | false | false | false | false | 0 |
dht_check_and_set_acl_xattr_req (inode_t *inode, dict_t *xattr_req)
{
int ret = 0;
GF_ASSERT (inode);
GF_ASSERT (xattr_req);
if (inode->ia_type != IA_IFDIR)
return;
if (!dict_get (xattr_req, POSIX_ACL_ACCESS_XATTR)) {
ret = dict_set_int8 (xa... | false | false | false | true | false | 1 |
EstimateScore()
{
m_score = m_translationDimension.GetTargetPhrase()->GetFutureScore();
std::vector<HypothesisDimension>::const_iterator p;
for (p = m_hypothesisDimensions.begin();
p != m_hypothesisDimensions.end(); ++p) {
m_score += p->GetHypothesis()->GetTotalScore();
}
} | false | false | false | false | false | 0 |
setup(Config * opts)
{
name_ = "email-filter";
order_num_ = 0.85;
is_quote_char.conv.setup(*opts, "utf-8", "ucs-4", NormNone);
opts->retrieve_list("f-email-quote", &is_quote_char);
margin = opts->retrieve_int("f-email-margin");
reset();
return true;
} | false | false | false | false | false | 0 |
getscript(struct protstream *conn, mystring_t *name)
{
FILE *stream;
struct stat filestats; /* returned by stat */
int size; /* size of the file */
int result;
int cnt;
char path[1024];
result = scriptname_valid(name);
if (result!=TIMSIEVE_OK)
{
prot_printf(conn,"NO \"Invalid script name\"\r... | true | true | false | false | true | 1 |
GenerateRandomVector (FIXP_DBL *RESTRICT spec,
int size,
int *pRandomState)
{
int i, invNrg_e = 0, nrg_e = 0;
FIXP_DBL invNrg_m, nrg_m = FL2FXCONST_DBL(0.0f) ;
FIXP_DBL *RESTRICT ptr = spec;
int randomState = *pRandomState;
#define GEN_NOISE_N... | false | false | false | false | false | 0 |
show_move(OBB,NBB)
struct ka *OBB,*NBB;
{
int L1,R1,B1,T1,L2,R2,B2,T2;
struct ka BB;
L1 = NBB->kaLeft;
R1 = NBB->kaRight;
B1 = NBB->kaBottom;
T1 = NBB->kaTop;
L2 = OBB->kaLeft;
R2 = OBB->kaRight;
B2 = OBB->kaBottom;
T2 = OBB->kaTop;
if (L1 > R1) SwapInts(L1,R1);
if (B1 ... | false | false | false | false | false | 0 |
gt_sam_alignment_cigar_i_operation(GtSamAlignment *sam_alignment,
uint16_t i)
{
gt_assert(sam_alignment != NULL);
switch ((unsigned char) bam1_cigar(sam_alignment->s_alignment)[i]
& BAM_CIGAR_MASK) {
case BAM_CMATCH:
return 'M';
... | false | false | false | false | false | 0 |
addNote() {
if (m_currentGraphicsView == NULL) return;
ViewGeometry vg;
vg.setRect(0, 0, Note::initialMinWidth, Note::initialMinHeight);
QPointF tl = m_currentGraphicsView->mapToScene(QPoint(0, 0));
QSizeF vpSize = m_currentGraphicsView->viewport()->size();
tl.setX(tl.x() + ((vpSize.width() - Note::initialMinWid... | false | false | false | false | false | 0 |
OTF_WStream_writeBeginFileOpSnapshotKV( OTF_WStream* wstream, uint64_t time,
uint64_t originaltime, uint32_t process, uint64_t matchingId,
uint32_t scltoken, OTF_KeyValueList *list ) {
OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream );
/* buffer can be NULL if file-open fails */
if ( NULL == b... | false | false | false | false | false | 0 |
disconnectSlot(const Slot& slot)
{
std::list<Connection>::iterator it = Connectable::connections().begin();
std::list<Connection>::iterator end = Connectable::connections().end();
for(; it != end; ++it)
{
if( it->slot().equals(slot) )
{
it->close();
return;
... | false | false | false | false | false | 0 |
check_equal_value(equal_val_array * array, double val)
{
int i;
/*search if the new value exists and increase the counter */
if (array != NULL)
for (i = 0; i < array->count; i++) {
if (array->values[i]->val == val) {
array->values[i]->count++;
G_debug(5, "found value %g with count %i at pos %i\n"... | false | false | false | false | false | 0 |
q_sync(struct queue *q)
{
if ((q->flags & Q_SYNC) == 0)
return 0;
return fdatasync(q->fd);
} | false | false | false | false | false | 0 |
cmd_export(int argc, char *argv[])
{
struct pstore_header *header;
int input, output;
if (argc < 3)
usage();
parse_args(argc, argv);
if (!input_file)
usage();
input = open(input_file, O_RDONLY);
if (input < 0)
die("Failed to open input file '%s': %s", input_file, strerror(errno));
if (output_file) {
... | false | false | false | false | false | 0 |
do_temporary_test (SoupSession *session, SoupURI *base_uri)
{
SoupMessage *msg;
char *client_md5;
const char *server_md5;
debug_printf (1, "PUT w/ temporary buffers\n");
msg = soup_message_new_from_uri ("PUT", base_uri);
soup_message_body_append (msg->request_body, SOUP_MEMORY_TEMPORARY,
"one\r\n", 5);
s... | false | false | false | false | false | 0 |
skl_write_wm_values(struct drm_i915_private *dev_priv,
const struct skl_wm_values *new)
{
struct drm_device *dev = dev_priv->dev;
struct intel_crtc *crtc;
list_for_each_entry(crtc, &dev->mode_config.crtc_list, base.head) {
int i, level, max_level = ilk_wm_max_level(dev);
enum pipe pipe = crtc->pipe;
if (... | false | false | false | false | false | 0 |
plogis(double x, double location, double scale,
int lower_tail, int log_p)
{
#ifdef IEEE_754
if (ISNAN(x) || ISNAN(location) || ISNAN(scale))
return x + location + scale;
#endif
if (scale <= 0.0) ML_ERR_return_NAN;
x = (x - location) / scale;
if (ISNAN(x)) ML_ERR_return_NAN;
R_P_bounds_Inf_... | false | false | false | false | false | 0 |
last_component_is_dotdot(const char *pathname)
{
while (*pathname == '/')
++pathname;
for (;;)
{
const char *begin;
const char *end;
begin = pathname;
++pathname;
while (*pathname && *pathname != '/')
++pathname;
end = pathname;
... | false | false | false | false | false | 0 |
encode_vsa(char *buffer, uint8_t *output, size_t outlen)
{
int vendor;
int length;
char *p;
vendor = decode_vendor(buffer, &p);
if (vendor == 0) return 0;
output[0] = 0;
output[1] = (vendor >> 16) & 0xff;
output[2] = (vendor >> 8) & 0xff;
output[3] = vendor & 0xff;
length = encode_tlv(p, output + 4, outlen... | false | false | false | false | false | 0 |
runOnMachineFunction(MachineFunction &MF) {
bool Changed = false;
InstrsToRemove.clear();
for (MachineFunction::iterator BI = MF.begin(), BE = MF.end(); BI != BE;
++BI) {
for (MachineBasicBlock::iterator I = (*BI).begin(), E = (*BI).end();
I != E; ++I) {
MachineInstr &MI = *I;
Cha... | false | false | false | false | false | 0 |
dxf_hatch_boundary_path_edge_spline_set_knot_value
(
DxfHatchBoundaryPathEdgeSpline *dxf_hatch_boundary_path_edge_spline,
/*!< DXF \c HATCH boundary path edge spline entity. */
int position,
/*!< position in the array of knot values [0 .. DXF_MAX_HATCH_BOUNDARY_PATH_EDGE_... | false | false | false | false | false | 0 |
ts_print(register const struct timeval *tvp)
{
register int s;
struct tm *tm;
time_t Time;
static unsigned b_sec;
static unsigned b_usec;
int d_usec;
int d_sec;
switch (tflag) {
case 0: /* Default */
s = (tvp->tv_sec + thiszone) % 86400;
(void)printf("%s ", ts_format(s, tvp->tv_usec));
br... | false | false | false | false | false | 0 |
map_utf8(char *dest, size_t dest_len,
utf8_ptr src, size_t src_byte_len,
size_t *src_bytes_used) const
{
utf8_ptr src_start;
size_t cur_total;
char *srcend;
/* remember where we started */
src_start = src;
/* compute where the source buffer ends */
srcen... | false | false | false | false | false | 0 |
ListeBasis(GtkWidget *listOfBasis,char *NomFichier)
{
gchar basisName[40];
FILE *fd;
Cbase *base;
gboolean OK = FALSE;
gchar temp[40];
gchar t[40];
GtkTreeModel *model;
GtkListStore *store;
GtkTreeIter iter;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(listOfBasis));
store = GTK_LIST_STORE ... | false | false | false | false | false | 0 |
String_SequalsIgnoreCaseC(String * string, char * string2)
{
if(string == NULL && string2 == NULL)
return true;
if(string == NULL || string2 == NULL)
return false;
String * string2S = String_create(string2);
Boolean result = String_equalsIgnoreCase(string, string2S);
String_destroy(string2S);
return resu... | false | false | false | false | false | 0 |
BufferGetBlockNumber(Buffer buffer)
{
volatile BufferDesc *bufHdr;
Assert(BufferIsPinned(buffer));
if (BufferIsLocal(buffer))
bufHdr = &(LocalBufferDescriptors[-buffer - 1]);
else
bufHdr = &BufferDescriptors[buffer - 1];
/* pinned, so OK to read tag without spinlock */
return bufHdr->tag.blockNum;
} | false | false | false | false | false | 0 |
alarm_settings_changed_app (GtkComboBox *combo, gpointer data)
{
AlarmApplet *applet = (AlarmApplet *)data;
AlarmSettingsDialog *dialog = applet->settings_dialog;
g_debug ("APP Combo_changed");
g_assert (dialog->alarm != NULL);
if (GTK_WIDGET_HAS_FOCUS (dialog->notify_app_command_entry)) {
g_debug ... | false | false | false | false | false | 0 |
inflate64Init2(strm, windowBits)
z_stream64p strm;
int windowBits;
{
struct inflate_state FAR *state;
if (strm == Z_NULL) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)cli_calloc(1, sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
Tracev((stderr, "inflate: alloca... | false | false | false | false | false | 0 |
operator()() const {
if (empty()) return "";
if (family.empty() && version.empty()) return name;
if (family.empty()) return name + "-" + version;
if (version.empty()) return family + "-" + name;
return family + "-" + name + "-" + version;
} | false | false | false | false | false | 0 |
adnp_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct device_node *np = client->dev.of_node;
struct adnp *adnp;
u32 num_gpios;
int err;
err = of_property_read_u32(np, "nr-gpios", &num_gpios);
if (err < 0)
return err;
client->irq = irq_of_parse_and_map(np, 0);
if (!client... | false | false | false | false | false | 0 |
SendToPlayers(WorldPacket const* data) const
{
for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{ itr->getSource()->GetSession()->SendPacket(data); }
} | false | false | false | false | false | 0 |
indi_send(struct indi_prop_t *iprop, struct indi_elem_t *ielem )
{
char msg[4096], *ptr = msg;
char val[80];
const char *valstr = NULL;
const char *type;
struct indi_device_t *idev = iprop->idev;
indi_list *isl;
type = indi_prop_type[iprop->type];
ptr += sprintf(msg, "<new%sVector device=\"%s\" name=\"%s\">\n"... | true | true | false | false | false | 1 |
print_cred(dig_cred_t* _c)
{
printf("===Digest credentials===\n");
if (_c) {
printf("Username\n");
printf("+--whole = \'%.*s\'\n", _c->username.whole.len, _c->username.whole.s);
printf("+--user = \'%.*s\'\n", _c->username.user.len, _c->username.user.s);
printf("\\--domain = \'%.*s\'\n", _c->username.domain... | false | false | false | false | false | 0 |
tracker_miner_is_paused (TrackerMiner *miner)
{
g_return_val_if_fail (TRACKER_IS_MINER (miner), TRUE);
return g_hash_table_size (miner->priv->pauses) > 0 ? TRUE : FALSE;
} | false | false | false | false | false | 0 |
_exe_del(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Exe_Event_Del *ev = event;
if ((espeak) && (ev->exe == espeak))
{
if (tmpf)
{
unlink(tmpf);
free(tmpf);
tmpf = NULL;
close(tmpfd);
}
espeak = NULL... | false | false | false | false | false | 0 |
bfa_lps_no_res(struct bfa_lps_s *first_lps, u8 count)
{
struct bfa_s *bfa = first_lps->bfa;
struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
struct list_head *qe, *qe_next;
struct bfa_lps_s *lps;
bfa_trc(bfa, count);
qe = bfa_q_next(first_lps);
while (count && qe) {
qe_next = bfa_q_next(qe);
lps = (struct b... | false | false | false | false | false | 0 |
_bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2)
{
BTPageState *state = NULL;
bool merge = (btspool2 != NULL);
IndexTuple itup,
itup2 = NULL;
bool should_free,
should_free2,
load1;
TupleDesc tupdes = RelationGetDescr(wstate->index);
int i,
keysz = RelationGetNumberOfAttribut... | false | false | false | false | false | 0 |
theora_enc_init_buffer (th_ycbcr_buffer buf, th_info * info, guint8 * data)
{
GstVideoFormat format;
guint i;
switch (info->pixel_fmt) {
case TH_PF_444:
format = GST_VIDEO_FORMAT_Y444;
break;
case TH_PF_420:
format = GST_VIDEO_FORMAT_I420;
break;
case TH_PF_422:
format =... | false | false | false | false | false | 0 |
__d_unalias(struct inode *inode,
struct dentry *dentry, struct dentry *alias)
{
struct mutex *m1 = NULL, *m2 = NULL;
int ret = -ESTALE;
/* If alias and dentry share a parent, then no extra locks required */
if (alias->d_parent == dentry->d_parent)
goto out_unalias;
/* See lock_rename() */
if (!mutex_trylock... | false | false | false | false | false | 0 |
rtl_merge_blocks (basic_block a, basic_block b)
{
rtx b_head = BB_HEAD (b), b_end = BB_END (b), a_end = BB_END (a);
rtx del_first = NULL_RTX, del_last = NULL_RTX;
rtx b_debug_start = b_end, b_debug_end = b_end;
bool forwarder_p = (b->flags & BB_FORWARDER_BLOCK) != 0;
int b_empty = 0;
if (dump_file)
fpr... | false | false | false | false | false | 0 |
should_generate_this_cgl_cut(int cut_num, int max_cuts_before_resolve,
int generation_flag, int freq, int bc_level,
int bc_index, int cuts_in_root, int *should_generate)
{
if (cut_num > max_cuts_before_resolve) {
*should_generate = FALSE;
return 0;
}
switch (generation_flag) {
ca... | false | false | false | false | false | 0 |
do_one_cpu(unsigned int cpu, struct cpufreq_policy *new_pol,
unsigned long freq, unsigned int pc)
{
switch (pc) {
case 0:
return cpufreq_set_frequency(cpu, freq);
case 1:
/* if only one value of a policy is to be changed, we can
* use a "fast path".
*/
if (new_pol->min)
return cpufreq_modify_policy... | false | false | false | false | false | 0 |
camellia_do_decrypt(const u32 *subkey, u32 *io, unsigned i)
{
u32 il, ir, t0, t1; /* temporary variables */
/* pre whitening but absorb kw2 */
io[0] ^= SUBKEY_L(i);
io[1] ^= SUBKEY_R(i);
/* main iteration */
#define ROUNDS(i) ({ \
CAMELLIA_ROUNDSM(io[0], io[1], \
SUBKEY_L(i + 7), SUBKEY_R(i + 7),... | false | false | false | false | false | 0 |
Log_param_values()
{
int index;
int count;
if(Params_table.log_all == REG_FALSE)return REG_SUCCESS;
/* Check that we have enough storage space - if not then store
current entries on disk (rather than continually grab more
memory) */
if(Param_log.num_entries == Param_log.max_entries){
/* Save... | false | false | false | false | false | 0 |
string_list_pack_length(const GList* _list)
{
size_t i;
GList* list = UNCONST_CAST_POINTER(GList *, _list);
size_t total_length = 0;
if (list == NULL){
cl_log(LOG_WARNING, "string_list_pack_length():"
"list is NULL");
return 0;
}
for (i = 0; i < g_list_length(list) ; i++){
int len = 0;
char... | false | false | false | false | false | 0 |
updateButtonState()
{
QModelIndex index = selectedIndex();
if (servUpButton) {
servUpButton->setEnabled(index.isValid());
}
if (servDownButton) {
servDownButton->setEnabled(index.isValid());
}
if (servRemoveButton) {
servRemoveButton->setEnabled(index.isValid());
}
} | false | false | false | false | false | 0 |
unity_webapps_indicator_context_free (UnityWebappsIndicatorContext *context)
{
g_return_if_fail (context != NULL);
g_hash_table_destroy (context->menu_callbacks_by_name);
g_hash_table_destroy (context->indicator_callbacks_by_name);
g_object_unref (G_OBJECT (context->indicator_proxy));
g_free (context);... | false | false | false | false | false | 0 |
getColorFromDialog()
{
bool ok;
QRgb rgb = QColorDialog::getRgba(lastSel.rgba(), &ok, parentWidget());
if (!ok)
return;
QColor col = QColor::fromRgba(rgb);
insertColor(col, tr("Custom"), -1);
lastSel = col;
emit selected(col);
} | false | false | false | false | false | 0 |
SetClassTemplateArgs(struct Specifier * spec, struct __ecereNameSpace__ecere__sys__OldList * templateArgs)
{
if(spec->type == 1)
{
struct Symbol * symbol = spec->symbol;
spec->templateArgs = templateArgs;
if(templateArgs && templateArgs->first)
{
char templateString[1024];
struct TemplateArgument * arg;
strcpy(templa... | true | true | false | false | false | 1 |
FreeCache() {
Display& d = *Session::instance()->default_display();
XDisplay* dpy = d.rep()->display_;
if (icache_) {
delete icache_; // will free up ximages
icache_ = nil;
}
// tx_pixmaps_ is a superset of source_table_
if (tx_pixmaps_) {
Table2Iterator(OvPi... | false | false | false | false | false | 0 |
hv_synic_clockevents_cleanup(void)
{
int cpu;
if (!(ms_hyperv.features & HV_X64_MSR_SYNTIMER_AVAILABLE))
return;
for_each_online_cpu(cpu)
clockevents_unbind_device(hv_context.clk_evt[cpu], cpu);
} | false | false | false | false | false | 0 |
useBuiltIn(UkKeyMapping *map)
{
UkResetKeyMap(m_keyMap);
for (int i=0; map[i].key; i++) {
m_keyMap[map[i].key] = map[i].action;
if (map[i].action < vneCount) {
if (islower(map[i].key)) {
m_keyMap[toupper(map[i].key)] = map[i].action;
}
else if ... | false | false | false | false | false | 0 |
drm_dp_port_setup_pdt(struct drm_dp_mst_port *port)
{
int ret;
u8 rad[6], lct;
bool send_link = false;
switch (port->pdt) {
case DP_PEER_DEVICE_DP_LEGACY_CONV:
case DP_PEER_DEVICE_SST_SINK:
/* add i2c over sideband */
ret = drm_dp_mst_register_i2c_bus(&port->aux);
break;
case DP_PEER_DEVICE_MST_BRANCHING:
... | false | false | false | false | false | 0 |
bcma_hcd_init_chip_arm_phy(struct bcma_device *dev)
{
struct bcma_device *arm_core;
void __iomem *dmu;
arm_core = bcma_find_core(dev->bus, BCMA_CORE_ARMCA9);
if (!arm_core) {
dev_err(&dev->dev, "can not find ARM Cortex A9 ihost core\n");
return;
}
dmu = ioremap_nocache(arm_core->addr_s[0], 0x1000);
if (!dm... | false | false | false | false | false | 0 |
close()
{
getLogLog().debug(LOG4CPLUS_TEXT("Entering SysLogAppender::close()..."));
LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( access_mutex )
::closelog();
closed = true;
LOG4CPLUS_END_SYNCHRONIZE_ON_MUTEX;
} | false | false | false | false | false | 0 |
_unpwd_cleanup(struct _mosquitto_unpwd **root, bool reload)
{
struct _mosquitto_unpwd *u, *tmp;
if(!root) return MOSQ_ERR_INVAL;
HASH_ITER(hh, *root, u, tmp){
HASH_DEL(*root, u);
if(u->password) _mosquitto_free(u->password);
if(u->username) _mosquitto_free(u->username);
#ifdef WITH_TLS
if(u->salt) _mosquit... | false | false | false | false | false | 0 |
labelsRead (frnetorderstream& fs)
{
off_t pos = m_headersize + m_arraySize;
fs.seekg (pos);
if (fs.fail())
return false;
for (int i = 0; i < m_numFileLabels; i++) {
kuint16 labelType, year, month, day, hour, minute, second;
kfloat64 calcTime;
fs.readInt16 (labelType);
fs.readInt16 (year);
... | false | false | false | false | false | 0 |
transform()
{
uint32_t *H = hashBuf;
uint32_t *W = inBuf;
//for (int t = 0; t < 16 ; t++)
// printf("%2d %08lx\n", t, W[t]);
//see 6.2.2
for (int t = 16; t < 64 ; t++)
W[t] = TR32(SHA_sigma1(W[t-2]) + W[t-7] + SHA_sigma0(W[t-15]) + W[t-16]);
uint32_t a = H[0];
uint32_t b = ... | false | false | false | false | false | 0 |
print_context_label (mark, inf, label)
char const *mark;
struct file_data *inf;
char const *label;
{
if (label)
printf_output ("%s %s\n", mark, label);
else
{
char const *ct = ctime (&inf->stat.st_mtime);
if (!ct)
ct = "?\n";
/* See Posix.2 section 4.17.6.1.4 for this forma... | false | false | false | false | false | 0 |
car_keyword_get_enum(const CmdArg *ca, const gchar *keyword, gint default_value, ...)
{
gint ret = default_value;
if((ca != NULL) && (keyword != NULL))
{
const gchar *value;
if((value = car_keyword_get_value(ca, keyword, NULL)) != NULL)
{
gint index;
const gchar *word;
va_list arg;
va_start(ar... | false | false | false | false | false | 0 |
w_REFINE_LP(struct wbitstream*str, int coeff, int model_bits)
{
if (coeff > 0) {
_jxr_wbitstream_uintN(str, coeff, model_bits);
coeff >>= model_bits;
if (coeff == 0)
_jxr_wbitstream_uint1(str, 0);
} else if (coeff < 0) {
coeff = -coeff;
_jxr_wbitstream_uintN(s... | false | false | false | false | false | 0 |
giterr_set(int error_class, const char *string, ...)
{
git_buf buf = GIT_BUF_INIT;
va_list arglist;
#ifdef GIT_WIN32
DWORD win32_error_code = (error_class == GITERR_OS) ? GetLastError() : 0;
#endif
int error_code = (error_class == GITERR_OS) ? errno : 0;
va_start(arglist, string);
git_buf_vprintf(&buf, string, a... | false | false | false | false | false | 0 |
setlgt_position(Nv_data * data, Tcl_Interp * interp, /* Current interpreter. */
int argc, /* Number of arguments. */
char **argv /* Argument strings. */
)
{
int num, w;
float x, y, z;
double atof();
if (argc != 6)
return (TCL_ERROR);
num = get_light_num(argv[0]);
data->light[... | 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.