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 |
|---|---|---|---|---|---|---|
mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
const UChar* end, UChar* fold, OnigEncoding enc)
{
const UChar* p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
if (*p == 0x49) {
*fold++ = 0xc4;
*fold =... | false | false | false | false | false | 0 |
getColor(const HSBColor& hsb)
{
agg::rgba c;
hsb.getRGBA(c);
if (uses16bitColor) {
return RGBA8(c);
} else {
agg::rgba8 c8 = agg::rgba8(c);
return RGBA8(c8);
}
} | false | false | false | false | false | 0 |
f2fs_nfs_get_inode(struct super_block *sb,
u64 ino, u32 generation)
{
struct f2fs_sb_info *sbi = F2FS_SB(sb);
struct inode *inode;
if (check_nid_range(sbi, ino))
return ERR_PTR(-ESTALE);
/*
* f2fs_iget isn't quite right if the inode is currently unallocated!
* However f2fs_iget currently does appropriate ... | false | false | false | false | false | 0 |
lam_wrap_append_sv(const lam_sv_t& in, lam_sv_t& out)
{
// JMS Is there a better way to do this?
for (int i = 0; (string::size_type) i < in.size(); ++i)
out.push_back(in[i]);
} | false | false | false | false | false | 0 |
glue_filesystem(EFI_GUID *proto, EFI_HANDLE dev, fops_fs_glue_t glue)
{
fileops_t *fops;
VOID *intf = NULL;
EFI_STATUS status;
status = uefi_call_wrapper(BS->HandleProtocol, 3, dev, proto, &intf);
if (EFI_ERROR(status)) {
ERR_PRT((L"unable to locate %g: should not happen", proto));
return NULL; /* should not ... | false | false | false | false | false | 0 |
__inquire_remote_apic(int apicid)
{
unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
const char * const names[] = { "ID", "VERSION", "SPIV" };
int timeout;
u32 status;
pr_info("Inquiring remote APIC 0x%x...\n", apicid);
for (i = 0; i < ARRAY_SIZE(regs); i++) {
pr_info("... APIC 0x%x %s: "... | false | false | false | false | false | 0 |
count_callback(void *x)
{
BASEPHONE *b = x;
if (b->bgnflag) bncnt++;
if (b->endflag) edcnt++;
} | false | false | false | false | false | 0 |
removeButtonClicked()
{
QObject const *signalSender = sender();
if (!signalSender)
{
kError() << "KSwitchLanguageDialog::removeButtonClicked() called directly, not using signal" << endl;
return;
}
KPushButton *removeButton = const_cast<KPushButton*>(::qobject_cast<const KPushButton*... | false | false | false | false | false | 0 |
pcxhr_set_pipe_cmd_params(struct pcxhr_rmh *rmh, int capture,
unsigned int param1, unsigned int param2,
unsigned int param3)
{
snd_BUG_ON(param1 > MASK_FIRST_FIELD);
if (capture)
rmh->cmd[0] |= 0x800; /* COMMAND_RECORD_MASK */
if (param1)
rmh->cmd[0] |= (param1 << FIELD_SIZE);
if (param2) {... | false | false | false | false | false | 0 |
close_stack( struct stack_item *stack, u_64 thispid, u_64 cyc_time )
{
unsigned long code;
fprintf(stdbug, "close stack for pid %4"PRId64", pos %u, cyc_time %"PRIu64"\n",
thispid, stack->pos, cyc_time);
if( stack->pos > 0 && stack->code[stack->pos] == FXT_SWITCH_TO_CODE )
{/* top of current stack is switch_to... | false | false | false | false | false | 0 |
pt_AttachThread(void)
{
PRThread *thred = NULL;
/*
* NSPR must have been initialized when PR_AttachThread is called.
* We cannot have PR_AttachThread call implicit initialization
* because if multiple threads call PR_AttachThread simultaneously,
* NSPR may be initialized more than once.
... | false | false | false | false | false | 0 |
sa_validate_xf_attrs(u_int16_t type, u_int8_t *value, u_int16_t len,
void *arg)
{
struct attr_validation_state *avs =
(struct attr_validation_state *)arg;
LOG_DBG((LOG_SA, 95, "sa_validate_xf_attrs: phase %d mode %d type %d "
"len %d", avs->phase, avs->mode, type, len));
/* Make sure the phase and ty... | false | false | false | false | false | 0 |
elf64_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
bfd_boolean failed = FALSE;
/* Check if there are any relocations. */
bfd_map_over_sections (abfd, check_for_relocs, & failed);
if (failed)
return FALSE;
return bfd_elf_link_add_symbols (abfd, info);
} | false | false | false | false | false | 0 |
ParseBinaryExpression(int prec,
bool accept_IN,
bool* ok) {
Expression result = ParseUnaryExpression(CHECK_OK);
for (int prec1 = Precedence(peek(), accept_IN); prec1 >= prec; prec1--) {
// prec1 >= 4
... | false | false | false | false | false | 0 |
overflow(int c)
{
if (c == EOF)
pSync();
else
d_buffer += c;
return c;
} | false | false | false | false | false | 0 |
ath5k_bitrate_to_hw_rix(int bitrate)
{
int i;
for (i = 0; i < ATH5K_NR_RATES; i++) {
if (ath5k_rates[i].bitrate == bitrate)
return ath5k_rates[i].hw_code;
}
DBG("ath5k: invalid bitrate %d\n", bitrate);
return ATH5K_RATE_CODE_1M; /* use lowest rate */
} | false | false | false | false | false | 0 |
tw9910_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *format)
{
struct v4l2_mbus_framefmt *mf = &format->format;
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct tw9910_priv *priv = to_tw9910(client);
const struct tw9910_scale_ctrl *scale;
if (format-... | false | false | false | false | false | 0 |
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__MenuItem_NotifySelect__00000063(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * selection, unsigned int mods)
{
struct IDEWorkSpace * __ecerePointer_IDEWorkSpace = (struct IDEWorkSpace *)(this ? (((char *)this)... | false | false | false | false | false | 0 |
early_ioremap_setup(void)
{
int i;
for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
if (WARN_ON(prev_map[i]))
break;
for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
} | false | false | false | false | false | 0 |
isl_map_partial_lexopt_aligned(
__isl_take isl_map *map, __isl_take isl_set *dom,
__isl_give isl_set **empty, int max)
{
int i;
struct isl_map *res;
struct isl_set *todo;
if (!map || !dom)
goto error;
if (isl_map_plain_is_empty(map)) {
if (empty)
*empty = dom;
else
isl_set_free(dom);
return map... | false | false | false | false | false | 0 |
sh_tmu_clock_event_set_state(struct clock_event_device *ced,
int periodic)
{
struct sh_tmu_channel *ch = ced_to_sh_tmu(ced);
/* deal with old setting first */
if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced))
sh_tmu_disable(ch);
dev_info(&ch->tmu->pdev->dev, "ch%u: used for %s clock even... | false | false | false | false | false | 0 |
eog_list_store_get_pos_by_image (EogListStore *store, EogImage *image)
{
GtkTreeIter iter;
gint pos = -1;
GFile *file;
g_return_val_if_fail (EOG_IS_LIST_STORE (store), -1);
g_return_val_if_fail (EOG_IS_IMAGE (image), -1);
file = eog_image_get_file (image);
if (is_file_in_list_store_file (store, file, &iter)) ... | false | false | false | false | false | 0 |
pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
{
struct poll_table_entry *entry;
entry = container_of(wait, struct poll_table_entry, wait);
if (key && !((unsigned long)key & entry->key))
return 0;
return __pollwake(wait, mode, sync, key);
} | false | false | false | false | false | 0 |
remove_event_file_dir(struct trace_event_file *file)
{
struct dentry *dir = file->dir;
struct dentry *child;
if (dir) {
spin_lock(&dir->d_lock); /* probably unneeded */
list_for_each_entry(child, &dir->d_subdirs, d_child) {
if (d_really_is_positive(child)) /* probably unneeded */
d_inode(child)->i_privat... | false | false | false | false | true | 1 |
to_latex_string(unsigned char c)
{
if (c == '_')
return "\\_";
else if (c == '\0')
return "\\$";
else
return to_string(c);
} | false | false | false | false | false | 0 |
scsi_host_free_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
{
struct scsi_host_cmd_pool *pool = shost->cmd_pool;
if (cmd->prot_sdb)
kmem_cache_free(scsi_sdb_cache, cmd->prot_sdb);
kmem_cache_free(pool->sense_slab, cmd->sense_buffer);
kmem_cache_free(pool->cmd_slab, cmd);
} | false | false | false | false | false | 0 |
__turnon_all_dumpvars(void)
{
register int32 ii;
register struct net_t *np;
register struct task_t *tskp;
register struct mod_t *mdp;
int32 ni;
for (mdp = __modhdr; mdp != NULL; mdp = mdp->mnxt)
{
if (!mdp->mod_hasdvars) continue;
for (ni = 0, np = &(mdp->mnets[0]); ni < mdp->mnnum; ni++, np++)
{
... | false | false | false | false | false | 0 |
OnCloseFile(wxCommandEvent& WXUNUSED(event))
{
wxTreeItemId sel = GetTreeSelection();
if (!sel.IsOk())
return;
if (FileTreeData* ftd = (FileTreeData*)m_pTree->GetItemData(sel))
{
if (ProjectFile* File = ftd->GetProjectFile())
Manager::Get()->GetEditorManager()->Close(File->f... | false | false | false | false | false | 0 |
parent_dnum(s, pd)
const char *s; /* dungeon name */
struct proto_dungeon *pd;
{
int i;
xchar pdnum;
i = find_branch(s, pd);
/*
* Got branch, now find parent dungeon. Stop if we have reached
* "this" dungeon (if we haven't found it by now it is an error).
*/
for (pdnum = 0; strcmp(pd->tmpdungeon[pdnum].... | false | false | false | false | false | 0 |
GetService(char *name)
{
if (count > 0)
count = current = 0;
return (count = GetRP(name, &rp, &rpp));
} | false | false | false | false | false | 0 |
ak881x_s_stream(struct v4l2_subdev *sd, int enable)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct ak881x *ak881x = to_ak881x(client);
if (enable) {
u8 dac;
/* For colour-bar testing set bit 6 of AK881X_VIDEO_PROCESS1 */
/* Default: composite output */
if (ak881x->pdata->flags & AK881X_COMPON... | false | false | false | false | false | 0 |
NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki)
{
EVP_PKEY *pkey;
ASN1_IA5STRING *chal;
int i, n;
char *s;
BIO_printf(out, "Netscape SPKI:\n");
i=OBJ_obj2nid(spki->spkac->pubkey->algor->algorithm);
BIO_printf(out," Public Key Algorithm: %s\n",
(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i));
pkey = X509_PUBKE... | false | false | false | false | false | 0 |
git_futils_prettify_dir(char *buffer_out, size_t size, const char *path, const char *base_path)
{
int len = 0, segment_len, only_dots, root_path_offset, error = GIT_SUCCESS;
char *current;
const char *buffer_out_start, *buffer_end;
current = (char *)path;
buffer_end = path + strlen(path);
buffer_out_start = buff... | false | true | false | false | false | 1 |
saveXml(QTextStream& xmlStream)
{
QString name = m_name;
name = name.replace("&","&");
name = name.replace("<","<");
name = name.replace(">",">");
xmlStream << "<continent name=\""<<name<<"\" bonus=\""<<bonus<<"\" >" << endl;
QList< Country* >::const_iterator it, it_end;
it = m_members.constBegi... | false | false | false | false | false | 0 |
synthesize(Design*des, NetScope*scope, NetExpr*)
{
perm_string path = scope->local_symbol();
unsigned width=expr_width();
if (width == 0) {
cerr << get_fileline() << ": internal error: "
<< "Found a zero width constant!" << endl;
return 0;
}
NetNet*osig = new NetNet(sc... | false | false | false | false | false | 0 |
recvDocuments(TIFF* tif, FaxRecvInfo& info, FaxRecvInfoArray& docs, Status& result)
{
bool recvOK;
u_int ppm = PPM_EOP;
batchid = getCommID();
for (;;) {
bool okToRecv = true;
Status reason;
modem->getRecvSUB(info.subaddr); // optional subaddress
/*
* Check a received TSI/PWD against the list of ... | false | false | false | false | false | 0 |
newGlobalRef(jobject obj, int id)
{
if (obj)
{
if (id) /* zero when weak global ref is desired */
{
lock locked;
for (std::multimap<int, countedRef>::iterator iter = refs.find(id);
iter != refs.end();
iter++) {
if (iter-... | false | false | false | false | false | 0 |
GetNewMultiXactId(int nxids, MultiXactOffset *offset)
{
MultiXactId result;
MultiXactOffset nextOffset;
debug_elog3(DEBUG2, "GetNew: for %d xids", nxids);
/* MultiXactIdSetOldestMember() must have been called already */
Assert(MultiXactIdIsValid(OldestMemberMXactId[MyBackendId]));
LWLockAcquire(MultiXactGenLoc... | false | false | false | false | false | 0 |
acquireLocksOnSubLinks(Node *node, acquireLocksOnSubLinks_context *context)
{
if (node == NULL)
return false;
if (IsA(node, SubLink))
{
SubLink *sub = (SubLink *) node;
/* Do what we came for */
AcquireRewriteLocks((Query *) sub->subselect,
context->for_execute,
false);
/* Fall through to... | false | true | false | false | false | 1 |
ref_always_accessed_p (struct loop *loop, mem_ref_p ref, bool stored_p)
{
vec<mem_ref_loc_p> locs = vNULL;
unsigned i;
mem_ref_loc_p loc;
bool ret = false;
struct loop *must_exec;
tree base;
base = get_base_address (ref->mem);
if (INDIRECT_REF_P (base)
|| TREE_CODE (base) == MEM_REF)
base = T... | false | false | false | false | false | 0 |
Play(int number)
{
GDK_THREADS_LEAVE();
playlist->Pause();
playlist->Play(number);
playlist->UnPause();
GDK_THREADS_ENTER();
} | false | false | false | false | false | 0 |
SECU_PrintSetOfExtensions(FILE *out, SECItem **any, char *m, int level)
{
int rv = 0;
if (m && *m) {
SECU_Indent(out, level++); fprintf(out, "%s:\n", m);
}
while (any && any[0]) {
rv |= SECU_DecodeAndPrintExtensions(out, any[0], "", level);
any++;
}
return rv;
} | false | false | false | false | false | 0 |
mkstr(char *str) {
Term *term;
Ref(char *, string, str);
term = gcnew(Term);
term->str = string;
term->closure = NULL;
RefEnd(string);
return term;
} | false | false | false | false | false | 0 |
__env_thread_init(env, during_creation)
ENV *env;
int during_creation;
{
DB_ENV *dbenv;
DB_HASHTAB *htab;
REGENV *renv;
REGINFO *infop;
THREAD_INFO *thread;
int ret;
dbenv = env->dbenv;
infop = env->reginfo;
renv = infop->primary;
if (renv->thread_off == INVALID_ROFF) {
if (dbenv->thr_max == 0) {
env... | false | false | false | false | false | 0 |
start_create_ibss(struct adapter *padapter)
{
unsigned short caps;
u8 val8;
u8 join_type;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)(&(pmlmeinfo->network));
pmlmeext->cur_channel = ... | false | false | false | false | false | 0 |
gst_ogg_mux_set_header_on_caps (GstCaps * caps, GList * buffers)
{
GstStructure *structure;
GValue array = { 0 };
GList *walk = buffers;
caps = gst_caps_make_writable (caps);
structure = gst_caps_get_structure (caps, 0);
/* put buffers in a fixed list */
g_value_init (&array, GST_TYPE_ARRAY);
while ... | false | false | false | false | false | 0 |
dataTypeName() const
{
Pack::DataType type = dataType();
switch (type) {
case Pack::FormSubset: return tkTr(Trans::Constants::FORMS);
case Pack::SubForms: return tkTr(Trans::Constants::SUBFORMS);
case Pack::DrugsWithInteractions: return tkTr(Trans::Constants::DRUGS_WITH_INTERACTIONS);
case Pack:... | false | false | false | false | false | 0 |
j_mfcccalc_free(MFCCCalc *mfcc)
{
if (mfcc->rest_param) free_param(mfcc->rest_param);
if (mfcc->param) free_param(mfcc->param);
if (mfcc->wrk) WMP_free(mfcc->wrk);
if (mfcc->tmpmfcc) free(mfcc->tmpmfcc);
if (mfcc->db) WMP_deltabuf_free(mfcc->db);
if (mfcc->ab) WMP_deltabuf_free(mfcc->ab);
if (mfcc->cmn.wr... | false | false | false | false | false | 0 |
gameEngineMode(KBlocksConfigManager * config)
{
int gameCount;
bool sameSeq;
bool hasAttack;
bool standbyMode;
bool hasHuman;
bool sendLimit;
string serverIP;
string recordFile;
string recordType;
bool recordBinary;
config->GetKeyInt("Engine", "GameCount", &gameCoun... | false | false | false | false | false | 0 |
dupcounters(struct cgpu_info *cgpu, uint64_t *checked, uint64_t *dups)
{
struct dupdata *dup = (struct dupdata *)(cgpu->dup_data);
if (!dup) {
*checked = 0;
*dups = 0;
} else {
*checked = dup->checked;
*dups = dup->dups;
}
} | false | false | false | false | false | 0 |
mca_btl_tcp_proc_remove(mca_btl_tcp_proc_t* btl_proc, mca_btl_base_endpoint_t* btl_endpoint)
{
size_t i;
OPAL_THREAD_LOCK(&btl_proc->proc_lock);
for(i=0; i<btl_proc->proc_endpoint_count; i++) {
if(btl_proc->proc_endpoints[i] == btl_endpoint) {
memmove(btl_proc->proc_endpoints+i, btl_proc... | false | false | false | false | false | 0 |
WriteDB(DB *dbp,char *name,void *ptr,int size)
{ DBT *key,*value;
key = NewDBKey(name);
value = NewDBValue(ptr,size);
if ((errno = dbp->put(dbp,NULL,key,value,0)) != 0)
{
Debug("Database write failed: %s",db_strerror(errno));
DeleteDBKey(key);
DeleteDBValue(value);
return false;
}
else
{
De... | false | false | false | false | false | 0 |
store_context ()
{
struct CONTEXT *arch;
if (NULL == (arch = (struct CONTEXT *)
callocx(1,sizeof(struct CONTEXT))))
{
error_message (4002);
return;
}
arch->previous = context;
context = arch;
context->bp = bp;
context->frame = frame;
context->kodp = kodp;
context->kodp1 = kod... | false | false | false | false | false | 0 |
analogtv_level(analogtv *it, int y, int ytop, int ybot)
{
int level;
if (ybot-ytop>=7) {
if (y==ytop || y==ybot-1) level=0;
else if (y==ytop+1 || y==ybot-2) level=1;
else level=2;
}
else if (ybot-ytop>=5) {
if (y==ytop || y==ybot-1) level=0;
else level=2;
}
else if (ybot-ytop>=3) {
i... | false | false | false | false | false | 0 |
urlIsRelative(const char *url)
{
const char *p;
if (url == NULL) {
return (0);
}
if (*url == '\0') {
return (0);
}
for (p = url; *p != '\0' && *p != ':' && *p != '/'; p++);
if (*p == ':') {
return (0);
}
return (1);
} | false | false | false | false | false | 0 |
fde_needed_for_eh_p (dw_fde_ref fde)
{
if (flag_asynchronous_unwind_tables)
return true;
if (TARGET_USES_WEAK_UNWIND_INFO && DECL_WEAK (fde->decl))
return true;
if (fde->uses_eh_lsda)
return true;
/* If exceptions are enabled, we have collected nothrow info. */
if (flag_exceptions && (fde->all... | false | false | false | false | false | 0 |
gamgi_global_selection_assembly (gamgi_assembly *parent, int mark)
{
gamgi_assembly *child;
gamgi_dlist *dlist;
for (dlist = parent->assembly_start; dlist != NULL; dlist = dlist->next)
{
child = GAMGI_CAST_ASSEMBLY dlist->data;
child->mark = mark;
gamgi_global_selection_assembly (child, mark);
}
} | false | false | false | false | false | 0 |
cb_gnm_dialog_setup_destroy_handlers (G_GNUC_UNUSED GtkWidget *widget,
GnmDialogDestroySignals *dd)
{
GPtrArray *os = dd->objects_signals;
int i;
for (i = 0; i < (int)os->len; i += 2) {
GObject *obj = g_ptr_array_index (os, i);
guint s = GPOINTER_TO_UINT (g_ptr_array_index (os, i + 1));
g_signal_han... | false | false | false | false | false | 0 |
token_exit( int fd )
{
int i,j,k,temp;
int num_jug;
num_jug=quejugador(fd);
if( num_jug<0 || num_jug >= MAXPLAYER)
return;
temp=usuario.nro_tot[num_jug];
borrar_jugador( num_jug );
if( temp >= PLAY && temp < PERDIO )
broadcast(BN_DISCON"=%i",num_jug);
if(temp<=BOARD)
return;
j=0;
for(k=0;k<MAX... | false | false | false | false | false | 0 |
dib3000mb_fifo_control(struct dvb_frontend *fe, int onoff)
{
struct dib3000_state *state = fe->demodulator_priv;
deb_xfer("%s fifo\n",onoff ? "enabling" : "disabling");
if (onoff) {
wr(DIB3000MB_REG_FIFO, DIB3000MB_FIFO_ACTIVATE);
} else {
wr(DIB3000MB_REG_FIFO, DIB3000MB_FIFO_INHIBIT);
}
return 0;
} | false | false | false | false | false | 0 |
_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *label)
{
Elm_Multibuttonentry_Item *item;
if (part && strcmp(part, "default")) return;
if (!label) return;
item = (Elm_Multibuttonentry_Item *)it;
edje_object_part_text_escaped_set(item->button, "elm.btn.text", label);
_resize_butt... | false | false | false | false | false | 0 |
Create( wxWindow *parent, wxWindowID id,
const wxString& value,
const wxPoint& pos, const wxSize& size,
long style,
double min, double max,
double initial,
... | false | false | false | false | false | 0 |
initiate_send (void)
{
if (ac_out_buffer.length() < ac_out_buffer_size) {
// try to refill the buffer
refill_buffer();
}
if (ac_out_buffer.length() && connected) {
srv_internal_dbgprintf("%d: sending %d bytes\n", fileno, ac_out_buffer.length());
int num_sent = dispatcher::send (ac_out_buffer.data(), ac_out_b... | false | false | false | false | false | 0 |
FoldNoBox4glDoc(unsigned int startPos, int length, int initStyle,
Accessor &styler) {
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0;
unsigned... | false | false | false | false | false | 0 |
execStyleChange(KHTMLPart *part, int propertyID, int propertyEnum)
{
CSSStyleDeclarationImpl *style = new CSSStyleDeclarationImpl(0);
style->setProperty(propertyID, propertyEnum);
style->ref();
part->editor()->applyStyle(style);
style->deref();
return true;
} | false | false | false | false | false | 0 |
init_internal_command_queue(PLCI *plci)
{
word i;
dbug(1, dprintf("%s,%d: init_internal_command_queue",
(char *)(FILE_), __LINE__));
plci->internal_command = 0;
for (i = 0; i < MAX_INTERNAL_COMMAND_LEVELS; i++)
plci->internal_command_queue[i] = NULL;
} | false | false | false | false | false | 0 |
save_dev(blkid_dev dev, FILE *file)
{
struct list_head *p;
if (!dev || dev->bid_name[0] != '/')
return 0;
DBG(DEBUG_SAVE,
printf("device %s, type %s\n", dev->bid_name, dev->bid_type ?
dev->bid_type : "(null)"));
fprintf(file,
"<device DEVNO=\"0x%04lx\" TIME=\"%ld\"",
(unsigned long) dev->bid_devn... | false | false | false | false | false | 0 |
rtw_setstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 unicast_key)
{
struct cmd_obj *ph2c;
struct set_stakey_parm *psetstakey_para;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct set_stakey_rsp *psetstakey_rsp = NULL;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecu... | false | true | false | false | false | 1 |
dump(unsigned long start, unsigned long len)
{
unsigned long offset;
int char_num;
char char_str[17];
/* Start on a multiple of 16 bytes */
offset = start & 0xfffffff0;
char_str[16] = 0;
char_num=0;
while(1) {
/* Print offset, if needed */
if(char_num==0) printf("%08lx: ", offset);
/* If we're before t... | true | true | false | false | false | 1 |
L30()
{register object *base=vs_base;
register object *sup=base+VM30; VC30
vs_check;
{object V226;
object V227;
object V228;
V226=(base[0]);
V227=(base[1]);
V228=(base[2]);
vs_top=sup;
goto TTL;
TTL:;
if(!(((long)length((V227)))==((long)1))){
goto T750;}
{object V229;
V229= ((V228))->v.v_self[(long)54];
... | false | false | false | false | false | 0 |
add_ocsp_serial(OCSP_REQUEST **req, char *serial,const EVP_MD *cert_id_md, X509 *issuer,
STACK_OF(OCSP_CERTID) *ids)
{
OCSP_CERTID *id;
X509_NAME *iname;
ASN1_BIT_STRING *ikey;
ASN1_INTEGER *sno;
if(!issuer)
{
BIO_printf(bio_err, "No issuer certificate specified\n");
return 0;
}
if(!*req) *req = OCSP... | false | false | false | false | false | 0 |
CNF_AddSources(void) {
int i;
for (i=0; i<n_ntp_sources; i++) {
NSR_AddUnresolvedSource(ntp_sources[i].params.name, ntp_sources[i].params.port,
ntp_sources[i].type, &ntp_sources[i].params.params);
}
NSR_ResolveSources();
} | false | false | false | false | false | 0 |
bf_index(Var arglist, Byte next, void *vdata, Objid progr)
{ /* (source, what [, case-matters]) */
Var r;
int case_matters = 0;
if (arglist.v.list[0].v.num == 3)
case_matters = is_true(arglist.v.list[3]);
r.type = TYPE_INT;
r.v.num = strindex(arglist.v.list[1].v.str, arglist.v.list[2].v.str,
... | false | false | false | false | false | 0 |
fill_cmd_activate_session (uint8_t authentication_type,
uint8_t maximum_privilege_level,
const void *challenge_string,
unsigned int challenge_string_len,
uint32_t initial_outbound_sequence_number,
... | false | false | false | false | false | 0 |
zbase_make_font(gs_font_dir * pdir, const gs_font * oldfont,
const gs_matrix * pmat, gs_font ** ppfont)
{
/*
* We must call gs_base_make_font so that the XUID gets copied
* if necessary.
*/
int code = gs_base_make_font(pdir, oldfont, pmat, ppfont);
if (code < 0)
retur... | false | false | false | false | false | 0 |
leaveNotifyEvent(XCrossingEvent &ce) {
m_closing = false;
// if there's a submenu open, highlight its index and stop hide
if (validIndex(m_which_sub) && m_active_index != m_which_sub &&
menuitems[m_which_sub]->submenu()->isVisible()) {
int old = m_active_index;
m_active_index = m_whi... | false | false | false | false | false | 0 |
twl6040_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
struct snd_soc_codec *codec = dai->codec;
struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
int rate;
rate = params_rate(params);
switch (rate) {
case 11250:
case 22500:
case 44... | false | false | false | false | false | 0 |
isInteriorIntersection(int inputLineIndex)
{
for (int i=0; i<result; i++)
{
if (!(intPt[i].equals2D(*inputLines[inputLineIndex][0])
|| intPt[i].equals2D(*inputLines[inputLineIndex][1])))
{
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
get_data_X (gretl_matrix *X, const MODEL *pmod, const DATASET *dset)
{
int wt = pmod->nwt;
int i, t, vi, s = 0;
/* copy independent vars into matrix X */
if (!wt && pmod->missmask == NULL) {
/* use faster method */
int T = pmod->t2 - pmod->t1 + 1;
size_t sz = T * sizeof(double);
for (i=2; i<=pmod... | false | false | false | false | false | 0 |
read()
{
d->mData["proxyOn"] = d->mSettings->value("proxyOn");
d->mData["proxyURL"] = d->mSettings->value("proxyURL");
d->mData["proxyUser"] = d->mSettings->value("proxyUser");
d->mData["proxyPasswd"] = d->mSettings->value("proxyPasswd");
d->mData["proxyPort"] = d->mSettings->value("proxyPort");
... | false | false | false | false | false | 0 |
pInline()
{
if ( def_token_file!=NULL )
{
warnNoFL("-inline conflicts with -def-tokens; ignored");
}
else if ( GenCPP )
{
warnNoFL("-inline conflicts with C++ interface; ignored");
}
else Inline = 1;
} | false | false | false | false | false | 0 |
mimeTypes( Mode mode )
{
QStringList mimeList, allFormats;
const KService::List services = KServiceTypeTrader::self()->query("QImageIOPlugins");
foreach(const KService::Ptr &service, services) {
if ( (service->property("X-KDE-Read").toBool() && mode == Reading) ||
(service->property("X... | false | false | false | false | false | 0 |
gst_rtsp_connection_set_auth (GstRTSPConnection * conn,
GstRTSPAuthMethod method, const gchar * user, const gchar * pass)
{
g_return_val_if_fail (conn != NULL, GST_RTSP_EINVAL);
if (method == GST_RTSP_AUTH_DIGEST && ((user == NULL || pass == NULL)
|| g_strrstr (user, ":") != NULL))
return GST_RTS... | false | false | false | false | false | 0 |
gt_pch_p_22VEC_size_time_entry_gc (ATTRIBUTE_UNUSED void *this_obj,
void *x_p,
ATTRIBUTE_UNUSED gt_pointer_operator op,
ATTRIBUTE_UNUSED void *cookie)
{
struct VEC_size_time_entry_gc * const x ATTRIBUTE_UNUSED = (struct VEC_size_time_entry_gc *)x_p;
{
size_t i0;
size_t l0 = (size_t)(((*x).base).prefix.nu... | false | false | false | false | false | 0 |
nssutil_growList(char ***pModuleList, int *useCount, int last)
{
char **newModuleList;
*useCount += SECMOD_STEP;
newModuleList = (char **)PORT_Realloc(*pModuleList,
*useCount*sizeof(char *));
if (newModuleList == NULL) {
return SECFailure;
}
PORT_Memset(&newModuleList[last],0, sizeof(ch... | false | false | false | false | false | 0 |
getFileInfo(const Tokenizer *tokenizer, const Settings *settings) const
{
if (settings->isEnabled("unusedFunction") && settings->_jobs == 1)
instance.parseTokens(*tokenizer, tokenizer->list.getFiles().front().c_str(), settings);
return nullptr;
} | false | false | false | false | false | 0 |
test_get_events_call (WalkerTestCaseFixture *fixture,
TplLogWalker *walker,
guint num_events,
gint64 timestamp,
GTimeSpan duration)
{
GList *events;
get_events (fixture, walker, num_events);
events = fixture->events;
g_assert (events != NULL);
g_assert_cmpuint (g_list_length (events), ==, nu... | false | false | false | false | false | 0 |
fill_from_database()
{
BusyCursor busy_cursor(get_app_window());
bool result = Box_DB_Table::fill_from_database();
Document* document = get_document();
if(!document)
return false;
//Get relationships from the document:
Document::type_vec_relationships vecRelationships = document->get_relationships(m_... | false | false | false | false | false | 0 |
init_uc_val(container_node *c, value *v) {
node *d = v->any_def();
if (d && d->parent == c)
++ucm[d];
} | false | false | false | false | false | 0 |
pagebot(FILE *outf, Outchoices *od) {
extern time_t origstarttime;
long secs;
/* Start of the bottom of the page */
od->outputter->pagebotstart(outf, od);
/* The credit line */
od->outputter->credit(outf, od);
/* The program run time */
if (od->runtime) {
secs = (long)difftime(time((time_t *)NUL... | false | false | false | false | false | 0 |
write_xfig(const char *logfile, unsigned long long sim_time)
{
FILE *f;
f = fopen(logfile, "w");
if (f == NULL) {
fprintf(stderr, "Cannot open <%s> for writing: %s\n",
logfile, strerror(errno));
return -1;
}
write_xfig_header(f);
if (ferror(f)) {
goto done;
}
write_xfig_linear(f);
write_xfig_time(f... | false | false | false | false | true | 1 |
b43_ppr_get_max(struct b43_wldev *dev, struct b43_ppr *ppr)
{
u8 res = 0;
int i;
u8 *rate;
ppr_for_each_entry(ppr, i, rate) {
res = max(*rate, res);
}
return res;
} | false | false | false | false | false | 0 |
ignore1(char **list, struct ignoretab *tab, char *which)
{
int h;
struct ignore *igp;
char **ap;
if (*list == NULL)
return igshow(tab, which);
for (ap = list; *ap != 0; ap++) {
char *field;
size_t sz;
sz = strlen(*ap);
field = ac_alloc(sz + 1);
i_strcpy(field, *ap, sz + 1);
field[sz]='\0';
if (me... | false | true | false | false | false | 1 |
bm_initialize(void)
{
int i;
time_t mod;
panel_bm_lst.bm = panel_bm_mng.bm = bm_list;
for (i = 0; i < BM_ENTRIES_LIMIT; i++)
US_INIT(bm_list[i]);
pathname_set_directory(clex_data.homedir);
user_bm_file = estrdup(pathname_join(".clexbm"));
mod = mod_time(user_bm_file);
if (read_bm_file() == 0)
bm_file_mod... | false | false | false | false | false | 0 |
update_state()
{
unsigned short ss = 0;
for (int i=0; i<8; i++)
{
if ( m_D[i]->getDrivenState() )
ss |= 1<<i;
}
sreg = ss;
} | false | false | false | false | false | 0 |
gmpc_log_func(
const gchar * log_domain,
GLogLevelFlags log_level,
const gchar * message,
gpointer user_data)
{
if (log_level <= global_log_level)
{
g_log_default_handler(log_domain, log_level, message, user_data);
}
} | false | false | false | false | false | 0 |
opal_os_dirpath_create(const char *path, const mode_t mode)
{
struct stat buf;
char **parts, *tmp;
int i, len;
int ret;
if (NULL == path) { /* protect ourselves from errors */
return(OPAL_ERROR);
}
if (0 == (ret = stat(path, &buf))) { /* already exists */
if (mode == (mode ... | false | true | false | false | true | 1 |
Get_control_msg_impl() {
struct msg_struct* msg = NULL;
int return_status;
char data[REG_MAX_MSG_SIZE];
/* will this block? we never want it to! */
if(poll_steering_msg(&appside_socket_info,
appside_socket_info.connector_handle) == REG_FAILURE)
return NULL;
if(consume_steering_msg(&appside_s... | false | false | false | false | false | 0 |
ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response)
{
gcry_sexp_t key;
ssh_key_type_spec_t spec;
unsigned char hash[MAX_DIGEST_LEN];
unsigned int hash_n;
unsigned char key_grip[20];
unsigned char *key_blob;
u32 key_blob_size;
unsigned char *data;
unsigned char *sig;
size_t ... | false | false | false | false | false | 0 |
do_focus (CANON_Scanner * s)
{
SANE_Status status;
u_char ebuf[74];
size_t buf_size;
DBG (3, "do_focus: sending GET FILM STATUS\n");
memset (ebuf, 0, sizeof (ebuf));
buf_size = 4;
status = get_film_status (s->fd, ebuf, &buf_size);
if (status != SANE_STATUS_GOOD)
{
DBG (1, "do_focus: GET FILM ... | 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.