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 |
|---|---|---|---|---|---|---|
ath6kl_credit_distribute(struct ath6kl_htc_credit_info *cred_info,
struct list_head *ep_dist_list,
enum htc_credit_dist_reason reason)
{
switch (reason) {
case HTC_CREDIT_DIST_SEND_COMPLETE:
ath6kl_credit_update(cred_info, ep_dist_list);
break;
case HTC_CREDIT_DIST_ACTIVITY_CHANGE:
ath6kl_cre... | false | false | false | false | false | 0 |
PyFFGlyph_docompare(PyFF_Glyph *self,PyObject *other,
double pt_err, double spline_err) {
SplineSet *ss2;
int ret;
SplinePoint *badpoint;
if ( PyType_IsSubtype(&PyFF_GlyphType,((PyObject *)other)->ob_type) ) {
SplineChar *sc = self->sc;
SplineChar *sc2 = ((PyFF_Glyph *) other)->sc;
int olayer = ((P... | false | false | false | false | false | 0 |
set_discard_limits(struct cache *cache, struct queue_limits *limits)
{
/*
* FIXME: these limits may be incompatible with the cache device
*/
limits->max_discard_sectors = min_t(sector_t, cache->discard_block_size * 1024,
cache->origin_sectors);
limits->discard_granularity = cache->discard_block_size << ... | false | false | false | false | false | 0 |
insert( const char *name, struct pfs_stat *buf, pfs_dir *dir )
{
char path[PFS_PATH_MAX];
struct pfs_stat *copy;
if (!dircache_table) dircache_table = hash_table_create(0, 0);
dir->append(name);
copy = (struct pfs_stat *)xxmalloc(sizeof(struct pfs_stat));
*copy = *buf;
sprintf(path, "%s/%s", dircache_path, ... | false | false | false | false | false | 0 |
cache_enter_group(void)
{
int tmp;
tmp = res_cache_ahead_size();
if (tmp > MAX_CACHE)
tmp = MAX_CACHE;
else if (tmp < 0)
tmp = 0;
ahead_size = tmp;
tmp = res_cache_trail_size();
if (tmp > MAX_CACHE)
tmp = MAX_CACHE;
else if (tmp < 0)
tmp = 0;
trail_size = tmp;
cache_dir =... | false | false | false | false | false | 0 |
gee_linked_list_real_drain (GeeQueue* base, GeeCollection* recipient, gint amount) {
GeeLinkedList * self;
gint result = 0;
GeeCollection* _tmp0_ = NULL;
gint _tmp1_ = 0;
gint _tmp2_ = 0;
self = (GeeLinkedList*) base;
g_return_val_if_fail (recipient != NULL, 0);
_tmp0_ = recipient;
_tmp1_ = amount;
_tmp2_ = g... | false | false | false | false | false | 0 |
panel_act_MKDIR(this, other)
panel_t *this, *other;
{
size_t len;
char *input = NULL, *tmp_input;
if (!il_read_line("New directory name: ", &input, NULL, mkdir_history))
return;
if (input[0] == '\0')
{
xfree(input);
return;
}
tmp_input = tilde_expand(input);
xfree(input);
i... | false | false | false | false | false | 0 |
test_runner_global_destructor()
{
test_runner_case *tmp_case, *test_case = test_runner_global_instance.case_list_head;
while (test_case) {
tmp_case = test_case->next_case;
test_runner_case_destructor(test_case);
test_case = tmp_case;
}
fprintf(
test_runner_global_instanc... | false | false | false | false | false | 0 |
atk_text_get_character_extents (AtkText *text,
gint offset,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coords)
{
AtkTextIface *iface... | false | false | false | false | false | 0 |
getAttribute(UColAttribute attr,
UErrorCode &status) const
{
if (U_FAILURE(status))
return UCOL_DEFAULT;
return ucol_getAttribute(ucollator, attr, &status);
} | false | false | false | false | false | 0 |
uhelpform(const char *sofar, const int hf)
{
unsigned ucnt, sfl = 0;
char **result, **rp;
if (sofar)
sfl = strlen(sofar);
/* There cannot be more form types than the number of users can there.... */
result = (char **) malloc((Nusers + 2) * sizeof(char *));
if (!result)
return result;
rp = result;
if... | false | true | false | false | false | 1 |
arraycontsel(PG_FUNCTION_ARGS)
{
PlannerInfo *root = (PlannerInfo *) PG_GETARG_POINTER(0);
Oid operator = PG_GETARG_OID(1);
List *args = (List *) PG_GETARG_POINTER(2);
int varRelid = PG_GETARG_INT32(3);
VariableStatData vardata;
Node *other;
bool varonleft;
Selectivity selec;
Oid element_typeid;
... | false | false | false | false | false | 0 |
get_next()
{
unsigned int new_address = value + cpu_pic->program_memory[value]->instruction_size();
if (new_address >= memory_size)
{
printf("%s PC=0x%x >= memory size 0x%x\n", __FUNCTION__, new_address, memory_size);
bp.halt();
}
return( new_address);
} | false | false | false | false | false | 0 |
ftpGetFile(FtpStateData * ftpState)
{
assert(*ftpState->filepath != '\0');
ftpState->flags.isdir = 0;
ftpSendMdtm(ftpState);
} | false | false | false | false | false | 0 |
popupdead_check_buttons()
{
int i;
UI_BUTTON *b;
for ( i = 0; i < Popupdead_num_choices; i++ ) {
b = &Popupdead_button_regions[i];
if ( b->pressed() ) {
return i;
}
b = &Popupdead_buttons[i];
if ( b->pressed() ) {
return i;
}
}
return -1;
} | false | false | false | false | false | 0 |
getAnnotationText(UT_uint32 iAnnotation, std::string & sText) const
{
fl_AnnotationLayout * pAL = getAnnotationLayout(iAnnotation);
if(!pAL)
return false;
pf_Frag_Strux* sdhStart = pAL->getStruxDocHandle();
PT_DocPosition posStart = getDocument()->getStruxPosition(sdhStart)+1; // Pos of Block o Text
UT_GrowBuf b... | false | false | false | false | false | 0 |
packet_add(struct cvm_packet* p,
const char* str, unsigned len)
{
unsigned char* ptr;
if (p->length + len + 1 >= CVM_BUFSIZE-1)
return 0;
ptr = p->data + p->length;
memcpy(ptr, str, len);
ptr[len] = 0;
p->length += len + 1;
return 1;
} | false | false | false | false | false | 0 |
StartBootloader(void)
{
if (m_port->IsOpen() && m_commands->StartBootloader())
{
m_port->Close();
return true;
}
return false;
} | false | false | false | false | false | 0 |
chirp_volume_open(const char *volume, time_t stoptime)
{
struct chirp_volume *v;
char filename[CHIRP_PATH_MAX];
char *buffer;
char *name;
char *c;
int result;
debug(D_MULTI, "opening volume %s", volume);
/*
The volume name must have at least one
at-sign in order to indicate the volname.
*/
c = strc... | false | true | false | false | true | 1 |
parse_host(char *host, char *hname, struct accessdata_dn *acc)
{
int i;
errno = EINVAL;
if (!*host)
return -1;
errno = ENAMETOOLONG;
i = 0;
while(*host && *host != '/') {
*hname++ = *host++;
if (++i > DN_MAXNODEL)
return -1;
}
*hname = 0;
errno = 0;
if (!*host)
return 0;
host++;
i = 0;
errno ... | false | false | false | false | false | 0 |
run_threads(struct thread_info* threads, int numthreads)
{
int i = 0;
int curr_num_threads = 0;
struct running_thread* running_threads = NULL;
struct timespec ts;
while (i < numthreads)
{
if (max_num_threads == 0) // just do them all sequentially in this thread here
{
run_function(&(threa... | false | false | false | false | false | 0 |
getPacket()
{
AVM_WRITE("ASF network reader", 1, "getPacket() (Eof: %d, pkts: %" PRIsz ")\n", m_bEof, m_Packets.size());
PthreadMutex& mutex = m_pParent->m_Mutex;
PthreadCond& cond = m_pParent->m_Cond;
Locker locker(mutex);
for (int i = 0; !m_Packets.size(); i++)
{
if (m_bEof || i > 20)
return ... | false | false | false | false | false | 0 |
vfio_msi_set_vector_signal(struct vfio_pci_device *vdev,
int vector, int fd, bool msix)
{
struct pci_dev *pdev = vdev->pdev;
int irq = msix ? vdev->msix[vector].vector : pdev->irq + vector;
char *name = msix ? "vfio-msix" : "vfio-msi";
struct eventfd_ctx *trigger;
int ret;
if (vector >= vdev->num_ctx)
... | false | false | false | false | false | 0 |
k5_free_error(struct errinfo *ep, const char *msg)
{
if (msg != oom_msg)
free((char *)msg);
} | false | false | false | false | false | 0 |
unregisterClient(Client* client)
{
int position;
//
// If the client is in the list, delete the client from the list
// and return the result; otherwise, return FALSE.
//
if ( (position = this->clientList.getPosition(client)) )
{
return this->clientList.deleteElement(position);
}
e... | false | false | false | false | false | 0 |
xbaeGetCellTotalWidth(mw)
XbaeMatrixWidget mw;
{
int i, columns;
/*
* Calculate width of non-fixed cell area.
*/
columns = TRAILING_HORIZ_ORIGIN(mw);
for (i = mw->matrix.fixed_columns, mw->matrix.non_fixed_total_width = 0;
i < columns;
i++)
mw->matrix.non_fixed_total... | false | false | false | false | false | 0 |
ipa_tm_transform_calls (struct cgraph_node *node, struct tm_region *region,
basic_block bb, bitmap irr_blocks)
{
bool need_ssa_rename = false;
edge e;
edge_iterator ei;
VEC(basic_block, heap) *queue = NULL;
bitmap visited_blocks = BITMAP_ALLOC (NULL);
VEC_safe_push (basic_block, heap, queue, bb);
do
... | false | false | false | false | false | 0 |
write_data(struct drm_i915_private *dev_priv, u32 reg,
const u8 *data, u32 len)
{
u32 i, j;
for (i = 0; i < len; i += 4) {
u32 val = 0;
for (j = 0; j < min_t(u32, len - i, 4); j++)
val |= *data++ << 8 * j;
I915_WRITE(reg, val);
}
} | false | false | false | false | false | 0 |
xml_load(const char * filename)
{
struct XMLBUF xml;
XmlNode *ret = NULL;
// printf("xml_load(\"%s\");\n", filename);
xml.eof = 0;
xml.read_index = 0;
xml.fptr = fopen(filename, "rb");
if(!xml.fptr)
return NULL;
xml.buf = malloc(BUFFER+1);
if(!xml.buf)
goto xml_load_fail_malloc_buf;
xml.buf[BUFFER]=0;
... | false | false | false | false | true | 1 |
calculateTotalTimeSeconds() {
double totalTime = 0;
vector<TcxTrack*>::iterator it;
for ( it=trackList.begin() ; it < trackList.end(); ++it )
{
TcxTrack* track = *it;
totalTime += track->calculateTotalTime();
}
char totalTimeBuf[50];
snprintf(&totalTimeBuf[0], sizeof(totalTi... | false | false | false | false | false | 0 |
dummy_reloc_loop(void)
{
int i;
for (i = 0; i < 0x800; i++) {
BEGIN_BATCH(8);
OUT_BATCH(XY_SRC_COPY_BLT_CMD |
XY_SRC_COPY_BLT_WRITE_ALPHA |
XY_SRC_COPY_BLT_WRITE_RGB);
OUT_BATCH((3 << 24) | /* 32 bits */
(0xcc << 16) | /* copy ROP */
4*4096);
OUT_BATCH(2048 << 16 | 0);
OUT_BATCH((4096) ... | false | false | false | false | false | 0 |
list_first(ListNode * const head, ListNode **output) {
ListNode *target_node;
assert_true(head);
if (list_empty(head)) {
return 0;
}
target_node = head->next;
*output = target_node;
return 1;
} | false | false | false | false | false | 0 |
selectNew()
{
uchar numLords = DataTheme.lords.count();
if( numLords < GenericLord::MAX_LORDS-1 ) {
save();
_idLord = DataTheme.lords.count();
GenericLordModel * lord = new GenericLordModel();
DataTheme.lords.append( lord );
init();
}
} | false | false | false | false | false | 0 |
parse_encoding_decl (void)
{
ACEXML_Char* astring = 0;
if ((this->parse_token (ACE_TEXT("ncoding")) < 0)
|| this->skip_equal () != 0
|| this->parse_encname (astring) != 0)
{
this->fatal_error (ACE_TEXT ("Invalid EncodingDecl specification"));
}
const ACEXML_Char* encoding = this->current... | false | false | false | false | false | 0 |
slk_label ( int labnum ) {
if ( slks == NULL )
return NULL;
return slks->fkeys[labnum].label;
} | false | false | false | false | false | 0 |
range_reverse(PyObject *seq)
{
rangeobject *range = (rangeobject*) seq;
longrangeiterobject *it;
PyObject *one, *sum, *diff, *product;
long lstart, lstop, lstep, new_start, new_stop;
unsigned long ulen;
assert(PyRange_Check(seq));
/* reversed(range(start, stop, step)) can be expressed as
... | false | false | false | false | false | 0 |
dh_locate(const struct guid *muid)
{
bool found = FALSE;
const void *key;
void *value;
if (NULL == by_muid_old)
return NULL; /* DH layer shutdown occurred already */
/*
* Look in the old table first. If we find something there, move it
* to the new table to keep te record "alive" since we still get hits
... | false | false | false | false | false | 0 |
grep_error(int errcode, regex_t *matcher, GtError *err)
{
char sbuf[BUFSIZ], *buf;
size_t bufsize;
gt_error_check(err);
bufsize = regerror(errcode, matcher, NULL, 0);
buf = malloc(bufsize);
(void) regerror(errcode, matcher, buf ? buf : sbuf, buf ? bufsize : BUFSIZ);
gt_error_set(err, "grep(): %s", buf ? b... | true | true | false | false | false | 1 |
prefixwrite(void *ptr, size_t size, size_t nmemb, FILE *f,
char *prefix, size_t prefixlen)
{
static FILE *lastf;
static char lastc = '\n';
size_t rsz, wsz = 0;
char *p = ptr;
if (nmemb == 0)
return 0;
if (prefix == NULL) {
lastf = f;
lastc = ((char *)ptr)[size * nmemb - 1];
return fwrite(ptr, size, nme... | false | false | false | false | true | 1 |
sig_gui_printtext_finished(WINDOW_REC *window)
{
TEXT_BUFFER_VIEW_REC *view;
LINE_REC *insert_after;
view = WINDOW_GUI(window)->view;
insert_after = WINDOW_GUI(window)->use_insert_after ?
WINDOW_GUI(window)->insert_after : view->buffer->cur_line;
view_add_eol(view, &insert_after);
remove_old_lines(view... | false | false | false | false | false | 0 |
relocate_entry_gtt(struct drm_i915_gem_object *obj,
struct drm_i915_gem_relocation_entry *reloc,
uint64_t target_offset)
{
struct drm_device *dev = obj->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
struct i915_ggtt *ggtt = &dev_priv->ggtt;
uint64_t delta = relocation_target(reloc, target_of... | false | false | false | false | false | 0 |
gnome_scan_module_manager_unload_modules (GnomeScanModuleManager *manager)
{
GSList *node;
for (node = manager->modules; node ; node = node->next) {
g_type_module_unuse (G_TYPE_MODULE (node->data));
}
} | false | false | false | false | false | 0 |
mxser_cflags_changed(struct mxser_port *info, unsigned long arg,
struct async_icount *cprev)
{
struct async_icount cnow;
unsigned long flags;
int ret;
spin_lock_irqsave(&info->slock, flags);
cnow = info->icount; /* atomic copy */
spin_unlock_irqrestore(&info->slock, flags);
ret = ((arg & TIOCM_RNG) && (cnow.... | false | false | false | false | false | 0 |
jpc_cod_gettsfb(int qmfbid, int numlvls)
{
jpc_tsfb_t *tsfb;
if (!(tsfb = malloc(sizeof(jpc_tsfb_t))))
return 0;
if (numlvls > 0) {
switch (qmfbid) {
case JPC_COX_INS:
tsfb->qmfb = &jpc_ns_qmfb2d;
break;
default:
case JPC_COX_RFT:
tsfb->qmfb = &jpc_ft_qmfb2d;
break;
}
} else {
tsfb->qmfb... | false | false | false | false | false | 0 |
ac_tm_set_time(ac_tm_p _atp, time_t _t)
{
if(!_atp)
return -1;
memset( _atp, 0, sizeof(ac_tm_t));
_atp->time = _t;
return ac_tm_fill(_atp, localtime(&_t));
} | false | false | false | false | false | 0 |
_even_rand( unsigned *seed, unsigned max )
{
unsigned r, ret;
/* make sure distribution is even */
do {
r = (unsigned) rand_r( seed );
ret = r % max;
} while ( r - ret > RAND_MAX - max );
return ret;
} | false | false | false | false | false | 0 |
gt_alphabet_decode_seq_to_fp(const GtAlphabet *alphabet, FILE *fpout,
const GtUchar *src, unsigned long len)
{
unsigned long i;
const GtUchar *characters;
gt_assert(fpout != NULL && (len == 0 || src != NULL));
if (alphabet == NULL)
{
characters = (const GtUchar *) "acgt"... | false | false | false | false | false | 0 |
snd_cmipci_pcm_spdif_new(struct cmipci *cm, int device)
{
struct snd_pcm *pcm;
int err;
err = snd_pcm_new(cm->card, cm->card->driver, device, 1, 1, &pcm);
if (err < 0)
return err;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cmipci_playback_spdif_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &s... | false | true | false | false | false | 1 |
mouseMoveEvent(QMouseEvent *e)
{
if (d->bColorPicking) {
d->_setColor(grabColor(e->globalPos()));
return;
}
KDialog::mouseMoveEvent(e);
} | false | false | false | false | false | 0 |
gccifyAsm(std::string asmstr) {
for (std::string::size_type i = 0; i != asmstr.size(); ++i)
if (asmstr[i] == '\n')
asmstr.replace(i, 1, "\\n");
else if (asmstr[i] == '\t')
asmstr.replace(i, 1, "\\t");
else if (asmstr[i] == '$') {
if (asmstr[i + 1] == '{') {
std::string::size_type... | false | false | false | false | false | 0 |
ResetPositionFlag_ (MolComplexS *mol_complexSP, int mol_complexesN)
{
int mol_complexI;
for (mol_complexI = 0; mol_complexI < mol_complexesN; mol_complexI++)
(mol_complexSP + mol_complexI)->position_changedF = 0;
} | false | false | false | false | false | 0 |
main()
{
cout<<"Gfan version:\n"<<GFAN_RELEASEDIR<<endl<<endl;
cout<<"Forked from source tree on:\n"<<GFAN_FORKTIME<<endl<<endl;
cout<<"Linked libraries:"<<endl;
cout<<"GMP "<<gmp_version<<endl;
cout<<"Cddlib YES"<<endl;
cout<<"SoPlex "<<((LpSolver::find("SoPlexCddGmp"))?"YES":" NO... | false | false | false | false | false | 0 |
push(int, Packet *p)
{
if (!_active || (uint32_t)(random() & SAMPLING_MASK) < _sampling_prob)
output(0).push(p);
else {
checked_output_push(1, p);
_drops++;
}
} | false | false | false | false | false | 0 |
bSetParms( float fDefValue, float fMinValue, float fMaxValue,
float fMinIncSz, float fMaxIncSz )
{
bool bRtn;
if( ! bIsCreated( ) ) return( FALSE );
bRtn = m_oSpnValue.bSetParms( fDefValue, fMinValue, fMaxValue,
fMinIncSz, fMaxI... | false | false | false | false | false | 0 |
shiftExpression() {
Node *right, *result ;
result = additiveExpression() ;
for (;;) {
if (match (LSHIFT)) {
right = additiveExpression() ;
result = new Node (this,LSHIFT, result, right) ;
} else if (match (RSHIFT)) {
right = additiveExpression() ;
... | false | false | false | false | false | 0 |
autohelperowl_attackpat237(int trans, int move, int color, int action)
{
int a, b, C;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(647, trans, move);
b = AFFINE_TRANSFORM(685, trans, move);
C = AFFINE_TRANSFORM(648, trans, move);
return !play_attack_defend_n(color, 1, 2, move, a, move)&& (somewhe... | false | false | false | false | false | 0 |
initRadio(const CEGUI::String& radio, int group, bool selected)
{
WindowManager& winMgr = WindowManager::getSingleton();
if (winMgr.isWindowPresent(radio))
{
RadioButton* button = static_cast<RadioButton*>(winMgr.getWindow(radio));
button->setGroupID(group);
button->setSelected(selec... | false | false | false | false | false | 0 |
parse_subject_public_key_info_for_cert (GBytes *data)
{
GBytes *info;
GNode *asn;
asn = egg_asn1x_create_and_decode (pkix_asn1_tab, "Certificate", data);
g_assert (asn != NULL);
info = egg_asn1x_get_element_raw (egg_asn1x_node (asn, "tbsCertificate", "subjectPublicKeyInfo", NULL));
g_assert (info != NULL);
eg... | false | false | false | false | false | 0 |
cb_end(GtkPrintOperation *operation, GtkPrintContext *context, gPrinter *printer)
{
#if DEBUG_ME
fprintf(stderr, "cb_end: %d\n", printer->_preview);
#endif
if (printer->_preview && printer->onEnd)
(*printer->onEnd)(printer);
} | false | false | false | false | false | 0 |
filter_gui_filter_set(filter_t *f, gboolean removable,
gboolean active, GList *ruleset)
{
static const gchar * const widgets[] = {
"checkbutton_filter_enabled",
"button_filter_reset",
"button_filter_add_rule_text",
"button_filter_add_rule_ip",
"button_filter_add_rule_size",
"button_filter_add_rule_jump... | false | false | false | false | false | 0 |
_create_tuple_for_attribute (ASN1_OBJECT *name, ASN1_STRING *value) {
char namebuf[X509_NAME_MAXLEN];
int buflen;
PyObject *name_obj;
PyObject *value_obj;
PyObject *attr;
unsigned char *valuebuf = NULL;
buflen = OBJ_obj2txt(namebuf, sizeof(namebuf), name, 0);
if (buflen < 0) {
... | false | false | false | false | false | 0 |
totem_compare_recent_items (GtkRecentInfo *a, GtkRecentInfo *b)
{
gboolean has_totem_a, has_totem_b;
has_totem_a = gtk_recent_info_has_group (a, "Totem");
has_totem_b = gtk_recent_info_has_group (b, "Totem");
if (has_totem_a && has_totem_b) {
time_t time_a, time_b;
time_a = gtk_recent_info_get_modified (a);
... | false | false | false | false | false | 0 |
ReadXBit(Parser p)
{
if(p->peeked)
p->peeked = 0;
else
parse(p);
return &p->xbit;
} | false | false | false | false | false | 0 |
take_shadow_cp(void) {
u4_int i; /* wide counter */
for (i = 0u; i < shadow_cnt; i++)
if (shadow_cp[i]) {
constant_pool[i] = NULL;
#ifdef DEBUG_SHADOW
fprintf(stderr, "take cp entry %u\n", i);
#endif
}
} | false | false | false | false | false | 0 |
do_check_one_pubkey (int n, gcry_sexp_t skey, gcry_sexp_t pkey,
const unsigned char *grip, int algo, int flags)
{
if (flags & FLAG_SIGN)
{
if (algo == GCRY_PK_ECDSA)
check_pubkey_sign_ecdsa (n, skey, pkey);
else
check_pubkey_sign (n, skey, pkey, algo);
}
if (flags & FLAG_CRYPT)
... | false | false | false | false | false | 0 |
write_restart_file(char *file)
{
if (me) return;
char outfile[128];
sprintf(outfile,"%s.rigid",file);
FILE *fp = fopen(outfile,"w");
if (fp == NULL) {
char str[128];
sprintf(str,"Cannot open fix rigid restart file %s",outfile);
error->one(FLERR,str);
}
fprintf(fp,"# fix rigid mass, COM, iner... | false | false | false | false | false | 0 |
zv_save(fp,x,name)
FILE *fp;
ZVEC *x;
char *name;
{
int i;
matlab mat;
if ( ! x )
error(E_NULL,"zv_save");
mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0;
mat.m = x->dim;
mat.n = 1;
mat.imag = TRUE;
mat.namlen = (name == (char *)NULL) ? 1 : strlen(name)+1;
... | false | false | false | true | false | 1 |
output_delayed_int (struct output * out, int * ptr)
{
struct derivation *tmp;
if (out->to_void)
return;
tmp = new_derivation (delayed_int);
tmp->delayed_int = ptr;
output_char (out, '\0');
da_append (out->derivations, tmp);
} | false | false | false | false | false | 0 |
filter_off(void)
{
if (panel->type == PANEL_TYPE_FILE)
filter_off_file();
else {
/* PANEL_TYPE_DIR, PANEL_TYPE_GROUP, PANEL_TYPE_HIST, PANEL_TYPE_USER */
panel->filtering = 0;
filter_update();
win_filter();
}
pan_adjust(panel);
win_filter();
win_panel();
} | false | false | false | false | false | 0 |
operator+=(const Attribute& a)
{
merge(a);
d->associatedActions += a.associatedActions();
for (int i = 0; i < a.d->dynamicAttributes.count(); ++i)
if (i < d->dynamicAttributes.count()) {
if (a.d->dynamicAttributes[i])
d->dynamicAttributes[i] = a.d->dynamicAttributes[i];
} else {
d->d... | false | false | false | false | false | 0 |
adaptive_keyboard_hotkey_notify_hotkey(unsigned int scancode)
{
int current_mode = 0;
int new_mode = 0;
int keycode;
switch (scancode) {
case DFR_CHANGE_ROW:
if (adaptive_keyboard_mode_is_saved) {
new_mode = adaptive_keyboard_prev_mode;
adaptive_keyboard_mode_is_saved = false;
} else {
current_mode =... | false | false | false | false | false | 0 |
h_enddo(OMPragma* p, ostream& os) {
int n = RExit(p);
if ( p->is_nowait() ) {
print_pragma(p, os);
} else {
p->add_nowait();
print_pragma(p, os);
generate_barrier(n, os);
}
generate_call("exit", "do", n, os);
if ( keepSrcInfo ) reset_src_info(p, os);
} | false | false | false | false | false | 0 |
load_theme (void)
{
if (ball_preimage)
g_object_unref (ball_preimage);
ball_preimage = load_image (ball_filename);
refresh_pixmaps ();
refresh_preview_surfaces ();
} | false | false | false | false | false | 0 |
manhattanLength(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QPoint, manhattanLength);
return QScriptValue(eng, self->manhattanLength());
} | false | false | false | false | false | 0 |
atoipr(const char *s, iprange *ir)
{
if((s = atoip(s, &ir->lr)) == NULL) return NULL;
ir->ur = ir->lr;
s += strspn(s, " \t");
if(*s == '-')
{
if(!(s = atoip(s + 1, &ir->ur)) || ir->lr > ir->ur) return NULL;
}
else if(*s == '/')
{
int m, n;
if(sscanf(s + 1, "%d%n",... | false | false | false | false | false | 0 |
vmw_binding_scrub_dx_shader(struct vmw_ctx_bindinfo *bi, bool rebind)
{
struct vmw_ctx_bindinfo_shader *binding =
container_of(bi, typeof(*binding), bi);
struct vmw_private *dev_priv = bi->ctx->dev_priv;
struct {
SVGA3dCmdHeader header;
SVGA3dCmdDXSetShader body;
} *cmd;
cmd = vmw_fifo_reserve_dx(dev_priv, ... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
AddRemoveComboBox *_t = static_cast<AddRemoveComboBox *>(_o);
switch (_id) {
case 0: _t->aboutToAddItem(); break;
case 1... | false | false | false | false | false | 0 |
split_shorts(opal_cmd_line_t *cmd, char *token, char **args,
int *output_argc, char ***output_argv,
int *num_args_used, bool ignore_unknown)
{
int i, j, len;
cmd_line_option_t *option;
char fake_token[3];
int num_args;
/* Setup that we didn't use an... | false | false | false | false | false | 0 |
CWriteFile(const io::path& fileName, bool append)
: FileSize(0)
{
#ifdef _DEBUG
setDebugName("CWriteFile");
#endif
Filename = fileName;
openFile(append);
} | false | false | false | false | false | 0 |
volume_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
{
struct ast_datastore *datastore = NULL;
struct volume_information *vi = NULL;
int is_new = 0;
/* Separate options from argument */
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(direction);
AST_APP_ARG(options);
);
AST_STAN... | false | false | false | false | false | 0 |
fk42gal (dtheta,dphi)
double *dtheta; /* b1950.0 'FK4' ra in degrees
Galactic longitude (l2) in degrees (returned) */
double *dphi; /* b1950.0 'FK4' dec in degrees
Galactic latitude (b2) in degrees (returned) */
/* Note: The equatorial coordinates are b1950.0 'FK4'. use the
routine jpgalj if conver... | false | false | false | false | false | 0 |
run_script_awake(struct script_state *st)
{
struct map_session_data *sd = map_id2sd(st->rid);
if( (sd && sd->npc_sleep != &st->sleep) || (st->rid != 0 && !sd) ) {
st->rid = 0;
}
if(st->state != RERUNLINE) {
st->state = END;
st->sleep.tick = 0;
}
st->sleep.timer = -1;
if(sd)
npc_timeout_start(sd);
run... | false | false | false | false | false | 0 |
o2hb_dead_threshold_set(unsigned int threshold)
{
if (threshold > O2HB_MIN_DEAD_THRESHOLD) {
spin_lock(&o2hb_live_lock);
if (list_empty(&o2hb_all_regions))
o2hb_dead_threshold = threshold;
spin_unlock(&o2hb_live_lock);
}
} | false | false | false | false | false | 0 |
_dump_slurmdb_assoc_records(List assoc_list)
{
slurmdb_association_rec_t *assoc = NULL;
ListIterator itr = NULL;
itr = list_iterator_create(assoc_list);
while((assoc = list_next(itr))) {
debug("\t\tid=%d", assoc->id);
}
list_iterator_destroy(itr);
} | false | false | false | false | false | 0 |
WriteMeshStatisticsFile( const char* AreaFileName, const char* QFileName,
const char* AngleMinFileName, const char* DegreeFileName )
{
std::ofstream area_file( AreaFileName );
std::ofstream Q_file( QFileName );
std::ofstream AngleMin_file( AngleMinFileName );
std::ofstream ... | false | false | false | false | false | 0 |
SubnRankFabricNodesByRegexp(IBFabric *p_fabric,
const char * nodeNameRex,
map_pnode_int &nodesRank)
{
regExp nodeRex(nodeNameRex);
rexMatch *p_rexRes;
list_pnode rootNodes;
// go over all nodes of the fabric;
for (map_str_pnode::iterator nI = p_fabric->NodeByName.begin();
... | false | false | false | false | false | 0 |
H5HF_tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
{
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HF_tiny_remove)
/*
* Check arguments.
*/
HDassert(hdr);
HDassert(id);
/* Check if... | false | false | false | false | false | 0 |
e_int_config_keybindings(E_Container *con,
const char *params)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "keyboard_and_mouse/key_bindings")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata ... | false | false | false | false | false | 0 |
SetStatus(uint8 in)
{
// PAUSED and INSUFFICIENT have extra flag variables m_paused and m_insufficient
// - they are never to be stored in status
wxASSERT( in != PS_PAUSED && in != PS_INSUFFICIENT );
status = in;
if (theApp->IsRunning()) {
UpdateDisplayedInfo( true );
if ( thePrefs::ShowCatTabInfos() ) {... | false | false | false | false | false | 0 |
do_all_sorted_fn(const OBJ_NAME *name,void *d_)
{
struct doall_sorted *d=d_;
if(name->type != d->type)
return;
d->names[d->n++]=name;
} | false | false | false | false | false | 0 |
gst_asf_mux_write_content_description (GstAsfMux * asfmux, guint8 ** buf,
const GstTagList * tags)
{
guint8 *values = (*buf) + ASF_CONTENT_DESCRIPTION_OBJECT_SIZE;
guint64 size = 0;
GST_DEBUG_OBJECT (asfmux, "Writing content description object");
gst_asf_put_guid (*buf, guids[ASF_CONTENT_DESCRIPTION_INDEX... | false | false | false | false | false | 0 |
sftp_pkt_ensure(struct sftp_packet *pkt, int length)
{
if ((int)pkt->maxlen < length) {
pkt->maxlen = length + 256;
pkt->data = sresize(pkt->data, pkt->maxlen, char);
}
} | false | false | false | false | false | 0 |
dissect_p1_ReportType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1220 "../../asn1/p1/p1.cnf"
gint report = -1;
offset = dissect_ber_choice(actx, tree, tvb, offset,
ReportType_choice, hf_index, ... | false | false | false | false | false | 0 |
OPENSSL_asc2uni(const char *asc, int asclen, unsigned char **uni, int *unilen)
{
int ulen, i;
unsigned char *unitmp;
if (asclen == -1) asclen = strlen(asc);
ulen = asclen*2 + 2;
if (!(unitmp = OPENSSL_malloc(ulen))) return NULL;
for (i = 0; i < ulen - 2; i+=2) {
unitmp[i] = 0;
unitmp[i + 1] = asc[i>>1];
}
... | false | false | false | false | false | 0 |
disconnect_timeout(gpointer user_data)
{
struct avdtp *session = user_data;
struct audio_device *dev;
gboolean stream_setup;
session->dc_timer = 0;
stream_setup = session->stream_setup;
session->stream_setup = FALSE;
dev = manager_get_device(&session->server->src, &session->dst, FALSE);
if (dev && dev->sink ... | false | false | false | false | false | 0 |
twl4030_init_irq(struct device *dev, int irq_num)
{
static struct irq_chip twl4030_irq_chip;
int status, i;
int irq_base, irq_end, nr_irqs;
struct device_node *node = dev->of_node;
/*
* TWL core and pwr interrupts must be contiguous because
* the hwirqs numbers are defined contiguously from 1 to 15.
*... | false | false | false | false | false | 0 |
select(const int &tableref, const int &fieldref, const QHash<int, QString> &conditions) const
{
QString toReturn;
toReturn = QString("SELECT `%2`.`%1` FROM `%2` WHERE %3")
.arg(fieldName(tableref, fieldref))
.arg(table(tableref))
.arg(getWhereClause(tableref, conditions));
... | false | false | false | false | false | 0 |
emulator_get_msr(struct x86_emulate_ctxt *ctxt,
u32 msr_index, u64 *pdata)
{
struct msr_data msr;
int r;
msr.index = msr_index;
msr.host_initiated = false;
r = kvm_get_msr(emul_to_vcpu(ctxt), &msr);
if (r)
return r;
*pdata = msr.data;
return 0;
} | false | false | false | false | false | 0 |
gst_play_sink_release_pad (GstPlaySink * playsink, GstPad * pad)
{
GstPad **res = NULL;
gboolean untarget = TRUE;
GST_DEBUG_OBJECT (playsink, "release pad %" GST_PTR_FORMAT, pad);
GST_PLAY_SINK_LOCK (playsink);
if (pad == playsink->video_pad) {
res = &playsink->video_pad;
g_signal_handlers_disconnec... | false | false | false | false | false | 0 |
removeStatusPreset()
{
OptStatusUI *d = (OptStatusUI *)w;
int id = d->cb_preset->currentItem();
if(id == -1)
return;
emit dataChanged();
QString name = d->cb_preset->text(id);
if (newPresets.contains(name)) {
newPresets.remove(name);
} else {
deletedPresets += d->cb_preset->text(id);
presets.remove(d... | 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.