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 |
|---|---|---|---|---|---|---|
InterpolateAdjacent(void)
{//=====================================
int ix;
int f1 = -1;
int select = -1;
int f2 = -1;
float ratio;
peak_t *p = NULL;
peak_t *p1 = NULL;
peak_t *p2 = NULL;
for(ix=0; ix<numframes; ix++)
{
if(frames[ix]->selected)
select = ix;
else
if(frames[ix]->keyframe)
{
if(sel... | false | false | false | false | false | 0 |
isError(RootObject *o)
{
Type *t = isType(o);
if (t)
return (t->ty == Terror);
Expression *e = isExpression(o);
if (e)
return (e->op == TOKerror || !e->type || e->type->ty== Terror);
Tuple *v = isTuple(o);
if (v)
return arrayObjectIsError(&v->objects);
Dsymbol *s = is... | false | false | false | false | false | 0 |
blockingPopGenericCommand(redisClient *c, int where) {
robj *o;
time_t timeout;
int j;
for (j = 1; j < c->argc-1; j++) {
o = lookupKeyWrite(c->db,c->argv[j]);
if (o != NULL) {
if (o->type != REDIS_LIST) {
addReply(c,shared.wrongtypeerr);
retur... | false | false | false | false | false | 0 |
paintSingleField( const MapRenderer::FieldRenderInfo& fieldInfo, int layer, const SPoint& pos )
{
if ( fieldInfo.visibility >= visible_ago) {
if ( fieldInfo.fld->vehicle || (fieldInfo.fld->building && fieldInfo.fld->bdt.test(cbbuildingentry) )) {
ContainerBase* c = fieldInfo.fld->getContainer();
... | false | false | false | false | false | 0 |
jacobiansPoseComposition(
const CPose2D &x,
const CPose2D &u,
CMatrixDouble33 &df_dx,
CMatrixDouble33 &df_du,
const bool compute_df_dx,
const bool compute_df_du )
{
const double spx = sin(x.phi());
const double cpx = cos(x.phi());
if (compute_df_dx)
{
/*
df_dx =
[ 1, 0, -sin(phi_x)*x_u-cos(phi... | false | false | false | false | false | 0 |
zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC) /* {{{ */
{
zval *tmp;
ALLOC_ZVAL(tmp);
Z_UNSET_ISREF_P(tmp);
Z_SET_REFCOUNT_P(tmp, 0);
ZVAL_BOOL(tmp, value);
return zend_update_static_property(scope, name, name_length, tmp TSRMLS_CC);
} | false | false | false | false | false | 0 |
string_escape(char **strp, int *strp_len, int *strp_alloc_size,
const char *chars, int chars_len, int options) {
int i = 0, j = 0, op = 0, replstr_len = 0;
char replstr[8]; /* 7 should be enough (covers \uXXXX + null) */
unsigned char c;
//int hits_total = 0;
unsigned char hits[256]; /* tra... | false | false | false | false | false | 0 |
file_object_special_op(enum file_object_op op,
const char * const old_name, const char * const new_name)
{
const int accmodes[] = { O_RDONLY, O_WRONLY, O_RDWR };
unsigned i;
GSList *objects = NULL;
bool ok = TRUE;
int saved_errno = 0;
errno = EINVAL; /* In case one of the soft assertions fails */
g_return_va... | false | false | false | false | false | 0 |
getSupportedIDs(UErrorCode& status) const
{
if (U_SUCCESS(status)) {
return LocaleUtility::getAvailableLocaleNames(_bundleName);
}
return NULL;
} | false | false | false | false | false | 0 |
compiler_complex_args(struct compiling *c, const node *n)
{
int i, len = (NCH(n) + 1) / 2;
expr_ty result;
asdl_seq *args = asdl_seq_new(len, c->c_arena);
if (!args)
return NULL;
/* fpdef: NAME | '(' fplist ')'
fplist: fpdef (',' fpdef)* [',']
*/
REQ(n, fplist);
for (i = ... | false | false | false | false | false | 0 |
on_query_data_loaded (SoupSession *session,
SoupMessage *query,
gpointer user_data)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (user_data);
GError *error = NULL;
char *contents;
gpointer ret;
if (query->status_code != SOUP_STATUS_OK) {
g_set_error... | false | false | false | false | false | 0 |
do_who_on_channel(struct Client *source_p, struct Channel *chptr,
int server_oper, int member, struct who_format *fmt)
{
struct Client *target_p;
struct membership *msptr;
rb_dlink_node *ptr;
RB_DLINK_FOREACH(ptr, chptr->members.head)
{
msptr = ptr->data;
target_p = msptr->client_p;
if(server_oper && !... | false | false | false | false | false | 0 |
afcofs_data_set(struct mb86a16_state *state,
unsigned char AFCEX_L,
unsigned char AFCEX_H)
{
if (mb86a16_write(state, 0x58, AFCEX_L) < 0)
goto err;
if (mb86a16_write(state, 0x59, AFCEX_H) < 0)
goto err;
return 0;
err:
dprintk(verbose, MB86A16_ERROR, 1, "I2C transfer error");
return -EREMOTEIO;
} | false | false | false | false | false | 0 |
WriteInlineMode(vtkIndent indent)
{
vtkDataSet* input = this->GetInputAsDataSet();
ostream& os = *(this->Stream);
int extent[6];
vtkInformation* inInfo = this->GetExecutive()->GetInputInformation(0, 0);
inInfo->Get(
vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), extent);
// Split progress of the... | false | false | false | false | false | 0 |
RemoveHashFromList( CUpDownClient* client )
{
// Nothing to remove
if ( !client->HasValidHash() ) {
return;
}
// Find all items with the specified hash
std::pair<HashMap::iterator, HashMap::iterator> range = m_hashList.equal_range( client->GetUserHash() );
for ( ; range.first != range.second; ++range.first ) ... | false | false | false | false | false | 0 |
transport_subsystem_check_init(void)
{
int ret;
static int sub_api_initialized;
if (sub_api_initialized)
return;
ret = request_module("target_core_iblock");
if (ret != 0)
pr_err("Unable to load target_core_iblock\n");
ret = request_module("target_core_file");
if (ret != 0)
pr_err("Unable to load target_... | false | false | false | false | false | 0 |
InitKernel (
StructInitInfo * module )
{
Int t1;
Int t2;
/* init filters and functions */
InitHdlrFuncsFromTable( GVarFuncs );
/* install the arithmetic operation methods */
for ( t1 = T... | false | false | false | false | false | 0 |
cert_UpdateSubjectKeyIDSlotCheck(SECItem *slotid, int series)
{
SECItem *oldSeries, *newSlotid, *newSeries;
SECStatus rv = SECFailure;
if (!gSubjKeyIDSlotCheckLock) {
return rv;
}
newSlotid = SECITEM_DupItem(slotid);
newSeries = SECITEM_AllocItem(NULL, NULL, sizeof(int));
if (!newSlotid |... | false | false | false | false | false | 0 |
getRowRange() const
{
if (rowrange_ == NULL) {
int nr=numberRows_;
rowrange_ = reinterpret_cast<double *> (malloc(nr*sizeof(double)));
std::fill(rowrange_,rowrange_+nr,0.0);
char dum1;
double dum2;
int i;
for (i=0; i<nr; i++) {
convertBoundToSense(rowlower_[i],rowupper_[i],dum1,dum2... | false | true | false | false | false | 1 |
alog_request(FILE *fp, struct alog_instr *instr, int argc, char **argv)
{
char *str;
if (dico_argcv_string(argc, (const char**)argv, &str))
print_str(fp, "-");
else {
print_str(fp, str);
free(str);
}
} | false | false | false | false | false | 0 |
ExpandZERO_EXTEND_VECTOR_INREG(SDValue Op) {
SDLoc DL(Op);
EVT VT = Op.getValueType();
int NumElements = VT.getVectorNumElements();
SDValue Src = Op.getOperand(0);
EVT SrcVT = Src.getValueType();
int NumSrcElements = SrcVT.getVectorNumElements();
// Build up a zero vector to blend into this one.
EVT Sr... | false | false | false | false | false | 0 |
radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
{
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
struct drm_device *dev = crtc->dev;
struct radeon_device *rdev = dev->dev_private;
struct drm_crtc *test_crtc;
struct radeon_crtc *test_radeon_crtc;
u32 adjusted_clock, test_adjusted_clock;
adjusted_clo... | false | false | false | false | false | 0 |
ruvAddReplicaNoCSN (RUV *ruv, ReplicaId rid, const char *replica_purl)
{
RUVElement *replica;
PR_ASSERT (NULL != ruv);
/* PR_ASSERT(rid != READ_ONLY_REPLICA_ID); */
replica = (RUVElement *)slapi_ch_calloc (1, sizeof (RUVElement));
if (replica == NULL)
{
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
... | false | false | false | false | false | 0 |
glade_property_class_make_string_from_object (GladePropertyClass *
property_class, GObject * object)
{
GladeWidget *gwidget;
gchar *string = NULL, *filename;
if (!object)
return NULL;
if (property_class->pspec->value_type == GDK_TYPE_PIXBUF)
{
if ((f... | false | false | false | false | false | 0 |
gnumeric_isref (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
{
if (argc != 1)
return value_new_error (ei->pos,
_("Invalid number of arguments"));
return value_new_bool (GNM_EXPR_GET_OPER (argv[0]) == GNM_EXPR_OP_CELLREF);
} | false | false | false | false | false | 0 |
_ecore_exe_exec_it(const char *exe_cmd,
Ecore_Exe_Flags flags)
{
char use_sh = 1;
char *buf = NULL;
char **args = NULL;
int save_errno = 0;
/* So what is this doing?
*
* We are trying to avoid wrapping the exe call with /bin/sh -c.
* We conservatively search for certai... | false | false | false | false | false | 0 |
addCurrentConstraint()
{
TimeConstraint *ctr=NULL;
double weight;
QString tmp=weightLineEdit->text();
weight_sscanf(tmp, "%lf", &weight);
if(weight<0.0 || weight>100.0){
QMessageBox::warning(this, tr("FET information"),
tr("Invalid weight"));
return;
}
int maxHours=maxHoursSpinBox->value();
QString st... | false | false | false | false | false | 0 |
atl1e_probe(struct pci_device *pdev)
{
struct net_device *netdev;
struct atl1e_adapter *adapter = NULL;
static int cards_found;
int err = 0;
adjust_pci_device(pdev);
netdev = alloc_etherdev(sizeof(struct atl1e_adapter));
if (netdev == NULL) {
err = -ENOMEM;
DBG("atl1e: out of memory allocating net_device\... | false | false | false | false | false | 0 |
parq_upload_frozen_clear(struct parq_ul_queued *puq)
{
parq_ul_queued_check(puq);
g_assert(puq->flags & PARQ_UL_FROZEN);
puq->flags &= ~PARQ_UL_FROZEN;
g_assert(puq->by_addr->frozen > 0);
g_assert(puq->queue->frozen > 0);
puq->by_addr->frozen--;
puq->queue->frozen--;
} | false | false | false | false | false | 0 |
dsgw_opencookiedb()
{
FILE *fp;
time_t now;
int newfile = 0;
char cdb[MAXPATHLEN]; /*DSGW_COOKIEDB_FNAME + context*/
#ifdef XP_WIN32
#ifndef F_OK
#define F_OK 0
#endif
#endif
PR_snprintf(cdb, sizeof(cdb), "%s.%s", DSGW_COOKIEDB_FNAME, context);
if ( access( cdb, F_OK ) == 0 ) {
fp = fopen( cd... | false | false | false | false | false | 0 |
httpRouteRequest(HttpConn *conn)
{
HttpRx *rx;
HttpTx *tx;
HttpRoute *route;
int next, rewrites, match;
rx = conn->rx;
tx = conn->tx;
for (next = rewrites = 0; rewrites < HTTP_MAX_REWRITE; ) {
if ((route = mprGetNextItem(conn->host->routes, &next)) == 0) {
... | false | false | false | false | false | 0 |
iitimegrade (pglobal, argc, argv, pvar, pinfo)
pointer pglobal;
int argc;
char **argv;
pointer pvar;
pointer pinfo;
{
struct sglobal *qglobal = (struct sglobal *) pglobal;
struct uuconf_timespan **pqspan = (struct uuconf_timespan **) pvar;
struct sinfo *qinfo = (struct sinfo *) pinfo;
i... | false | false | false | false | false | 0 |
ntru_neg_mod(NtruIntPoly *a, uint16_t modulus) {
uint16_t i;
for (i=0; i<a->N; i++)
a->coeffs[i] = modulus - a->coeffs[i];
} | false | false | false | false | false | 0 |
irc_list_channels (server *serv, char *arg, int min_users)
{
if (arg[0])
{
tcp_sendf (serv, "LIST %s\r\n", arg);
return;
}
if (serv->use_listargs)
tcp_sendf (serv, "LIST >%d,<10000\r\n", min_users - 1);
else
tcp_send_len (serv, "LIST\r\n", 6);
} | false | false | false | false | false | 0 |
Recv_StatusInfoRequest( void )
{
gogocStatusInfo* pStatusInfo = NULL;
error_t retCode;
// Retrieve the status information. (ALLOCATION MADE HERE)
retCode = RetrieveStatusInfo( &pStatusInfo );
if( retCode == GOGOCM_UIS__NOERROR )
{
// Send the information to the requester.
Send_StatusInfo( pStatusI... | false | false | false | false | false | 0 |
gvir_config_object_set_namespace(GVirConfigObject *object, const char *ns,
const char *ns_uri)
{
xmlNsPtr namespace;
g_return_val_if_fail(GVIR_CONFIG_IS_OBJECT(object), FALSE);
g_return_val_if_fail(ns != NULL, FALSE);
g_return_val_if_fail(ns_uri != NULL, FALSE);
na... | false | false | false | false | false | 0 |
describeAggregates(const char *pattern, bool verbose)
{
PQExpBufferData buf;
PGresult *res;
printQueryOpt myopt = pset.popt;
initPQExpBuffer(&buf);
/*
* There are two kinds of aggregates: ones that work on particular types
* and ones that work on all (denoted by input type = "any")
*/
printfPQExpBuffer(... | false | false | false | false | false | 0 |
onUpdWindowSelect(FXObject *sender,FXSelector sel,void*){
FXint which=FXSELID(sel)-ID_MDI_1;
FXMDIChild *child=(FXMDIChild*)childAtIndex(which);
if(child){
FXString string;
if(which<9)
string.format("&%d %s",which+1,child->getTitle().text());
else
string.format("1&0 %s",child->getTitle().t... | false | false | false | false | false | 0 |
acpi_dma_simple_xlate(struct acpi_dma_spec *dma_spec,
struct acpi_dma *adma)
{
struct acpi_dma_filter_info *info = adma->data;
if (!info || !info->filter_fn)
return NULL;
return dma_request_channel(info->dma_cap, info->filter_fn, dma_spec);
} | false | false | false | false | false | 0 |
ReplicateOffEdges(RECTANGLE *screen, LINE *obj, POINT *p,
RECTANGLE *bounds, SYMMETRY *s,
DRAWER *drawer)
{
VECTOR v, vec1, vec2;
/* use same vectors as you did to generate the lattice */
RearrangeVectors(s,&vec1,&vec2);
DrawIfNecessary(screen,obj,p,bounds,&vec1,1,drawer,0);
DrawIfNece... | false | false | false | false | false | 0 |
enic_dev_wait(struct vnic_dev *vdev,
int (*start)(struct vnic_dev *, int),
int (*finished)(struct vnic_dev *, int *),
int arg)
{
unsigned long time;
int done;
int err;
BUG_ON(in_interrupt());
err = start(vdev, arg);
if (err)
return err;
/* Wait for func to complete...2 seconds max
*/
time = jiffies +... | false | false | false | false | false | 0 |
push_close_delete_or_succeed (SftpPushHandle *handle)
{
if (handle->tempname)
{
/* If we wrote to a temp file, do delete then rename. */
GDataOutputStream *command = new_command_stream (handle->backend, SSH_FXP_REMOVE);
put_string (command, handle->op_job->destination);
queue_command_strea... | false | false | false | false | false | 0 |
paint(){
clear_screen();
for(int y = 0; y < m_height-2; ++y){
std::string s = "";
cursorpos(0,y);
for(int x = 0; x < m_width; ++x){
std::pair<int, int> p = {x,y};
if(m_grid.count(p) != 0){
s+= m_grid[p].get_str();
}
else{
s+= " ";
}
}
std::cout << s;
std::cout.flush();
}
} | false | false | false | false | false | 0 |
_k_slotActionTriggered(QAction* action)
{
q->trigger(); // was for kdesktop's slotNewMenuActivated() in kde3 times. Can't hurt to keep it...
if (action == m_newDirAction) {
q->createDirectory();
return;
}
const int id = action->data().toInt();
Q_ASSERT(id > 0);
KNewFileMenuSing... | false | false | false | false | false | 0 |
handle_LNI_V(struct ptype_action_args *parg)
{
g2_connection_t *connec = parg->connec;
g2_packet_t *source = parg->source;
size_t min_length;
if(unlikely(!skip_unexpected_child(source, "/LNI/V")))
return false;
min_length =
(buffer_remaining(source->data_trunk) < (sizeof(connec->vendor_code)-1) ?
buffer_re... | false | false | false | false | false | 0 |
glade_gtk_label_post_create (GladeWidgetAdaptor *adaptor,
GObject *object,
GladeCreateReason reason)
{
GladeWidget *glabel = glade_widget_get_from_gobject (object);
if (reason == GLADE_CREATE_USER)
glade_widget_property_set_sensitive (glabel, "mnemonic-widget", FALSE, MNEMONIC_INSENSI... | false | false | false | false | false | 0 |
RemoveLayer (std::string& inchi, const std::string& str, bool all)
{
std::string::size_type pos = inchi.find(str);
if(pos!=string::npos)
inchi.erase(pos, (all ? string::npos : inchi.find('/', pos+1) - pos));
} | false | false | false | false | false | 0 |
pm_process( char *FileName,
BOOL (*sfunc)(char *),
BOOL (*pfunc)(char *, char *) )
/* ------------------------------------------------------------------------ **
* Process the named parameter file.
*
* Input: FileName - The pathname of the parameter file to be opened.
... | false | false | false | false | false | 0 |
chlsol2(real_t **a, int n, real_t b[])
{
real_t matvec(int, int, int, real_t **, real_t []);
real_t tamvec(int, int, int, real_t **, real_t []);
int i;
for (i=1; i<=n; i++) b[i]=(b[i]-tamvec(1,i-1,i,a,b))/a[i][i];
for (i=n; i>=1; i--) b[i]=(b[i]-matvec(i+1,n,i,a,b))/a[i][i];
} | false | false | false | false | false | 0 |
LoadCreatureEventAI_Summons(bool check_entry_use)
{
// Drop Existing EventSummon Map
m_CreatureEventAI_Summon_Map.clear();
// Gather additional data for EventAI
QueryResult* result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM creature_ai_summons"... | false | false | false | false | false | 0 |
recover_slack(edge_t * e, path * p)
{
int b;
node_t *vn;
b = 0; /* skip first rank box */
for (vn = aghead(e);
ND_node_type(vn) == VIRTUAL && !sinfo.splineMerge(vn);
vn = aghead(ND_out(vn).list[0])) {
while ((b < p->nbox) && (p->boxes[b].LL.y > ND_coord(vn).y))
b++;
if (b >= p->nbox)
... | false | false | false | false | false | 0 |
store_arg (const char *arg, int delete_always, int delete_failure)
{
if (argbuf_index + 1 == argbuf_length)
argbuf = xrealloc (argbuf, (argbuf_length *= 2) * sizeof (const char *));
argbuf[argbuf_index++] = arg;
argbuf[argbuf_index] = 0;
if (delete_always || delete_failure)
record_temp_file (arg, dele... | false | true | false | false | true | 1 |
clearRecentFiles()
{
QSettings s;
s.remove("editor/recentFiles");
d->recentFiles.clear();
} | false | false | false | false | false | 0 |
generic_ip_connect(struct TCP_Server_Info *server)
{
int rc = 0;
__be16 sport;
int slen, sfamily;
struct socket *socket = server->ssocket;
struct sockaddr *saddr;
saddr = (struct sockaddr *) &server->dstaddr;
if (server->dstaddr.ss_family == AF_INET6) {
sport = ((struct sockaddr_in6 *) saddr)->sin6_port;
s... | false | false | false | false | false | 0 |
renderCtrlFormCover()
{
string_t* page = stringNew("Set(cover,");
mutexLock(M_STATE);
const char* nc = cfNamedCover();
if (nc) {
stringAppend(page, "by_name,");
stringAppend(page, nc);
stringAppend(page, ");");
} else {
stringAppend(page, "clear);");
}
mutexU... | false | false | false | false | false | 0 |
glusterd_bricks_select_rebalance_volume (dict_t *dict, char **op_errstr)
{
int ret = -1;
char *volname = NULL;
glusterd_volinfo_t *volinfo = NULL;
xlator_t *this = N... | false | false | false | true | false | 1 |
addcstr(const std::string& str) {
int x = COLS / 2 - str.length() / 2;
mvaddstr(getcury(stdscr), x, str.c_str());
} | false | false | false | false | false | 0 |
function_return_type(Node *n, bool resolve = true) {
String *decl = Getattr(n, "decl");
SwigType *type = Getattr(n, "type");
String *ty = NewString(type);
SwigType_push(ty, decl);
if (SwigType_isqualifier(ty))
Delete(SwigType_pop(ty));
Delete(SwigType_pop_function(ty));
if (resolve) {
... | false | false | false | false | false | 0 |
insertSite(const Vertex &v)
{
QuadEdge *e = locate(v);
if ((v.equals(e->orig(), tolerance)) || (v.equals(e->dest(), tolerance))) {
return *e; // point already in subdivision.
}
// Connect the new point to the vertices of the containing
// triangle (or quadrilateral, if the new point fell on an
// existing edg... | false | false | false | false | false | 0 |
ath10k_pci_irq_sync(struct ath10k *ar)
{
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
int i;
for (i = 0; i < max(1, ar_pci->num_msi_intrs); i++)
synchronize_irq(ar_pci->pdev->irq + i);
} | false | false | false | false | false | 0 |
SQLValidDSNW (LPCWSTR lpszDSN)
{
BOOL retcode = FALSE;
/* Check dsn */
CLEAR_ERROR ();
if (!lpszDSN || !WCSLEN (lpszDSN) || WCSLEN (lpszDSN) >= SQL_MAX_DSN_LENGTH)
{
PUSH_ERROR (ODBC_ERROR_GENERAL_ERR);
goto quit;
}
retcode = ValidDSNW (lpszDSN);
quit:
return retcode;
} | false | false | false | false | false | 0 |
rsi_send_internal_mgmt_frame(struct rsi_common *common,
struct sk_buff *skb)
{
struct skb_info *tx_params;
if (skb == NULL) {
rsi_dbg(ERR_ZONE, "%s: Unable to allocate skb\n", __func__);
return -ENOMEM;
}
tx_params = (struct skb_info *)&IEEE80211_SKB_CB(skb)->driver_data;
tx_params->flags |= INTERNAL_MGM... | false | false | false | false | false | 0 |
CT_BackSpace(int player)
{
patch_t *patch;
char c;
if (msgptr[player] == 0)
{ // message is already blank
return;
}
msgptr[player]--;
c = chat_msg[player][msgptr[player]];
if (c < 33)
{
msglen[player] -= 6;
}
else
{
patch... | false | false | false | false | false | 0 |
drm_intel_gem_dump_validation_list(drm_intel_bufmgr_gem *bufmgr_gem)
{
int i, j;
for (i = 0; i < bufmgr_gem->exec_count; i++) {
drm_intel_bo *bo = bufmgr_gem->exec_bos[i];
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
if (bo_gem->relocs == NULL) {
DBG("%2d: %d (%s)\n", i, bo_gem->gem_handle,
b... | false | false | false | false | false | 0 |
eqvcommon(struct Equivblock *p, int comno, ftnint comoffset)
#endif
{
int ovarno;
ftnint k, offq;
register Namep np;
register struct Eqvchain *q;
if(comoffset + p->eqvbottom < 0)
{
errstr("attempt to extend common %s backward",
extsymtab[comno].fextname);
freqchain(p);
return;
}
if( (k = comoffset... | false | false | false | false | false | 0 |
blockExit(bool mustNotThrow)
{
//printf("CompoundStatement::blockExit(%p) %d\n", this, statements->dim);
int result = BEfallthru;
Statement *slast = NULL;
for (size_t i = 0; i < statements->dim; i++)
{ Statement *s = (*statements)[i];
if (s)
{
//printf("result = x%x\n",... | false | false | false | false | false | 0 |
crypt_set_error(struct crypt_device *cd, const char *error)
{
size_t size = strlen(error);
/* Set global error, ugly hack... */
strncpy(global_error, error, MAX_ERROR_LENGTH - 2);
if (size < MAX_ERROR_LENGTH && global_error[size - 1] == '\n')
global_error[size - 1] = '\0';
/* Set error string per context */
i... | false | true | false | false | false | 1 |
YM2413UpdateOne(int which, INT16 **buffers, int length)
{
YM2413 *chip = OPLL_YM2413[which];
UINT8 rhythm = chip->rhythm&0x20;
SAMP *bufMO = buffers[0];
SAMP *bufRO = buffers[1];
int i;
if( (void *)chip != cur_chip ){
cur_chip = (void *)chip;
/* rhythm slots */
SLOT7_1 = &chip->P_CH[7].SL... | false | false | false | false | false | 0 |
netsys_create_not_event(value allow_user_add)
{
#ifdef HAVE_POLL
struct not_event *p;
value r;
int x;
int e;
#ifndef HAVE_EVENTFD
int pipefd[2];
#endif
r = alloc_not_event();
p = *(Not_event_val(r));
p->state = 0;
p->fd1 = -1;
p->fd2 = -1;
p->allow_user_add = Bool_val(allow_... | false | false | false | false | false | 0 |
construct_pam_passwd(int num_msg, const struct pam_message **msg,
struct pam_response **response, void *data)
{
int count = 0;
struct pam_response *reply;
char *string = (char *)data;
CRM_CHECK(data, return PAM_CONV_ERR);
CRM_CHECK(num_msg == 1, return PAM_CONV_ERR); /* W... | false | false | false | false | false | 0 |
overflow( int c )
{
sync();
if( c != EOF ) {
*pptr() = static_cast<char>( c );
pbump( 1 );
}
return c;
} | false | false | false | false | false | 0 |
search_tree(struct fs_info *fs, u64 loffset,
struct btrfs_disk_key *key, struct btrfs_path *path)
{
u8 buf[BTRFS_MAX_LEAF_SIZE];
struct btrfs_header *header = (struct btrfs_header *)buf;
struct btrfs_node *node = (struct btrfs_node *)buf;
struct btrfs_leaf *leaf = (struct btrfs_leaf *)buf;
int slot, ret;
u64 of... | false | false | false | false | false | 0 |
isSameShuffle(unsigned OutR1, unsigned InpR1,
unsigned OutR2, unsigned &InpR2) const {
if (!BTP->has(OutR1) || !BTP->has(InpR1) || !BTP->has(OutR2))
return false;
const BitTracker::RegisterCell &OutC1 = BTP->lookup(OutR1);
const BitTracker::RegisterCell &OutC2 = BTP->lookup(OutR2);
unsigned W = OutC1.... | false | false | false | false | false | 0 |
fix_xscale(GtkWidget *align)
{
gfloat xscale;
g_object_get(align, "xscale", &xscale, NULL);
if (xscale != 1.0)
g_object_set(align, "xscale", 1.0f, NULL);
} | false | false | false | false | false | 0 |
gf_path_add_rect(GF_Path *gp, Fixed ox, Fixed oy, Fixed w, Fixed h)
{
GF_Err e = gf_path_add_move_to(gp, ox, oy);
if (e) return e;
e = gf_path_add_line_to(gp, ox + w, oy);
if (e) return e;
e = gf_path_add_line_to(gp, ox+w, oy-h);
if (e) return e;
e = gf_path_add_line_to(gp, ox, oy-h);
if (e) return e;
return g... | false | false | false | false | false | 0 |
gimmix_strip_file_ext (char *string)
{
int len;
int i;
if (string == NULL || (len=strlen(string))==0 )
return;
for (i=len-1; i>0; i--)
{
if (string[i] == '.')
{
string[i] = '\0';
break;
}
}
return;
} | false | false | false | false | false | 0 |
vbi_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
ssize_t ret = 0;
DEB_VBI("dev:%p, fh:%p\n", dev, fh);
if( NULL == vv->vbi_streaming ) {
// fixme: check if dma3 is a... | false | false | false | false | false | 0 |
_sc92031_rx_tasklet_error(struct net_device *dev,
u32 rx_status, unsigned rx_size)
{
if(rx_size > (MAX_ETH_FRAME_SIZE + 4) || rx_size < 16) {
dev->stats.rx_errors++;
dev->stats.rx_length_errors++;
}
if (!(rx_status & RxStatesOK)) {
dev->stats.rx_errors++;
if (rx_status & (RxHugeFrame | RxSmallFra... | false | false | false | false | false | 0 |
Grad(int x, int y, int z, float dx, float dy, float dz) {
int h = NoisePerm[NoisePerm[NoisePerm[x]+y]+z];
h &= 15;
float u = h<8 || h==12 || h==13 ? dx : dy;
float v = h<4 || h==12 || h==13 ? dy : dz;
return ((h&1) ? -u : u) + ((h&2) ? -v : v);
} | false | false | false | false | false | 0 |
IoList_last(IoList *self, IoObject *locals, IoMessage *m)
{
/*doc List last(optionalSize)
Returns the last item or Nil if the list is empty.
If optionalSize is provided, that number of the last items in the list are returned.
*/
if (IoMessage_argCount(m) == 0)
{
IoObject *result = List_at_(DATA(self), List_si... | false | false | false | false | false | 0 |
opal_dss_pack_timeval(opal_buffer_t *buffer, const void *src,
int32_t num_vals, opal_data_type_t type)
{
int64_t tmp[2];
int ret = OPAL_SUCCESS;
int32_t i;
struct timeval *ssrc = (struct timeval *)src;
for (i = 0; i < num_vals; ++i) {
tmp[0] = (int64_t)ssrc[i].tv_s... | false | false | false | false | false | 0 |
out_date(std::time_t date)
{
if (date != std::time_t(-1)) {
#ifdef HAVE_GMTIME_R
struct tm time;
gmtime_r(&date, &time);
struct tm *t = &time;
#else
struct tm *t = gmtime(&date);
#endif
char buf[32];
strftime(buf, sizeof(buf) - 1, "%d/%m/%Y %H:%M:%S", t);
retu... | false | false | false | false | false | 0 |
city_rotate_specialist(struct city *pcity, int citizen_index)
{
enum citizen_category citizens[MAX_CITY_SIZE];
Specialist_type_id from, to;
int num_citizens = get_city_citizen_types(pcity, FEELING_FINAL, citizens);
if (citizen_index < 0 || citizen_index >= num_citizens
|| citizens[citizen_index] < CITIZEN_S... | false | false | false | false | false | 0 |
numaFindExtrema(NUMA *nas,
l_float32 delta)
{
l_int32 i, n, found, loc, direction;
l_float32 startval, val, maxval, minval;
NUMA *nad;
PROCNAME("numaFindExtrema");
if (!nas)
return (NUMA *)ERROR_PTR("nas not defined", procName, NULL);
n = numaGetCount(nas);
nad ... | false | false | false | false | false | 0 |
__ath10k_ce_rx_num_free_bufs(struct ath10k_ce_pipe *pipe)
{
struct ath10k *ar = pipe->ar;
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
struct ath10k_ce_ring *dest_ring = pipe->dest_ring;
unsigned int nentries_mask = dest_ring->nentries_mask;
unsigned int write_index = dest_ring->write_index;
unsigned int sw_i... | false | false | false | false | false | 0 |
pfstr(const char *s)
{
while (*s)
(*pfunc)(*s++);
} | false | false | false | false | false | 0 |
gst_rtsp_server_finalize (GObject * object)
{
GstRTSPServer *server = GST_RTSP_SERVER (object);
GST_DEBUG_OBJECT (server, "finalize server");
g_free (server->address);
g_free (server->service);
g_object_unref (server->session_pool);
g_object_unref (server->media_mapping);
if (server->auth)
g_objec... | false | false | false | false | false | 0 |
try_ram_remap(resource_size_t offset, size_t size)
{
struct page *page = pfn_to_page(offset >> PAGE_SHIFT);
/* In the simple case just return the existing linear address */
if (!PageHighMem(page))
return __va(offset);
return NULL; /* fallback to ioremap_cache */
} | false | false | false | false | false | 0 |
new_qpol_role_t(qpol_policy_t *p,char const *name){
const qpol_role_t *r;
BEGIN_EXCEPTION
if (qpol_policy_get_role_by_name(p, name, &r)) {
{tcl_throw_error("Role does not exist"); goto fail;};
}
END_EXCEPTION
return (qpol_role_t*)r;
fail:
return NULL;
} | false | false | false | false | false | 0 |
padFragmentForSourcePosition(int rawPos) const
{
if (_fragments.isEmpty()) {
// if (_start < rawPos && rawPos < _end)
if (IN_RANGE_STRICTLY(rawPos, _start, _end))
return (PadFragment *)this;
} else {
foreach(PadFragment *fragment, _fragments) {
if (fragment->start(... | false | false | false | false | false | 0 |
tr_probe_num(const std::string& x)const
{untested();
if (Umatch(x, "fflux ")) {untested();
return _yf[0].f0;
}else if (Umatch(x, "rflux ")) {untested();
return _yr[0].f0;
}else if (Umatch(x, "fiof{fset} ")) {untested();
return _mf0_c0;
}else if (Umatch(x, "riof{fset} ")) {untested();
return _mr0... | false | false | false | false | false | 0 |
extrainfo_insert(routerlist_t *rl, extrainfo_t *ei)
{
int r = 0;
routerinfo_t *ri = rimap_get(rl->identity_map,
ei->cache_info.identity_digest);
signed_descriptor_t *sd =
sdmap_get(rl->desc_by_eid_map, ei->cache_info.signed_descriptor_digest);
extrainfo_t *ei_tmp;
{
ext... | false | false | false | false | false | 0 |
gf_server_check_setxattr_cmd (call_frame_t *frame, dict_t *dict)
{
data_pair_t *pair = NULL;
server_conf_t *conf = NULL;
rpc_transport_t *xprt = NULL;
uint64_t total_read = 0;
uint64_t total_write = 0;
conf = frame->this->private;
if (... | false | false | false | false | false | 0 |
getScaledSize(int orig_width,
int orig_height,
int *scaledWidth,
int *scaledHeight) {
cairo_matrix_t matrix;
cairo_get_matrix(cairo, &matrix);
double xScale;
double yScale;
if (orig_width > orig_height)
get_singular_values (&matrix, &xScale, &yScale);
else
get_singular_values... | false | false | false | false | false | 0 |
vlistDefVarTable(int vlistID, int varID, int tableID)
{
vlist_t *vlistptr;
if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
{
xwarning("%s", "Operation not executed." );
return;
}
vlistptr = vlist_to_pointer(vlistID);
vlistptr->vars[varID].tableID = tableID;
{
int param, pnum... | false | false | false | false | false | 0 |
mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass)
{
might_sleep();
return __mutex_lock_common(lock, TASK_INTERRUPTIBLE,
subclass, NULL, _RET_IP_, NULL, 0);
} | false | false | false | false | false | 0 |
CmCleanupAndExit (
void)
{
UINT32 i;
BOOLEAN DeleteAmlFile = FALSE;
AePrintErrorLog (ASL_FILE_STDERR);
if (Gbl_DebugFlag)
{
/* Print error summary to stdout also */
AePrintErrorLog (ASL_FILE_STDOUT);
}
/* Emit compile times if enabled ... | false | false | false | false | false | 0 |
index()
{
// qDebug() << "i";
// Make sure that invalid values returns an invalid index
Q_ASSERT ( model->index ( -2, -2 ) == QModelIndex() );
Q_ASSERT ( model->index ( -2, 0 ) == QModelIndex() );
Q_ASSERT ( model->index ( 0, -2 ) == QModelIndex() );
int rows = model->rowCount();
int column... | false | false | false | false | false | 0 |
proxy_remove(GDBusClient *client, const char *path,
const char *interface)
{
GList *list;
for (list = g_list_first(client->proxy_list); list;
list = g_list_next(list)) {
GDBusProxy *proxy = list->data;
if (g_str_equal(proxy->interface, interface) == TRUE &&
g_str_equal(proxy->obj_path, path) == ... | false | false | false | false | false | 0 |
tg3_find_peer(struct tg3 *tp)
{
struct pci_dev *peer;
unsigned int func, devnr = tp->pdev->devfn & ~7;
for (func = 0; func < 8; func++) {
peer = pci_get_slot(tp->pdev->bus, devnr | func);
if (peer && peer != tp->pdev)
break;
pci_dev_put(peer);
}
/* 5704 can be configured in single-port mode, set peer to
... | 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.