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 |
|---|---|---|---|---|---|---|
hwcrhk_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx)
{
char tempbuf[1024];
HWCryptoHook_ErrMsgBuf rmsg;
/* Since HWCryptoHook_MPI is pretty compatible with BIGNUM's,
we use them directly, plus a little macro magic. We only
thing we need to make sure of is that enough... | true | true | false | false | false | 1 |
tf_nump(void)
{
if (__tfrec == NULL) return(bad_notfcontext_err("tf_nump"));
return(__tfrec->tfanump1 - 1);
} | false | false | false | false | false | 0 |
check_this(cyg_assert_class_zeal zeal) const
{
if (CdlDefineLoadableBody_Magic != cdldefineloadablebody_cookie) {
return false;
}
CYGDBG_MEMLEAK_CHECKTHIS();
return CdlLoadableBody::check_this(zeal) && CdlNodeBody::check_this(zeal);
} | false | false | false | false | false | 0 |
ct_xfitimer_stop(struct ct_timer_instance *ti)
{
struct ct_timer *atimer = ti->timer_base;
unsigned long flags;
spin_lock_irqsave(&atimer->lock, flags);
list_del_init(&ti->running_list);
ti->running = 0;
spin_unlock_irqrestore(&atimer->lock, flags);
ct_xfitimer_update(atimer);
} | false | false | false | false | false | 0 |
lp_irq_disable(struct irq_data *d)
{
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct lp_gpio *lg = container_of(gc, struct lp_gpio, chip);
u32 hwirq = irqd_to_hwirq(d);
unsigned long reg = lp_gpio_reg(&lg->chip, hwirq, LP_INT_ENABLE);
unsigned long flags;
spin_lock_irqsave(&lg->lock, flags);
outl(i... | false | false | false | false | false | 0 |
Initialize(Handle<Object> target) {
HandleScope scope;
NODE_SET_METHOD(target, "close", Close);
NODE_SET_METHOD(target, "open", Open);
NODE_SET_METHOD(target, "read", Read);
NODE_SET_METHOD(target, "fdatasync", Fdatasync);
NODE_SET_METHOD(target, "fsync", Fsync);
NODE_SET_METHOD(target, "rename", Rename)... | false | false | false | false | false | 0 |
on_mainwindow_set_focus_child (GtkContainer *container,
GtkWidget *widget,
gpointer user_data)
{
gpaint_canvas *canvas = canvas_lookup(GTK_WIDGET(container));
GtkWidget *drawing_area = GTK_WIDGET(canvas->... | false | false | false | false | false | 0 |
new_max_color(int * popularity, int upper_bound,
int * max_used_color) {
int i;
for(i = upper_bound; i >= 0; i--) {
if (popularity[i] > 0) {
*max_used_color = i;
return;
}
}
} | false | false | false | false | false | 0 |
emit_alpha_test()
{
this->current_annotation = "Alpha test";
fs_inst *cmp;
if (c->key.alpha_test_func == GL_ALWAYS)
return;
if (c->key.alpha_test_func == GL_NEVER) {
/* f0.1 = 0 */
fs_reg some_reg = fs_reg(retype(brw_vec8_grf(0, 0),
BRW_REGISTER_TYPE... | false | false | false | false | false | 0 |
max6642_init_client(struct max6642_data *data,
struct i2c_client *client)
{
u8 config;
/*
* Start the conversions.
*/
config = i2c_smbus_read_byte_data(client, MAX6642_REG_R_CONFIG);
if (config & 0x40)
i2c_smbus_write_byte_data(client, MAX6642_REG_W_CONFIG,
config & 0xBF); /* run */
data->temp_h... | false | false | false | false | false | 0 |
issue_unused_warnings(void)
{ int32 i;
if (module_switch) return;
/* Update any ad-hoc variables that might help the library */
if (glulx_mode)
{ global_initial_value[10]=statusline_flag;
}
/* Now back to mark anything necessary as used */
i = symbol_index("Main", -1);
if (!(s... | false | false | false | false | false | 0 |
format_type_warning (format_wanted_type *type, tree wanted_type, tree arg_type)
{
int kind = type->kind;
const char *wanted_type_name = type->wanted_type_name;
const char *format_start = type->format_start;
int format_length = type->format_length;
int pointer_count = type->pointer_count;
int arg_num = type-... | false | false | false | false | false | 0 |
countryCodeToName(const QString &country) const
{
QString countryName;
QString entryFile = KStandardDirs::locate("locale", QString::fromLatin1("l10n/") + country.toLower() + QLatin1String("/entry.desktop"));
if (!entryFile.isEmpty()) {
KConfig cfg(entryFile);
KConfigGroup cg(&cfg, "KCM Local... | false | false | false | false | false | 0 |
worker_test_unused(worker_t * worker) {
if (apr_table_elts(worker->match.dot)->nelts) {
worker_log(worker, LOG_ERR, "There are unused MATCH .");
return APR_EGENERAL;
}
if (apr_table_elts(worker->match.headers)->nelts) {
worker_log(worker, LOG_ERR, "There are unused MATCH headers");
return APR_EGEN... | false | false | false | false | false | 0 |
create_tool_item( GtkAction* action )
{
GtkWidget* item = 0;
if ( IS_EGE_OUTPUT_ACTION(action) )
{
GValue value;
GtkWidget* hb = gtk_hbox_new( FALSE, 5 );
GtkWidget* lbl = 0;
memset( &value, 0, sizeof(value) );
g_value_init( &value, G_TYPE_STRING );
g_object... | false | false | false | false | false | 0 |
da_map (struct darray * arr, da_map_func_t fn)
{
size_t i;
for (i = 0 ; i < arr->len ; i++)
(*fn) (arr->content [i]);
} | false | false | false | false | false | 0 |
opt_taken(int let)
{
char opt[2];
opt[0] = (let == '0') ? '#' : let & 0xFF;
opt[1] = '\0';
return(ao_taken(lam_args_optd, opt));
} | true | true | false | false | false | 1 |
proxy_fixup(request_rec *r)
{
char *url, *p;
int access_status;
proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
&proxy_module);
if (!r->proxyreq || !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
return DECLINED;
/* X... | false | false | false | false | false | 0 |
flow_entry_compare(const flow_table_entry_t* const first,
const flow_table_entry_t* const second) {
return first->ip_source == second->ip_source
&& first->ip_destination == second->ip_destination
&& first->transport_protocol == second->transport_protocol
&& first->port_... | false | false | false | false | false | 0 |
acquire_mpi_lock(void)
{
int ret;
struct timeval tv;
MPI_Comm *comm;
/* Send signal to interrupt a blocked read/write in the app, if
any. Once the signal is sent, acquire the lam_mpi_mutex and then
proceed. This is used to ensure that the app thread yields to
the cr_handler thread before resumi... | false | false | false | false | false | 0 |
rb_gzreader_each(int argc, VALUE *argv, VALUE obj)
{
VALUE str;
RETURN_ENUMERATOR(obj, 0, 0);
while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
rb_yield(str);
}
return obj;
} | false | false | false | false | false | 0 |
snd_rawmidi_runtime_create(struct snd_rawmidi_substream *substream)
{
struct snd_rawmidi_runtime *runtime;
if ((runtime = kzalloc(sizeof(*runtime), GFP_KERNEL)) == NULL)
return -ENOMEM;
runtime->substream = substream;
spin_lock_init(&runtime->lock);
init_waitqueue_head(&runtime->sleep);
INIT_WORK(&runtime->eve... | false | false | false | false | false | 0 |
addbddcircuitabl( BddCircuit, Expr )
bddcircuit *BddCircuit;
ablexpr *Expr;
{
bddnode *BddNode;
setbddlocalcircuit( BddCircuit );
BddNode = loc_addbddcircuitabl( Expr );
checkbddmaxnode( (bddsystem *)0, 1 );
return( BddNode );
} | false | false | false | false | false | 0 |
loadFromFile(const char *fname)
{
FILE *f;
#if defined(WIN32)
f = _tfopen(fname, _TEXT("rt"));
#else
f = fopen(fname, "r");
#endif
if (f == NULL)
return 0;
char line[MAX_MACRO_LINE];
size_t len;
resetContent();
//read possible header
int version;
if (!readHeader(f, ve... | false | false | false | false | false | 0 |
tag2_key_release_event(GtkTreeView * tree, GdkEventKey * event, tag_element * te)
{
guint32 uc;
if ((event->state & GDK_CONTROL_MASK) != 0 && event->keyval == GDK_f)
{
gtk_widget_grab_focus(te->sentry);
gtk_widget_show(te->sentry);
return FALSE;
} /*
else if(event->keyval == GDK_Escape){
gtk_entry_s... | false | false | false | false | false | 0 |
fw_device_op_open(struct inode *inode, struct file *file)
{
struct fw_device *device;
struct client *client;
device = fw_device_get_by_devt(inode->i_rdev);
if (device == NULL)
return -ENODEV;
if (fw_device_is_shutdown(device)) {
fw_device_put(device);
return -ENODEV;
}
client = kzalloc(sizeof(*client), ... | false | false | false | false | false | 0 |
afr_sh_entry_impunge_readlink_sink_cbk (call_frame_t *impunge_frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
const char *linkname, struct iatt *sbuf, dict_t *xdata)
{
a... | false | false | false | false | false | 0 |
extract_opcode_info(char* src, char* name, int* size, char* spec_proc, char* spec_ea)
{
char* ptr = strstr(src, ID_OPHANDLER_NAME);
if(ptr == NULL)
return 0;
ptr += strlen(ID_OPHANDLER_NAME) + 1;
ptr += check_strcncpy(name, ptr, ',', MAX_NAME_LENGTH);
if(*ptr != ',') return 0;
ptr++;
ptr += skip... | false | false | false | false | true | 1 |
_appendSymbol(UnicodeString& dst,
int32_t value,
const UnicodeString* symbols,
int32_t symbolsCount) {
U_ASSERT(0 <= value && value < symbolsCount);
if (0 <= value && value < symbolsCount) {
dst += symbols[value];
}
} | false | false | false | false | false | 0 |
verify_config(void)
{
extern struct cfg config;
HUWRONG(config.port, "port", MAX_PORTS);
ZHWRONG(config.childs, "child_processes", MAX_CHILDS);
HWRONG(config.backlog, "backlog_size", MAX_BACKLOG);
HUWRONG(config.proxyport, "forward_proxy_port", MAX_PORTS);
HUWRONG(config.uid, "uid", MAX_UID);
HUWRONG(config.gid... | false | false | false | false | false | 0 |
SendInitTransports(Player* player)
{
// Hack to send out transports
MapManager::TransportMap& tmap = sMapMgr.m_TransportsByMap;
// no transports at map
if (tmap.find(player->GetMapId()) == tmap.end())
{ return; }
UpdateData transData;
MapManager::TransportSet& tset = tmap[player->GetM... | false | false | false | false | false | 0 |
initialiseSample()
{
// we will make extensive use of the WindowManager.
WindowManager& winMgr = WindowManager::getSingleton();
// load scheme and set up defaults
SchemeManager::getSingleton().create("TaharezLook.scheme");
System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
... | false | false | false | false | false | 0 |
mxser_board_remove(struct mxser_board *brd)
{
unsigned int i;
for (i = 0; i < brd->info->nports; i++) {
tty_unregister_device(mxvar_sdriver, brd->idx + i);
tty_port_destroy(&brd->ports[i].port);
}
free_irq(brd->irq, brd);
} | false | false | false | false | false | 0 |
getUnconditionalBranchTargetOpValue(const MCInst &MI, unsigned OpIdx,
SmallVectorImpl<MCFixup> &Fixups) const {
unsigned Val =
::getBranchTargetOpValue(MI, OpIdx, ARM::fixup_t2_uncondbranch, Fixups);
bool I = (Val & 0x800000);
bool J1 = (Val & 0x400000);
bool J2 = (Val & 0x200000);
... | false | false | false | false | false | 0 |
_rpc_complete_batch(slurm_msg_t *msg)
{
int i, rc, msg_rc;
slurm_msg_t req_msg, resp_msg;
uid_t uid = g_slurm_auth_get_uid(msg->auth_cred, NULL);
complete_batch_script_msg_t *req = msg->data;
if (!_slurm_authorized_user(uid)) {
error("Security violation: complete_batch(%u) from uid %d",
re... | false | false | false | false | false | 0 |
removeProcessFromTable(int pid)
{
OFListIterator(DcmQueryRetrieveProcessSlot *) first = table_.begin();
OFListIterator(DcmQueryRetrieveProcessSlot *) last = table_.end();
while (first != last)
{
if ((*first)->matchesPID(pid))
{
delete (*first);
table_.erase(first);
return;
}
++... | false | false | false | false | false | 0 |
mkroll_launch(struct trap *ttmp, xchar x, xchar y, short otyp, long ocount)
{
struct obj *otmp;
int tmp;
schar dx,dy;
int distance;
coord cc;
coord bcc;
int trycount = 0;
bool success = false;
int mindist = 4;
if (ttmp->ttyp == ROLLING_BOULDER_TRAP) mindist = 2;
distance = r... | false | false | false | false | false | 0 |
header_hrhfilesys(struct variable *vp,
oid * name,
size_t * length,
int exact, size_t * var_len, WriteMethod ** write_method)
{
#define HRFSYS_ENTRY_NAME_LENGTH 11
oid newname[MAX_OID_LEN];
int fsys_idx, LowIndex = -1;
int ... | false | false | false | false | false | 0 |
appendBlock(blocklist_t * bl, block_t * bp)
{
bp->next = NULL;
if (bl->last) {
bl->last->next = bp;
bl->last = bp;
} else {
bl->first = bp;
bl->last = bp;
}
} | false | false | false | false | false | 0 |
gncOwnerInitCustomer (GncOwner *owner, GncCustomer *customer)
{
if (!owner) return;
owner->type = GNC_OWNER_CUSTOMER;
owner->owner.customer = customer;
} | false | false | false | false | false | 0 |
check_address (GstAddressList *list, const gchar *text)
{
gint type;
if (list->_priv->type != GST_ADDRESS_TYPE_IP)
return TRUE;
type = gst_filter_check_ip_address (text);
if (type == GST_ADDRESS_IPV4 || type == GST_ADDRESS_IPV6)
return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
Setup_Mapping (void)
{
int n;
propertyRec *p;
n = sizeof(windowPropTable) / sizeof(propertyRec);
p = windowPropTable;
for ( ; --n >= 0; p++) {
if (! p->atom) {
p->atom = XInternAtom(dpy, p->name, True);
if (p->atom == None)
continue;
}
Add_Mapping(p->atom, p->format, p->dformat);
... | false | false | false | false | false | 0 |
assign(const int oid[])
{
unsigned int count = 0;
while (oid[count] != -1)
count++;
assign(oid, count);
} | false | false | false | false | false | 0 |
git_linear_search(glui32 key, glui32 keysize,
glui32 start, glui32 structsize, glui32 numstructs,
glui32 keyoffset, glui32 options)
{
unsigned char keybuf[4];
glui32 count;
int ix;
int retindex = ((options & serop_ReturnIndex) != 0);
int zeroterm = ((options & serop_ZeroKeyTerminates) != 0);
fetchkey... | false | false | false | false | false | 0 |
getValueAndCheckMinMax(OFCmdSignedInt &value,
const OFCmdSignedInt low,
const OFCmdSignedInt high)
{
E_ValueStatus status = getValue(value);
if (status == VS_Normal)
{
... | false | false | false | false | false | 0 |
qmonCalendarSetAsk(
lListElem *calp
) {
StringConst cal_name = NULL;
StringConst year_calendar = NULL;
StringConst week_calendar = NULL;
DENTER(GUI_LAYER, "qmonCalendarSetAsk");
if (!calp) {
DEXIT;
return;
}
cal_name = (StringConst)lGetString(calp, CAL_name);
if (cal_name)
... | false | false | false | false | false | 0 |
get_chars_for_script (const gchar *script,
UnicodeRange **ranges,
gint *size)
{
gint i, j, index;
gint script_index, common_script_index;
gint prev_end;
script_index = find_script (script);
common_script_index = find_script ("C... | false | false | false | false | false | 0 |
Load_Filename_List_Key_Press (GtkWidget *treeview, GdkEvent *event)
{
if (event && event->type == GDK_KEY_PRESS)
{
GdkEventKey *kevent = (GdkEventKey *)event;
switch(kevent->keyval)
{
case GDK_KEY_Delete:
Load_Filename_List_Delete_Line(treeview);
... | false | false | false | false | false | 0 |
guess_record_qk(const gnet_host_t *h, const void *buf, size_t len)
{
struct qkdata *qk;
struct qkdata new_qk;
qk = get_qkdata(h);
if (qk != NULL) {
new_qk.first_seen = qk->first_seen;
new_qk.flags = qk->flags;
} else {
new_qk.first_seen = tm_time();
new_qk.flags = 0;
}
new_qk.last_seen = new_qk.last_u... | false | false | false | false | false | 0 |
addlosig(lofig_list *ptfig, long index, chain_list *namechain, char type)
{
losig_list *ptsig;
losig_list *pthead;
ptype_list *pt;
chain_list *ptchain;
long high;
long low;
long i;
long sigsize;
sigsize = getsigsize( ptfig );
low = (index % sigsize);
high = (index / sigsize);
for (pt = ptfig->BKSIG; ... | false | false | false | false | false | 0 |
getLanguageName (const langType language)
{
/*Assert (0 <= language && language < (int) LanguageCount);*/
if (language < 0) return NULL;
return LanguageTable [language]->name;
} | false | false | false | false | false | 0 |
can_step_taken_wrt_to_zoc(const struct unit_type *punittype,
const struct player *unit_owner,
const struct tile *src_tile,
const struct tile *dst_tile)
{
if (unit_type_really_ignores_zoc(punittype)) {
return TRUE;
}
i... | false | false | false | false | false | 0 |
Display_whole_string(word x_pos,word y_pos,char * str,byte position)
{
char cursor[2];
Print_general(x_pos,y_pos,str,TEXT_COLOR,BACKGROUND_COLOR);
cursor[0]=str[position] ? str[position] : ' ';
cursor[1]='\0';
Print_general(x_pos+(position<<3)*Menu_factor_X,y_pos,cursor,CURSOR_COLOR,CURSOR_BACKGROUND_COLOR);... | true | true | false | false | false | 1 |
explain_buffer_errno_stat_explanation(explain_string_buffer_t *sb,
int errnum, const char *syscall_name, const char *pathname,
const struct stat *data)
{
explain_final_t final_component;
(void)data;
explain_final_init(&final_component);
switch (errnum)
{
case EACCES:
explain_bu... | false | false | false | false | false | 0 |
folder_get_identifier(Folder *folder)
{
gchar *type_str;
cm_return_val_if_fail(folder != NULL, NULL);
type_str = folder->klass->idstr;
return g_strconcat("#", type_str, "/", folder->name, NULL);
} | false | false | false | false | false | 0 |
lin_search(int * trace, int vertex, int depth) {
int i;
for(i = 0; i <= depth; i++) {
if (trace[i] == vertex)
return i;
}
} | false | false | false | false | false | 0 |
memFindBufSizeType(size_t net_size, size_t * gross_size)
{
mem_type type;
size_t size;
if (net_size <= 2 * 1024) {
type = MEM_2K_BUF;
size = 2 * 1024;
} else if (net_size <= 4 * 1024) {
type = MEM_4K_BUF;
size = 4 * 1024;
} else if (net_size <= 8 * 1024) {
type = MEM_8K_BUF;
size = 8 * 1024;
... | false | false | false | false | false | 0 |
TYPE_get_desc(TYPE type)
{
static char buf[256];
TYPE_ID id;
int value;
id = TYPE_get_id(type);
value = TYPE_get_value(type);
if (id == T_ARRAY)
{
strcpy(buf, TYPE_name[JOB->class->array[value].type.t.id]);
strcat(buf, "[]");
}
else
{
strcpy(buf, TYPE_name[id]);
}
return buf;
} | false | false | false | false | false | 0 |
go_doc_write (GODoc *doc, GsfXMLOut *output)
{
GSList *ptr;
if (g_hash_table_size (doc->priv->imagebuf) > 0 ||
doc->priv->resourcesbuf != NULL) {
gsf_xml_out_start_element (output, "GODoc");
g_hash_table_foreach (doc->priv->imagebuf, save_image_cb, output);
for (ptr = doc->priv->resourcesbuf; ptr; ptr = pt... | false | false | false | false | false | 0 |
skiproot(const char *path, const char *end, rb_encoding *enc)
{
#ifdef DOSISH_DRIVE_LETTER
if (path + 2 <= end && has_drive_letter(path)) path += 2;
#endif
while (path < end && isdirsep(*path)) path++;
return (char *)path;
} | false | false | false | false | false | 0 |
objc_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
{
enum tree_code code = TREE_CODE (*expr_p);
switch (code)
{
/* Look for the special case of OBJC_TYPE_REF with the address
of a function in OBJ_TYPE_REF_EXPR (presumably objc_msgSend
or one of its cousins). */
case OBJ_TYPE... | false | false | false | false | false | 0 |
ipv4addr_getregistry(const ipv6calc_ipv4addr *ipv4addrp) {
char resultstring[NI_MAXHOST];
int i;
i = libipv4addr_get_registry_string(ipv4addrp, resultstring);
if (i == 2) {
return(IPV4_ADDR_REGISTRY_RESERVED);
} else if (i != 0) {
return(IPV4_ADDR_REGISTRY_UNKNOWN);
};
#ifdef SUPPORT_DB_IPV4
if (strcmp(re... | false | false | false | false | false | 0 |
expand_builtin_memcmp (tree exp, ATTRIBUTE_UNUSED rtx target,
ATTRIBUTE_UNUSED enum machine_mode mode)
{
location_t loc ATTRIBUTE_UNUSED = EXPR_LOCATION (exp);
if (!validate_arglist (exp,
POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE))
return NULL_RTX;
/* Note: The cmpstrnsi pattern, if ... | false | false | false | false | false | 0 |
dmfe_phy_write(void __iomem *ioaddr, u8 phy_addr, u8 offset,
u16 phy_data, u32 chip_id)
{
u16 i;
if (chip_id == PCI_DM9132_ID) {
dw16(0x80 + offset * 4, phy_data);
} else {
/* DM9102/DM9102A Chip */
/* Send 33 synchronization clock to Phy controller */
for (i = 0; i < 35; i++)
dmfe_phy_write_1bit(... | false | false | false | false | false | 0 |
isert_completion_rdma_write(struct iser_tx_desc *tx_desc,
struct isert_cmd *isert_cmd)
{
struct isert_rdma_wr *wr = &isert_cmd->rdma_wr;
struct iscsi_cmd *cmd = isert_cmd->iscsi_cmd;
struct se_cmd *se_cmd = &cmd->se_cmd;
struct isert_conn *isert_conn = isert_cmd->conn;
struct isert_device *device = isert_co... | false | false | false | false | false | 0 |
midisynth_unuse(void *private_data, struct snd_seq_port_subscribe *info)
{
struct seq_midisynth *msynth = private_data;
if (snd_BUG_ON(!msynth->output_rfile.output))
return -EINVAL;
snd_rawmidi_drain_output(msynth->output_rfile.output);
return snd_rawmidi_kernel_release(&msynth->output_rfile);
} | false | false | false | false | false | 0 |
gamgi_mesa_select_press (int x, int y, gamgi_window *window)
{
int *box = gamgi->box;
int square = GAMGI_MESA_SELECT_SQUARE;
if (gamgi->state == GAMGI_MESA_SELECT_READY)
{
gamgi->window_mouse = window;
gamgi->state = GAMGI_MESA_SELECT_SIZE;
box[0] = box[2] = x;
box[1] = box[3] = y;
}
else if (gamgi->state... | false | false | false | false | false | 0 |
gn_bmp_point(gn_bmp *bmp, int x, int y)
{
int i = 0;
switch (bmp->type) {
case GN_BMP_OperatorLogo:
case GN_BMP_CallerLogo:
i = (bmp->bitmap[(y * bmp->width + x) / 8] & 1 << (7-((y * bmp->width + x) % 8)));
break;
case GN_BMP_PictureMessage:
i = (bmp->bitmap[9 * y + (x / 8)] & 1 << (7 - (x % 8)));
break;
... | false | false | false | false | false | 0 |
FindEffectParametersBySemantic(const FCDEffect* effect, const char* semantic, FCDEffectParameterList& parameters, bool localOnly)
{
if (effect == NULL || semantic == NULL || *semantic == 0) return;
size_t count = effect->GetEffectParameterCount();
for (size_t p = 0; p < count; ++p)
{
const FCDEffectPa... | false | false | false | false | false | 0 |
metadata_append_list(FileData *fd, const gchar *key, const GList *values)
{
GList *list = metadata_read_list(fd, key, METADATA_PLAIN);
if (!list)
{
return metadata_write_list(fd, key, values);
}
else
{
gboolean ret;
list = g_list_concat(list, string_list_copy(values));
list = remove_duplicate_string... | false | false | false | false | false | 0 |
setCascadeNameFromOptions(DOMElement* elemGeneral)
{
DOMElement* elemCascadeName=NULL;
UINT8 tmpBuff[TMP_BUFF_SIZE];
UINT32 tmpLen = TMP_BUFF_SIZE;
if(elemGeneral == NULL) return E_UNKNOWN;
ASSERT_GENERAL_OPTIONS_PARENT
(elemGeneral->getNodeName(), OPTIONS_NODE_CASCADE_NAME);
//getCascadeName
getDOMChildByNa... | false | false | false | false | false | 0 |
glusterd_perform_volinfo_version_action (glusterd_volinfo_t *volinfo,
glusterd_volinfo_ver_ac_t ac)
{
GF_ASSERT (volinfo);
switch (ac) {
case GLUSTERD_VOLINFO_VER_AC_NONE:
break;
case GLUSTERD_VOLINFO_VER_AC_INCREMENT:
vol... | false | false | false | true | false | 1 |
regmap_mmio_gather_write(void *context,
const void *reg, size_t reg_size,
const void *val, size_t val_size)
{
struct regmap_mmio_context *ctx = context;
unsigned int offset;
int ret;
regmap_mmio_regsize_check(reg_size);
if (!IS_ERR(ctx->clk)) {
ret = clk_enable(ctx->clk);
if (ret < 0)
retu... | false | false | false | false | false | 0 |
SetScreenUpdater( PG_ScreenUpdater* screenUpdater )
{
if ( screenUpdater != NULL )
my_ScreenUpdater = screenUpdater;
else
my_ScreenUpdater = &defaultScreenUpdater;
} | false | false | false | false | false | 0 |
vmw_fence_goal_new_locked(struct vmw_fence_manager *fman,
u32 passed_seqno)
{
u32 goal_seqno;
u32 *fifo_mem;
struct vmw_fence_obj *fence;
if (likely(!fman->seqno_valid))
return false;
fifo_mem = fman->dev_priv->mmio_virt;
goal_seqno = vmw_mmio_read(fifo_mem + SVGA_FIFO_FENCE_GOAL);
if (likely(passe... | false | false | false | false | false | 0 |
fun(Vect & x, Vect& temp, Vect& g, double ro)
{
for(int ii=0;ii<ndim;++ii)
{
temp[ii]=x[ii]-ro*g[ii];
temp[ii]=max(min(temp[ii],xmax[ii]),xmin[ii]);
}
if(debug> 5)
cout << " ro = " << ro << endl;
return func(temp);
} | false | false | false | false | false | 0 |
btgettuple(PG_FUNCTION_ARGS)
{
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
ScanDirection dir = (ScanDirection) PG_GETARG_INT32(1);
BTScanOpaque so = (BTScanOpaque) scan->opaque;
bool res;
/*
* If we've already initialized this scan, we can just advance it in the
* appropriate direction. If we... | false | false | false | false | false | 0 |
_FcValuePrint (const FcValue v)
{
switch (v.type) {
case FcTypeVoid:
printf ("<void>");
break;
case FcTypeInteger:
printf ("%d(i)", v.u.i);
break;
case FcTypeDouble:
printf ("%g(f)", v.u.d);
break;
case FcTypeString:
printf ("\"%s\"", v.u.s);
break;
case FcTypeBool:
printf ("%s", v.u.b ... | false | false | false | false | false | 0 |
read(FILE* fp){
if(fscanf(fp," %d %d %d %d ",&x1,&y1,&x2,&y2)==4){return 1;}
else{return 0;}
} | false | false | false | false | false | 0 |
ScanUserPlugins() {
// Bail if plugins disabled
if (plugins_active == 0)
return 0;
string plugin_path = string(LIB_LOC) + "/kismet/";
DIR *plugdir;
if ((plugdir = opendir(plugin_path.c_str())) == NULL) {
_MSG("Failed to open primary plugin directory (" + plugin_path + "): " +
strerror(errno), MSGFLAG_ERR... | false | false | false | false | false | 0 |
ths7303_log_status(struct v4l2_subdev *sd)
{
struct ths7303_state *state = to_state(sd);
v4l2_info(sd, "stream %s\n", state->stream_on ? "On" : "Off");
if (state->bt.pixelclock) {
struct v4l2_bt_timings *bt = bt = &state->bt;
u32 frame_width, frame_height;
frame_width = V4L2_DV_BT_FRAME_WIDTH(bt);
frame_h... | false | false | false | false | false | 0 |
urf_device_set_block (UrfDevice *device,
gboolean block)
{
GDBusProxy *proxy;
GError *error = NULL;
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
... | false | false | false | false | false | 0 |
pathDataConst()
{
if (mArguments && mArguments->isConstant) {
double* data = reinterpret_cast<double*> (&mChildChange);
if (mArguments->evaluate(data, 7) < 0)
CfdgError::Error(mArguments->where, "Cannot evaluate arguments");
delete mArguments;
... | false | false | false | false | false | 0 |
add_signal_handler(int signo, Router *router, const String &handler)
{
if (signo < 0 || signo >= 32 || router->master() != this)
return -1;
SignalInfo *si = new SignalInfo;
if (!si)
return -1;
si->signo = signo;
si->router = router;
si->handler = handler;
_signal_lock.acquire();
_sig... | false | false | false | false | false | 0 |
sloc_count(char *filename, FILE *stream) {
/* Count the sloc in the program in stdin. */
long sloc = 0;
int sawchar = 0; /* Did you see a character on this line? */
int c;
int mode = NORMAL; /* NORMAL, INSTRING, or INCOMMENT */
int comment_type = ANSIC_STYLE; /* ANSIC_STYLE or CPP_ST... | false | false | false | false | false | 0 |
SetSeqToRelease(MDNode *M) {
if (Seq == S_None || Seq == S_Use) {
Seq = M ? S_MovableRelease : S_Release;
RRI.ReleaseMetadata = M;
} else if (Seq != S_MovableRelease || RRI.ReleaseMetadata != M) {
Seq = S_Release;
RRI.ReleaseMetadata = 0;
}
} | false | false | false | false | false | 0 |
cogorc_putline_YUY2 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
p = orc_program_new ();
... | false | false | false | false | false | 0 |
VpSubAbs(Real *a, Real *b, Real *c)
{
size_t word_shift;
size_t ap;
size_t bp;
size_t cp;
size_t a_pos;
size_t b_pos, b_pos_with_word_shift;
size_t c_pos;
BDIGIT av, bv, borrow, mrv;
#ifdef BIGDECIMAL_DEBUG
if(gfDebug) {
VPrint(stdout, "VpSubAbs called: a = %\n", a);
... | false | false | false | false | false | 0 |
markCurrent(GMTrackList * list,FXint item) {
current_track=-1;
if (list->getNumItems()) {
current_track = list->getItemId(item);
}
} | false | false | false | false | false | 0 |
load_firmware(const char* bytes,size_t length) {
if ( strncmp(bytes, "CY", 2)==0) {
// check if this is fx3
load_fx3_firmware(bytes, length);
return;
}
IhxFile ihx = parse_ihx ( bytes, length );
// place the device in reset
m_impl->toggle_reset(false);
for (IhxFile::iterator itr=ihx.begin... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
UI_Signalswindow *_t = static_cast<UI_Signalswindow *>(_o);
switch (_id) {
case 0: _t->show_signals((*reinterpret_cast< int(*)>(... | false | false | false | false | false | 0 |
peekType() {
unsigned char t;
if (readBytes(&t, -1) && (t <= 4 || t >= 253)) return t;
return -1;
} | false | false | false | false | false | 0 |
attachment_dialog_update (EAttachmentDialog *dialog)
{
EAttachment *attachment;
GFileInfo *file_info;
GtkWidget *widget;
const gchar *content_type;
const gchar *display_name;
gchar *description;
gchar *disposition;
gchar *type_description = NULL;
gboolean sensitive;
gboolean active;
attachment = e_attachmen... | false | false | false | false | false | 0 |
TXT_SelectWidget(TXT_UNCAST_ARG(table), TXT_UNCAST_ARG(widget))
{
TXT_CAST_ARG(txt_table_t, table);
TXT_CAST_ARG(txt_widget_t, widget);
int i;
for (i=0; i<table->num_widgets; ++i)
{
if (table->widgets[i] == NULL)
{
continue;
}
if (table->widgets[i] == wi... | false | false | false | false | false | 0 |
unset_object(struct alisp_instance *instance, struct alisp_object * name)
{
struct list_head *pos;
struct alisp_object *res;
struct alisp_object_pair *p;
const char *id;
if (!alisp_compare_type(name, ALISP_OBJ_IDENTIFIER) &&
!alisp_compare_type(name, ALISP_OBJ_STRING)) {
lisp_warn(instance, "unset obj... | false | false | false | false | false | 0 |
uv_bios_mq_watchlist_alloc(unsigned long addr, unsigned int mq_size,
unsigned long *intr_mmr_offset)
{
u64 watchlist;
s64 ret;
/*
* bios returns watchlist number or negative error number.
*/
ret = (int)uv_bios_call_irqsave(UV_BIOS_WATCHLIST_ALLOC, addr,
mq_size, (u64)intr_mmr_offset,
(u64)&watchlis... | false | false | false | false | false | 0 |
intel_snb_check_microcode(void)
{
int pebs_broken = 0;
int cpu;
get_online_cpus();
for_each_online_cpu(cpu) {
if ((pebs_broken = intel_snb_pebs_broken(cpu)))
break;
}
put_online_cpus();
if (pebs_broken == x86_pmu.pebs_broken)
return;
/*
* Serialized by the microcode lock..
*/
if (x86_pmu.pebs_bro... | false | false | false | false | false | 0 |
EncodePredefinedEntities(const char *source,ssize_t offset,
char **destination,size_t *length,size_t *extent,MagickBooleanType pedantic)
{
char
*canonical_content;
if (offset < 0)
canonical_content=CanonicalXMLContent(source,pedantic);
else
{
char
*content;
content=AcquireStrin... | false | false | false | false | false | 0 |
slurp( const std::string& fileName ){
std::ifstream inFileStream;
std::istream& in = openIn( fileName, inFileStream );
std::istreambuf_iterator<char> beg(in), end;
return std::string( beg, end );
} | false | false | false | false | false | 0 |
cl_target_option_restore (struct gcc_options *opts, struct cl_target_option *ptr)
{
opts->x_target_flags = ptr->x_target_flags;
opts->x_ix86_isa_flags = ptr->x_ix86_isa_flags;
if (targetm.target_option.restore)
targetm.target_option.restore (ptr);
} | 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.