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 |
|---|---|---|---|---|---|---|
zoomVector (v2g * vecteur, ZoomFilterFXWrapperData * data, float X, float Y)
{
float vx, vy;
float sq_dist = X * X + Y * Y;
/* sx = (X < 0.0f) ? -1.0f : 1.0f;
sy = (Y < 0.0f) ? -1.0f : 1.0f;
*/
float coefVitesse = (1.0f + data->general_speed) / 50.0f;
// Effects
/* Centralized FX */
switch ... | false | false | false | false | false | 0 |
pass_loggedin_set(struct entry *ent, const char *param, const char *val)
{
int res;
struct pass_session *fts;
struct statefile *sf = (struct statefile *) av_namespace_get(ent);
struct pass_session *passd = (struct pass_session *) sf->data;
AV_LOCK(pass_lock);
fts = pass_find_session(passd, para... | false | false | false | false | false | 0 |
morguemon(void)
{
int i = rn2(100), hd = rn2(level_difficulty());
if(hd > 10 && i < 10)
return ((Inhell || In_endgame(&u.uz)) ? mkclass(S_DEMON,0) :
&mons[ndemon(A_NONE)]);
if(hd > 8 && i > 85)
return mkclass(S_VAMPIRE,0);
return((i < 20) ? &mons[PM_GHOST]
... | false | false | false | false | false | 0 |
setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key,
unsigned int keylen)
{
struct ablkcipher_alg *cipher = crypto_ablkcipher_alg(tfm);
unsigned long alignmask = crypto_ablkcipher_alignmask(tfm);
int ret;
u8 *buffer, *alignbuffer;
unsigned long absize;
absize = keylen + alignmask;
buffer = kmal... | false | true | false | false | false | 1 |
writeUnaryNeg(int etype) {
writeTEXT("pop eax");
stringstream s;
if(etype == TIPO_REAL) {
s << "xor eax ,0x80000000";
} else {
s << "neg eax";
}
writeTEXT(s.str());
writeTEXT("push eax");
} | false | false | false | false | false | 0 |
snd_cs4281_create(struct snd_card *card,
struct pci_dev *pci,
struct cs4281 **rchip,
int dual_codec)
{
struct cs4281 *chip;
unsigned int tmp;
int err;
static struct snd_device_ops ops = {
.dev_free = snd_cs4281_dev_free,
};
*rchip = NULL;
if ((err = pci_enable_device(pci)) < 0)
retur... | false | false | false | false | false | 0 |
getAttributeSegmentRange(ocw, canvas, attr, leftp, rightp)
OverTheSpotConversionWidget ocw;
TextCanvas *canvas;
int attr;
Position *leftp;
Position *rightp;
{
int nsegs = ocw->overthespot.numsegments;
DisplaySegment *dseg = ocw->overthespot.dispsegments;
DisplayFragment *dfp;
Position left, right;
... | false | false | false | false | false | 0 |
process_net_sending(struct request *req)
{
if (req->handler) {
req->handler->main(req);
} else {
write(req->net_fd, req->response.status.str, req->response.status.len);
req_del(req->net_fd);
}
} | false | false | false | false | false | 0 |
userdb_dump (void)
{
int fd;
char path[_POSIX_PATH_MAX], tmppath[_POSIX_PATH_MAX];
struct stat stat;
log_message_level(LOG_LEVEL_SERVER, "userdb_dump: dumping user database");
snprintf(tmppath, sizeof(tmppath), "%s/users.tmp", global.varDir);
if((fd = open(tmppath, O_WRONLY | O_CREAT, S... | true | true | false | false | true | 1 |
CSocket_stream_lof(GB_STREAM *stream, int64_t *len)
{
void *_object = stream->tag;
int bytes;
*len=0;
if (!THIS) return -1;
if (ioctl(SOCKET->socket,FIONREAD,&bytes))
{
CSocket_stream_internal_error(THIS, NET_CANNOT_READ, FALSE);
return -1;
}
*len=bytes;
return 0;
} | false | false | false | false | false | 0 |
mca_scoll_base_group_unselect(struct oshmem_group_t * group)
{
/*
* scoll close() is called before group destructors, so
* do close group collectives if scoll modules are no longer
* valid
*
* there is a memory leak here, because not doing close means
* that we leaving object with dan... | false | false | false | false | false | 0 |
gda_data_model_iter_get_holder_for_field (GdaDataModelIter *iter, gint col)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_ITER (iter), NULL);
g_return_val_if_fail (iter->priv, NULL);
return gda_set_get_nth_holder ((GdaSet *) iter, col);
} | false | false | false | false | false | 0 |
getInlinedChainForAddress(
const DWARFUnit *U, const uint64_t Address) const {
DWARFDebugInfoEntryInlinedChain InlinedChain;
InlinedChain.U = U;
if (isNULL())
return InlinedChain;
for (const DWARFDebugInfoEntryMinimal *DIE = this; DIE; ) {
// Append current DIE to inlined chain only if it has correc... | false | false | false | false | false | 0 |
columnRect( const QwtIntervalSample &sample,
const QwtScaleMap &xMap, const QwtScaleMap &yMap ) const
{
QwtColumnRect rect;
const QwtInterval &iv = sample.interval;
if ( !iv.isValid() )
return rect;
if ( orientation() == Qt::Horizontal )
{
const double x0 = xMap.transform( base... | false | false | false | false | false | 0 |
GREEDY_compute_mapping(flexsched_solution_t flex_soln,
int (*pick_node)(flexsched_solution_t, int), int *sortmap)
{
int i, j;
int job, node;
for (i = 0; i < flex_soln->prob->num_jobs; i++) {
job = sortmap[i];
node = pick_node(flex_soln, job);
if (-1 == node) return;
... | false | false | false | false | false | 0 |
Fmethod_xnsetter(CTX ctx, ksfp_t *sfp _RIX)
{
kMethod *mtd = sfp[K_MTDIDX].mtdNC;
ksymbol_t fn = DP(mtd)->delta;
kString *n = knh_getFieldName(ctx, fn);
kDictMap *m = knh_Object_getXData(ctx, sfp[0].o);
ktype_t p1 = knh_Param_get(DP(mtd)->mp, 0)->type;
knh_DictMap_set(ctx, m, n, new_Boxing(ctx, sfp+1, ClassTBL(... | false | false | false | false | false | 0 |
append(const QString& item)
{
if(size())
{
if(m_unique)
{
remove(item);
}
if(count() == size())
{
m_data.pop_back();
}
m_data.prepend(item);
}
} | false | false | false | false | false | 0 |
SetPrimaryOutputName(const DataObjectIdentifierType & key)
{
if( key != this->m_IndexedOutputs[0]->first )
{
DataObjectPointerMap::value_type p(key, DataObjectPointer() );
// note: insert will not change value if it's already there.
DataObjectPointerMap::iterator it = this->m_Outputs.insert( p ).fir... | false | false | false | false | false | 0 |
get_slot(void)
{
skip_alloc_t *new_p;
int level_n, slot_size;
void *admin_mem;
/* generate the level for our new slot */
level_n = random_level(MAX_SKIP_LEVEL);
slot_size = SKIP_SLOT_SIZE(level_n);
/* get an extry from the free list */
new_p = entry_free_list[level_n];
if (new_p != NULL) {
... | false | false | false | false | false | 0 |
qat_hal_clear_gpr(struct icp_qat_fw_loader_handle *handle)
{
unsigned char ae;
unsigned int ctx_mask = ICP_QAT_UCLO_AE_ALL_CTX;
int times = MAX_RETRY_TIMES;
unsigned int csr_val = 0;
unsigned short reg;
unsigned int savctx = 0;
int ret = 0;
for (ae = 0; ae < handle->hal_handle->ae_max_num; ae++) {
if (!(hand... | false | false | false | false | false | 0 |
rtw_set_802_11_disassociate(struct adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, _FW_LINKED)) {
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
rtw... | false | false | false | false | false | 0 |
esp_write_tgt_config3(struct esp *esp, int tgt)
{
if (esp->rev > ESP100A) {
u8 val = esp->target[tgt].esp_config3;
if (val != esp->prev_cfg3) {
esp->prev_cfg3 = val;
esp_write8(val, ESP_CFG3);
}
}
} | false | false | false | false | false | 0 |
acm_port_dtr_rts(struct tty_port *port, int raise)
{
struct acm *acm = container_of(port, struct acm, port);
int val;
int res;
if (raise)
val = ACM_CTRL_DTR | ACM_CTRL_RTS;
else
val = 0;
/* FIXME: add missing ctrlout locking throughout driver */
acm->ctrlout = val;
res = acm_set_control(acm, val);
if (r... | false | false | false | false | false | 0 |
ring_clearto(Ring *ring)
{
if (!ring_empty(ring))
ring->clearto = ring->supply;
else
ring->clearto = 0;
} | false | false | false | false | false | 0 |
copy(int i, int j, int delflag)
{
int tmp = atom->nextra_grow;
atom->nextra_grow = 0;
for (int k = 0; k < nstyles; k++) styles[k]->copy(i,j,delflag);
atom->nextra_grow = tmp;
if (atom->nextra_grow)
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
modify->fix[atom->extra_grow[iextra]]->cop... | false | false | false | false | false | 0 |
source_extension_notify (GObject *object,
GParamSpec *pspec)
{
ESource *source;
ESourceExtension *extension;
extension = E_SOURCE_EXTENSION (object);
source = e_source_extension_ref_source (extension);
g_return_if_fail (source != NULL);
if ((pspec->flags & E_SOURCE_PARAM_SETTING) != 0)
... | false | false | false | false | false | 0 |
jfs_ci_revalidate(struct dentry *dentry, unsigned int flags)
{
/*
* This is not negative dentry. Always valid.
*
* Note, rename() to existing directory entry will have ->d_inode,
* and will use existing name which isn't specified name by user.
*
* We may be able to drop this positive dentry here. But dropp... | false | false | false | false | false | 0 |
get_bg0_tile_info(int tile_index)
{
int data = videoram16[tile_index];
int code;
if (videoflags & 0x0400) code = (data & 0x0fff) | 0x2000;
else code = (data & 0x1fff);
SET_TILE_INFO(
0,
code,
((videoflags & 0x0010) >> 1) | ((data >> 13) & 7),
0)
} | false | false | false | false | false | 0 |
qexp_matches (Bonobo_ServerInfo * si, QueryExpr * e, QueryContext * qctx)
{
QueryExprConst res;
gboolean retval;
res = qexp_evaluate (si, e, qctx);
retval = qexp_constant_bool (&res);
qexp_constant_unuse (res);
return retval;
} | false | false | false | false | false | 0 |
ftrace_location_range(unsigned long start, unsigned long end)
{
struct ftrace_page *pg;
struct dyn_ftrace *rec;
struct dyn_ftrace key;
key.ip = start;
key.flags = end; /* overload flags, as it is unsigned long */
for (pg = ftrace_pages_start; pg; pg = pg->next) {
if (end < pg->records[0].ip ||
start >= ... | false | false | false | false | false | 0 |
alloc_ele()
{
pfq_ele *ele;
/* if we have nothing in the free list, allocate more elements */
if (free_ == 0)
{
pfq_page *pg;
size_t i;
/* allocate another page */
pg = (pfq_page *)t3malloc(sizeof(pfq_page));
... | false | false | false | false | false | 0 |
monetary_startup (struct linereader *lr, struct localedef_t *locale,
int ignore_content)
{
if (!ignore_content)
{
struct locale_monetary_t *monetary;
locale->categories[LC_MONETARY].monetary = monetary =
(struct locale_monetary_t *) xmalloc (sizeof (*monetary));
memset (monetary, '\0', si... | false | false | false | false | false | 0 |
graph_add_commit(struct graph *graph, struct graph_canvas *canvas,
const char *id, const char *parents, bool is_boundary)
{
graph->position = graph_find_column_by_id(&graph->row, id);
graph->id = id;
graph->canvas = canvas;
graph->is_boundary = is_boundary;
while ((parents = strchr(parents, ' '))) {
parents+... | false | false | false | false | false | 0 |
parse_def_output_filter(struct line_parser *lp, struct fttag *fttag)
{
char *c;
if (!lp->cur_def_term) {
fterr_warnx("%s line %d: Must start term.", lp->fname, lp->lineno);
return -1;
}
NEXT_WORD(&lp->buf, c);
if (!c) {
fterr_warnx("%s line %d: Expecting filter list.", lp->fname, lp->lineno);
... | false | false | false | false | false | 0 |
nv04_gr_mthd_bind_surf2d(struct nvkm_device *device, u32 inst, u32 data)
{
switch (nv04_gr_mthd_bind_class(device, data)) {
case 0x30:
nv04_gr_set_ctx1(device, inst, 0x00004000, 0);
nv04_gr_set_ctx_val(device, inst, 0x02000000, 0);
return true;
case 0x42:
nv04_gr_set_ctx1(device, inst, 0x00004000, 0);
nv04... | false | false | false | false | false | 0 |
nntp_enter_group(char *reply)
{
char command[512];
long first = 0;
long last = 0;
if (!reply) {
sprintf(command, "GROUP %s\r\n", global.curr_group->name);
reply = server_comm(main_server, command, True);
}
if (!reply || atoi(reply) != NNTP_OK_GROUP)
return reply;
if (sscanf(reply, "%*... | false | false | false | false | false | 0 |
tf_getpchange(int32 nparam)
{
register int32 i, ii;
struct tfarg_t *tfap;
if (__tfrec == NULL) return(bad_notfcontext_err("tf_getpchange"));
ii = __inum;
if (nparam == 0) i = 1; else i = nparam + 1;
for (; i < __tfrec->tfanump1; i++)
{
tfap = &(__tfrec->tfargs[i]);
if (tfap->sav_pvc_flgs[ii] != 0) return... | false | false | false | false | false | 0 |
_inputstr_up(histnop, h, tmp)
int *histnop, h;
char **tmp;
{
keyflush();
#ifndef _NOCOMPLETE
if (completable(h) && selectlist) {
selectfile(tmpfilepos--, NULL);
setcursor(rptr, vptr);
}
else
#endif
#ifdef DEP_ORIGSHELL
if (dumbmode || vptr < maxcol)
#else
if (vptr < maxcol)
#endif
{
if (nohist(h) || !histo... | false | false | false | false | false | 0 |
fiji_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
{
struct fiji_hwmgr *data = (struct fiji_hwmgr *)(hwmgr->backend);
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
uint32_t i;
struct phm_ppt_v1_clock_voltage_dependency_table *dep_sclk_table =
table_info->vd... | false | false | false | false | false | 0 |
undistort_point(const mrpt::utils::TPixelCoordf &p, mrpt::utils::TPixelCoordf &undistorted_p)
{
std::vector<TPixelCoordf> in_p(1), out_p;
in_p[0] = p;
mrpt::vision::pinhole::undistort_points(
in_p,
out_p,
cam.intrinsicParams,
cam.getDistortionParamsAsVector()
);
ASSERT_(out_p.size()==1);
undistorted_p ... | false | false | false | false | false | 0 |
store_bitmask(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
SETUP_STORE_DATA_PARAM(dev, attr);
long reqval;
u8 currval;
if (kstrtol(buf, 10, &reqval))
return -EINVAL;
reqval = clamp_val(reqval, 0, param->mask[0]);
reqval = (reqval & param->mask[0]) << par... | false | false | false | false | false | 0 |
per_read_object_identifier(STREAM* s, uint8 oid[6])
{
uint8 t12;
int length;
uint8 a_oid[6];
boolean status;
per_read_length(s, &length); /* length */
if (length != 5)
return False;
stream_read_uint8(s, t12); /* first two tuples */
a_oid[0] = (t12 >> 4);
a_oid[1] = (t12 & 0x0F);
stream_read_uint8(s, a_o... | false | false | false | false | false | 0 |
vm_hardware_shutdown(vm_instance_t *vm)
{
int i;
if ((vm->status == VM_STATUS_HALTED) || !vm->cpu_group) {
vm_log(vm,"VM","trying to shutdown an inactive VM.\n");
return(-1);
}
vm_log(vm,"VM","shutdown procedure engaged.\n");
/* Mark the VM as halted */
vm->status = VM_STATUS_HALTED;
... | false | false | false | false | false | 0 |
prtcode(int *codes)
{
struct parse_event *p;
for (p = key_events; p->name != NULL; p++) {
if (p->value == (unsigned)codes[1]) {
printf("scancode 0x%04x = %s (0x%02x)\n", codes[0], p->name, codes[1]);
return;
}
}
if (isprint (codes[1]))
printf("scancode 0x%04x = '%c' (0x%02x)\n", codes[0], codes[1], co... | false | false | false | false | false | 0 |
gsf_input_mmap_new (char const *filename, GError **err)
{
#if defined(HAVE_MMAP) || defined(G_OS_WIN32)
GsfInputMemory *mem;
guint8 *buf = NULL;
struct stat st;
int fd;
size_t size;
mem = g_object_new (GSF_INPUT_MEMORY_TYPE, NULL);
fd = g_open (filename, O_RDONLY | O_BINARY, 0);
if (fd < 0 || fstat (fd, &st) ... | false | false | false | false | false | 0 |
mca_coll_ml_need_multi_topo(int bcol_collective)
{
mca_base_component_list_item_t *bcol_cli;
const mca_bcol_base_component_2_0_0_t *bcol_component;
for (bcol_cli = (mca_base_component_list_item_t *)
opal_list_get_first(&mca_bcol_base_components_in_use);
(opal_list_item_t *) bcol_cli !... | false | false | false | false | false | 0 |
gtk_knob_adjustment_changed(GtkAdjustment *adjustment, gpointer data)
{
GtkKnob *knob;
g_return_if_fail(adjustment != NULL);
g_return_if_fail(data != NULL);
knob = GTK_KNOB(data);
knob->old_value = adjustment->value;
gtk_widget_queue_draw (GTK_WIDGET(knob));
} | false | false | false | false | false | 0 |
OnLoaded ()
{
Lock (); // don't destroy when unlinking
if (m_Source) {
m_Source->Unlink (this); // avoids two links
m_Source->Link (this);
}
if (m_SourceAux) {
m_SourceAux->Unlink (this); // avoids two links
m_SourceAux->Link (this);
}
if (m_Target) {
m_Target->Unlink (this); // avoids two links
m_Tar... | false | false | false | false | false | 0 |
VisitContinueStatement(ContinueStatement* stmt) {
Comment cmnt(masm_, "[ ContinueStatement");
SetStatementPosition(stmt);
NestedStatement* current = nesting_stack_;
int stack_depth = 0;
while (!current->IsContinueTarget(stmt->target())) {
stack_depth = current->Exit(stack_depth);
current = current->o... | false | false | false | false | false | 0 |
gxi_update_summary_label (GncXmlImportData *data)
{
gchar *string = NULL;
gboolean show = FALSE;
if (data->n_unassigned)
{
if (data->n_impossible)
{
string = g_strdup_printf (
_("There are %d unassigned and %d undecodable words. "
... | false | false | false | false | false | 0 |
ai_gothere_bodyguard(struct unit *punit, struct tile *dest_tile)
{
struct player *pplayer = unit_owner(punit);
unsigned int danger = 0;
struct city *dcity;
struct unit *guard = aiguard_guard_of(punit);
const struct veteran_level *vlevel;
bool bg_needed = FALSE;
if (is_barbarian(unit_owner(punit))) {
... | false | false | false | false | false | 0 |
unlock_mbox(const gchar *base, gint fd, LockType type)
{
if (type == LOCK_FILE) {
gchar *lockfile;
lockfile = g_strconcat(base, ".lock", NULL);
if (claws_unlink(lockfile) < 0) {
FILE_OP_ERROR(lockfile, "unlink");
g_free(lockfile);
return -1;
}
g_free(lockfile);
return 0;
} else if (type == LOCK... | false | false | false | false | false | 0 |
buildBitSetsFromDisjointSet(
ArrayRef<Metadata *> BitSets, ArrayRef<GlobalObject *> Globals) {
llvm::DenseMap<Metadata *, uint64_t> BitSetIndices;
llvm::DenseMap<GlobalObject *, uint64_t> GlobalIndices;
for (unsigned I = 0; I != BitSets.size(); ++I)
BitSetIndices[BitSets[I]] = I;
for (unsigned I = 0; I ... | false | false | false | false | false | 0 |
elements() const {
return new StringMapEnumeration(lookup_.begin(), lookup_.end());
} | false | false | false | false | false | 0 |
RLP_MarkMissingIF(u8 Ns)
{
u8 i;
for (i = VR; i != Ns; i = Incr(i)) {
if (R[i].State == _idle) R[i].State = _srej; /* bug in spec, fig A.23 */
}
} | false | false | false | false | false | 0 |
open_file(const char *dir, const char *file, char **pfname)
{
char *full_name = make_full_file_name(dir, file);
FILE *fp = fopen(full_name, "r");
if (!fp) {
dico_log(L_ERR, errno, _("cannot open file `%s'"), full_name);
free(full_name);
} else
*pfname = full_name;
return fp;
} | false | false | false | false | false | 0 |
reserved_init(void)
{
if (!stp)
{
stp = symtab_alloc(SIZEOF(table));
for (table_ty *tp = table; tp < ENDOF(table); ++tp)
{
nstring s(tp->name);
stp->assign(s, &tp->token);
}
}
} | false | false | false | false | false | 0 |
event_process_active_single_queue(struct event_base *base,
struct event_list *activeq)
{
struct event *ev;
int count = 0;
EVUTIL_ASSERT(activeq != NULL);
for (ev = TAILQ_FIRST(activeq); ev; ev = TAILQ_FIRST(activeq)) {
if (ev->ev_events & EV_PERSIST)
event_queue_remove(base, ev, EVLIST_ACTIVE);
else
... | false | false | false | false | false | 0 |
registerFactory()
{
if (CEGUI::WindowRendererManager::getSingleton().isFactoryPresent(d_type))
CEGUI::Logger::getSingleton().logEvent(
"Factory for '" + CEGUI::String(d_type) +
"' appears to be already registered, skipping.",
CEGUI::Informative);
else
this->d... | false | false | false | false | false | 0 |
il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
struct il_tx_cmd *tx_cmd, struct sk_buff *skb_frag,
int sta_id)
{
struct ieee80211_key_conf *keyconf = info->control.hw_key;
switch (keyconf->cipher) {
case WLAN_CIPHER_SUITE_CCMP:
tx_cmd->sec_ctl = TX_CMD_SEC_CCM;
... | false | false | false | false | false | 0 |
addPreSched2(PassManagerBase &PM,
CodeGenOpt::Level OptLevel) {
// FIXME: temporarily disabling load / store optimization pass for Thumb1.
if (OptLevel != CodeGenOpt::None) {
if (!Subtarget.isThumb1Only())
PM.add(createARMLoadStoreOptimizationPass());
if (Subtar... | false | false | false | false | false | 0 |
hiface_pcm_stream_start(struct pcm_runtime *rt)
{
int ret = 0;
int i;
if (rt->stream_state == STREAM_DISABLED) {
/* reset panic state when starting a new stream */
rt->panic = false;
/* submit our out urbs zero init */
rt->stream_state = STREAM_STARTING;
for (i = 0; i < PCM_N_URBS; i++) {
memset(rt->... | false | false | false | false | false | 0 |
idma64_slave_config(struct dma_chan *chan,
struct dma_slave_config *config)
{
struct idma64_chan *idma64c = to_idma64_chan(chan);
/* Check if chan will be configured for slave transfers */
if (!is_slave_direction(config->direction))
return -EINVAL;
memcpy(&idma64c->config, config, sizeof(idma64c->config));
... | false | false | false | false | false | 0 |
num_ships_attacking(int target_objnum)
{
object *attacking_objp;
ai_info *attacking_aip;
ship_obj *so;
int count = 0;
int target_team = obj_team(&Objects[target_objnum]);
for ( so = GET_FIRST(&Ship_obj_list); so != END_OF_LIST(&Ship_obj_list); so = GET_NEXT(so) )
{
attacking_objp = &Objects[so->objnum];
if... | false | false | false | false | false | 0 |
parentsig(int sig UNUSED)
{
int i, which, smallest;
if(wholistens < 0) {
which = smallest = -1;
for(i = 0; i < ovdb_conf.numrsprocs; i++) {
if(children[i].pid == -1)
continue;
if(!ovdb_conf.maxrsconn || children[i].num <= ovdb_conf.maxrsconn) {
if(smallest == -1 || children[i].num < smallest) {
... | false | false | false | false | false | 0 |
btrfs_log_new_name(struct btrfs_trans_handle *trans,
struct inode *inode, struct inode *old_dir,
struct dentry *parent)
{
struct btrfs_root * root = BTRFS_I(inode)->root;
/*
* this will force the logging code to walk the dentry chain
* up for the file
*/
if (S_ISREG(inode->i_mode))
BTRFS_I(inode)->las... | false | false | false | false | false | 0 |
formatAll()
{
UT_return_if_fail(m_pDoc);
m_pDoc->enableListUpdates();
fl_SectionLayout* pSL = m_pFirstSection;
clearAllCountWraps();
while (pSL)
{
if(pSL->getContainerType() == FL_CONTAINER_DOCSECTION)
{
fl_DocSectionLayout * pDSL = static_cast<fl_DocSectionLayout *>(pSL);
pDSL->recalculateFields(0);
... | false | false | false | false | false | 0 |
search_cancel_callback (NautilusDirectory *directory,
NautilusDirectoryCallback callback,
gpointer callback_data)
{
NautilusSearchDirectory *search;
SearchCallback *search_callback;
search = NAUTILUS_SEARCH_DIRECTORY (directory);
search_callback = search_callback_find (search, callback, callback_data);
if... | false | false | false | false | false | 0 |
svg_reset_xlink_target(GF_Node *node)
{
SVGAllAttributes all_atts;
gf_svg_flatten_attributes((SVG_Element *)node, &all_atts);
if (all_atts.xlink_href) all_atts.xlink_href->target=NULL;
} | false | false | false | false | false | 0 |
bf_set_connection_option(Var arglist, Byte next, void *vdata, Objid progr)
{ /* (conn, option, value) */
Objid oid = arglist.v.list[1].v.obj;
const char *option = arglist.v.list[2].v.str;
Var value = arglist.v.list[3];
shandle *h = find_shandle(oid);
enum error e = E_NONE;
if (oid != progr &... | false | false | false | false | false | 0 |
ipoib_open ( struct net_device *netdev ) {
struct ipoib_device *ipoib = netdev->priv;
struct ib_device *ibdev = ipoib->ibdev;
struct ipoib_mac *mac = ( ( struct ipoib_mac * ) netdev->ll_addr );
int rc;
/* Open IB device */
if ( ( rc = ib_open ( ibdev ) ) != 0 ) {
DBGC ( ipoib, "IPoIB %p could not open device: ... | false | false | false | false | false | 0 |
e_ews_folder_set_parent_id (EEwsFolder *folder,
EwsFolderId *parent_fid)
{
EEwsFolderPrivate *priv;
g_return_if_fail (E_IS_EWS_FOLDER (folder));
g_return_if_fail (parent_fid != NULL);
priv = folder->priv;
if (priv->parent_fid) {
g_free (priv->parent_fid->id);
g_free (priv->parent... | false | false | false | false | false | 0 |
hpb_dmae_reset(struct hpb_dmae_device *hpbdev)
{
u32 ch;
for (ch = 0; ch < hpbdev->pdata->num_hw_channels; ch++)
hsrstr_write(hpbdev, ch);
} | false | false | false | false | false | 0 |
git__mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset)
{
int mprot = 0;
int mflag = 0;
assert((out != NULL) && (len > 0));
if ((out == NULL) || (len == 0)) {
errno = EINVAL;
return GIT_ERROR;
}
out->data = NULL;
out->len = 0;
if (prot & GIT_PROT_WRITE)
mprot = PROT_WRITE;
... | false | false | false | false | false | 0 |
ngene_init(struct ngene *dev)
{
int i;
tasklet_init(&dev->event_tasklet, event_tasklet, (unsigned long)dev);
memset_io(dev->iomem + 0xc000, 0x00, 0x220);
memset_io(dev->iomem + 0xc400, 0x00, 0x100);
for (i = 0; i < MAX_STREAM; i++) {
dev->channel[i].dev = dev;
dev->channel[i].number = i;
}
dev->fw_interf... | false | false | false | false | false | 0 |
window_print(window_t *w, fstring_t *line) {
if (!w || !line) {
fstring_free(line);
return;
}
if (!line->ts)
line->ts = time(NULL);
query_emit_id(NULL, UI_WINDOW_PRINT, &w, &line); /* XXX */
} | false | false | false | false | false | 0 |
p7_trace_Reverse(P7_TRACE *tr)
{
int z;
int tmp;
float tmpf;
/* For emit-on-transition states N,C,J, traces always obey the
* C-,Cx,Cx,Cx convention even when they were constructed backwards;
* so we make them Cx,Cx,Cx,C- by pulling residues backwards by one,
* just before reversing them. (Othe... | false | false | false | false | false | 0 |
append_bucket(sed_filter_ctxt* ctx, char* buf, int sz)
{
apr_status_t status = APR_SUCCESS;
apr_bucket *b;
if (ctx->tpool == ctx->r->pool) {
/* We are not using transient bucket */
b = apr_bucket_pool_create(buf, sz, ctx->r->pool,
ctx->r->connection->bucket... | false | false | false | false | false | 0 |
gst_task_finalize (GObject * object)
{
GstTask *task = GST_TASK (object);
GstTaskPrivate *priv = task->priv;
GST_DEBUG ("task %p finalize", task);
if (priv->thr_notify)
priv->thr_notify (priv->thr_user_data);
priv->thr_notify = NULL;
priv->thr_user_data = NULL;
gst_object_unref (priv->pool);
/* ... | false | false | false | false | false | 0 |
vmx_mpx_supported(void)
{
return (vmcs_config.vmexit_ctrl & VM_EXIT_CLEAR_BNDCFGS) &&
(vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_BNDCFGS);
} | false | false | false | false | false | 0 |
exponentsSum()const
{
IntegerVector sum(numberOfVariablesInRing());
for(const_iterator i=begin();i!=end();i++)
sum+=i->exponentsSum();
return sum;
} | false | false | false | false | false | 0 |
cert_GetOCSPResponse(PLArenaPool *arena, const char *location,
const SECItem *encodedRequest)
{
char *walkOutput = NULL;
char *fullGetPath = NULL;
size_t pathLength;
PRInt32 urlEncodedBufLength;
size_t base64size;
char b64ReqBuf[max_get_request_size+1];
size_t slashLeng... | false | false | false | false | false | 0 |
locase(unsigned char *dir, unsigned char a)
{
if (a<128 || a==255) return a>='A' && a<='Z' ? a + 0x20 : a;
if (!dir) return a;
return dir[a];
} | false | false | false | false | false | 0 |
getSaveFileNameWId(const KUrl& dir, const QString& filter,
WId parent_id,
const QString& caption, Options options)
{
if (KFileDialogPrivate::isNative()) {
return KFileDialog::getSaveFileName(dir, filter, 0, caption, options); // every... | false | false | false | false | false | 0 |
gst_text_overlay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstCairoTextOverlay *overlay = GST_CAIRO_TEXT_OVERLAY (object);
GST_OBJECT_LOCK (overlay);
switch (prop_id) {
case ARG_TEXT:{
g_free (overlay->default_text);
overlay->default_text = g_... | false | false | false | false | false | 0 |
e_source_backend_summary_setup_set_fields_array (ESourceBackendSummarySetup *extension,
EContactField *fields,
gint n_fields,
gint which)
{
gint i;
GString *string;
gbool... | false | false | false | false | false | 0 |
JNSimpleCompareFunction3(
void *theEnv,
void *theValue,
DATA_OBJECT *theResult)
{
INSTANCE_TYPE *ins1,*ins2;
struct multifieldMarker *theMarks;
struct ObjectCmpJoinSingleSlotVars3 *hack;
int rv;
FIELD f1,f2;
hack = (struct ObjectCmpJoinSingleSlotVars3 *) ValueToBitMap(theValue);
GetPattern... | false | false | false | false | false | 0 |
getPrefix() {
PointerIntPair<Use**, 2, PrevPtrTag> &PotentialPrefix(this[-1].Prev);
if (PotentialPrefix.getOpaqueValue())
return 0;
return reinterpret_cast<Use*>((char*)&PotentialPrefix + 1);
} | false | false | false | false | false | 0 |
write_typelib_interface( const type_t *iface, const typelib_t *typelib )
{
const UUID *typelib_uuid = get_attrp( typelib->attrs, ATTR_UUID );
const UUID *uuid = get_attrp( iface->attrs, ATTR_UUID );
unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION );
if (!uuid) return;
if (!is_object(... | false | false | false | false | false | 0 |
cullEmptyLayers()
{
BackgroundLayer *next;
for (BackgroundLayer *p = this; p; p = next) {
next = p->m_next;
if (next && !next->isBackgroundImageSet() &&
!next->isBackgroundXPositionSet() && !next->isBackgroundYPositionSet() &&
!next->isBackgroundAttachmentSet() && !next->... | false | false | false | false | false | 0 |
usertty_textout(char *txt)
{
if (o_draftlen)
{ /* text from another source came, we need to either */
if (o_strongdraft)
{
o_draftlen=0; /* accept the draft */
if (lastdraft)
lastdraft->last_line[0]=0;
... | false | false | false | false | false | 0 |
create_branch(const char *head,
const char *name, const char *start_name,
int force, int reflog, enum branch_track track)
{
struct ref_lock *lock;
struct commit *commit;
unsigned char sha1[20];
char *real_ref, ref[PATH_MAX], msg[PATH_MAX + 20];
int forcing = 0;
snprintf(ref, sizeof ref, "refs/heads/%s"... | true | true | false | false | false | 1 |
options_parse(int argc, char *argv[])
{
static struct option long_options[]=
{
{ "version", no_argument, NULL, OPT_VERSION},
{ "help", no_argument, NULL, OPT_HELP},
{0, 0, 0, 0},
};
bool opt_version= false;
bool opt_help= false;
int option_index= 0;
while (1)
{
int option_rv= getopt_lo... | false | false | false | false | false | 0 |
IsVBComment(Accessor &styler, int pos, int len) {
return len > 0 && styler[pos] == '\'';
} | false | false | false | false | false | 0 |
gen_peephole2_2877 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands)
{
rtx operand0;
rtx _val = 0;
start_sequence ();
#line 17181 "../../src/gcc/config/i386/i386.md"
{
if (GET_MODE_SIZE (DImode) < GET_MODE_SIZE (SImode))
operands[0] = gen_lowpart (SImode, operands[0]);
}
operand0 = operands[0];
(void) ope... | false | false | false | false | false | 0 |
cb_instance_add_config_callback(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* e2,
int *returncode, char *returntext, void *arg) {
int rc=LDAP_SUCCESS;
cb_backend_instance *inst;
cb_backend *cb=(cb_backend *) arg;
Slapi_Attr *attr = NULL;
Slapi_Value *sva... | false | false | false | false | false | 0 |
OSBase_UnixProcessProviderEnumInstances( CMPIInstanceMI * mi,
const CMPIContext * ctx,
const CMPIResult * rslt,
const CMPIObjectPath * ref,
const char ** properties) {
CMPIInstance * ci = NULL;
CMPIStatus rc = {CMPI_RC_OK, NULL};
struct proces... | false | false | false | false | false | 0 |
xsh_frame_divide_flat( int do_flat, cpl_frame* src,
cpl_frame *mflat, const char* tag, xsh_instrument* instr)
{
cpl_frame *result = NULL;
if ( do_flat == CPL_TRUE){
xsh_msg( "Divide by flat");
check( result = xsh_divide_flat( src, mflat, tag, instr));
}
else{
check( result = cpl_frame_duplicate(... | false | false | false | false | false | 0 |
read_samples(float *inl, float *inr, unsigned frames)
{
unsigned wp = 0;
switch(s_w->format)
{
case AF_MONO8:
{
Sint8 *d = s_w->data.si8;
while(wp < frames)
inl[wp++] = (float)(d[s_rpos++]<<8);
break;
}
case AF_STEREO8:
{
Sint8 *d = s_w->data.si8;
while(wp < frames)
{
inl[wp] = (floa... | false | false | false | false | false | 0 |
asn1PE_H245V76LogicalChannelParameters (OOCTXT* pctxt, H245V76LogicalChannelParameters* pvalue)
{
int stat = ASN_OK;
ASN1BOOL extbit;
/* extension bit */
extbit = 0;
encodeBit (pctxt, extbit);
/* encode hdlcParameters */
stat = asn1PE_H245V76HDLCParameters (pctxt, &pvalue->hdlcParameters);
... | 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.