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 |
|---|---|---|---|---|---|---|
toOutput(Core::ITokenPool *pool, TokenReplacementMethod method)
{
Q_ASSERT(_docSource);
if (!_docSource)
return;
Q_EMIT beginTokenReplacement();
if (!_docOutput) {
_docOutput = new QTextDocument(this);
}
_docOutput->clear();
_docOutput->setHtml(_docSource->toHtml());
//... | false | false | false | false | false | 0 |
ecDoublePointEd(const EcCurve *curve, EcPoint *R, const EcPoint *P)
{
EcPoint tP;
const EcPoint *ptP = 0;
/* Check for overlapping arguments, copy if necessary and set pointer */
if (P == R) {
INIT_EC_POINT(&tP);
ptP = &tP;
bnCopy(tP.x, P->x);
bnCopy(tP.y, P->y);
... | false | false | false | false | false | 0 |
mb86a16_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{
u8 dist;
struct mb86a16_state *state = fe->demodulator_priv;
if (mb86a16_read(state, MB86A16_DISTMON, &dist) != 2) {
dprintk(verbose, MB86A16_ERROR, 1, "I2C transfer error");
return -EREMOTEIO;
}
*ucblocks = dist;
return 0;
} | false | true | false | false | false | 1 |
check_tentative_tls(ioa_socket_raw fd)
{
TURN_TLS_TYPE ret = TURN_TLS_NO;
char s[12];
int len = 0;
do {
len = (int)recv(fd, s, sizeof(s), MSG_PEEK);
} while (len < 0 && (errno == EINTR));
if(len>0 && ((size_t)len == sizeof(s))) {
if((s[0]==22)&&(s[1]==3)&&(s[5]==1)&&(s[9]==3)) {
char max_supported = (ch... | true | true | false | false | false | 1 |
wmi_remove_notify_handler(const char *guid)
{
struct wmi_block *block;
acpi_status status = AE_NOT_EXIST;
char tmp[16], guid_input[16];
struct list_head *p;
if (!guid)
return AE_BAD_PARAMETER;
wmi_parse_guid(guid, tmp);
wmi_swap_bytes(tmp, guid_input);
list_for_each(p, &wmi_block_list) {
acpi_status wmi_... | true | true | false | false | false | 1 |
dlm_kick_thread(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
{
if (res) {
spin_lock(&dlm->spinlock);
spin_lock(&res->spinlock);
__dlm_dirty_lockres(dlm, res);
spin_unlock(&res->spinlock);
spin_unlock(&dlm->spinlock);
}
wake_up(&dlm->dlm_thread_wq);
} | false | false | false | false | false | 0 |
qed_mcp_reset(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt)
{
u32 seq = ++p_hwfn->mcp_info->drv_mb_seq;
u8 delay = CHIP_MCP_RESP_ITER_US;
u32 org_mcp_reset_seq, cnt = 0;
int rc = 0;
/* Set drv command along with the updated sequence */
org_mcp_reset_seq = qed_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0);
DR... | false | false | false | false | false | 0 |
Set(const UFObject &object)
{
if (this == &object) // Avoid self-assignment
return;
// We are comparing the strings ADDRESSes not values.
if (Name() != object.Name())
Throw("Object name mismatch with '%s'", object.Name());
const UFNumberArray &array = object;
if (Size() != array.Size... | false | false | false | false | false | 0 |
parse(DataExtractor data) {
uint32_t Offset = 0;
while (data.isValidOffset(Offset)) {
Locations.resize(Locations.size() + 1);
LocationList &Loc = Locations.back();
Loc.Offset = Offset;
dwarf::LocationListEntry Kind;
while ((Kind = static_cast<dwarf::LocationListEntry>(
data.getU8... | false | false | false | false | false | 0 |
history_reset (void)
{
int id;
for (id = hist_NONE ; id < hist_COUNT ; id++ )
histories[id].current = &histories[id].head;
} | false | false | false | false | false | 0 |
hfi1_set_ctxt_pkey(struct hfi1_devdata *dd, unsigned ctxt, u16 pkey)
{
struct hfi1_ctxtdata *rcd;
unsigned sctxt;
int ret = 0;
u64 reg;
if (ctxt < dd->num_rcv_contexts)
rcd = dd->rcd[ctxt];
else {
ret = -EINVAL;
goto done;
}
if (!rcd || !rcd->sc) {
ret = -EINVAL;
goto done;
}
sctxt = rcd->sc->hw_co... | false | false | false | false | false | 0 |
dconf_engine_watch_established (DConfEngine *engine,
gpointer handle,
GVariant *reply,
const GError *error)
{
OutstandingWatch *ow = handle;
/* ignore errors */
if (--ow->pending)
/* more on the way... ... | false | false | false | false | false | 0 |
AddInfluencerItemAttributeBonus(item * BonusItem)
{
// In case of no item, the thing to do is pretty easy...
//
if (BonusItem->type == (-1))
return;
// Apply the bonuses to the stats of the character.
Me.strength += BonusItem->bonus_to_str + BonusItem->bonus_to_all_attributes;
Me.dexterity += BonusItem->bonus_... | false | false | false | false | false | 0 |
diagnostic_count_diagnostic (diagnostic_context *context,
diagnostic_info *diagnostic)
{
diagnostic_t kind = diagnostic->kind;
switch (kind)
{
default:
abort();
break;
case DK_ICE:
#ifndef ENABLE_CHECKING
/* When not checking, ICEs are converted to fatal errors when an
error... | false | false | false | false | false | 0 |
setShellCommand(const QString &cmd)
{
Q_D(KProcess);
KShell::Errors err;
d->args = KShell::splitArgs(
cmd, KShell::AbortOnMeta | KShell::TildeExpand, &err);
if (err == KShell::NoError && !d->args.isEmpty()) {
d->prog = KStandardDirs::findExe(d->args[0]);
if (!d->prog.isEmpty... | false | false | false | false | false | 0 |
ldns_rbtree_find_less_equal(ldns_rbtree_t *rbtree, const void *key, ldns_rbnode_t **result)
{
int r;
ldns_rbnode_t *node;
/* We start at root... */
node = rbtree->root;
*result = NULL;
/* While there are children... */
while (node != LDNS_RBTREE_NULL) {
r = rbtree->cmp(key, node->key);
if (r == 0) {
/*... | false | false | false | false | false | 0 |
checkRequest(conn, majorp, minorp, arglenp)
IMConnection *conn;
int *majorp;
int *minorp;
int *arglenp;
{
IMBuffer *ibp = IM_INBUF(conn);
int len;
/* check if there is enough data for the request header */
if (IMBUFLEN(ibp) < 4) return 0;
#ifdef XIM_BC
if (conn->has_length_bug) {
len = (int)IMGet... | false | false | false | false | false | 0 |
put4lsb(U8* rcode, int n, int& o, U32 x) {
for (int k=0; k<4; ++k) {
if (o<n) rcode[o]=(x>>(k*8))&255;
++o;
}
} | false | false | false | false | false | 0 |
HDBFlags2int(HDBFlags f)
{
unsigned r = 0;
if(f.initial) r |= (1U << 0);
if(f.forwardable) r |= (1U << 1);
if(f.proxiable) r |= (1U << 2);
if(f.renewable) r |= (1U << 3);
if(f.postdate) r |= (1U << 4);
if(f.server) r |= (1U << 5);
if(f.client) r |= (1U << 6);
if(f.invalid) r |= (1U << 7);
if(f.require_preauth) r |= (1U... | false | false | false | false | false | 0 |
handle_exit(char *params)
{
/* Only one exit per block. */
if(sawExit) {
return -1;
}
/* Exit takes a positive integer parameter */
int n; // Store the exit parameter
char delimiter = '\0'; // Must be space or '\0'
if(params == NULL || sscanf(params, "%d%c", &... | false | false | false | false | false | 0 |
mmc_test_seq_perf(struct mmc_test_card *test, int write,
unsigned int tot_sz, int max_scatter)
{
struct mmc_test_area *t = &test->area;
unsigned int dev_addr, i, cnt, sz, ssz;
struct timespec ts1, ts2;
int ret;
sz = t->max_tfr;
/*
* In the case of a maximally scattered transfer, the maximum transfer
... | false | false | false | false | false | 0 |
Cudd_bddInterval(
DdManager * dd /* DD manager */,
int N /* number of x variables */,
DdNode ** x /* array of x variables */,
unsigned int lowerB /* lower bound */,
unsigned int upperB /* upper bound */)
{
DdNode *one, *zero;
DdNode *r, *rl, *ru;
int i;
one = DD_ONE(dd);
zero = Cudd_... | false | false | false | false | false | 0 |
jbd2_journal_errno(journal_t *journal)
{
int err;
read_lock(&journal->j_state_lock);
if (journal->j_flags & JBD2_ABORT)
err = -EROFS;
else
err = journal->j_errno;
read_unlock(&journal->j_state_lock);
return err;
} | false | false | false | false | false | 0 |
genericDebug(Flags flag, QString str)
{
unsigned long bit = 1 << flag;
if ((bit & debugMask) != 0)
qDebug("%s %-8.8s %s", QTime::currentTime().toString("hh:mm:ss:zzz").latin1(),
flagName (flag).latin1(),
str.latin1());
} | false | false | false | false | false | 0 |
iwl_mvm_tdls_ch_switch_work(struct work_struct *work)
{
struct iwl_mvm *mvm;
struct ieee80211_sta *sta;
struct iwl_mvm_sta *mvmsta;
struct ieee80211_vif *vif;
unsigned int delay;
int ret;
mvm = container_of(work, struct iwl_mvm, tdls_cs.dwork.work);
mutex_lock(&mvm->mutex);
/* called after an active channel ... | false | false | false | false | false | 0 |
tps65912_probe(struct platform_device *pdev)
{
struct tps65912 *tps65912 = dev_get_drvdata(pdev->dev.parent);
struct regulator_config config = { };
struct tps_info *info;
struct regulator_init_data *reg_data;
struct regulator_dev *rdev;
struct tps65912_reg *pmic;
struct tps65912_board *pmic_plat_data;
int i;
... | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__sys__RSearchString(char * buffer, char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord)
{
if(buffer && subStr)
{
int subLen = strlen(subStr);
char * ptr1 = buffer + maxLen - subLen;
char * ptr2 = buffer + maxLen - subLen - 1;
int (* strcompare)(const char *, const char *, u... | false | false | false | false | true | 1 |
ContinueConnect()
{
LogMessage(__TFILE__, __LINE__, this, Debug_Verbose, _T("CHttpControlSocket::ContinueConnect() m_pEngine=%p"), m_pEngine);
if (GetCurrentCommandId() != cmd_connect ||
!m_pCurrentServer)
{
LogMessage(Debug_Warning, _T("Invalid context for call to ContinueConnect(), cmd=%d, m_pCurrentServer=%p"... | false | false | false | false | false | 0 |
SuffTransFind(const char *name)
{
LstNode *ln;
LST_FOREACH(ln, &transforms) {
if (strcmp(name, ((const GNode *)Lst_Datum(ln))->name) == 0)
return (Lst_Datum(ln));
}
return (NULL);
} | false | false | false | false | false | 0 |
TemplateParametersInDeclaration(
const Token * tok,
std::vector<const Token *> & typeParametersInDeclaration)
{
typeParametersInDeclaration.clear();
for (; tok && tok->str() != ">"; tok = tok->next()) {
if (Token::Match(tok, "%var% ,|>"))
typeParametersInDeclaration.push_back(tok);
... | false | false | false | false | false | 0 |
intif_parse_MailDeleteRes(int fd)
{
struct map_session_data *sd = map_id2sd(RFIFOL(fd,2));
if(sd)
clif_deletemail_res(sd->fd,RFIFOL(fd,6),RFIFOB(fd,10));
return 0;
} | false | false | false | false | false | 0 |
radix_tree_last(struct radix_tree *tree, struct radix_tree_node *node,
int level)
{
while (level < level_count(tree)) {
int i;
for (i = slot_count(tree) - 1; i >= 0; i--)
if (node->slots[i] != NULL)
break;
if (i < 0)
return NULL;
node = node->slots[i];
level++;
}
return node;
} | false | false | false | false | false | 0 |
denormalize_positions(double *x0, double *x1, double *x2)
{
int i;
/* x*[0] = ecliptic longitude, x*[12] = rectascension */
for (i = 0; i <= 12; i += 12) {
if (x1[i] - x0[i] < -180)
x0[i] -= 360;
if (x1[i] - x0[i] > 180)
x0[i] += 360;
if (x1[i] - x2[i] < -180)
x2[i] -= 360;
if (... | false | false | false | false | false | 0 |
what_owner_is_waiting_for(struct file_lock *block_fl)
{
struct file_lock *fl;
hash_for_each_possible(blocked_hash, fl, fl_link, posix_owner_key(block_fl)) {
if (posix_same_owner(fl, block_fl))
return fl->fl_next;
}
return NULL;
} | false | false | false | false | false | 0 |
evd_service_listen (EvdService *self,
const gchar *address,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
EvdSocket *socket;
GSimpleAsyncResult *res;
g_return_if_f... | false | false | false | false | false | 0 |
symbol_lookup(const_String_or_char_ptr name, Symtab *symtab, int (*check) (Node *n)) {
Node *n = 0;
if (DohCheck(name)) {
n = _symbol_lookup(name, symtab, check);
} else {
String *sname = NewString(name);
n = _symbol_lookup(sname, symtab, check);
Delete(sname);
}
return n;
} | false | false | false | false | false | 0 |
ar_style_set_enable_animations (ArStyle *style,
gboolean enable)
{
ArStylePrivate *priv = style->priv;
enable = enable != FALSE;
if (priv->enable_animations == enable)
return;
priv->enable_animations = enable;
g_object_notify (G_OBJECT (style), AR_STYLE_PROP_ENABLE_ANIMAT... | false | false | false | false | false | 0 |
_register_divider(struct device *dev, const char *name,
const char *parent_name, unsigned long flags,
void __iomem *reg, u8 shift, u8 width,
u8 clk_divider_flags, const struct clk_div_table *table,
spinlock_t *lock)
{
struct clk_divider *div;
struct clk *clk;
struct clk_init_data init;
if (clk_divider_flag... | false | false | false | false | false | 0 |
_add_assocs(slurmdbd_conn_t *slurmdbd_conn,
Buf in_buffer, Buf *out_buffer, uint32_t *uid)
{
int rc = SLURM_SUCCESS;
dbd_list_msg_t *get_msg = NULL;
char *comment = NULL;
debug2("DBD_ADD_ASSOCS: called");
if (slurmdbd_unpack_list_msg(&get_msg, slurmdbd_conn->rpc_version,
DBD_ADD_ASSOCS, in_buff... | false | false | false | false | false | 0 |
eet_data_image_encode_cipher(const void *data,
const char *cipher_key,
unsigned int w,
unsigned int h,
int alpha,
int comp,
in... | false | false | false | false | false | 0 |
bessel_I0(double x)
{ /* modified Bessel function of the first kind */
double ax, ans;
double y;
if ((ax = fabs(x)) < 3.75) {
y = x / 3.75;
y *= y;
ans = 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492 + y * (0.2659732 + y * (0.360768e-01 + y * 0.45813e-02)))));
} else {
y = 3.75 / ax... | false | false | false | false | false | 0 |
dump_stringtable(const stringtable_t *stt)
{
int i;
for(; stt; stt = stt->next)
{
printf("{\n");
dump_memopt(stt->memopt);
dump_lvc(&(stt->lvc));
for(i = 0; i < stt->nentries; i++)
{
printf("Id=%-5d (%d) ", stt->idbase+i, stt->entries[i].id);
if(stt->entries[i].str)
print_string(stt->entries[i].s... | false | false | false | false | false | 0 |
pickUp(const bool force_sticky /*= false*/)
{
// check if we're already picked up or if dragging is disabled.
if (d_pickedUp || !d_draggingEnabled)
return true;
// see if we need to force sticky mode switch
if (!d_stickyMode && force_sticky)
setStickyModeEnabled(true);
// can only ... | false | false | false | false | false | 0 |
Ratio(float a, int b)
{
if (b != 0)
return a / (float) b;
else
return 0;
} | false | false | false | false | false | 0 |
radeon_dp_mst_set_be_cntl(struct radeon_encoder *primary,
struct radeon_encoder_mst *mst_enc,
enum radeon_hpd_id hpd, bool enable)
{
struct drm_device *dev = primary->base.dev;
struct radeon_device *rdev = dev->dev_private;
uint32_t reg;
int retries = 0;
uint32_t temp;
reg = RREG32(NI_DIG_BE_CN... | false | false | false | false | false | 0 |
attrcurse() /* remove a random INTRINSIC ability */
{
switch(rnd(11)) {
case 1 : if (HFire_resistance & INTRINSIC) {
HFire_resistance &= ~INTRINSIC;
You_feel("warmer.");
break;
}
case 2 : if (HTeleportation & INTRINSIC) {
HTeleportation &= ~INTRINSIC;
You_feel("less jumpy.");
break;
}
case 3... | false | false | false | false | false | 0 |
_e2_option_tree_cell_pixbuf_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tree_column), "column"));
gchar *icon;
gtk_tree_model_get (model, iter, column, &icon, -1);
#ifdef E2_IMA... | false | false | false | false | false | 0 |
gst_rtp_ac3_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
{
gboolean res;
gint rate;
GstStructure *structure;
structure = gst_caps_get_structure (caps, 0);
if (!gst_structure_get_int (structure, "rate", &rate))
rate = 90000; /* default */
gst_basertppayload_set_options (payl... | false | false | false | false | false | 0 |
bitmap_checkpage(struct bitmap_counts *bitmap,
unsigned long page, int create)
__releases(bitmap->lock)
__acquires(bitmap->lock)
{
unsigned char *mappage;
if (page >= bitmap->pages) {
/* This can happen if bitmap_start_sync goes beyond
* End-of-device while looking for a whole page.
* It is harmless.
... | false | false | false | false | false | 0 |
ubifs_budget_space(struct ubifs_info *c, struct ubifs_budget_req *req)
{
int err, idx_growth, data_growth, dd_growth, retried = 0;
ubifs_assert(req->new_page <= 1);
ubifs_assert(req->dirtied_page <= 1);
ubifs_assert(req->new_dent <= 1);
ubifs_assert(req->mod_dent <= 1);
ubifs_assert(req->new_ino <= 1);
ubifs_as... | false | false | false | false | false | 0 |
set_status (uae_u8 status, int quick)
{
scsidelay_irq = quick <= 2 ? 2 : quick;
scsidelay_status = status;
} | false | false | false | false | false | 0 |
initFromAPInt(const APInt& api, bool isIEEE)
{
if (api.getBitWidth() == 16)
return initFromHalfAPInt(api);
else if (api.getBitWidth() == 32)
return initFromFloatAPInt(api);
else if (api.getBitWidth()==64)
return initFromDoubleAPInt(api);
else if (api.getBitWidth()==80)
return initFromF80LongDoub... | false | false | false | false | false | 0 |
ark3116_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
struct ark3116_private *priv = usb_get_serial_port_data(port);
unsigned char *data = urb->transfer_buffer;
char tty_flag = TTY_NORMAL;
unsigned long flags;
__u32 lsr;
/* update line status */
spin_lock_irqsave(&priv->statu... | false | false | false | false | false | 0 |
GetChildById(uint32_t id)
{
wxMutexLocker lock(m_lock);
for (std::list<CStatTreeItemBase*>::const_iterator it = m_children.begin();
it != m_children.end(); ++it) {
if ((*it)->m_id == id) {
return *it;
}
}
return NULL;
} | false | false | false | false | false | 0 |
dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az,
dReal bx, dReal by, dReal bz)
{
dReal l,k;
dAASSERT (R);
l = dSqrt (ax*ax + ay*ay + az*az);
if (l <= REAL(0.0)) {
dDEBUGMSG ("zero length vector");
return;
}
l = dRecip(l);
ax *= l;
ay *= l;
az *= l;
k = ax*bx + ay*by + az*bz;
bx -... | false | false | false | false | false | 0 |
input_sequence (int *nextchar, char **pointer1, int *length1, char **pointer2a, int *length2a,
char **pointer2b, int *length2b, int *skiplength, FILE *fp, bool possible_fasta_header_p) {
bool eolnp = true;
*pointer1 = &(Firsthalf[0]);
*pointer2a = (char *) NULL;
*length2a = 0;
*pointer2b = (char *) NULL;
... | false | false | false | false | false | 0 |
L9()
{register object *base=vs_base;
register object *sup=base+VM9; VC9
vs_check;
{object V64;
V64=(base[0]);
vs_top=sup;
goto TTL;
TTL:;
base[1]= ((object)VV[3]);
vs_top=(vs_base=base+1)+1;
Lfloat_digits();
return;
}
} | false | false | false | false | false | 0 |
vmw_cmdbuf_res_add(struct vmw_cmdbuf_res_manager *man,
enum vmw_cmdbuf_res_type res_type,
u32 user_key,
struct vmw_resource *res,
struct list_head *list)
{
struct vmw_cmdbuf_res *cres;
int ret;
cres = kzalloc(sizeof(*cres), GFP_KERNEL);
if (unlikely(cres == NULL))
return -ENOM... | false | false | false | false | false | 0 |
toshiba_wmi_init(void)
{
int ret;
if (!wmi_has_guid(WMI_EVENT_GUID) ||
!dmi_check_system(toshiba_wmi_dmi_table))
return -ENODEV;
ret = toshiba_wmi_input_setup();
if (ret) {
pr_err("Failed to setup input device\n");
return ret;
}
pr_info("Toshiba WMI Hotkey Driver\n");
return 0;
} | false | false | false | false | false | 0 |
on_save ()
{
const char* description = entry->text_char ();
int pos = image_list->get_selected_position ();
gamedata::save (pos, description, gametime);
gamedata *gdata = gamedata::get_saved_game (pos);
// save sucessful --> save preview
if (gdata != NULL)
{
string filepath = gdata... | false | false | false | false | false | 0 |
WriteObjectRuleFiles(cmSourceFile& source)
{
// Identify the language of the source file.
const char* lang = this->LocalGenerator->GetSourceFileLanguage(source);
if(!lang)
{
// don't know anything about this file so skip it
return;
}
// Get the full path name of the object file.
std::string c... | false | false | false | false | false | 0 |
SDfileinfo(int32 fid, /* IN: file ID */
int32 *datasets,/* OUT: number of datasets in the file */
int32 *attrs /* OUT: number of global attributes */)
{
NC *handle = NULL;
intn ret_value = SUCCEED;
#ifdef SDDEBUG
fprintf(stderr, "SDnumber: I've been called\n");
#endif
... | false | false | false | false | false | 0 |
pcie_set_readrq(struct pci_dev *dev, int rq)
{
u16 v;
if (rq < 128 || rq > 4096 || !is_power_of_2(rq))
return -EINVAL;
/*
* If using the "performance" PCIe config, we clamp the
* read rq size to the max packet size to prevent the
* host bridge generating requests larger than we can
* cope with
*/
if (... | false | false | false | false | false | 0 |
evalArg(int n) const
{
SeVec3d arg;
const SeExprNode* child = SeExprNode::child(n);
child->eval(arg);
if (!child->isVec()) arg[1] = arg[2] = arg[0];
return arg;
} | false | false | false | false | false | 0 |
get_pov_vibration()
{
gchar *temp=NULL;
gchar *tempold=NULL;
gchar *t=NULL;
gint m = rowSelected;
gint j;
gdouble x0, y0, z0;
gdouble x1, y1, z1;
if(!ShowVibration || m<0) return g_strdup( " ");
temp = g_strdup( "// Vibration arrows \n");
for(j=0;j<Ncenters;j++)
{
if(
vibration.mod... | false | false | false | false | false | 0 |
drawArrowAnnotations(QPaintEvent* event)
{
QString annotation = m_board.arrowAnnotation();
if(!annotation.isEmpty() && !annotation.isNull())
{
QStringList list = annotation.split(",");
for(QStringList::Iterator it = list.begin(); it != list.end(); it++)
{
if(*it != "")
... | false | false | false | false | false | 0 |
xfs_attr3_rmt_hdr_set(
struct xfs_mount *mp,
void *ptr,
xfs_ino_t ino,
uint32_t offset,
uint32_t size,
xfs_daddr_t bno)
{
struct xfs_attr3_rmt_hdr *rmt = ptr;
if (!xfs_sb_version_hascrc(&mp->m_sb))
return 0;
rmt->rm_magic = cpu_to_be32(XFS_ATTR3_RMT_MAGIC);
rmt->rm_offset = cpu_to_be32(offset);
rmt... | false | false | false | false | false | 0 |
vxge_hw_ring_replenish(struct __vxge_hw_ring *ring)
{
void *rxd;
struct __vxge_hw_channel *channel;
enum vxge_hw_status status = VXGE_HW_OK;
channel = &ring->channel;
while (vxge_hw_channel_dtr_count(channel) > 0) {
status = vxge_hw_ring_rxd_reserve(ring, &rxd);
vxge_assert(status == VXGE_HW_OK);
if (ri... | false | false | false | false | false | 0 |
getNewValueJumpOpcode(MachineInstr *MI, int reg,
bool secondRegNewified,
MachineBasicBlock *jmpTarget,
const MachineBranchProbabilityInfo
*MBPI) {
bool taken = false;... | false | false | false | false | false | 0 |
numbered_arg_compare (const void *p1, const void *p2)
{
/* Subtract 1, because argument number 0 can only occur through overflow. */
unsigned int n1 = ((const struct numbered_arg *) p1)->number - 1;
unsigned int n2 = ((const struct numbered_arg *) p2)->number - 1;
return (n1 > n2 ? 1 : n1 < n2 ? -1 : 0);
} | false | false | false | false | false | 0 |
babel_multi_complete(char **args, char *todir, int argc)
{
char buffer[TREATY_MINIMUM_EXTENT+10];
char b2[TREATY_MINIMUM_EXTENT];
char cwd[512];
char *ep, *md;
FILE *f;
if (argc!=2)
{
fprintf(stderr,"Invalid usage\n");
return;
}
if (!babel_init(args[0]))
{
fprintf(stderr,"Error: Could not... | false | false | false | false | true | 1 |
QuantizeCoordinatesLike(vtkSurface *Mesh)
{
int i;
double p[3];
Mesh->GetScalingFactors(this->Factor,this->Tx,this->Ty,this->Tz);
for (i=0;i<this->GetNumberOfPoints();i++)
{
this->Points->GetPoint(i,p);
p[0] = floor( (p[0]-Tx) * Factor + 0.5 );
p[1] = floor( (p[1]-Ty) * Factor + 0.5 );
p[2] = floor( (p[2]-... | false | false | false | false | false | 0 |
toDouble (char *str)
{
if (str [0] == 0)
return 0;
char *ptr;
return strtod (str, &ptr);
} | false | false | false | false | false | 0 |
fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
void *rp_arg)
{
struct fc_rport_priv *rdata = rp_arg;
struct fc_lport *lport = rdata->local_port;
struct fc_els_flogi *flogi;
unsigned int r_a_tov;
FC_RPORT_DBG(rdata, "Received a FLOGI %s\n", fc_els_resp_type(fp));
if (fp == ERR_PTR(-FC_EX_CLOSED)... | false | false | false | false | false | 0 |
load_config_data(git_repository *repo, const git_config *config)
{
int is_bare;
/* Try to figure out if it's bare, default to non-bare if it's not set */
if (git_config_get_bool(&is_bare, config, "core.bare") < 0)
repo->is_bare = 0;
else
repo->is_bare = is_bare;
return 0;
} | false | false | false | false | false | 0 |
EV_DoFloorAndCeiling(line_t * line, byte * args, boolean raise)
{
boolean floor, ceiling;
int secnum;
sector_t *sec;
if (raise)
{
floor = EV_DoFloor(line, args, FLEV_RAISEFLOORBYVALUE);
secnum = -1;
while ((secnum = P_FindSectorFromTag(args[0], secnum)) >= 0)
{
... | false | false | false | false | false | 0 |
find_r(){
if (R_BIAS)
return find_r(R_PROB);
else if(R_LIMIT && R_RAND) {
int count = 1;
int r = rand() % 2;
while(r != 1 ){
count++;
r = rand() % 2;
}
return count;
}
else if(R_LIMIT)
return R_DISTANCE;
else
return 0;
} | false | false | false | false | false | 0 |
slcan_transmit(struct work_struct *work)
{
struct slcan *sl = container_of(work, struct slcan, tx_work);
int actual;
spin_lock_bh(&sl->lock);
/* First make sure we're connected. */
if (!sl->tty || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) {
spin_unlock_bh(&sl->lock);
return;
}
if (sl->xleft <= 0... | false | false | false | false | false | 0 |
write_hatch(Node& out, int h, int color)
{
ostringstream name;
name << "Hatch_" << hatches[h].style << '_'
<< hatches[h].angle << '_' << hatches[h].density
<< '_' << color+1;
hatch_color hc( hatches[h], color );
if( written_hatches.find(hc) == written_hatche... | false | false | false | false | false | 0 |
workbook_sheet_state_new (const Workbook *wb)
{
int i;
WorkbookSheetState *wss = g_new (WorkbookSheetState, 1);
wss->properties = go_object_properties_collect (G_OBJECT (wb));
wss->n_sheets = workbook_sheet_count (wb);
wss->sheets = g_new (WorkbookSheetStateSheet, wss->n_sheets);
for (i = 0; i < wss->n_sheets; i... | false | false | false | false | false | 0 |
TransmissionActive()
{
GtkTreeModel *model;
GtkTreeIter iter;
gpointer data;
data = NULL;
model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "trans-model"));
if (gtk_tree_model_get_iter_first(model, &iter)) {
do {
gtk_tree_model_g... | false | false | false | false | false | 0 |
kcm_ccache_refresh(krb5_context context,
kcm_ccache ccache,
krb5_creds **credp)
{
krb5_error_code ret;
krb5_creds in, *out;
krb5_kdc_flags flags;
krb5_const_realm realm;
krb5_ccache_data ccdata;
const char *estr;
memset(&in, 0, sizeof(in));
KCM_ASSERT_VALID(ccache);
if (... | false | false | false | false | false | 0 |
parse_values(const char *s, struct value **values)
{
const struct value *value;
int n;
scan_values(s);
if (yyparse())
return -1;
*values = var_value_list;
n = 0;
for (value = var_value_list; value; value = value->next)
n++;
return n;
} | false | false | false | false | false | 0 |
fnv_zhash(ZVALUE z, QCKHASH val)
{
LEN n;
HALF *hp;
#if BASEB == 16
FULL f;
#endif
/*
* hash the sign
*/
val += V_NUM;
quasi_fnv(z.sign, val);
n = z.len;
hp = z.v;
#if BASEB == 16
while (n > 1) {
f = (FULL) *hp++;
f |= (FULL) *hp++ << BASEB;
quasi_fnv(f, val);
n -= 2;
}
if (n) {
quasi_fnv(*h... | false | false | false | false | false | 0 |
Delete_action(Widget w _is_unused, XEvent *event, String *params,
Cardinal *num_params)
{
action_debug(Delete_action, event, params, num_params);
reset_idle_timer();
if (kybdlock) {
enq_ta(Delete_action, CN, CN);
return;
}
#if defined(X3270_ANSI) /*[*/
if (IN_ANSI) {
net_sendc('\177');
return;
}
#endi... | false | false | false | false | false | 0 |
mock_C_CloseSession (CK_SESSION_HANDLE session)
{
Session *sess;
sess = g_hash_table_lookup (the_sessions, GUINT_TO_POINTER (session));
g_return_val_if_fail (sess != NULL, CKR_SESSION_HANDLE_INVALID);
g_hash_table_remove (the_sessions, GUINT_TO_POINTER (sess));
return CKR_OK;
} | false | false | false | false | false | 0 |
maki_dbus_topic (const gchar* server, const gchar* channel, const gchar* topic, GError** error)
{
makiServer* serv;
makiInstance* inst = maki_instance_get_default();
if ((serv = maki_instance_get_server(inst, server)) != NULL)
{
if (topic[0] != '\0')
{
maki_server_send_printf(serv, "TOPIC %s :%s", channel, ... | false | false | false | false | false | 0 |
Trspi_Hash(UINT32 HashType, UINT32 BufSize, BYTE* Buf, BYTE* Digest)
{
EVP_MD_CTX md_ctx;
unsigned int result_size;
int rv;
switch (HashType) {
case TSS_HASH_SHA1:
rv = EVP_DigestInit(&md_ctx, EVP_sha1());
break;
default:
rv = TSPERR(TSS_E_BAD_PARAMETER);
goto out;
break;
}
if (rv != EVP_SUCC... | false | false | false | false | false | 0 |
output_file_init(struct output_file *out, int block_size,
int64_t len, bool sparse, int chunks, bool crc)
{
int ret;
out->len = len;
out->block_size = block_size;
out->cur_out_ptr = 0ll;
out->chunk_cnt = 0;
out->crc32 = 0;
out->use_crc = crc;
out->zero_buf = calloc(block_size, 1);
if (!out->zero_buf) {
e... | false | false | false | false | true | 1 |
run(const struct init_action *a)
{
pid_t pid;
/* Careful: don't be affected by a signal in vforked child */
sigprocmask_allsigs(SIG_BLOCK);
if (BB_MMU && (a->action_type & ASKFIRST))
pid = fork();
else
pid = vfork();
if (pid < 0)
message(L_LOG | L_CONSOLE, "can't fork");
if (pid) {
sigprocmask_allsigs(S... | false | false | false | false | true | 1 |
PKCS7_content_new(PKCS7 *p7, int type)
{
PKCS7 *ret=NULL;
if ((ret=PKCS7_new()) == NULL) goto err;
if (!PKCS7_set_type(ret,type)) goto err;
if (!PKCS7_set_content(p7,ret)) goto err;
return(1);
err:
if (ret != NULL) PKCS7_free(ret);
return(0);
} | false | false | false | false | false | 0 |
s5p_mfc_clear_cmds(struct s5p_mfc_dev *dev)
{
if (IS_MFCV6_PLUS(dev)) {
/* Zero initialization should be done before RESET.
* Nothing to do here. */
} else {
mfc_write(dev, 0xffffffff, S5P_FIMV_SI_CH0_INST_ID);
mfc_write(dev, 0xffffffff, S5P_FIMV_SI_CH1_INST_ID);
mfc_write(dev, 0, S5P_FIMV_RISC2HOST_CMD);
... | false | false | false | false | false | 0 |
create_loop_tree_node_allocnos (ira_loop_tree_node_t loop_node)
{
if (loop_node->bb != NULL)
create_bb_allocnos (loop_node);
else if (loop_node != ira_loop_tree_root)
{
int i;
edge_iterator ei;
edge e;
VEC (edge, heap) *edges;
ira_assert (current_loops != NULL);
FOR_EACH... | false | false | false | false | false | 0 |
invokeSlot(QObject *object, const QString& slot, QStringList args)
{
QString invokeName = slot;
invokeName = invokeName.mid(invokeName.indexOf('('));
invokeName.prepend(QString::number(QSIGNAL_CODE) + "invoke");
QString slotName = QString::number(QSLOT_CODE) + slot;
connect(this, invokeName.toAscii(), objec... | false | false | false | false | false | 0 |
f_listpop(VALUE *vp)
{
VALUE result;
if ((vp->v_type != V_ADDR) || (vp->v_addr->v_type != V_LIST))
return error_value(E_POP);
if (vp->v_addr->v_subtype & V_NOREALLOC)
return error_value(E_LIST5);
removelistfirst(vp->v_addr->v_list, &result);
return result;
} | false | false | false | false | false | 0 |
pico_usingcolor(void)
{
return(_using_color && pico_hascolor());
} | false | false | false | false | false | 0 |
ath_chanctx_init(struct ath_softc *sc)
{
struct ath_chanctx *ctx;
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ieee80211_supported_band *sband;
struct ieee80211_channel *chan;
int i, j;
sband = &common->sbands[IEEE80211_BAND_2GHZ];
if (!sband->n_channels)
sband = &common->sbands[IEEE80211_BA... | false | false | false | false | false | 0 |
nma_mobile_access_method_get_dns (NMAMobileAccessMethod *method)
{
g_return_val_if_fail (method != NULL, NULL);
return method->dns ? (const gchar **)method->dns->pdata : NULL;
} | false | false | false | false | false | 0 |
SetValue(uint32_t index, Object* value) {
float cast_value = 0;
if (index < static_cast<uint32_t>(length())) {
if (value->IsSmi()) {
int int_value = Smi::cast(value)->value();
cast_value = static_cast<float>(int_value);
} else if (value->IsHeapNumber()) {
double double_value = HeapNumber::... | false | false | false | false | false | 0 |
_GME_VScroll(GGadget *g, GEvent *e) {
if ( e->type==et_controlevent && e->u.control.subtype == et_scrollbarchange ) {
GMatrixEdit *gme = (GMatrixEdit *) g->data;
GME_VScroll(gme,&e->u.control.u.sb);
}
return( true );
} | 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.