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 |
|---|---|---|---|---|---|---|
appendRow(const MSBinaryVector& aBinaryVector_)
{
if (columns()==0||aBinaryVector_.length()!=columns())
{
error("MSBinaryMatrix length error.");
return *this;
}
unsigned newLength=(rows()+1)*columns();
MSTypeData<unsigned char,MSAllocator<unsigned char> > *d=MSTypeData<unsigned char,MSAllocator<un... | false | false | false | true | false | 1 |
find_first_waiter(const struct gfs2_glock *gl)
{
struct gfs2_holder *gh;
list_for_each_entry(gh, &gl->gl_holders, gh_list) {
if (!test_bit(HIF_HOLDER, &gh->gh_iflags))
return gh;
}
return NULL;
} | false | false | false | false | false | 0 |
__checksums_differ (uint32_t *checksum, int child_count,
unsigned char *child_up)
{
int ret = _gf_false;
int i = 0;
uint32_t cksum = 0;
gf_boolean_t activate_check = _gf_false;
for (i = 0; i < child_count... | false | false | false | false | false | 0 |
get_linux_version_code(void)
{
struct utsname name;
char *s, *t;
int i, r;
uname(&name); /* never fails */
s = name.release;
r = 0;
for (i = 0; i < 3; i++) {
t = strtok(s, ".");
r = r * 256 + (t ? atoi(t) : 0);
s = NULL;
}
return r;
} | false | false | false | false | false | 0 |
bfa_ioc_sm_getattr(struct bfa_ioc *ioc, enum ioc_event event)
{
switch (event) {
case IOC_E_FWRSP_GETATTR:
del_timer(&ioc->ioc_timer);
bfa_fsm_set_state(ioc, bfa_ioc_sm_op);
break;
case IOC_E_PFFAILED:
case IOC_E_HWERROR:
del_timer(&ioc->ioc_timer);
/* fall through */
case IOC_E_TIMEOUT:
ioc->cbfn->en... | false | false | false | false | false | 0 |
close_and_restore(const struct magic_set *ms, const char *name, int fd,
const struct stat *sb)
{
if ((ms->flags & MAGIC_PRESERVE_ATIME) != 0) {
/*
* Try to restore access, modification times if read it.
* This is really *bad* because it will modify the status
* time of the file... And of course this wi... | false | false | false | false | true | 1 |
search_name_hash(hash_list *top, char *text, unsigned long len)
{
register unsigned long Value;
register hash *name;
register hash_list *HashTable;
Value = shash(text, len, NAME_HASH_SIZE);
HashTable = (hash_list *) top;
name = (hash *) HashTable[Value].head;
while (name)
{
if... | false | false | false | false | false | 0 |
posix_urandom(PyObject *self, PyObject *args)
{
Py_ssize_t size;
PyObject *result;
int ret;
/* Read arguments */
if (!PyArg_ParseTuple(args, "n:urandom", &size))
return NULL;
if (size < 0)
return PyErr_Format(PyExc_ValueError,
"negative argument not ... | false | false | false | false | false | 0 |
MASQUERADE_save(const void *ip, const struct xt_entry_target *target)
{
const struct nf_nat_ipv4_multi_range_compat *mr = (const void *)target->data;
const struct nf_nat_ipv4_range *r = &mr->range[0];
if (r->flags & NF_NAT_RANGE_PROTO_SPECIFIED) {
printf(" --to-ports %hu", ntohs(r->min.tcp.port));
if (r->max.tc... | false | false | false | false | false | 0 |
WXMPMeta_Clone_1 ( XMPMetaRef xmpObjRef,
XMP_OptionBits options,
WXMP_Result * wResult ) /* const */
{
XMP_ENTER_ObjRead ( XMPMeta, "WXMPMeta_Clone_1" )
XMPMeta * xClone = new XMPMeta; // ! Don't need an output lock, final ref assignment in client glue.
thiz.Clone ( xClone, options );
XMP_Asser... | false | false | false | false | false | 0 |
add_looparound_copies (struct loop *loop, chain_p chain)
{
unsigned i;
dref ref, root = get_chain_root (chain);
gimple phi;
FOR_EACH_VEC_ELT (chain->refs, i, ref)
{
phi = find_looparound_phi (loop, ref, root);
if (!phi)
continue;
bitmap_set_bit (looparound_phis, SSA_NAME_VERSION (PHI_RE... | false | false | false | false | false | 0 |
fso_gsm_constants_determinePhoneNumberType (const gchar* number) {
guint8 result = 0U;
gint _tmp0_ = 0;
const gchar* _tmp1_ = NULL;
gchar _tmp2_ = '\0';
gint _tmp3_ = 0;
g_return_val_if_fail (number != NULL, 0U);
_tmp1_ = number;
_tmp2_ = string_get (_tmp1_, (glong) 0);
if (_tmp2_ == '+') {
_tmp0_ = 145;
} ... | false | false | false | false | false | 0 |
filterYule (const Float_t* input, Float_t* output, size_t nSamples, const Float_t* kernel)
{
while (nSamples--) {
*output = 1e-10 /* 1e-10 is a hack to avoid slowdown because of denormals */
+ input [0] * kernel[0]
- output[-1] * kernel[1]
+ input [-1] * kernel[2]
- ou... | false | false | false | false | false | 0 |
_xlate_users(char *user_str, char *key)
{
char *tmp_str, *token, *save_ptr = NULL;
uid_t *uids_array = NULL;
int array_size = 0;
uid_t uid;
if (!user_str || !user_str[0])
return uids_array;
tmp_str = xstrdup(user_str);
token = strtok_r(tmp_str, ",", &save_ptr);
while (token) {
if (uid_from_string(token, &... | false | false | false | false | false | 0 |
sendInfo(int line, Variables& v, list<pair<string, pair<string, int> > >& stk) {
sendStackInfo(stk);
sendVariables(v.getGlobals(), stk, true);
sendVariables(v.getLocals(), stk, false);
} | false | false | false | false | false | 0 |
dbcmd_prefix_rep(register int32 i, char *aval, int32 alen,
struct namlst_t *cmdtab, int32 cmdnum)
{
for (; i < cmdnum; i++)
{ if (strncmp(aval, cmdtab[i].lnam, alen) == 0) return(TRUE); }
return(FALSE);
} | false | false | false | false | false | 0 |
pixmap_endianness_reverse_3_simple(byte *data, int area)
{
int c;
for (c = 0; c < area; c++) {
byte val0 = data[0];
data[0] = data[2];
data[2] = val0;
data += 3;
}
} | false | false | false | false | false | 0 |
replay_truncate(size_t len)
{
int fd = open(filename_.c_str(), O_RDWR);
if (fd < 0) {
fprintf(stderr, "replay %s: %s\n", filename_.c_str(), strerror(errno));
abort();
}
struct stat sb;
int r = fstat(fd, &sb);
if (r != 0) {
fprintf(stderr, "replay %s: %s\n", filename_.c_str(), strerror(errno)... | false | false | false | false | false | 0 |
rcsbuf_cache (RCSNode *rcs, struct rcsbuffer *rcsbuf)
{
if (cached_rcs != NULL)
rcsbuf_cache_close ();
cached_rcs = rcs;
++rcs->refcount;
cached_rcsbuf = *rcsbuf;
} | false | false | false | false | false | 0 |
region_info_list_has_save(List *region_info_list)
{
List *li;
for (li = region_info_list; li != NULL; li = li->next) {
RegionInfo *info = (RegionInfo *)li->data;
if (info->global_common->save)
return TRUE;
}
return FALSE;
} | false | false | false | false | false | 0 |
isInteger() {
if(_denominator == 1 || (_denominator != 0 && (_numerator % _denominator == 0)) || (_denominator == 0 && _numerator == 0))
return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
setRate( StkFloat rate )
{
rate_ = rate;
// If negative rate and at beginning of sound, move pointer to end
// of sound.
if ( (rate_ < 0) && (time_ == 0.0) ) time_ = file_.fileSize() - 1.0;
if ( fmod( rate_, 1.0 ) != 0.0 ) interpolate_ = true;
else interpolate_ = false;
} | false | false | false | false | false | 0 |
PGTYPESnumeric_from_decimal(decimal *src, numeric *dst)
{
int i;
zero_var(dst);
dst->weight = src->weight;
dst->rscale = src->rscale;
dst->dscale = src->dscale;
dst->sign = src->sign;
if (alloc_var(dst, src->ndigits) != 0)
return -1;
for (i = 0; i < src->ndigits; i++)
dst->digits[i] = src->digits[i];
... | false | false | false | false | false | 0 |
dib9000_mbx_get_message_attr(struct dib9000_state *state, u16 id, u16 * msg, u8 * size, u16 attr)
{
u8 i;
u16 *block;
u16 timeout = 30;
*msg = 0;
do {
/* dib9000_mbx_get_from_cache(); */
for (i = 0; i < DIB9000_MSG_CACHE_SIZE; i++) {
block = state->platform.risc.message_cache[i];
if ((*block >> 8) == id... | false | true | false | false | false | 1 |
_gda_thread_meta__collations (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnection *cnc,
GdaMetaStore *store, GdaMetaContext *context, GError **error)
{
main_thread_basic_core (sub_thread__gda_thread_meta__collations, prov, cnc, store, context, error);
} | false | false | false | false | false | 0 |
insert_ds(ldns_rdf *dsowner, uint32_t ttl)
{
int d, dsrand;
int keytag = 0;
char *dsownerstr;
char digeststr[70];
/**
* Average the amount of DS records per delegation a little.
*/
dsrand = 1+rand() % NUM_DS;
for(d = 0; d < dsrand; d++) {
... | true | true | false | false | false | 1 |
atk_text_get_text_after_offset (AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
gint *start_offset,
gint *end_offset)
{
AtkTextIface *iface;
gint local_start_offset, local_end_offset;
gint *real... | false | false | false | false | false | 0 |
log_open(const char *filename)
{
int id;
FILE *file;
if (filename == NULL) return LOG_EINSANE;
if (strcmp(filename, "") == 0) return LOG_EINSANE;
file = fopen(filename, "a");
id = log_open_file(file);
if (id >= 0)
{
struct stat st;
setvbuf (loglist [id] . logfile... | false | false | true | false | true | 1 |
c67x00_hub_status_data(struct usb_hcd *hcd, char *buf)
{
struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd);
struct c67x00_sie *sie = c67x00->sie;
u16 status;
int i;
*buf = 0;
status = c67x00_ll_usb_get_status(sie);
for (i = 0; i < C67X00_PORTS; i++)
if (status & PORT_CONNECT_CHANGE(i))
*buf |= (1 << i);
... | false | false | false | false | false | 0 |
check_array_access(Block *block, Operand *arg)
{
Block *b;
Boolean has_array_access;
for (b = block; b != NULL; b = b->next) {
if (b->pre_head != NULL) {
has_array_access =
check_array_access_stm(b->pre_head->stm_head, arg);
if (has_array_access)
return TRUE;
}
if (b->inner != NULL) {
... | false | false | false | false | false | 0 |
gog_chart_map_make_path (GogChartMap *map, double const *x, double const *y,
int n_points,
GOLineInterpolation interpolation, gboolean skip_invalid, gpointer data)
{
if (map->make_path != NULL)
return (map->make_path) (map, x, y, n_points, interpolation, skip_invalid, data);
return NULL;
} | false | false | false | false | false | 0 |
dlr_mysql_messages(void)
{
Octstr *sql;
long res;
MYSQL_RES *result;
MYSQL_ROW row;
sql = octstr_format("SELECT count(*) FROM %s;", octstr_get_cstr(fields->table));
result = mysql_select(sql);
octstr_destroy(sql);
if (result == NULL) {
return -1;
}
if (mysql_num_rows(r... | false | false | false | false | true | 1 |
fl_throw_focus(Fl_Widget *o) {
#ifdef DEBUG
printf("fl_throw_focus(o=%p)\n", o);
#endif // DEBUG
if (o->contains(Fl::pushed())) Fl::pushed_ = 0;
#if !(defined(WIN32) || defined(__APPLE__))
if (o->contains(fl_selection_requestor)) fl_selection_requestor = 0;
#endif
if (o->contains(Fl::belowmouse())) Fl::belowmo... | false | false | false | false | false | 0 |
display(char *dest, u_char *p)
{
char *dp = dest;
char ch = ' ';
int l, octet = 3;
p++;
l = *p++;
/* Iterate over all octets in the * display-information element */
dp += sprintf(dp, " \"");
while (l--) {
dp += sprintf(dp, "%c", *p++);
/* last octet in group? */
if (*p & 0x80) {
octet++;
ch = ' ... | false | true | false | false | false | 1 |
factor(double n)
{
double quot, d, s;
int i;
print("%.0f\n", n);
if(n == 0)
return;
s = sqrt(n) + 1;
while(modf(n/2, ") == 0) {
print(" 2\n");
n = quot;
s = sqrt(n) + 1;
}
while(modf(n/3, ") == 0) {
print(" 3\n");
n = quot;
s = sqrt(n) + 1;
}
while(modf(n/5, ") == 0) {
pri... | false | false | false | false | false | 0 |
initialiseParams(std::string const &par)
{
//just for the sake of parsing arguments
FuncRequest cmd(LFUN_UNKNOWN_ACTION, par);
if (cmd.getArg(0) == "run") {
oldFileCB->setEditText(toqstr(cmd.getArg(1)));
newFileCB->setEditText(toqstr(cmd.getArg(2)));
slotOK();
}
progressBar->setValue(0);
progressBar->setEn... | false | false | false | false | false | 0 |
cp_ident(CPState *cp)
{
do { cp_save(cp, cp->c); } while (lj_char_isident(cp_get(cp)));
cp->str = lj_str_new(cp->L, cp->sb.buf, cp->sb.n);
cp->val.id = lj_ctype_getname(cp->cts, &cp->ct, cp->str, cp->tmask);
if (ctype_type(cp->ct->info) == CT_KW)
return ctype_cid(cp->ct->info);
return CTOK_IDENT;
} | false | false | false | false | false | 0 |
light_set_status_worker(struct work_struct *work)
{
struct tpacpi_led_classdev *data =
container_of(work, struct tpacpi_led_classdev, work);
if (likely(tpacpi_lifecycle == TPACPI_LIFE_RUNNING))
light_set_status((data->new_state != TPACPI_LED_OFF));
} | false | false | false | false | false | 0 |
Initialize(Widget greq, Widget gnew,
ArgList args, Cardinal *no_args)
{
ScrBarWidget new = (ScrBarWidget)gnew;
if (new->core.width == 0)
new->core.width = new->scrbar.vertical ? new->scrbar.thickness : 1;
if (new->core.height == 0)
new->core.height = new->scrbar.vertical ? 1 : new->scrbar.thic... | false | false | false | false | false | 0 |
tci_raw(struct toshiba_acpi_dev *dev,
const u32 in[TCI_WORDS], u32 out[TCI_WORDS])
{
struct acpi_object_list params;
union acpi_object in_objs[TCI_WORDS];
struct acpi_buffer results;
union acpi_object out_objs[TCI_WORDS + 1];
acpi_status status;
int i;
params.count = TCI_WORDS;
params.pointer = in_objs;
... | false | false | false | false | false | 0 |
gsb_debug_payee_test_fix ()
{
GSList *tmp_list;
tmp_list = gsb_data_transaction_get_complete_transactions_list ();
while (tmp_list)
{
gint transaction_number = gsb_data_transaction_get_transaction_number (tmp_list -> data);
gint payee_number = gsb_data_transaction_get_party_number (transaction_number... | false | false | false | false | false | 0 |
vxge_hw_vpath_rts_rth_set(
struct __vxge_hw_vpath_handle *vp,
enum vxge_hw_rth_algoritms algorithm,
struct vxge_hw_rth_hash_types *hash_type,
u16 bucket_size)
{
u64 data0, data1;
enum vxge_hw_status status = VXGE_HW_OK;
if (vp == NULL) {
status = VXGE_HW_ERR_INVALID_HANDLE;
goto exit;
}
status = ... | false | false | false | false | false | 0 |
xmlSecSimpleKeysStoreFinalize(xmlSecKeyStorePtr store) {
xmlSecPtrListPtr list;
xmlSecAssert(xmlSecKeyStoreCheckId(store, xmlSecSimpleKeysStoreId));
list = xmlSecSimpleKeysStoreGetList(store);
xmlSecAssert(list != NULL);
xmlSecPtrListFinalize(list);
} | false | false | false | false | false | 0 |
DisconnectCC(ClientInfo *p,ConfClient *pCC,char *Reason)
{
p->Count = GenBye(pCC,p->Buf,Reason);
pCC->bKicked = TRUE;
pCC->bSWL = TRUE;
pCC->bPermanent = FALSE;
pCC->bInConf = FALSE;
pCC->bDisconnected = TRUE;
if(pCC->bConnected) {
pCC->bConnected = FALSE;
ConferenceClients--;
}
S... | false | false | false | false | false | 0 |
pnpacpi_parse_ext_irq_option(struct pnp_dev *dev,
unsigned int option_flags,
struct acpi_resource_extended_irq *p)
{
int i;
pnp_irq_mask_t map;
unsigned char flags;
bitmap_zero(map.bits, PNP_IRQ_NR);
for (i = 0; i < p->interrupt_count; i++) {
if (p->interrupts[i]) {
if (p->interrupts[i] < PNP_IRQ_N... | false | false | false | false | false | 0 |
createSocket(SocketType socketType)
{
LogFunction(*log);
Network::SOCKET result = INVALID_SOCKET;
char flag = 0;
int ret = 0;
switch(socketType)
{
case SocketTCP:
result = socket(AF_INET, SOCK_STREAM, 0);
flag = 1;
// no delay for TCP
ret = setsockopt( result, IPPROTO_TCP, TCP_NODELAY, (char*... | false | false | false | false | false | 0 |
convert_number(struct webauth_context *ctx, const char *string,
unsigned long *value)
{
int s;
char *end;
errno = 0;
*value = strtoul(string, &end, 10);
if (*end != '\0' || (*value == ULONG_MAX && errno != 0)) {
s = WA_ERR_REMOTE_FAILURE;
wai_error_set(ctx, s, "invali... | false | false | false | false | false | 0 |
write_header(FILE *f)
{
AU_HEADER(header);
header[AU_HDR_MAGIC_OFF] = htoll((uint32_t) AU_MAGIC);
header[AU_HDR_HDR_SIZE_OFF] = htoll(AU_HEADER_SIZE);
header[AU_HDR_DATA_SIZE_OFF] = 0;
header[AU_HDR_ENCODING_OFF] = htoll(AU_ENC_8BIT_ULAW);
header[AU_HDR_SAMPLE_RATE_OFF] = htoll(DEFAULT_SAMPLE_RATE);
header[AU_H... | false | false | false | false | false | 0 |
lispy_name(char *name) {
bool helper = false;
String *new_name = NewString("");
for (unsigned int i = 0; i < strlen(name); i++) {
if (name[i] == '_' || name[i] == '-') {
Printf(new_name, "%c", '-');
helper = false;
} else if (name[i] >= 'A' && name[i] <= 'Z') {
if (helper)
Printf(new_n... | false | false | false | false | false | 0 |
gc_mark_stack(void)
{
set_stack_end();
if (stack_start > stack_end) {
gc_mark_range(stack_end, stack_start);
}
else {
gc_mark_range(stack_start, stack_end);
}
} | false | false | false | false | false | 0 |
dwc3_endpoint_transfer_complete(struct dwc3 *dwc,
struct dwc3_ep *dep, const struct dwc3_event_depevt *event)
{
unsigned status = 0;
int clean_busy;
u32 is_xfer_complete;
is_xfer_complete = (event->endpoint_event == DWC3_DEPEVT_XFERCOMPLETE);
if (event->status & DEPEVT_STATUS_BUSERR)
status = -ECONNRESE... | false | false | false | false | false | 0 |
rw_cfg_remove_key (ConfigFile * cfg, gchar * section, gchar * key)
{
ConfigSection *sect;
ConfigLine *line;
sect = rw_cfg_find_section (cfg, section);
if (sect)
{
line = rw_cfg_find_string (sect, key);
if (line)
{
cfg->changed = 1;
g_free (line->key);
g_free (line->value);
g_free (line);
sect... | false | false | false | false | false | 0 |
vformat(const char *fmt, va_list vp)
{
/* Initial allocation */
if (!format_buf)
{
format_len = 1024;
format_buf = mem_zalloc(format_len);
format_buf[0] = 0;
}
/* Null format yields last result */
if (!fmt) return (format_buf);
/* Keep going until successful */
while (1)
{
va_list args;
size_t len;... | false | false | false | false | false | 0 |
stream_read_key ( zword timeout, zword routine, bool hot_keys )
{
zchar key = ZC_BAD;
flush_buffer ();
/* Read key from current input stream */
continue_input:
do {
if (istream_replay)
key = replay_read_key ();
else
key = console_read_key (timeout);
} while (key == ZC_BAD);
/*... | false | false | false | false | false | 0 |
xsltValueOf(xsltTransformContextPtr ctxt, xmlNodePtr node,
xmlNodePtr inst, xsltStylePreCompPtr castedComp)
{
#ifdef XSLT_REFACTORED
xsltStyleItemValueOfPtr comp = (xsltStyleItemValueOfPtr) castedComp;
#else
xsltStylePreCompPtr comp = castedComp;
#endif
xmlXPathObjectPtr res = NULL;
xmlNodeP... | false | false | false | false | false | 0 |
c_akick_list(struct Luser *lptr, struct NickInfo *nptr, int ac, char **av)
{
struct ChanInfo *cptr;
struct AutoKick *ak;
int idx;
char *mask = NULL;
if (!(cptr = FindChan(av[1])))
return;
if (ac >= 4)
mask = av[3];
RecordCommand("%s: %s!%s@%s AKICK [%s] LIST %s",
n_ChanServ,
... | false | false | false | false | false | 0 |
maildir_search_start_unicode(struct maildir_searchengine *sei,
const unicode_char *s)
{
unsigned i, j, *r;
size_t n;
for (n=0; s[n]; ++n)
;
++n;
if (sei->string)
free(sei->string);
sei->string=malloc(n * sizeof(*s));
if (!sei->string)
return (-1);
sei->string_l=n-1;
memcpy(sei->string, s, n * s... | false | true | false | false | false | 1 |
hideprod(void)
{
int i, j;
j = 0;
levprd[0] = 0;
PLOOP(1, i) {
if(!(levprd[i] & REDFLAG)) {
j++;
if(foutput != 0)
Bprint(foutput, "Rule not reduced: %s\n", writem(prdptr[i]));
}
levprd[i] = *prdptr[i] - NTBASE;
}
if(j)
print("%d rules never reduced\n", j);
} | false | false | false | false | false | 0 |
flush_ships()
{
flush_ships_count--;
if(flush_ships_count & 1)
return;
if(flush_ships_count & 2)
dships->off();
else
dships->on();
if(flush_ships_count == 0)
flush_ships_count = -1;
} | false | false | false | false | false | 0 |
infix_draw_trunk(int depth)
{
int i;
for(i = 1; i < depth; i++) {
if(trunk[i])
infix_print_fixed_string(" | ");
else
infix_print_fixed_string(" ");
}
} | false | false | false | false | false | 0 |
read_public_key (cdk_stream_t inp, size_t pktlen, cdk_pkt_pubkey_t pk)
{
size_t i, ndays, npkey;
if (!inp || !pk)
return CDK_Inv_Value;
if (DEBUG_PKT)
_gnutls_write_log ("read_public_key: %d octets\n", (int) pktlen);
pk->is_invalid = 1; /* default to detect missing self signatures */
pk->... | false | false | false | false | false | 0 |
fqdncacheUnlockEntry(fqdncache_entry * f)
{
assert(f->locks > 0);
f->locks--;
if (fqdncacheExpiredEntry(f))
fqdncacheRelease(f);
} | false | false | false | false | false | 0 |
client3_1_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
void *myframe)
{
clnt_local_t *local = NULL;
clnt_conf_t *conf = NULL;
clnt_fd_ctx_t *fdctx = NULL;
call_frame_t *frame = NULL;
fd_t *fd = NULL;
i... | false | false | false | false | false | 0 |
SendRaster(RASTERDATA* InputRaster)
{
DRIVER_ERROR err;
BOOL lastplane,firstplane;
if (theHalftoner)
{
lastplane = theHalftoner->LastPlane();
firstplane = theHalftoner->FirstPlane();
}
else lastplane=firstplane=TRUE;
// older code used to send regular CAPy move as part of text... | false | false | false | false | false | 0 |
getCOFFSection(StringRef Section,
unsigned Characteristics,
int Selection,
SectionKind Kind) {
if (COFFUniquingMap == 0)
COFFUniquingMap = new COFFUniqueMapTy();
COFFUniqueMapTy &Map ... | false | false | false | false | false | 0 |
gst_registry_remove_features_for_plugin_unlocked (GstRegistry * registry,
GstPlugin * plugin)
{
GList *f;
g_return_if_fail (GST_IS_REGISTRY (registry));
g_return_if_fail (GST_IS_PLUGIN (plugin));
/* Remove all features for this plugin */
f = registry->priv->features;
while (f != NULL) {
GList *nex... | false | false | false | false | false | 0 |
isc_ratelimiter_setpertic(isc_ratelimiter_t *rl, isc_uint32_t pertic) {
if (pertic == 0)
pertic = 1;
rl->pertic = pertic;
} | false | false | false | false | false | 0 |
ecp_comb_fixed( unsigned char x[], size_t d,
unsigned char w, const mpi *m )
{
size_t i, j;
unsigned char c, cc, adjust;
memset( x, 0, d+1 );
/* First get the classical comb values (except for x_d = 0) */
for( i = 0; i < d; i++ )
for( j = 0; j < w; j++ )
... | false | false | false | false | false | 0 |
clutter_alpha_new_with_func (ClutterTimeline *timeline,
ClutterAlphaFunc func,
gpointer data,
GDestroyNotify destroy)
{
ClutterAlpha *retval;
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), NULL);
g_return_... | false | false | false | false | false | 0 |
db_InitComplete(DB *db)
{
struct RDBStr *rdb = (struct RDBStr *)db;
if (db->type != DB_RDB) {
return 0;
}
/* we should have added a version number to the RDBS structure. Since we
* didn't, we detect that we have and 'extended' structure if the rdbstatus
* func exists */
if (!lg_rdbstatusf... | false | false | false | false | false | 0 |
SiS_SetATTRegs(struct SiS_Private *SiS_Pr, unsigned short StandTableIndex)
{
unsigned char ARdata;
unsigned short i;
for(i = 0; i <= 0x13; i++) {
ARdata = SiS_Pr->SiS_StandTable[StandTableIndex].ATTR[i];
if(i == 0x13) {
/* Pixel shift. If screen on LCD or TV is shifted left or right,
* this... | false | false | false | false | false | 0 |
refresh_parameters(void)
{
for(int chainop_sizet = 0; chainop_sizet != static_cast<int>(chainops_rep.size()); chainop_sizet++) {
for(int n = 0; n < chainops_rep[chainop_sizet].cop->number_of_params(); n++) {
chainops_rep[chainop_sizet].cop->set_parameter(n + 1,
chainops_rep[chainop_sizet].cop->get_p... | false | false | false | false | false | 0 |
config_set_validate_cert_switch( const char *attrname, char *value,
char *errorbuf, int apply )
{
int retVal = LDAP_SUCCESS;
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
if (config_value_is_null(attrname, value, errorbuf, 0)) {
return LDAP_OPERATIONS_ERROR;
}
if ((strcasecmp(value, "on")... | false | false | false | false | false | 0 |
vmw_surface_dma_encode(struct vmw_surface *srf,
void *cmd_space,
const SVGAGuestPtr *ptr,
bool to_surface)
{
uint32_t i;
struct vmw_surface_dma *cmd = (struct vmw_surface_dma *)cmd_space;
const struct svga3d_surface_desc *desc =
svga3dsurface_get_desc(srf->format);
for (i = 0; i < srf->num_s... | false | false | false | false | false | 0 |
search_sqrt (uint32 p, uint32 a)
{
var uint32 x = 1;
var uint32 x2 = 1;
loop {
// 0 < x <= p/2, x2 = x^2 mod p.
if (x2 == a)
return x;
x2 += x; x++; x2 += x;
if (x2 >= p)
x2 -= p;
}
} | false | false | false | false | false | 0 |
smith_waterman_align(const char *u_orig,
const char *v_orig,
const GtUchar *u_enc,
const GtUchar *v_enc,
unsigned long u_len,
... | false | false | false | false | false | 0 |
ti_recv(struct usb_serial_port *port, unsigned char *data,
int length)
{
int cnt;
do {
cnt = tty_insert_flip_string(&port->port, data, length);
if (cnt < length) {
dev_err(&port->dev, "%s - dropping data, %d bytes lost\n",
__func__, length - cnt);
if (cnt == 0)
break;
}
tty_flip_buffer_push... | false | false | false | false | false | 0 |
FileStat(CONSFILE *cfp, struct stat *buf)
#else
FileStat(cfp, buf)
CONSFILE *cfp;
struct stat *buf;
#endif
{
int retval = 0;
if (cfp->errored == FLAGTRUE)
return -1;
switch (cfp->ftype) {
case simpleFile:
retval = fstat(cfp->fd, buf);
break;
case simplePipe:
retval = -1;
bre... | false | false | false | false | false | 0 |
CLinkSegment(PCIDSKFile *file,
int segment,
const char *segment_pointer) :
CPCIDSKSegment(file, segment, segment_pointer),
loaded_(false), modified_(false)
{
Load();
} | false | false | false | false | false | 0 |
evg_stencil_new(GF_Raster2D *_dr, GF_StencilType type)
{
EVGStencil *st;
switch (type) {
case GF_STENCIL_SOLID:
st = evg_solid_brush();
break;
case GF_STENCIL_LINEAR_GRADIENT:
st = evg_linear_gradient_brush();
break;
case GF_STENCIL_RADIAL_GRADIENT:
st = evg_radial_gradient_brush();
break;
case GF_STE... | false | false | false | false | false | 0 |
_k_afterClicked()
{
if ( m_range.start().isValid() )
setRange( DateRange( m_range.start(), QDate() ) );
else if ( m_range.end().isValid() )
setRange( DateRange( m_range.end(), QDate() ) );
else
setRange( DateRange( QDate::currentDate(), QDate() ) );
emit q->rangeChanged( m_range... | false | false | false | false | false | 0 |
reconstruct_search( FILE *search_file_fp, char *search_file_ptr,
char *results_file_ptr)
{
int i, n_best_clsfs, expand_p = TRUE, want_wts_p = TRUE, update_wts_p = FALSE;
clsf_DS *best_clsfs, clsf;
search_DS search = NULL;
static int clsf_n_list[MAX_CLSF_N_LIST] = {END_OF_INT_LIST};
... | false | false | false | true | false | 1 |
mission_brief_common_reset()
{
int i, j;
for (i = 0; i < MAX_TVT_TEAMS; i++) {
Briefings[i].num_stages = 0;
for (j = 0; j < MAX_BRIEF_STAGES; j++) {
Briefings[i].stages[j].num_icons = 0;
Briefings[i].stages[j].num_lines = 0;
Briefings[i].stages[j].text = "";
if (Fred_running) {
if ( Briefings[i... | false | false | false | false | false | 0 |
acdHelpCodeDef(const AcdPAcd thys, AjPStr *msg)
{
AjPStr code = NULL;
AjPStr value = NULL;
AjBool ret = ajFalse;
acdLog("acdHelpCodeDef '%s'\n", acdType[thys->Type].Name);
if(!acdCodeSet)
acdCodeInit();
code = ajStrNewC("help");
ajStrAppendC(&code, acdType[thys->Type].Name);
... | false | false | false | false | false | 0 |
sector_cylinder_alignment_auto(u32 sec_index, struct hd_geometry *geo_p)
{
u32 sec_per_cyl;
u32 sec_index_new;
sec_per_cyl = geo_p->heads * geo_p->sectors;
sec_index_new = sec_index / sec_per_cyl * sec_per_cyl;
if ((sec_index % sec_per_cyl) > (sec_per_cyl >> 1))
{
return sec_index_new + sec_per_cyl;
}
ret... | false | false | false | false | false | 0 |
ario_browser_preferences_new (void)
{
ARIO_LOG_FUNCTION_START;
ArioBrowserPreferences *browser_preferences;
GtkBuilder *builder;
browser_preferences = g_object_new (TYPE_ARIO_BROWSER_PREFERENCES, NULL);
g_return_val_if_fail (browser_preferences->priv != NULL, NULL);
bu... | false | false | false | false | false | 0 |
unix_tcdrain(value fd)
{
if (tcdrain(Int_val(fd)) == -1) uerror("tcdrain", Nothing);
return Val_unit;
} | false | false | false | false | false | 0 |
threshold_init_device(void)
{
unsigned lcpu = 0;
/* to hit CPUs online before the notifier is up */
for_each_online_cpu(lcpu) {
int err = threshold_create_device(lcpu);
if (err)
return err;
}
threshold_cpu_callback = amd_64_threshold_cpu_callback;
return 0;
} | false | false | false | false | false | 0 |
cas_check_pci_invariants(struct cas *cp)
{
struct pci_dev *pdev = cp->pdev;
cp->cas_flags = 0;
if ((pdev->vendor == PCI_VENDOR_ID_SUN) &&
(pdev->device == PCI_DEVICE_ID_SUN_CASSINI)) {
if (pdev->revision >= CAS_ID_REVPLUS)
cp->cas_flags |= CAS_FLAG_REG_PLUS;
if (pdev->revision < CAS_ID_REVPLUS02u)
cp... | false | false | false | false | false | 0 |
set_code(struct tca6507_chip *tca, int reg, int bank, int new)
{
int mask = 0xF;
int n;
if (bank) {
mask <<= 4;
new <<= 4;
}
n = tca->reg_file[reg] & ~mask;
n |= new;
if (tca->reg_file[reg] != n) {
tca->reg_file[reg] = n;
tca->reg_set |= 1 << reg;
}
} | false | false | false | false | false | 0 |
GetLODSizeAndOffsetTables(vector<uint64_t>& vLODIndices, uint64_t iLOD) {
uint64_t ulSize = 0;
vector<uint64_t> vReducedDomainSize;
vReducedDomainSize.resize(ulDomainSemantics.size());
// compute size of the domain
for (size_t i=0;i<vReducedDomainSize.size();i++) {
if(ulLODDecFactor[i] < 2)
vRedu... | false | false | false | false | false | 0 |
Write(const void *buffer)
{
m_Writer = CreateWriter( m_FileName.c_str() );
WriteImageInformation();
m_Writer->WriteData( buffer, this->GetImageSizeInBytes() );
delete m_Writer;
m_Writer = ITK_NULLPTR;
} | false | false | false | false | false | 0 |
getSetting(const stringw& key) const
{
//the find function or irrmap returns a pointer to a map Node
//if the key can be found, otherwise it returns null
//the map node has the function getValue and getKey, as we already know the key, we return node->getValue()
map<stringw, stringw>::Node* n = SettingMap.... | false | false | false | false | false | 0 |
qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew) {
facetT *neighbor, **neighborp, *newfacet= NULL;
setT *vertices;
boolT flip, toporient;
int horizonskip, visibleskip;
FOREACHneighbor_(visible) {
if (!neighbor->seen && !neighbor->visible) {
vertices= qh_facetintersect(neighbor,vi... | false | false | false | false | true | 1 |
gsql_type_datetime_copy (GSQLTypeDateTime *dt)
{
GSQLTypeDateTime *new_dt;
g_return_val_if_fail (dt != NULL, NULL);
new_dt = g_new0(GSQLTypeDateTime, 1);
memcpy ((void *) new_dt, (void *) dt, sizeof (GSQLTypeDateTime));
return new_dt;
} | false | true | false | false | false | 1 |
on_menu_align_top()
{
//Get the top-most position:
double top = 0;
for(type_vec_canvas_items::iterator iter = m_layout_items_selected.begin();
iter != m_layout_items_selected.end(); ++iter)
{
Glib::RefPtr<CanvasLayoutItem> selected_item = *iter;
if(!selected_item)
continue;
double x = 0;
... | false | false | false | false | false | 0 |
ce_mark_pr(const waypoint* wp)
{
char* id;
if (inRoute) {
id = ce_find_uuid(wp);
if (id == NULL) {
sprintf(xml_buffer, "{%s}", ce_gen_uuid());
id = xml_buffer;
}
}
/* Have we seen and written the (nearly) same waypoint ? */
else if (ce_find_wpt(wp) != NULL) {
return;
} else {
... | false | true | false | false | false | 1 |
spidev_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
if (_IOC_TYPE(cmd) == SPI_IOC_MAGIC
&& _IOC_NR(cmd) == _IOC_NR(SPI_IOC_MESSAGE(0))
&& _IOC_DIR(cmd) == _IOC_WRITE)
return spidev_compat_ioc_message(filp, cmd, arg);
return spidev_ioctl(filp, cmd, (unsigned long)compat_ptr(arg));
} | false | false | false | false | false | 0 |
HdlrFunc31 (
Obj self,
Obj a_type,
Obj a_obj )
{
Obj t_1 = 0;
Obj t_2 = 0;
Obj t_3 = 0;
Obj t_4 = 0;
Bag oldFrame;
OLD_BRK_CURR_STAT
/* allocate new stack frame */
SWITCH_TO_NEW_FRAME(self,0,0,oldFrame);
REM_BRK_CURR_STAT();
SET_BRK_CURR_STAT(0);
/* if not IsType( type ) then */
t_4 = GF_IsType;
... | false | false | false | false | false | 0 |
set_all_tfswrite(int val)
{
type_pool_node_t *node;
LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link)
node->data.tfswrite = val;
} | 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.