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 |
|---|---|---|---|---|---|---|
opal_err2str(int errnum, const char **errmsg)
{
const char *retval;
switch (errnum) {
case OPAL_SUCCESS:
retval = "Success";
break;
case OPAL_ERROR:
retval = "Error";
break;
case OPAL_ERR_OUT_OF_RESOURCE:
retval = "Out of resource";
break;
case OP... | false | false | false | false | false | 0 |
welcome_token_exchange()
{
// <auth type="token-welcome-exchange">
// <token>JLKJLKJDS</token></auth>
xmlNodePtr n;
xmlNodePtr m;
xmlDocPtr doc;
xmlChar *xmlbuff;
int buffersize;
doc = xmlNewDoc(BAD_CAST "1.0");
n = xmlNewNode(NULL, BAD_CAST "auth");
m = xmlNewNode(N... | false | false | false | false | false | 0 |
additional_selector_matches_style (StTheme *a_this,
CRAdditionalSel *a_add_sel,
StThemeNode *a_node)
{
CRAdditionalSel *cur_add_sel = NULL;
g_return_val_if_fail (a_add_sel, FALSE);
for (cur_add_sel = a_add_sel; cur_add_sel; cur_ad... | false | false | false | false | false | 0 |
write(const QByteArray &buf)
{
if(d->active && !d->udp)
d->sock.write(buf);
} | false | false | false | false | false | 0 |
isInside(QPointF p)
{
QPointF cp = getGLEPoint(CentrePoint);
QPointF gp = QGLE::absQtToGLE(p,dpi,pixmap.height());
double angle;
if (QGLE::distance(cp,gp) < getGLELength(Radius))
{
angle = QGLE::angleBetweenTwoPoints(cp,gp);
if (isOnArc(angle))
return(true);
}
return(false);
} | false | false | false | false | false | 0 |
F_defun(struct alisp_instance *instance, struct alisp_object * args)
{
struct alisp_object * p1 = car(args),
* p2 = car(cdr(args)),
* p3 = cdr(cdr(args));
struct alisp_object * lexpr;
lexpr = new_object(instance, ALISP_OBJ_CONS);
if (lexpr) {
lexpr->value.c.car = new_identifier(instance, "lambda");... | false | false | false | false | false | 0 |
seems_valid_real(const Octstr *ostr, const char *filename, long lineno,
const char *function)
{
gw_assert(immutables_init);
gw_assert_place(ostr != NULL,
filename, lineno, function);
gw_assert_allocated(ostr,
filename, lineno, function... | false | false | false | true | false | 1 |
wordlistAdd(wordlist ** list, const char *key)
{
while (*list)
list = &(*list)->next;
*list = memAllocate(MEM_WORDLIST);
(*list)->key = xstrdup(key);
(*list)->next = NULL;
return (*list)->key;
} | false | false | false | false | false | 0 |
dbus_reply_cb(void *data, DBusMessage *replymsg, DBusError *error)
{
if (dbus_error_is_set(error)) {
//printf("Error: %s - %s\n", error->name, error->message);
}
} | false | false | false | false | false | 0 |
syck_map_add_m(VALUE self, VALUE key, VALUE val)
{
SyckNode *node;
VALUE emitter = rb_ivar_get( self, s_emitter );
Data_Get_Struct( self, SyckNode, node );
if ( rb_respond_to( emitter, s_node_export ) ) {
key = rb_funcall( emitter, s_node_export, 1, key );
val = rb_funcall( emitter, s_n... | false | false | false | false | false | 0 |
prune_criteria_number (unsigned long *number,char **r)
{
char *t;
STRINGLIST *s = NIL;
/* parse the date and return fn if OK */
int ret = (mail_criteria_string (&s,r) &&
(*number = strtoul ((char *) s->text.data,&t,10)) && !*t) ?
T : NIL;
if (s) mail_free_stringlist (&s);
return ret;
} | false | false | false | false | false | 0 |
archive_read_set_read_callback(struct archive *_a,
archive_read_callback *client_reader)
{
struct archive_read *a = (struct archive_read *)_a;
archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW,
"archive_read_set_read_callback");
a->client.reader = client_reader;
return ARCHIVE_OK;
} | false | false | false | false | false | 0 |
oprintf (outf_p o, const char *format, ...)
{
char *s;
size_t slength;
va_list ap;
/* In plugin mode, the O could be a NULL pointer, so avoid crashing
in that case. */
if (!o)
return;
va_start (ap, format);
slength = vasprintf (&s, format, ap);
if (s == NULL || (int) slength < 0)
fatal (... | false | false | false | false | false | 0 |
gegl_node_get_cache (GeglNode *node)
{
g_return_val_if_fail (GEGL_IS_NODE (node), NULL);
if (!node->cache)
{
GeglPad *pad;
const Babl *format;
/* XXX: it should be possible to have cache for other pads than
* only "output" pads
*/
pad = gegl_node_get_pad (node, "output... | false | false | false | false | false | 0 |
DetermineConstraintAxis(int constraint, double *x)
{
// Look for trivial cases
if ( ! this->Constrained )
{
return -1;
}
else if ( constraint >= 0 && constraint < 3 )
{
return constraint;
}
// Okay, figure out constraint. First see if the choice is
// outside the hot spot
if ( ! t... | false | false | false | false | false | 0 |
decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
struct nfs4_label *label)
{
uint32_t pi = 0;
uint32_t lfs = 0;
__u32 len;
__be32 *p;
int status = 0;
if (unlikely(bitmap[2] & (FATTR4_WORD2_SECURITY_LABEL - 1U)))
return -EIO;
if (likely(bitmap[2] & FATTR4_WORD2_SECURITY_LABEL)) {
p =... | false | false | false | false | false | 0 |
delete_win_hashtab (WinData *win)
{
int entry;
WinList *list;
entry = win->app_id & 0xff;
list = &hash_tab[entry];
if (win->win_prev)
win->win_prev->win_next = win->win_next;
else
list->head = win->win_next;
if (win->win_next)
win->win_next->win_prev = win->win_prev;
else
list->tail = ... | false | false | false | false | false | 0 |
Statistics_User_Time_2(WamWord since_start_word, WamWord since_last_word)
{
long user_time;
int since_start, since_last;
user_time = M_User_Time();
since_start = user_time;
since_last = user_time - last_user_time;
last_user_time = user_time;
return Un_Integer_Check(since_start, since_start_word) &&
... | false | false | false | false | false | 0 |
handle_alias_ifunc_attribute (bool is_alias, tree *node, tree name, tree args,
bool *no_add_attrs)
{
tree decl = *node;
if (TREE_CODE (decl) != FUNCTION_DECL
&& (!is_alias || TREE_CODE (decl) != VAR_DECL))
{
warning (OPT_Wattributes, "%qE attribute ignored", name);
*no_add_attrs = tr... | false | false | false | false | false | 0 |
ario_cover_preferences_sync_cover_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
ArioCoverPreferences *cover_preferences)
{
ARIO_LOG_FUNCTION_START;
gchar... | false | false | false | false | false | 0 |
YM2612_save_state(void)
{
int num;
const char statename[] = "YM2612";
for(num=0;num<YM2612NumChips;num++)
{
state_save_register_UINT8 (statename, num, "regs" , FM2612[num].REGS , 512);
FMsave_state_st(statename,num,&FM2612[num].OPN.ST);
FMsave_state_channel(statename,num,FM2612[num].CH,6);
/*... | false | false | false | false | false | 0 |
ladish_app_supervisor_set_app_properties(
ladish_app_supervisor_proxy_handle proxy,
uint64_t id,
const char * name,
const char * command,
bool run_in_terminal,
const char * level)
{
dbus_bool_t terminal;
terminal = run_in_terminal;
if (!cdbus_call(
0,
proxy_ptr->service,
prox... | false | false | false | false | false | 0 |
Start(Runnable* runnable) {
ASSERT(owned_);
if (!owned_) return false;
ASSERT(!started_);
if (started_) return false;
// Make sure that ThreadManager is created on the main thread before
// we start a new thread.
ThreadManager::Instance();
ThreadInit* init = new ThreadInit;
init->thread = this;
in... | false | false | false | false | false | 0 |
HPDF_SetPagesConfiguration (HPDF_Doc pdf,
HPDF_UINT page_per_pages)
{
HPDF_PTRACE ((" HPDF_SetPagesConfiguration\n"));
if (!HPDF_HasDoc (pdf))
return HPDF_INVALID_DOCUMENT;
if (pdf->cur_page)
return HPDF_RaiseError (&pdf->error, HPDF_INVALID_DOCUMENT_STAT... | false | false | false | false | false | 0 |
mlx4_pci_enable_device(struct mlx4_dev *dev)
{
struct pci_dev *pdev = dev->persist->pdev;
int err = 0;
mutex_lock(&dev->persist->pci_status_mutex);
if (dev->persist->pci_status == MLX4_PCI_STATUS_DISABLED) {
err = pci_enable_device(pdev);
if (!err)
dev->persist->pci_status = MLX4_PCI_STATUS_ENABLED;
}
mut... | false | false | false | false | false | 0 |
init(void)
{
if (!symbol_table.empty())
return;
trace(("%s\n", __PRETTY_FUNCTION__));
//
// initialize the names of the builtin functions
//
rpt_func::init(symbol_table);
//
// pull values from fmtgen
//
cattr__rpt_init();
common__rpt_init();
cstate__rpt_init();
fs... | false | false | false | false | false | 0 |
__backtrace_symbols (array, size)
void *const *array;
int size;
{
Dl_info info[size];
int status[size];
int cnt;
size_t total = 0;
char **result;
/* Fill in the information we can get from `dladdr'. */
for (cnt = 0; cnt < size; ++cnt)
{
struct link_map *map;
status[cnt] = _dl_a... | false | false | false | false | true | 1 |
jl_parse_string(const char *str, int pos0, int greedy)
{
value_t s = cvalue_static_cstring(str);
value_t p = fl_applyn(3, symbol_value(symbol("jl-parse-one-string")),
s, fixnum(pos0), greedy?FL_T:FL_F);
jl_value_t *expr=NULL, *pos1=NULL;
JL_GC_PUSH(&expr, &pos1);
value_t e... | false | false | false | false | false | 0 |
jar_gen_index(JAR *jar, jarArch format, JAR_FILE fp)
{
int result = JAR_ERR_CORRUPT;
JAR_FSEEK (fp, 0, (PRSeekWhence)0);
switch (format) {
case jarArchZip:
result = jar_listzip (jar, fp);
break;
case jarArchTar:
result = jar_listtar (jar, fp);
break;
case jarArchGuess:
case jarArchNon... | false | false | false | false | false | 0 |
btrfsic_read_from_block_data(
struct btrfsic_block_data_ctx *block_ctx,
void *dstv, u32 offset, size_t len)
{
size_t cur;
size_t offset_in_page;
char *kaddr;
char *dst = (char *)dstv;
size_t start_offset = block_ctx->start & ((u64)PAGE_CACHE_SIZE - 1);
unsigned long i = (start_offset + offset) >> PAGE_CACHE_SHI... | false | true | false | false | false | 1 |
snd_pcm_oss_write2(struct snd_pcm_substream *substream, const char *buf, size_t bytes, int in_kernel)
{
struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_sframes_t frames, frames1;
#ifdef CONFIG_SND_PCM_OSS_PLUGINS
if (runtime->oss.plugin_first) {
struct snd_pcm_plugin_channel *channels;
size_t oss_f... | false | false | false | false | false | 0 |
delimiterButton2Event(const XEvent *pEvent_)
{
if (delimiterSelection()==MSTrue)
{
if (delimiterEdit()==MSFalse&&delimiterVector().length()==0) server()->bell();
else selectDelimiter(pEvent_);
}
else server()->bell();
} | false | false | false | false | false | 0 |
unescape_chars(const char* cp, int len, Charset* charset, bool js){
char* s=new(PointerFreeGC) char[len+1]; // must be enough (%uXXXX==6 bytes, max utf-8 char length==6 bytes)
char* dst=s;
EscapeState escapeState=EscapeRest;
uint escapedValue=0;
int srcPos=0;
short int jsCnt=0;
while(srcPos<len){
uchar c=(ucha... | false | false | false | false | false | 0 |
jas_iccattrval_dump(jas_iccattrval_t *attrval, FILE *out)
{
char buf[8];
jas_iccsigtostr(attrval->type, buf);
fprintf(out, "refcnt = %d; type = 0x%08x %s\n", attrval->refcnt,
attrval->type, jas_iccsigtostr(attrval->type, &buf[0]));
if (attrval->ops->dump) {
(*attrval->ops->dump)(attrval, out);
}
} | true | true | false | false | false | 1 |
get_outer_parallel_do_loop(const Block *b)
{
Block *bpt;
for( bpt = b->outer; bpt != NULL; bpt = bpt->outer ){
if( is_parallel_do_loop(bpt) )
return bpt;
}
return NULL;
} | false | false | false | false | false | 0 |
destroy_lease_table(GDHCPServer *dhcp_server)
{
GList *list;
g_hash_table_destroy(dhcp_server->nip_lease_hash);
dhcp_server->nip_lease_hash = NULL;
for (list = dhcp_server->lease_list; list; list = list->next) {
struct dhcp_lease *lease = list->data;
g_free(lease);
}
g_list_free(dhcp_server->lease_list);... | false | false | false | false | false | 0 |
AddIncomingEdge(HBasicBlock* block, HEnvironment* other) {
ASSERT(!block->IsLoopHeader());
ASSERT(values_.length() == other->values_.length());
int length = values_.length();
for (int i = 0; i < length; ++i) {
HValue* value = values_[i];
if (value != NULL && value->IsPhi() && value->block() == block) {... | false | false | false | false | false | 0 |
mp4ff_read_stsz(mp4ff_t *f)
{
mp4ff_read_char(f); /* version */
mp4ff_read_int24(f); /* flags */
f->track[f->total_tracks - 1]->stsz_sample_size = mp4ff_read_int32(f);
f->track[f->total_tracks - 1]->stsz_sample_count = mp4ff_read_int32(f);
if (f->track[f->total_tracks - 1]->stsz_sample_size == 0)
... | false | false | false | false | false | 0 |
do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep,
char *to_start, char *to_end, char **to_stop)
{
enum __codecvt_result result;
#ifdef _LIBC
struct __gconv_step *gs = codecvt->__cd_out.__cd.__steps;
int status;
size_t dummy;
codecvt->__cd_out.__cd.__data[0].__outbuf = (unsigned char *) to_s... | false | false | false | false | false | 0 |
brcmf_proto_detach(struct brcmf_pub *drvr)
{
brcmf_dbg(TRACE, "Enter\n");
if (drvr->proto) {
if (drvr->bus_if->proto_type == BRCMF_PROTO_BCDC)
brcmf_proto_bcdc_detach(drvr);
else if (drvr->bus_if->proto_type == BRCMF_PROTO_MSGBUF)
brcmf_proto_msgbuf_detach(drvr);
kfree(drvr->proto);
drvr->proto = NULL;... | false | false | false | false | false | 0 |
putOctal(char *cp, int len, off_t value)
{
char tempBuffer[sizeof(off_t)*3 + 1];
char *tempString = tempBuffer;
int width;
width = sprintf(tempBuffer, "%0*"OFF_FMT"o", len, value);
tempString += (width - len);
/* If string has leading zeroes, we can drop one */
/* and field will have trailing '\0' */
/* (incr... | true | true | false | false | false | 1 |
deleteSelection(const Selection &selection)
{
if (selection.state() == Selection::RANGE) {
RefPtr<DeleteSelectionCommandImpl> cmd = new DeleteSelectionCommandImpl(document(), selection);
applyCommandToComposite(cmd);
}
} | false | false | false | false | false | 0 |
htset (ht_t * ht, char *key)
{
long alveole = hash (ht, key);
htelt_t *p;
for (p = ht[alveole]; p && strcmp (p->KEY, key); p = p->NEXT);
if (p)
return p;
return ht[alveole] = eltadd (ht[alveole], key);
} | false | false | false | false | false | 0 |
check_transitions (SkkContext *context,
const SkkTransition *transitions)
{
gint i;
for (i = 0; transitions[i].keys != NULL; i++) {
const gchar *preedit;
gchar *output;
SkkInputMode input_mode;
skk_context_reset (context);
output = skk_context_poll_output (context);
... | false | false | false | false | false | 0 |
PyvtkUnsignedShortArray_GetDataTypeValueMin(PyObject *, PyObject *args)
{
vtkPythonArgs ap(args, "GetDataTypeValueMin");
PyObject *result = NULL;
if (ap.CheckArgCount(0))
{
unsigned short tempr = vtkUnsignedShortArray::GetDataTypeValueMin();
if (!ap.ErrorOccurred())
{
result = ap.BuildV... | false | false | false | false | false | 0 |
voca_mono2tri(WORD_INFO *winfo, HTK_HMM_INFO *hmminfo)
{
WORD_ID w;
int ph;
char *p;
HMM_Logical *tmplg;
boolean ok_flag = TRUE;
for (w=0;w<winfo->num;w++) {
cycle_triphone(NULL);
cycle_triphone(winfo->wseq[w][0]->name);
for (ph = 0; ph < winfo->wlen[w] ; ph++) {
if (ph == winfo->wlen[... | false | false | false | false | false | 0 |
native_method_get_modifiers_internal(struct vm_object *this)
{
struct vm_method *vmm;
vmm = vm_object_to_vm_method(this);
if (!vmm)
return 0;
return vmm->method->access_flags;
} | false | false | false | false | false | 0 |
ipmi_lan_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
{
struct ipmi_rq_entry * entry;
struct ipmi_rs * rsp = NULL;
int try = 0;
lprintf(LOG_DEBUG, "ipmi_lan_send_cmd:opened=[%d], open=[%d]",
intf->opened, intf->open);
if (intf->opened == 0 && intf->open != NULL) {
if (intf->open(intf) < 0) {
lp... | false | false | false | false | false | 0 |
ThreadDisabledLeaks() {
if (FLAGS_no_threads) return;
pthread_t tid;
pthread_attr_t attr;
CHECK_EQ(pthread_attr_init(&attr), 0);
CHECK_EQ(pthread_create(&tid, &attr, RunDisabledLeaks, NULL), 0);
void* res;
CHECK_EQ(pthread_join(tid, &res), 0);
} | false | false | false | false | false | 0 |
gg_convert_image_to_grid_int16 (const gGraphImagePtr img)
{
/* converting this grid-image to Int16 */
int x;
int y;
void *pixels;
short value;
unsigned char *p_in;
short *p_out;
if (img->pixel_format != GG_PIXEL_GRID)
return GGRAPH_INVALID_IMAGE;
if (img->sample_format == GGRAPH_SAMPL... | false | false | false | false | true | 1 |
removeTests()
{
while ( isValid() )
removeTest( 0 );
} | false | false | false | false | false | 0 |
panel_background_set_rotate (PanelBackground *background,
gboolean rotate_image)
{
rotate_image = rotate_image != FALSE;
if (background->rotate_image == rotate_image)
return;
free_transformed_resources (background);
panel_background_set_rotate_no_update (background, rotate_image);
panel_backgro... | false | false | false | false | false | 0 |
maki_dbus_list (const gchar* server, const gchar* channel, GError** error)
{
makiServer* serv;
makiInstance* inst = maki_instance_get_default();
if ((serv = maki_instance_get_server(inst, server)) != NULL)
{
if (channel[0])
{
maki_server_send_printf(serv, "LIST %s", channel);
}
else
{
maki_server_s... | false | false | false | false | false | 0 |
frfind(P *p, unsigned char *s, int len)
{
long amnt = p->byte;
int x;
unsigned char table[256], c;
if (len > p->b->eof->byte - p->byte) {
x = len - (p->b->eof->byte - p->byte);
if (amnt < x)
return NULL;
amnt -= x;
fbkwd(p, x);
}
if (!len)
return p;
p->valcol = 0;
mset(table, 255, 256);
for (x = ... | false | false | false | false | false | 0 |
IntToStr(int num, unsigned int mxlen, char flag){
static char s[LEN+1];
int len;
s[LEN]=0;
char neg=0;
if(num<0){
num=-num;
neg=1;
};
for (len=(LEN-1);len>=(LEN-mxlen);len--){
s[len]=(num%10)+'0';
num/=10;
};
len++;
if(!(flag&F_LONG)){
while(s[len]=='0' && len < (LEN-1))
l... | false | false | false | false | false | 0 |
miner_files_get_file_urn (TrackerMinerFiles *miner,
GFile *file,
gboolean *is_iri)
{
const gchar *urn;
urn = tracker_miner_fs_get_urn (TRACKER_MINER_FS (miner), file);
*is_iri = TRUE;
if (!urn) {
/* This is a new insertion, use anonymous U... | false | false | false | false | false | 0 |
state_end0(char ch)
{
if (ch == '\n')
{
state = &HeaderParser::state_h0;
return;
}
else if (ch == ' ' || ch == '\t' || ch == '\r')
{
return;
}
else
{
log_warn("invalid character " << chartoprint(ch) << " ... | false | false | false | false | false | 0 |
_dxfHashTableReset(Htable *table)
{
/* resets the hash table by cleaning all buckets and
deleting all records */
Block
*block=table->block,
*next;
while(block)
{
next=block->next;
if (block->rec) DXFree((Pointer) block->rec);
DXFree((Pointer) block);
block=next;
}
... | false | false | false | false | false | 0 |
rgbe_read_uncompressed (const rgbe_file *file,
goffset *cursor,
gfloat *pixels)
{
const guint8 *data;
guint i;
g_return_val_if_fail (file, FALSE);
g_return_val_if_fail (file->file, FALSE);
g_return_val_if_fai... | false | false | false | false | false | 0 |
ao_device_load_options(ao_device *device, ao_option *options){
while (options != NULL) {
if(!strcmp(options->key,"matrix")){
/* If a driver has a static channel mapping mechanism
(physically constant channel mapping, or at least an
unvarying set of constants for mapping channels), the
... | false | false | false | false | false | 0 |
drawArea(const FXDrawable* source,FXint sx,FXint sy,FXint sw,FXint sh,FXint dx,FXint dy){
if(!surface){ fxerror("FXDCWindow::drawArea: DC not connected to drawable.\n"); }
if(!source || !source->id()){ fxerror("FXDCWindow::drawArea: illegal source specified.\n"); }
XCopyArea(DISPLAY(getApp()),source->id(),surface... | false | false | false | true | false | 1 |
mono_field_get_rva (MonoClassField *field)
{
guint32 rva;
int field_index;
MonoClass *klass = field->parent;
MonoFieldDefaultValue *field_def_values;
g_assert (field->type->attrs & FIELD_ATTRIBUTE_HAS_FIELD_RVA);
if (!klass->ext || !klass->ext->field_def_values) {
mono_class_alloc_ext (klass);
field_def_va... | false | false | false | false | false | 0 |
constructCompileUnit(const MDNode *N) {
DICompileUnit DIUnit(N);
StringRef FN = DIUnit.getFilename();
StringRef Dir = DIUnit.getDirectory();
unsigned ID = GetOrCreateSourceID(FN, Dir);
DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
CompileUnit *NewCU = new CompileUnit(ID, Die, Asm, this);
NewCU->addStri... | false | false | false | false | false | 0 |
ipmi_check_session_sequence_number_1_5_init (uint32_t *highest_received_sequence_number,
uint32_t *previously_received_list)
{
if (!highest_received_sequence_number
|| !previously_received_list)
{
SET_ERRNO (EINVAL);
return (-1);
}
(*highest_re... | false | false | false | false | false | 0 |
xfs_btree_get_bufs(
xfs_mount_t *mp, /* file system mount point */
xfs_trans_t *tp, /* transaction pointer */
xfs_agnumber_t agno, /* allocation group number */
xfs_agblock_t agbno, /* allocation group block number */
uint lock) /* lock flags for get_buf */
{
xfs_daddr_t d; /* real disk block address */
... | false | false | false | false | false | 0 |
_splitAtOrBeforeThisRun(fp_Run *pCurrentRun, UT_sint32 iTrailSpace)
{
// This run is past the end of the line.
// Reminder: m_iWorkingLineWidth = Length including this run.
// Set m_iWorkingLineWidth to length minus this run since this run
// extends beyond the maximum width of the line
m_iWorkingLineWidth -=... | false | false | false | false | false | 0 |
stmmac_clean_desc3(void *priv_ptr, struct dma_desc *p)
{
if (unlikely(p->des3))
p->des3 = 0;
} | false | false | false | false | false | 0 |
smudge (int argc, const char** argv)
{
const char* key_name = 0;
const char* key_path = 0;
const char* legacy_key_path = 0;
int argi = parse_plumbing_options(&key_name, &key_path, argc, argv);
if (argc - argi == 0) {
} else if (!key_name && !key_path && argc - argi == 1) { // Deprecated - for compatibility ... | false | false | false | false | false | 0 |
colorInterpolationForValue(DOM::CSSPrimitiveValueImpl* primitiveValue)
{
if (!primitiveValue)
return CI_AUTO;
switch (primitiveValue->getIdent()) {
case CSS_VAL_SRGB:
return CI_SRGB;
case CSS_VAL_LINEARRGB:
return CI_LINEARRGB;
case CSS_VAL_AUTO:
default:
return ... | false | false | false | false | false | 0 |
generateTemplateMaterial(Perm permutation)
{
String materialName = mBaseName;
if(permutation & LightMaterialGenerator::MI_DIRECTIONAL)
{
materialName += "Quad";
}
else
{
materialName += "Geometry";
}
if(permutation & Li... | false | false | false | false | false | 0 |
dht_fremovexattr (call_frame_t *frame, xlator_t *this,
fd_t *fd, const char *key, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
dht_local_t *local = NULL;
dht_layout_t *layout = NULL;
int call_cnt = 0;
int i;
... | false | false | false | false | false | 0 |
insert_seti(seq, stime, sline, voice, addr, value)
seq_type seq;
time_type stime;
int sline;
int voice;
int *addr;
int value;
{
register event_type event = event_create(seq, setisize, stime, sline);
if (seq_print) {
gprintf(TRANS,
"seti(%ld): time %ld, line %d, voice %d, addr %l... | false | false | false | false | false | 0 |
qlcnic_sriov_pf_cfg_vlan_filtering(struct qlcnic_adapter *adapter,
u8 enable)
{
struct qlcnic_cmd_args cmd;
int err;
err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_SET_NIC_INFO);
if (err)
return err;
cmd.req.arg[1] = 0x4;
if (enable) {
adapter->flags |= QLCNIC_VLAN_FILTERING;
cmd.req.arg... | false | false | false | false | false | 0 |
OTFAUX_State_setupThumbnail( OTFAUX_State* auxState,
uint64_t minTime,
uint64_t maxTime,
uint32_t width )
{
uint64_t timeDiff;
double timeStep;
uint32_t i;
if ( width == 0 || minTime >= maxTime || ( ma... | false | false | false | false | false | 0 |
pixelSize(const QString & sizeString) {
// assume all sizes are of the form Npx otherwise return -1
QString temp = sizeString;
temp.remove(" ");
if (temp.contains("px")) {
temp.remove("px");
bool ok;
int ps = temp.toInt(&ok);
if (ok) return ps;
}
return -1;
} | false | false | false | false | false | 0 |
print() const
{
int i;
std::cout << "Row cut has " << row_.getNumElements()
<< " elements";
if ( lb_ < -1.0e20 && ub_<1.0e20 )
std::cout << " with upper rhs of " << ub_;
else if ( lb_ > -1.0e20 && ub_ > 1.0e20 )
std::cout << " with lower rhs of " << lb_;
else
std::cout << " !!! ... | false | false | false | false | false | 0 |
count() const
{
return entryList().count();
} | false | false | false | false | false | 0 |
get_canmatch_exten(struct match_char *node)
{
/* find the exten at the end of the rope */
struct match_char *node2 = node;
for (node2 = node; node2; node2 = node2->next_char) {
if (node2->exten) {
#ifdef NEED_DEBUG_HERE
ast_log(LOG_NOTICE,"CanMatch_exten returns exten %s(%p)\n", node2->exten->exten, node2->ext... | false | false | false | false | false | 0 |
pet_food(struct map_session_data *sd)
{
int i, t;
nullpo_retr(1, sd);
nullpo_retr(1, sd->pd);
if(sd->petDB == NULL)
return 1;
i = pc_search_inventory(sd,sd->petDB->FoodID);
if(i < 0) {
clif_pet_food(sd,sd->petDB->FoodID,0);
return 1;
}
pc_delitem(sd,i,1,0,0);
t = sd->pet.intimate;
if(sd->pet.hungry >... | false | false | false | false | false | 0 |
check_active(struct ioatdma_chan *ioat_chan)
{
if (ioat_ring_active(ioat_chan)) {
mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT);
return;
}
if (test_and_clear_bit(IOAT_CHAN_ACTIVE, &ioat_chan->state))
mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT);
else if (ioat_chan->alloc_order > ioat_get... | false | false | false | false | false | 0 |
v_fsck_send_msg(int msg_num, const char *file_name, int line_number, ...) {
struct fsck_message *message = &msg_defs[msg_num];
char msg_string[max_log_entry_length - 4];
char debug_detail[100];
va_list args;
va_start(args, line_number);
vsnprintf(msg_string, sizeof(msg_string), message->msg_txt, args);
va_end(... | false | false | false | false | false | 0 |
iReadBwTga(TARGAHEAD *Header)
{
char ID[255];
if (iread(ID, 1, Header->IDLen) != Header->IDLen)
return IL_FALSE;
// We assume that no palette is present, but it's possible...
// Should we mess with it or not?
if (!ilTexImage(Header->Width, Header->Height, 1, (ILubyte)(Header->Bpp >> 3), IL_LUMINANCE, IL_UN... | false | false | false | false | false | 0 |
client_putData(struct soap *soap, int argc, char **argv)
{ int i;
struct x__DataSet data;
struct m__PutDataResponse response;
data.__size = argc - 2;
data.item = soap_malloc(soap, (argc - 2)*sizeof(struct x__Data));
for (i = 2; i < argc; i++)
open_data(soap, argv[i], &data.item[i - 2]);
if (soap_call_m_... | false | false | false | false | true | 1 |
fpixAddContinuedBorder(FPIX *fpixs,
l_int32 left,
l_int32 right,
l_int32 top,
l_int32 bot)
{
l_int32 i, j, w, h;
FPIX *fpixd;
PROCNAME("fpixAddContinuedBorder");
if (!fpixs)
return (FPIX *)ERROR_PTR(... | false | false | false | false | false | 0 |
unit_addrs_search (const void *vkey, const void *ventry)
{
const uintptr_t *key = (const uintptr_t *) vkey;
const struct unit_addrs *entry = (const struct unit_addrs *) ventry;
uintptr_t pc;
pc = *key;
if (pc < entry->low)
return -1;
else if (pc >= entry->high)
return 1;
else
return 0;
} | false | false | false | false | false | 0 |
read_quoted_string (void)
{
int c;
while (1)
{
c = read_char (); /* Read the string */
if (c == '\\')
{
read_escape ();
continue;
}
else if (c == '"' || c == EOF)
break;
obstack_1grow (&string_obstack, c);
}
obstack_1grow (&string_obstack, 0);
return XOBFINISH (&stri... | false | false | false | false | false | 0 |
FDKaacEnc_calcSfbRelevantLines( const FIXP_DBL *const sfbFormFactorLdData,
const FIXP_DBL *const sfbEnergyLdData,
const FIXP_DBL *const sfbThresholdLdData,
const INT *const sfbOffsets,
const INT sfbCnt,
const I... | false | false | false | false | false | 0 |
removeAllSources()
{
QMutableHashIterator<QString, Plasma::DataContainer*> it(d->sources);
while (it.hasNext()) {
it.next();
Plasma::DataContainer *s = it.value();
const QString source = it.key();
it.remove();
s->disconnect(this);
s->deleteLater();
emit so... | false | false | false | false | false | 0 |
contentsDragLeaveEvent( QDragLeaveEvent * )
{
// Restore the current item to what it was before the dragging (#17070)
if ( isValidItem(m_currentBeforeDropItem) )
{
setSelected( m_currentBeforeDropItem, true );
ensureItemVisible( m_currentBeforeDropItem );
}
else if ( isValidItem(m_dropItem) )... | false | false | false | false | false | 0 |
clear_blocked(struct btd_adapter *adapter)
{
int err;
err = adapter_ops->unblock_device(adapter->dev_id, BDADDR_ANY, 0);
if (err < 0)
error("Clearing blocked list failed: %s (%d)",
strerror(-err), -err);
} | false | false | false | false | false | 0 |
GDALDestroyApproxTransformer( void * pCBData )
{
VALIDATE_POINTER0( pCBData, "GDALDestroyApproxTransformer" );
ApproxTransformInfo *psATInfo = (ApproxTransformInfo *) pCBData;
if( psATInfo->bOwnSubtransformer )
GDALDestroyTransformer( psATInfo->pBaseCBData );
CPLFree( pCBData );
} | false | false | false | false | false | 0 |
setup_item_from_info (GkmSecretItem *item, GkmSecretData *data, ItemInfo *info)
{
GkmSecretObject *obj = GKM_SECRET_OBJECT (item);
const gchar *schema_name;
GkmSecret *secret;
gkm_secret_object_set_label (obj, info->display_name);
gkm_secret_object_set_created (obj, info->ctime);
gkm_secret_object_set_modified (... | false | false | false | false | false | 0 |
CompareIC_Miss(Arguments args) {
NoHandleAllocation na;
ASSERT(args.length() == 3);
CompareIC ic(static_cast<Token::Value>(Smi::cast(args[2])->value()));
ic.UpdateCaches(args.at<Object>(0), args.at<Object>(1));
return ic.target();
} | false | false | false | false | false | 0 |
load_roms_init_memory()
{
config_load_roms();
memory_ptr_init();
clk_setup_bram_version(); /* Must be after config_load_roms */
if(g_rom_version >= 3) {
g_c036_val_speed |= 0x40; /* set power-on bit */
} else {
g_c036_val_speed &= (~0x40); /* clear the bit */
}
do_reset();
/* if user booted ROM 01, switche... | false | false | false | false | false | 0 |
svm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
{
struct vcpu_svm *svm = to_svm(vcpu);
u32 dummy;
u32 eax = 1;
if (!init_event) {
svm->vcpu.arch.apic_base = APIC_DEFAULT_PHYS_BASE |
MSR_IA32_APICBASE_ENABLE;
if (kvm_vcpu_is_reset_bsp(&svm->vcpu))
svm->vcpu.arch.apic_base |= MSR_IA32_APICBASE_... | false | false | false | false | false | 0 |
set_up_stretched_texture_for_light_radius(void)
{
#ifdef HAVE_LIBGL
static int texture_is_set_up_already = FALSE;
// In the non-open-gl case, this function shouldn't be called ever....
//
if (!use_open_gl)
return;
// Stop any image batch being constructed,
// so that struct image does not get confused.
end... | false | false | false | false | false | 0 |
write(hsStream* S, plResManager* mgr) {
if (S->getVer().isUru() || S->getVer().isUniversal()) {
S->writeShort(fFlags);
if (fFlags & kHasAgeInfo)
fAgeInfo.write(S, mgr);
if (fFlags & kHasLinkingRules)
S->writeByte(fLinkingRules);
if (fFlags & kHasSpawnPt)
... | false | false | false | false | false | 0 |
try_recycle_socket(int fd, void *voidarg)
{
struct recycle_info *ri=(struct recycle_info *)voidarg;
union {
SOCKADDR_STORAGE ss;
struct sockaddr_in sin;
#if HAVE_SOXWRAP_IPV6
struct sockaddr_in6 sin6;
#endif
} sa;
socklen_t salen=sizeof(sa);
if (getsockname(fd, (struct sockaddr *)&sa, &salen) < 0)
retur... | false | true | false | false | false | 1 |
prevSegment(LiveInterval &LI,
SlotIndex S) {
LiveInterval::iterator P = LI.end();
for (LiveInterval::iterator I = LI.begin(), E = LI.end(); I != E; ++I) {
if (I->end > S)
return P;
P = I;
}
return P;
} | false | false | false | false | false | 0 |
send_fd (int sockfd, int fd)
{
char tmp[CMSG_SPACE(sizeof(int))];
struct cmsghdr *cmsg;
struct iovec iov;
struct msghdr msg;
char ch = '\0';
memset(&msg, 0, sizeof(msg));
msg.msg_control = (caddr_t) tmp;
msg.msg_controllen = CMSG_LEN(sizeof(int));
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_len = CMSG_LEN(sizeof(... | 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.