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 |
|---|---|---|---|---|---|---|
embDmxScophitMergeInsertOtherTargetBoth(AjPList list, AjPScophit hit1,
AjPScophit hit2)
{
AjPScophit new;
/* Check args */
if(!hit1 || !hit2 || !list)
return ajFalse;
new = embDmxScophitMerge(hit1, hit2);
ajDmxScophitTarget(&new);
ajDmxScophitTarget(&hit1);
ajDmxScophitTar... | false | false | false | false | false | 0 |
_pts_to_timestamp (GstUvcH264MjpgDemux * self, GstBuffer * buf, guint32 pts)
{
GstUvcH264MjpgDemuxPrivate *priv = self->priv;
GstUvcH264ClockSample *current_sample = NULL;
GstUvcH264ClockSample *oldest_sample = NULL;
guint32 next_sample;
struct uvc_last_scr_sample sample;
guint32 dev_sof;
if (self->priv-... | false | false | false | false | false | 0 |
mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) {
if (!m_owner->isSelected()) {
event->ignore();
return;
}
m_doDrag = false;
partLabelEdit();
} | false | false | false | false | false | 0 |
EvalPlanQualFetch(EState *estate, Relation relation, int lockmode,
ItemPointer tid, TransactionId priorXmax)
{
HeapTuple copyTuple = NULL;
HeapTupleData tuple;
SnapshotData SnapshotDirty;
/*
* fetch target tuple
*
* Loop here to deal with updated or busy tuples
*/
InitDirtySnapshot(SnapshotDirty);
... | false | false | false | false | false | 0 |
dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data,
void **ret_data)
{
struct dlm_ctxt *dlm = data;
struct dlm_reco_data_done *done = (struct dlm_reco_data_done *)msg->buf;
struct dlm_reco_node_data *ndata = NULL;
int ret = -EINVAL;
if (!dlm_grab(dlm))
return -EINVAL;
mlog(0, "got... | false | false | false | false | false | 0 |
funcNormExpr (expr)
chain_list *expr;
{
if (ATOM (expr))
return ((long) VALUE_ATOM (expr));
else if (OPER (expr) == NOT)
if (ATOM (CADR (expr)))
return (NOT * 100 + 10);
else
return (NOT * 100 + OPER (CADR (expr)));
return OPER (expr) * 100 + lengthExpr (expr);
} | false | false | false | false | false | 0 |
next_dict(int nb)
{
if(opt.dict != NULL)
{
if(!opt.stdin_dict) fclose(opt.dict);
opt.dict = NULL;
}
opt.nbdict = nb;
if(opt.dicts[opt.nbdict] == NULL)
return( FAILURE );
while(opt.nbdict < MAX_DICTS && opt.dicts[opt.nbdict] != NULL)
{
if( strcmp( opt.dicts[opt.nbdict], "-" ) == 0 )
{
opt.stdin_dict... | false | false | false | false | false | 0 |
make_consensus(blist)
struct blocks_list *blist;
{
struct blocks_list *bcur;
Block *block, *first_block;
struct seqseq *sseq;
sseq = (struct seqseq *) malloc (blist->nseq * sizeof(struct seqseq));
first_block = NULL;
bcur = blist->next;
while(bcur != NULL && bcur->block != NULL)
{
/* pro... | false | true | false | false | false | 1 |
timeout_max_confirm(gpointer user_data)
{
struct connman_dhcpv6 *dhcp = user_data;
dhcp->MRD = 0;
clear_timer(dhcp);
DBG("confirm max retransmit duration timeout");
g_dhcpv6_client_clear_retransmit(dhcp->dhcp_client);
if (dhcp->callback != NULL)
dhcp->callback(dhcp->network, FALSE);
return FALSE;
} | false | false | false | false | false | 0 |
_createEndnoteContainer(void)
{
lookupProperties();
fp_EndnoteContainer * pEndnoteContainer = new fp_EndnoteContainer(static_cast<fl_SectionLayout *>(this));
setFirstContainer(pEndnoteContainer);
setLastContainer(pEndnoteContainer);
fl_DocSectionLayout * pDSL = m_pLayout->getDocSecForEndnote(pEndnoteContainer);
U... | false | false | false | false | false | 0 |
free_refreshCheckHelper(refresh_check_helper ** list)
{
while (*list) {
refresh_check_helper *node = *list;
*list = NULL;
cbdataFree(node);
}
} | false | false | false | false | false | 0 |
seekp(std::streampos p)
{
if (sync())
return;
if (lseek(fd, p, SEEK_SET) < 0 && iosp)
iosp->setstate(std::ios::badbit);
else
setg(buffer, buffer+sizeof(buffer), buffer+sizeof(buffer));
} | false | false | false | false | false | 0 |
uyvy422_to_yuv422p(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const uint8_t *p, *p1;
uint8_t *lum, *cr, *cb, *lum1, *cr1, *cb1;
int w;
p1 = src->data[0];
lum1 = dst->data[0];
cb1 = dst->data[1];
cr1 = dst->data[2];
for(;height > 0; heigh... | false | false | false | false | false | 0 |
change_console(struct vc_data *new_vc)
{
struct vc_data *vc;
if (!new_vc || new_vc->vc_num == fg_console || vt_dont_switch)
return;
/*
* If this vt is in process mode, then we need to handshake with
* that process before switching. Essentially, we store where that
* vt wants to switch to and wait for it to... | false | false | false | false | false | 0 |
lookChar() {
int c;
if (readBufLen < 8) {
fillReadBuf();
}
if (readBufLen == 8) {
c = readBuf & 0xff;
} else if (readBufLen > 8) {
c = (readBuf >> (readBufLen - 8)) & 0xff;
} else if (readBufLen == 0) {
c = EOF;
} else {
c = (readBuf << (8 - readBufLen)) & 0xff;
}
return c;
} | false | false | false | false | false | 0 |
find_class( unsigned int step,
const vector<string>& classes,
unsigned int nranal ){
string result = classes[0];
if ( nranal > 1 ){
if ( classes.size() > 1 ){
if ( classes.size() > step )
result = classes[step];
else
result = "0";
}
}
return result;
} | false | false | false | false | false | 0 |
early_queue_to_ready (state_t state, struct ready_list *ready)
{
rtx insn;
rtx link;
rtx next_link;
rtx prev_link;
bool move_to_ready;
int cost;
state_t temp_state = alloca (dfa_state_size);
int stalls;
int insns_removed = 0;
/*
Flag '-fsched-stalled-insns=X' determines the aggressiveness of t... | false | false | false | false | false | 0 |
c_start(struct seq_file *m, loff_t *pos)
{
struct console *con;
loff_t off = 0;
console_lock();
for_each_console(con)
if (off++ == *pos)
break;
return con;
} | false | false | false | false | false | 0 |
ms_locops(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
if (parc != 3 || EmptyString(parv[2]))
return;
sendto_server(client_p, NULL, CAP_CLUSTER, 0, "LOCOPS %s :%s",
parv[1], parv[2]);
if (!IsClient(source_p) || !match(parv[1], me.name))
return;
... | false | false | false | false | false | 0 |
gt_encseq_col_get_sequence(const GtSeqCol *sc,
unsigned long filenum,
unsigned long seqnum,
unsigned long start,
unsigned long end)
{
GtEncseqCol *esc;
char... | false | false | false | false | false | 0 |
rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
{
struct rt2x00_dev *rt2x00dev = eeprom->data;
u32 reg = 0;
rt2x00_set_field32(®, E2PROM_CSR_DATA_IN, !!eeprom->reg_data_in);
rt2x00_set_field32(®, E2PROM_CSR_DATA_OUT, !!eeprom->reg_data_out);
rt2x00_set_field32(®, E2PROM_CSR_DATA_CLOCK,
!!... | false | false | false | false | false | 0 |
_parse(VisuConfigFileEntry *entry, gchar **tokens, guint iLine,
VisuData *dataObj, VisuGlView *view, GError **error)
{
gboolean ret;
static guint sig = 0;
if (!sig)
sig = g_signal_lookup("entryParsed", VISU_TYPE_OBJECT);
ret = TRUE;
if (tokens)
{
if (entry->read)
... | false | true | false | false | true | 1 |
compileExprSubst(void){
if (lexer->peek(ID_MODE)!=(int)'['){
lexer->error(RC.S(ERR_COMPILER_INTERNAL_EXPR));
lexer->getRestOfLine();
return NULL;
}
lexer->skip();
TKVMExprCode_base *code=compileExpr0();
if (!code) {
lexer->simpleSkipTo(']');
lexer->skip();
return NULL;
}
TKVMCodeExpression *ret=new ... | false | false | false | false | false | 0 |
cxd2820r_read_ber(struct dvb_frontend *fe, u32 *ber)
{
struct cxd2820r_priv *priv = fe->demodulator_priv;
int ret;
dev_dbg(&priv->i2c->dev, "%s: delsys=%d\n", __func__,
fe->dtv_property_cache.delivery_system);
switch (fe->dtv_property_cache.delivery_system) {
case SYS_DVBT:
ret = cxd2820r_read_ber_t(fe, ber... | false | false | false | false | false | 0 |
at_urlpath(const char *cp)
{
if (*cp++ != '/')
return 0;
cp += strspn(cp, "-" ALPHA NUMERIC "_$.+!*(),;:@&=?/~#%");
cp += strcspn(cp, "]'.}>) \t\r\n,\\\"");
return cp;
} | false | false | false | false | false | 0 |
OnRenameFile(cb_unused wxCommandEvent& event)
{
wxTreeItemId sel = GetTreeSelection();
if (!sel.IsOk())
return;
FileTreeData* ftd = (FileTreeData*)m_pTree->GetItemData(sel);
if (!ftd)
return;
cbProject* prj = ftd->GetProject();
if (!prj)
return;
if (ftd->GetProject... | false | false | false | false | false | 0 |
init (xlator_t *this)
{
dict_t *options = NULL;
char *includes = NULL, *excludes = NULL;
char *forced_loglevel = NULL;
if (!this)
return -1;
if (!this->children || this->children->next) {
gf_log (this->name, GF_LOG_ERROR,
... | false | false | false | false | false | 0 |
setNumericFld(int index, const QString &fld, const QVariant &sortval)
{
setRightFld(index, fld.trimmed());
setSortValue(index, sortval);
} | false | false | false | false | false | 0 |
tree_assimilate(KeyBindingTree *node)
{
KeyBindingTree *a, *b, *tmp, *last;
if (keyboard_firstnode == NULL) {
/* there are no nodes at this level yet */
keyboard_firstnode = node;
} else {
a = keyboard_firstnode;
last = a;
b = node;
while (a) {
la... | false | false | false | false | false | 0 |
TransformFromSource(
IntCoord swidth, IntCoord sheight, const Transformer& tx,
boolean& fromsource, boolean& overlimit
) {
boolean rotated;
IntCoord dwidth, dheight;
TransformedInfo(
nil, swidth, sheight, tx, nil, nil, nil, nil, &dwidth, &dheight,
&rotated
);
// this does... | false | false | false | false | false | 0 |
fluid_voice_gen_set(fluid_voice_t* voice, int i, float val)
{
voice->gen[i].val = val;
voice->gen[i].flags = GEN_SET;
if (i == GEN_SAMPLEMODE)
UPDATE_RVOICE_I1(fluid_rvoice_set_samplemode, (int) val);
} | false | false | false | false | false | 0 |
buildTry (Node *node) {
IFNode *catchlabel = new IFLabel (node) ;
IFNode *finallylabel = NULL;
IFNode *endlabel = new IFLabel (node) ;
if (node->right->op != CATCH) {
// finally present
finallylabel = new IFLabel (node) ;
issue (new IFInstruction (node, opTRY, catchlabel, endlabe... | false | false | false | false | false | 0 |
ocfs2_super_lock(struct ocfs2_super *osb,
int ex)
{
int status = 0;
int level = ex ? DLM_LOCK_EX : DLM_LOCK_PR;
struct ocfs2_lock_res *lockres = &osb->osb_super_lockres;
if (ocfs2_is_hard_readonly(osb))
return -EROFS;
if (ocfs2_mount_local(osb))
goto bail;
status = ocfs2_cluster_lock(osb, lockres, l... | false | false | false | false | false | 0 |
vxge_io_slot_reset(struct pci_dev *pdev)
{
struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
struct net_device *netdev = hldev->ndev;
struct vxgedev *vdev = netdev_priv(netdev);
if (pci_enable_device(pdev)) {
netdev_err(netdev, "Cannot re-enable device after reset\n");
return PCI_ERS_RESULT_DISCONNECT;
... | false | false | false | false | false | 0 |
gen_call_value (rtx operand0,
rtx operand1,
rtx operand2,
rtx operand3)
{
rtx _val = 0;
start_sequence ();
{
rtx operands[4];
operands[0] = operand0;
operands[1] = operand1;
operands[2] = operand2;
operands[3] = operand3;
#line 644 "../../src/gcc/config/aarch64/aarch64.md"
{
rtx call... | false | false | false | false | false | 0 |
xypnt_next_pnt (xypnt_head_rec *head_xypnt /* */,
xypnt *coord_point /* */,
char *finished /* */)
{
if (head_xypnt && head_xypnt->current_point)
{
head_xypnt->current_point = head_xypnt->current_point->next_point;
if (head_xy... | false | false | false | false | false | 0 |
Bignum_To_String (Object x, int radix) {
register char *p;
char *buf;
register unsigned int div, ndig, size;
struct S_Bignum *big;
Object ret;
Alloca_Begin;
if (Bignum_Zero (x))
return Make_String ("0", 1);
size = BIGNUM(x)->usize * (radix == 2 ? 17 : 6) + 3;
Alloca (buf, c... | false | false | false | false | false | 0 |
initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
{
GoaClient *client = GOA_CLIENT (initable);
gboolean ret;
ret = FALSE;
/* This method needs to be idempotent to work with the singleton
* pattern. See the docs for g_initable_init(). We ... | false | false | false | false | false | 0 |
test(const char *t, int er, const char *es, int siz,
const char *f, ...) {
va_list ap;
int r;
char s[40];
const char init[40] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
va_start(ap, f);
strcpy(s, init);
r = vsnprintf(s, siz, f, ap);
va_end(ap);
if (r != er || strcmp(s, es))
com... | true | true | false | false | true | 1 |
solve(const HepMatrix &a, const HepVector &v)
#ifdef HEP_GNU_OPTIMIZED_RETURN
return vret(v);
{
#else
{
HepVector vret(v);
#endif
static int max_array = 20;
static int *ir = new int [max_array+1];
if(a.ncol != a.nrow)
HepGenMatrix::error("Matrix::solve Matrix is not NxN");
if(a.ncol != v.nrow)
... | false | false | false | false | false | 0 |
chr_score(char c) {
if (isalpha(c)) {
return 2;
} else if (isalnum(c)) {
return 3;
} else if (isprint(c)) {
return 7;
} else if (c == '\0') {
return 10000;
} else {
return 100;
}
} | false | false | false | false | false | 0 |
finish_call (RestProxyCall *call, SoupMessage *message, GError **error)
{
RestProxyCallPrivate *priv;
g_assert (call);
g_assert (message);
priv = GET_PRIVATE (call);
/* Convert the soup headers in to hash */
/* FIXME: Eeek..are you allowed duplicate headers? ... */
g_hash_table_remove_all (priv->respons... | false | false | false | false | false | 0 |
merged(potmp, pobj)
struct obj **potmp, **pobj;
{
register struct obj *otmp = *potmp, *obj = *pobj;
if(mergable(otmp, obj)) {
/* Approximate age: we do it this way because if we were to
* do it "accurately" (merge only when ages are identical)
* we'd wind up never merging any corpses.
* otmp->age = otmp->... | false | false | false | false | false | 0 |
config_set_sasl_maxbufsize(const char *attrname, char *value, char *errorbuf, int apply )
{
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
int retVal = LDAP_SUCCESS;
int default_size = atoi(DEFAULT_SASL_MAXBUFSIZE);
int size;
size = atoi(value);
if(size < default_size){
... | false | false | false | false | false | 0 |
acpi_hw_validate_register(struct acpi_generic_address *reg,
u8 max_bit_width, u64 *address)
{
/* Must have a valid pointer to a GAS structure */
if (!reg) {
return (AE_BAD_PARAMETER);
}
/*
* Copy the target address. This handles possible alignment issues.
* Address must not be null. A null address als... | false | false | false | false | false | 0 |
handle_tcp_connect_back(struct gnutella_node *n,
const struct vmsg *vmsg, const char *payload, size_t size)
{
uint16 port;
if (vmsg->version > 1)
return;
if (VMSG_SHORT_SIZE(n, vmsg, size, 2))
return;
port = peek_le16(payload);
if (port == 0) {
if (GNET_PROPERTY(vmsg_debug)) {
g_warning("got improper ... | false | false | false | false | false | 0 |
pixModifySaturation(PIX *pixd,
PIX *pixs,
l_float32 fract)
{
l_int32 w, h, d, i, j, wpl;
l_int32 rval, gval, bval, hval, sval, vval;
l_uint32 *data, *line;
PROCNAME("pixModifySaturation");
if (!pixs)
return (PIX *)ERROR_PTR("pixs not defined"... | false | false | false | false | false | 0 |
strwrite(char *To, const char *From, unsigned long Len)
{
unsigned long i, j;
unsigned long FromLen = strlen(From);
Len = min(Len, BUFSIZ);
if (To && From)
{
switch (FromLen)
{
case 0:
break;
case 1:
memset(To, *From, Len);
break;... | false | false | false | false | false | 0 |
complete_username(void)
{
const char *login, *fullname;
username_find_init(rq.str,rq.strlen);
while ( (login = username_find(&fullname)) )
register_candidate(login,0,0,fullname);
} | false | false | false | false | false | 0 |
check_more(message, forceit)
int message; /* when FALSE check only, no messages */
int forceit;
{
int n = ARGCOUNT - curwin->w_arg_idx - 1;
if (!forceit && only_one_window()
&& ARGCOUNT > 1 && !arg_had_last && n >= 0 && quitmore == 0)
{
if (message)
{
#if defined(FEAT_GUI_DIALOG) || ... | false | false | false | false | false | 0 |
embWordRabinKarpInit(const AjPTable table, EmbPWordRK** ewords,
ajuint wordlen, const AjPSeqset seqset)
{
ajuint i;
ajuint j;
ajuint k;
ajuint l;
EmbPWord* words = NULL;
const EmbPWord embword = NULL;
ajulong patternHash;
EmbPWordRK newword = NULL;
AjIList... | false | false | false | false | false | 0 |
get_transmit_delay(NCR_Instance inst, int on_tx, double last_tx)
{
int poll_to_use, stratum_diff;
double delay_time;
/* If we're in burst mode, queue for immediate dispatch.
If we're operating in client/server mode, queue the timeout for
the poll interval hence. The fact that a timeout has been queue... | false | false | false | false | false | 0 |
MenuItem(PG_PopupMenu *parent, const std::string& caption, PG_PopupMenu *submenu)
: myFlags(MIF_SUBMENU),
myParent(parent),
mySubMenu(submenu),
myId(-1),
sNormal(0),
sSelected(0),
sDisabled(0),
selected(false),
needRecalc(true) {
initItem( caption );
} | false | false | false | false | false | 0 |
Scm_NumGE(ScmObj arg0, ScmObj arg1)
{
if (either_nan_p(arg0, arg1)) return FALSE;
return Scm_NumCmp(arg0, arg1) >= 0;
} | false | false | false | false | false | 0 |
del_entity(APTR data) {
HSCENT *ent = (HSCENT*)data;
#if DEBUG_ENTITY
fprintf(stderr, DHL " del_enty %s\n", ent->name);
#endif
if(NULL != ent->name)
ufreestr(ent->name);
ent->replace[0] = '\0';
ent->numeric = 0;
ufree(ent);
} | false | false | false | false | false | 0 |
SetEndPos(REAL ep){
CHECKWALL;
REAL BegPos = coords_( coords_.Len() -2 ).Pos;
if ( ep < BegPos )
{
ep = BegPos;
}
coords_(coords_.Len()-1).Pos = ep;
CHECKWALL;
} | false | false | false | false | false | 0 |
stack_refer_many_elements_from_bottom
(stack_t *stack,const size_t offset_a,const size_t offset_b,void *output)
{
if(offset_a >= stack_size(stack) || offset_b >= stack_size(stack)){
return STACK_OFFSET_IS_TOO_LARGE;
}
if(output){
size_t offset_small,offset_big;
if(offset_a < offset_b){
offset_small = of... | false | false | false | false | false | 0 |
nm_modem_ofono_new (const char *path)
{
nm_log_dbg (LOGD_MB, "in %s", __func__);
g_return_val_if_fail (path != NULL, NULL);
nm_log_dbg (LOGD_MB, "in %s: path %s", __func__, path);
return (NMModem *) g_object_new (NM_TYPE_MODEM_OFONO,
NM_MODEM_PATH, path,
... | false | false | false | false | false | 0 |
userAgentForUrl(const QUrl& _url) const
{
const KUrl url(_url);
const QString userAgent = KProtocolManager::userAgentForHost((url.isLocalFile() ? QL1S("localhost") : url.host()));
if (userAgent == KProtocolManager::defaultUserAgent())
return QWebPage::userAgentForUrl(_url);
return userAgent;
} | false | false | false | false | false | 0 |
DSDPApplySMW(DSDPSchurMat M, DSDPVec rhs, DSDPVec dy){
int info;
double r=M.schur->r,rr,dr,rhsr,rssr;
double rhsnorm,rhsnorm3,rhs1mrhs3=0,rhs3mrhs3=0;
DSDPVec rhs3=M.schur->rhs3,dy3=M.schur->dy3;
DSDPFunctionBegin;
info=DSDPVecNormInfinity(rhs,&rhsnorm);DSDPCHKERR(info);
info=DSDPVecNormInfinity(rhs3,&... | false | false | false | false | false | 0 |
pre_process()
{
#define SURROUND_FIRM_WAIT_FACTOR 10
Unit::pre_process();
if(hit_points<=0 || action_mode==ACTION_DIE || cur_action==SPRITE_DIE)
return;
err_when(action_mode==ACTION_DIE || cur_action==SPRITE_DIE || hit_points<=0);
if(action_mode2>=ACTION_ATTACK_UNIT && action_mode2<=ACTION_ATTACK_WALL)
retu... | false | false | false | false | false | 0 |
photos_utils_get_pixbuf_common_suffix (GdkPixbufFormat *format)
{
gchar **extensions;
gchar *result = NULL;
gint i;
if (format == NULL)
return NULL;
extensions = gdk_pixbuf_format_get_extensions (format);
if (extensions[0] == NULL)
return NULL;
/* try to find 3-char suffix first, use the last o... | false | false | false | false | false | 0 |
as_int() const
{
// get_si() returns "signed long int", so that's what we return from
// "as_int()" and we leave it to the user to do any possible further integer
// conversions.
if (!(this->i.fits_sint_p())) {
throw std::runtime_error("as_int: Integer larger than int");
}
return this->i... | false | false | false | false | false | 0 |
ctcl_calendar_type(int y, int m, int d, int opt)
{
int days_of_month[13]={0,31,28,31,30,31,30,31,30,30,31,30,31};
if(opt==1){
if(y>1582 || (y==1582 && m>10) || (y==1582 && m==10 && d>14) ){
if( (y%400==0) || (y%4==0 && y%100!=0) )days_of_month[2]++;
if(m>0 && m<=12 && d>0 && d<=days_of_month[m])
... | false | false | false | false | false | 0 |
alloc_kvm_area(void)
{
int cpu;
for_each_possible_cpu(cpu) {
struct vmcs *vmcs;
vmcs = alloc_vmcs_cpu(cpu);
if (!vmcs) {
free_kvm_area();
return -ENOMEM;
}
per_cpu(vmxarea, cpu) = vmcs;
}
return 0;
} | false | false | false | false | false | 0 |
insertColumnLeader(fp_Column* pLeader, fp_Column* pAfter)
{
UT_ASSERT(pLeader);
if (pAfter)
{
UT_sint32 ndx = m_vecColumnLeaders.findItem(pAfter);
UT_ASSERT(ndx >= 0);
m_vecColumnLeaders.insertItemAt(pLeader, ndx+1);
}
else
{
m_vecColumnLeaders.insertItemAt(pLeader, 0);
// Update owner and reformat
//... | false | false | false | false | false | 0 |
process_gt_strand_arg(GtStr *gt_strand_char, GtStrand *strand,
const char *optstr, GtError *err)
{
int had_err = 0;
gt_error_check(err);
if (gt_str_length(gt_strand_char)) {
GtStrand tmpstrand = gt_strand_get(gt_str_get(gt_strand_char)[0]);
if ((gt_str_length(gt_strand_cha... | false | false | false | false | false | 0 |
trace_abort(jit_State *J)
{
lua_State *L = J->L;
TraceError e = LJ_TRERR_RECERR;
TraceNo traceno;
J->postproc = LJ_POST_NONE;
lj_mcode_abort(J);
if (tvisnumber(L->top-1))
e = (TraceError)numberVint(L->top-1);
if (e == LJ_TRERR_MCODELM) {
L->top--; /* Remove error object */
J->state = LJ_TRAC... | false | false | false | false | false | 0 |
zretrievePieces()
{
A aId,aEgo,aHead,aIce,aEgoHash;
I dim[2];
/* manufacture result for pieces */
dim[1]=4;
dim[0]=Zpack.nId;
aId=gc(It,2,dim[0]*dim[1],dim,(I*)Zpack.Id);
dim[0]=Zpack.nEgo;
aEgo=gc(It,2,dim[0]*dim[1],dim,(I*)Zpack.Ego);
dim[0]=PK_HDRSIZE;
aHead=gc(It,1,dim[0],dim,(I *)&ZpkHeade... | false | true | false | false | true | 1 |
checkload (lua_State *L, int stat, const char *filename) {
if (stat) { /* module loaded successfully? */
lua_pushstring(L, filename); /* will be 2nd argument to module */
return 2; /* return open function and file name */
}
else
return luaL_error(L, "error loading module '%s' from file '%s':\n\t%s"... | false | false | false | false | false | 0 |
open(const QString& fn)
{
if(m_view->openPdn(fn))
filename = fn;
} | false | false | false | false | false | 0 |
e_list_iterator_next (EIterator *_iterator)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
if (iterator->iterator)
iterator->iterator = g_list_next (iterator->iterator);
else
iterator->iterator = iterator->list->list;
return (iterator->iterator != NULL);
} | false | false | false | false | false | 0 |
peekCharLL() {
if (fPeekChar == -1) {
fPeekChar = nextCharLL();
}
return fPeekChar;
} | false | false | false | false | false | 0 |
get_isink_val(int min_uA, int max_uA, u16 *setting)
{
int i;
for (i = 0; i < ARRAY_SIZE(isink_cur); i++) {
if (min_uA <= isink_cur[i] && max_uA >= isink_cur[i]) {
*setting = i;
return 0;
}
}
return -EINVAL;
} | false | false | false | false | false | 0 |
ho_recognize_font_1_minus (const double *array_in)
{
double return_value = 0.0;
if (HEIGHT < 0.15)
return_value += 0.2;
if (TOP < 0.3)
return_value += 0.2;
if (BOTTOM > 0.7)
return_value += 0.2;
if (WIDTH_BY_HEIGHT == 1.0 && HEIGHT < 0.1)
return_value += 0.2;
if (HEIGHT > 0.2)
return_v... | false | false | false | false | false | 0 |
approaching(int spdx, float spdy) {
int sgnx = (spdx>0)?1:(spdx<0)?-1:0;
int sgny = (spdy>0)?1:(spdy<0)?-1:0;
if ( ((spdx - _spdx) * sgnx) >= 0 ) return(true);
if ( ((spdy - _spdy) * sgny) >= 0 ) return(true);
return(false);
} | false | false | false | false | false | 0 |
isns_create_object(isns_object_template_t *tmpl,
const isns_attr_list_t *attrs,
isns_object_t *parent)
{
isns_object_t *obj;
unsigned int i;
/* Enforce containment rules. */
if (parent)
isns_assert(tmpl->iot_container == parent->ie_template);
#ifdef notdef
/* This check is somewhat costly: */
if (attrs &&... | false | false | false | false | false | 0 |
setup_page(void){
/* The user must be at least the administrator in order to see
** this screen.
*/
login_check_credentials();
if( !g.okAdmin ){
login_needed();
return;
}
common_standard_menu("setup", 0);
common_add_help_item("CvstracAdmin");
common_header("Setup Menu");
cgi_printf("<table ... | false | false | false | false | false | 0 |
e_widget_ilist_remove_num(Evas_Object *obj, int n)
{
/* _queue_append(obj, CMD_REMOVE, NULL, NULL, 0, NULL, NULL, NULL, 0, 0, n); */
E_Widget_Callback *wcb;
E_Widget_Data *wd;
Eina_List *item;
if (n < 0) return;
wd = e_widget_data_get(obj);
if (!wd) return;
e_ilist_remove_num(wd->o_ilist, n);
... | false | false | false | false | false | 0 |
gnumeric_eigen (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GnmMatrix *A = NULL;
GnmMatrix *EIG = NULL;
gnm_float *eigenvalues = NULL;
GnmValue *res = NULL;
int i, c, r;
gnumeric_eigen_ev_t *ev_sort;
A = gnm_matrix_from_value (argv[0], &res, ei->pos);
if (!A) goto out;
if (A->cols != A->rows || gnm_... | false | false | false | false | false | 0 |
ssl_callback_ServerNameIndication(SSL *ssl, int *al, modssl_ctx_t *mctx)
{
const char *servername =
SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
if (servername) {
conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
if (c) {
if (ap_vhost_iterate_given_conn(c, ssl_... | false | false | false | false | false | 0 |
dmask(float *image, int nx, int ny, float limit,
float dpsf, uint8_t* mask) {
int i, j, ip, jp, ilo, ihi, jlo, jhi;
int flagged_one = 0;
int boxsize = 3 * dpsf;
memset(mask, 0, nx*ny);
/* This makes a mask which dfind uses when looking at the pixels; dfind
* ignores any pixels the mask flagged as un... | false | false | false | false | false | 0 |
layout_split_change(LayoutWindow *lw, ImageSplitMode mode)
{
GtkWidget *image;
gint i;
for (i = 0; i < MAX_SPLIT_IMAGES; i++)
{
if (lw->split_images[i])
{
gtk_widget_hide(lw->split_images[i]->widget);
if (lw->split_images[i]->widget->parent != lw->utility_paned)
gtk_container_remove(GTK_CONTAINER(l... | false | false | false | false | false | 0 |
pt3_start_feed(struct dvb_demux_feed *feed)
{
struct pt3_adapter *adap;
if (signal_pending(current))
return -EINTR;
adap = container_of(feed->demux, struct pt3_adapter, demux);
adap->num_feeds++;
if (adap->thread)
return 0;
if (adap->num_feeds != 1) {
dev_warn(adap->dvb_adap.device,
"%s: unmatched sta... | false | false | false | false | false | 0 |
write_channel_parm( FILE *fp, config_t *cfg )
{
if (cfg->max_size)
fprintf( fp, "MaxSize %d\n", cfg->max_size );
if (cfg->max_messages)
fprintf( fp, "MaxMessages %d\n", cfg->max_messages );
if (!cfg->delete && !delete)
fputs( "Sync New ReNew Flags\n", fp );
if (cfg->expunge || expunge)
fputs( "Expunge Both\... | false | false | false | false | false | 0 |
checkBoxToggled( CheckBox * box )
{
if(box->getName() == "chkUseVertexNormals") {
mLodConfig.advanced.useVertexNormals = box->isChecked();
loadUserLod();
} else if (box->getName() == "chkShowWireframe") {
mCameraMan->getCamera()->setPolygonMode(mWireframe->isChecked() ? PM_WIREFRAME : PM... | false | false | false | false | false | 0 |
regtail(register struct comp *cp, char *p, char *val)
{
register char *scan;
register char *temp;
register int offset;
if (!EMITTING(cp))
return;
/* Find last node. */
for (scan = p; (temp = regnext(scan)) != NULL; scan = temp)
continue;
offset = (OP(scan) == BACK) ? scan - val : val - scan;
... | false | false | false | false | false | 0 |
hashDce(dirCache_t *cache, dirCacheEntry_t *dce)
{
if(dce->beginSlot != cache->nrHashed)
return;
cache->nrHashed = dce->endSlot;
if(dce->longName)
addNameToHash(cache, dce->longName);
addNameToHash(cache, dce->shortName);
} | false | false | false | false | false | 0 |
do_md_stop(const char *md)
{
int r;
CLEANUP_FREE char *err = NULL;
const char *mdadm[] = { str_mdadm, "--stop", md, NULL};
r = commandv(NULL, &err, mdadm);
if (r == -1) {
reply_with_error("%s", err);
return -1;
}
return 0;
} | false | false | false | false | false | 0 |
helper_fill_secret_entry (NMConnection *connection,
GtkBuilder *builder,
const char *entry_name,
GType setting_type,
HelperSecretFunc func)
{
GtkWidget *widget;
NMSetting *setting;
const char *tmp;
g_return_if_f... | false | false | false | false | false | 0 |
metadata_menuitem_clean_album_art_temp_dir (void) {
gchar* path = NULL;
const gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
GFile* album_art_dir = NULL;
const gchar* _tmp2_ = NULL;
GFile* _tmp3_ = NULL;
GFile* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
_tmp0_ = g_get_user_cache_dir ();
_tmp1_ = g_build_filename (_... | false | false | false | false | false | 0 |
DoLeftParen(const StringPiece& name) {
Regexp* re = new Regexp(kLeftParen, flags_);
re->cap_ = ++ncap_;
if (name.data() != NULL)
re->name_ = new string(name.as_string());
return PushRegexp(re);
} | false | false | false | false | false | 0 |
read_file(char *name, void (*process_line)(char *line))
{
FILE *file;
char line[LINE_BUFFER_SIZE];
if (!(file = fopen(name, "r")))
pexit("fopen: %s", name);
while (fgetl(line, sizeof(line), file))
process_line(line);
if (ferror(file)) pexit("fgets");
if (fclose(file)) pexit("fclose");
} | true | true | false | false | true | 1 |
navi_frame_widget_replace(gint32 image_id, gint32 frame_nr, gint32 dyn_rowindex)
{
FrameWidget *fw;
time_t new_timestamp;
if((dyn_rowindex < 0)
|| (dyn_rowindex >= MAX_DYN_ROWS)
|| (naviD == NULL)
)
{
return;
}
fw = &naviD->frame_widget_tab[dyn_rowindex];
new_timestamp = 0;
if(fw->frame_fi... | false | false | false | false | false | 0 |
brasero_file_node_set_from_info (BraseroFileNode *node,
BraseroFileTreeStats *stats,
GFileInfo *info)
{
/* NOTE: the name will never be replaced here since that means
* we could replace a previously set name (that triggered the
* creation of a graft). If someone wants to set a new name,
* then rename_n... | false | false | false | false | false | 0 |
do_split (const char *fname, FILE *fp)
{
int c, ctb, pkttype;
unsigned long pktlen = 0;
int partial = 0;
unsigned char header[20];
int header_idx = 0;
ctb = getc (fp);
if (ctb == EOF)
return 3; /* ready */
header[header_idx++] = ctb;
if (!(ctb & 0x80))
{
log_error("invalid CTB %02x... | true | true | false | false | true | 1 |
EC_GROUP_new_by_curve_name(int nid)
{
size_t i;
EC_GROUP *ret = NULL;
if (nid <= 0)
return NULL;
for (i=0; i<curve_list_length; i++)
if (curve_list[i].nid == nid)
{
ret = ec_group_new_from_data(curve_list[i]);
break;
}
if (ret == NULL)
{
ECerr(EC_F_EC_GROUP_NEW_BY_CURVE_NAME, EC_R_UNKNOWN_G... | false | false | false | false | false | 0 |
SV_Baselines_f (void)
{
int start;
entity_state_t nullstate;
entity_state_t *base;
Com_DPrintf ("Baselines() from %s\n", sv_client->name);
if (sv_client->state != cs_connected)
{
Com_Printf ("baselines not valid -- already spawned\n");
return;
}
// handle the case of a level changing while... | false | false | false | false | true | 1 |
fc_lport_ns_resp(struct fc_seq *sp, struct fc_frame *fp,
void *lp_arg)
{
struct fc_lport *lport = lp_arg;
struct fc_frame_header *fh;
struct fc_ct_hdr *ct;
FC_LPORT_DBG(lport, "Received a ns %s\n", fc_els_resp_type(fp));
if (fp == ERR_PTR(-FC_EX_CLOSED))
return;
mutex_lock(&lport->lp_mutex);
if (lp... | false | false | false | false | false | 0 |
maxnonzerosinrow() const
{
int mx = 0;
for(int r=1; r <= nrows; r++)
{
int si = data[r-1].size();
if(si > mx)
mx = si;
}
return mx;
} | 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.