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 |
|---|---|---|---|---|---|---|
ibus_array_engine_show_special_code_for_char(
IBusArrayEngine *arrayeng, gchar *ch)
{
if (!is_special_notify)
return;
GArray* candidates = array_get_reverted_key_candidates_from_special(array_context, ch);
if (candidates->len == 1) {
gchar* rawkeys = g_array_inde... | false | false | false | false | false | 0 |
need_inline_stubs(const type_t *iface)
{
const statement_t *stmt;
if (get_stub_mode() == MODE_Os) return 1;
STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) )
{
const var_t *func = stmt->u.var;
if (is_local( func->attrs )) continue;
if (!is_interpreted_func( iface, f... | false | false | false | false | false | 0 |
change_bind_existing(change::pointer cp)
{
change::pointer pcp;
cstate_ty *pcsp;
cstate_branch_change_list_ty *lp;
size_t j;
//
// verify the change number given on the command line
//
trace(("change_bind_existing(cp = %08lX)\n{\n", (long)cp));
assert(cp->reference_co... | false | false | false | false | false | 0 |
doclistener_populateObject(PT_BlockOffset blockOffset,
const PX_ChangeRecord_Object * pcro)
{
_assertRunListIntegrity();
switch (pcro->getObjectType())
{
case PTO_Image:
{
FG_Graphic* pFG = FG_Graphic::createFromChangeRecord(this, pcro);
if (pFG == NULL)
return false;
xxx_UT_DEBUGMSG(("Popul... | false | false | false | false | false | 0 |
makeargv()
{
char *cp, *cp2, c;
char **argp = margv;
margc = 0;
cp = line;
if (*cp == '!') { /* Special case shell escape */
/* save for shell command */
strlcpy(saveline, line, sizeof(saveline));
*argp++ = "!"; /* No room in string to get this */
margc++;
cp++;
}
while ((c = *cp)) {... | false | false | false | false | false | 0 |
unset_label()
{
struct text_label *this_label;
struct text_label *prev_label;
int tag;
if (END_OF_COMMAND) {
/* delete all labels */
while (first_label != NULL)
delete_label((struct text_label *) NULL, first_label);
} else {
/* get tag */
tag = int_expression();
if (!END_OF_COMMAND)
... | false | false | false | false | false | 0 |
keySetOwner(Key *key, const char *owner)
{
if (!key) return -1;
if (owner && (key->ownerSize=kdbiStrLen(owner)) > 1)
{
if (key->owner) {
char *p=0;
p=realloc(key->owner,key->ownerSize);
if (NULL==p) {
/*errno=KDB_ERR_NOMEM;*/
return -1;
}
key->owner=p;
} else {
key->owner=malloc(key->o... | false | true | false | false | false | 1 |
getVerifyKey(CACertificate** ppCert)
{
//We need this DAS key as EVP key...
EVP_PKEY* pPKey=EVP_PKEY_new();
EVP_PKEY_set1_DSA(pPKey,m_pDSA);
*ppCert=new CACertificate();
(*ppCert)->m_pCert=X509_new();
// LERNGRUPPE
// We nned to use Version 3 to use extensions
// X509_set_version((*ppCert)->m_pCer... | false | false | false | false | false | 0 |
nemo_search_engine_simple_start (NemoSearchEngine *engine)
{
NemoSearchEngineSimple *simple;
SearchThreadData *data;
GThread *thread;
simple = NEMO_SEARCH_ENGINE_SIMPLE (engine);
if (simple->details->active_search != NULL) {
return;
}
if (simple->details->query == NULL) {
return;
}
data = search_thre... | false | false | false | false | false | 0 |
attach_pas_card(struct address_info *hw_config)
{
pas_irq = hw_config->irq;
if (detect_pas_hw(hw_config))
{
if ((pas_model = pas_read(0xFF88)))
{
char temp[100];
if (pas_model < 0 ||
pas_model >= ARRAY_SIZE(pas_model_names)) {
printk(KERN_ERR "pas2 unrecognized model.\n");
retu... | false | false | false | false | false | 0 |
PromoteRsc(resource_t * rsc, node_t * next, gboolean optional, pe_working_set_t * data_set)
{
char *key = NULL;
GListPtr gIter = NULL;
gboolean runnable = TRUE;
GListPtr action_list = NULL;
pe_rsc_trace(rsc, "%s on %s", rsc->id, next ? next->details->uname : "N/A");
CRM_CHECK(next != NULL, ret... | false | false | false | true | false | 1 |
aif2clk_late_ev(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
wm8994->aif2clk_enable = 1;
break;
case SND_... | false | false | false | false | false | 0 |
make_debug_expr_from_rtl (const_rtx exp)
{
tree ddecl = make_node (DEBUG_EXPR_DECL), type;
enum machine_mode mode = GET_MODE (exp);
rtx dval;
DECL_ARTIFICIAL (ddecl) = 1;
if (REG_P (exp) && REG_EXPR (exp))
type = TREE_TYPE (REG_EXPR (exp));
else if (MEM_P (exp) && MEM_EXPR (exp))
type = TREE_TYPE (... | false | false | false | true | false | 1 |
check_dir_is_empty(struct ifp_device * dev, const char * dirname)
{
int i = 0;
int n = 0;
i = ifp_dir_open(dev, dirname);
ifp_err_expect(i, i == -ENOENT, err, "dir_open failed");
i = _ifp_list_dirs(dev, dirname, strlen(dirname), IFP_FILE|IFP_DIR,
_empty_dir_checker, &n);
ifp_err_jump(i, err, "ifp_list_dirs fa... | false | false | false | false | false | 0 |
write_entry(struct cache_entry *ce, char *path, const struct checkout *state, int to_tempfile)
{
int fd;
long wrote;
switch (ce->ce_mode & S_IFMT) {
char *new;
struct strbuf buf;
unsigned long size;
case S_IFREG:
new = read_blob_entry(ce, path, &size);
if (!new)
return error("git checkout-index: unab... | false | true | false | false | true | 1 |
MD5End(MD5_CTX *ctx, char *buf)
{
int i;
char *p = malloc(33);
unsigned char digest[16];
static const char hex[]="0123456789abcdef";
if (!p)
p = malloc(33);
if (!p)
return 0;
MD5Final(digest,ctx);
for (i=0;i<16;i++) {
p[i+i] = hex[digest[i] >> 4];
p[i+i+1] = hex[digest[i] & 0... | true | true | false | false | false | 1 |
gui_add_fill_dir(GtkTreeIter *iter, gboolean silent) {
GtkTreeView *tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add"));
GtkTreeModel *tm = gtk_tree_view_get_model(tv);
GtkTreeIter child;
gint nd;
gchar *filepath;
gtk_tree_model_get(tm, iter, ADD_NUM_DIRS, &nd, ADD_FILENAME, &filepath, -1);... | false | false | false | false | false | 0 |
newsgroups_cb(const char *mailbox,
const char *entry __attribute__((unused)),
const char *userid,
struct annotation_data *attrib, void *rock)
{
struct wildmat *wild = (struct wildmat *) rock;
/* skip personal mailboxes */
if ((!strncasecmp(mailbox, "INBOX", 5) &&
(!mailbox[5] || mailbox[5] ==... | false | false | false | false | false | 0 |
mx_xfn_xform_decls (gimple_stmt_iterator *gsi,
bool *handled_operands_p ATTRIBUTE_UNUSED,
struct walk_stmt_info *wi)
{
struct mf_xform_decls_data *d = (struct mf_xform_decls_data *) wi->info;
gimple stmt = gsi_stmt (*gsi);
switch (gimple_code (stmt))
{
case GIMPLE_BIND:
{
/* Pro... | false | false | false | false | false | 0 |
calc_seckey(struct cifs_ses *ses)
{
int rc;
struct crypto_blkcipher *tfm_arc4;
struct scatterlist sgin, sgout;
struct blkcipher_desc desc;
unsigned char sec_key[CIFS_SESS_KEY_SIZE]; /* a nonce */
get_random_bytes(sec_key, CIFS_SESS_KEY_SIZE);
tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);... | false | false | false | false | false | 0 |
embryo_program_variable_find(Embryo_Program *ep, const char *name)
{
int first, last, mid, result;
char pname[sNAMEMAX + 1];
Embryo_Cell paddr;
Embryo_Header *hdr;
if (!ep) return EMBRYO_CELL_NONE;
if (!ep->base) return EMBRYO_CELL_NONE;
hdr = (Embryo_Header *)ep->base;
... | false | false | false | false | false | 0 |
remove(GlyphIndex index) {
PageInfo& info = info_->item_ref(index);
if (canvas_ != nil && (info.status_ & PageInfoAllocated)) {
canvas_->damage(info.extension_);
}
Resource::unref(info.glyph_);
info_->remove(index);
} | false | false | false | false | false | 0 |
gen_ashrv2di3 (rtx operand0,
rtx operand1,
rtx operand2)
{
rtx _val = 0;
start_sequence ();
{
rtx operands[3];
operands[0] = operand0;
operands[1] = operand1;
operands[2] = operand2;
#line 11211 "../../src/gcc/config/i386/sse.md"
{
rtvec vs = rtvec_alloc (2);
rtx par = gen_rtx_PARALLEL (V2DI... | false | false | false | false | true | 1 |
AcpiHwEnableRuntimeGpeBlock (
ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
ACPI_GPE_BLOCK_INFO *GpeBlock,
void *Context)
{
UINT32 i;
ACPI_STATUS Status;
/* NOTE: assumes that all GPEs are currently disabled */
/* Examine each GPE Register with... | false | false | false | false | false | 0 |
_downcast(CORBA::ValueBase* _b)
{
return _b ? (UnknownValue*)_b->_ptrToValue(_PD_repoId) : 0;
} | false | false | false | false | false | 0 |
OnContext(wxContextMenuEvent &event)
{
wxMenu menu;
int i;
if (!mMenuEnabled) {
event.Skip();
return;
}
SetFocus();
for(i=0; i<GetNumBuiltins(); i++) {
menu.AppendCheckItem(ID_MENU+i, GetBuiltinName(i));
if (mFormatString == GetBuiltinFormat(i))
menu.Check(ID_MENU+i... | false | false | false | false | false | 0 |
DropConfigurationMapping(AlterTSConfigurationStmt *stmt,
HeapTuple tup, Relation relMap)
{
Oid cfgId = HeapTupleGetOid(tup);
ScanKeyData skey[2];
SysScanDesc scan;
HeapTuple maptup;
int i;
Oid prsId;
int *tokens,
ntoken;
ListCell *c;
prsId = ((Form_pg_ts_config) GETSTRUCT(tup))->cfgpars... | false | false | false | false | false | 0 |
H5Gunlink(hid_t loc_id, const char *name)
{
H5G_loc_t loc; /* Group's location */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
/* Check arguments */
if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BA... | false | false | false | false | false | 0 |
DPCache_HasTokenCRLs(CRLDPCache* cache)
{
PRBool answer = PR_FALSE;
PRUint32 i;
for (i=0;i<cache->ncrls;i++)
{
if (cache->crls[i] && (CRL_OriginToken == cache->crls[i]->origin) )
{
answer = PR_TRUE;
break;
}
}
return answer;
} | false | false | false | false | false | 0 |
askfor_aux_keypress(char *buf, size_t buflen, size_t *curs, size_t *len, char keypress, bool firsttime)
{
switch (keypress)
{
case ESCAPE:
{
*curs = 0;
return TRUE;
break;
}
case '\n':
case '\r':
{
*curs = *len;
return TRUE;
break;
}
case ARROW_LEFT:
{
if (firsttime) *curs... | false | false | false | false | false | 0 |
ssl_RemoveSSLv3CBCPadding(sslBuffer *plaintext,
unsigned int blockSize,
unsigned int macSize)
{
unsigned int paddingLength, good, t;
const unsigned int overhead = 1 /* padding length byte */ + macSize;
/* These lengths are all public so we can test them in non-constant
* time. */
if (ove... | false | false | false | false | false | 0 |
setup_class_translate (void)
{
int cl, mode;
enum reg_class cover_class, best_class, *cl_ptr;
int i, cost, min_cost, best_cost;
for (cl = 0; cl < N_REG_CLASSES; cl++)
ira_class_translate[cl] = NO_REGS;
if (flag_ira_algorithm == IRA_ALGORITHM_PRIORITY)
for (cl = 0; cl < LIM_REG_CLASSES; cl++)
{... | false | false | false | false | false | 0 |
prettyPrintByte(FILE *out, unsigned char item, unsigned int level)
{
int rv;
rv = prettyIndent(out, level);
if (rv < 0)
return rv;
rv = fprintf(out, "%02x ", item);
if (rv < 0) {
PORT_SetError(SEC_ERROR_IO);
return rv;
}
prettyColumn++;
if (prettyColumn >= RIGHT_MARGIN) {
return p... | false | false | false | false | false | 0 |
atspi_document_get_locale (AtspiDocument *obj, GError **error)
{
gchar *retval = NULL;
g_return_val_if_fail (obj != NULL, g_strdup ("C"));
_atspi_dbus_call (obj, atspi_interface_document, "GetLocale", error, "=>s", &retval);
return retval;
} | false | false | false | false | false | 0 |
checkFunctionUsage(const std::string& name, const Scope* scope)
{
if (!scope)
return true; // Assume it is used, if scope is not seen
for (std::list<Function>::const_iterator func = scope->functionList.begin(); func != scope->functionList.end(); ++func) {
if (func->functionScope) {
... | false | false | false | false | false | 0 |
restore_pirqs(void)
{
int pirq, rc, irq, gsi;
struct physdev_map_pirq map_irq;
struct irq_info *info;
list_for_each_entry(info, &xen_irq_list_head, list) {
if (info->type != IRQT_PIRQ)
continue;
pirq = info->u.pirq.pirq;
gsi = info->u.pirq.gsi;
irq = info->irq;
/* save/restore of PT devices doesn't ... | false | false | false | false | false | 0 |
fine_cell_cleanup (FttCell * cell, AdaptParams * p)
{
if (!GFS_CELL_IS_BOUNDARY (cell)) {
gpointer o;
p->nc--;
if ((o = CELL_HCOARSE (cell)))
gts_eheap_remove (p->hcoarse, o);
if ((o = CELL_HFINE (cell)))
gts_eheap_remove (p->hfine, o);
}
gfs_cell_cleanup (cell, GFS_DOMAIN (p->sim));
... | false | false | false | false | false | 0 |
enable_wol_mode(struct net_device *dev, int enable_intr)
{
void __iomem * ioaddr = ns_ioaddr(dev);
struct netdev_private *np = netdev_priv(dev);
if (netif_msg_wol(np))
printk(KERN_INFO "%s: remaining active for wake-on-lan\n",
dev->name);
/* For WOL we must restart the rx process in silent mode.
* Write NU... | false | false | false | false | false | 0 |
drawGroupHeadings(Window window_)
{
if (groupHeadingsHeight()>0)
{
if (fixedColumns()>0)
{
if (numColumns()<=columns())
{
drawGroupHeadings(window_,0,lastColumn());
}
else
{
drawGroupHeadings(window_,0,fixedColumns()-1);
drawGro... | false | false | false | false | false | 0 |
getKeyType(const UnicodeString& token, tokenType& keyType, UErrorCode &status)
{
if (U_FAILURE(status)) {
return;
}
if ( keyType==tNumber) {
}
else if (token==PK_VAR_N) {
keyType = tVariableN;
}
else if (token==PK_IS) {
keyType = tIs;
}
else if (token==PK_AND)... | false | false | false | false | false | 0 |
ReadyItem()
{
AString temp, weaponstr, armorstr, battlestr;
int weapon, armor, item, i, ready;
item = 0;
for(i = 0; i < MAX_READY; ++i) {
ready = readyWeapon[i];
if(ready != -1) {
if(item) weaponstr += ", ";
weaponstr += ItemString(ready, 1);
++item;
}
}
if(item > 0)
weaponstr = AString("Ready w... | false | false | false | false | false | 0 |
LayoutData(PHONEME_LIST *ph_list, int n_ph)
{//===========================================================
// divide the phoneme list into lines for display
int xpos;
int w;
int ix;
PHONEME_LIST *p;
numph = n_ph;
phlist = ph_list;
num_lines = 0;
linetab[0] = 1;
xpos = linewidth;
// could improve this to... | false | false | false | false | false | 0 |
inf_sanity_check(struct inputfile *inf)
{
fc_assert_ret_val(NULL != inf, FALSE);
fc_assert_ret_val(INF_MAGIC == inf->magic, FALSE);
fc_assert_ret_val(NULL != inf->fp, FALSE);
fc_assert_ret_val(0 <= inf->line_num, FALSE);
fc_assert_ret_val(0 <= inf->cur_line_pos, FALSE);
fc_assert_ret_val(FALSE == inf->at_eo... | false | false | false | false | false | 0 |
PROCunwatch(process)
int process;
{
if (process < 0 || process >= PROCtablesize) {
syslog(L_ERROR, "%s internal PROCunwatch %d", LogName, process);
return;
}
PROCtable[process].Site = -1;
} | false | false | false | false | false | 0 |
oc_frag_copy_mmx(unsigned char *_dst,
const unsigned char *_src,int _ystride){
OC_FRAG_COPY_MMX(_dst,_src,_ystride);
} | false | false | false | false | false | 0 |
translate_icl_filename(int last_value,
char *new_name, char *old_name)
{ char *prefix_path = NULL;
char *extension = "";
if (contains_separator(old_name)==0)
if (ICL_Path[0]!=0)
prefix_path = ICL_Path;
#ifdef FILE_EXTENSIONS
extension = check_extension(old_name, ICL_Extension);
#... | false | false | false | false | false | 0 |
check_video_profile (GUPnPDLNAInformation *info,
GUPnPDLNAProfile *profile)
{
GUPnPDLNAVideoInformation *video_info =
gupnp_dlna_information_get_video_information (info);
GUPnPDLNAAudioInformation *audio_info =
gupnp_dlna_i... | false | false | false | false | false | 0 |
jobDone(ThreadWeaver::Job *job)
{
FindMatchesJob *runJob = dynamic_cast<FindMatchesJob *>(job);
if (!runJob) {
return;
}
m_jobs.remove(runJob);
runJob->deleteLater();
if (m_jobs.isEmpty()) {
deleteLater();
}
} | false | false | false | false | false | 0 |
getTextAlignment()
{
TextAlignment textAlignment = getAlignment();
switch (_autoSize) {
case AUTOSIZE_CENTER:
textAlignment = ALIGN_CENTER;
break;
case AUTOSIZE_LEFT:
textAlignment = ALIGN_LEFT;
break;
case AUTOSIZE_RIGHT:
tex... | false | false | false | false | false | 0 |
write_file(struct open_file *ofile, const char *buf, size_t len, off_t off)
{
int retv;
lock_file(ofile);
if (S_ISDIR(ofile->dentry->ddent->mode))
retv = write_dir(ofile, buf, len, off);
else
retv = rw_file(ofile, (char *)buf, len, off, 0);
unlock_file(ofile);
return retv;
} | false | false | false | false | false | 0 |
packet_dump(unsigned char* packet, int length)
{
int i;
if(packet == NULL) return 1;
if(length <= 0 || length > 2048) return 1;
for(i=0; i<length; i++)
{
if(i%16 == 0) printf("\n");
printf("%02X ", packet[i]);
}
printf("\n");
return 0;
} | false | false | false | false | false | 0 |
cb_temperature_units(GtkWidget *button, gpointer data)
{
GList *list;
gint units;
units = GTK_TOGGLE_BUTTON(button)->active;
if (units == units_fahrenheit)
return;
units_fahrenheit = units;
for (list = sensor_list; list; list = list->next)
fix_temp_alert((Sensor *) list->data);
gkrellm_sensors_rebuild(DO... | false | false | false | false | false | 0 |
gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[])
{
int i;
int j;
int k;
i = 0;
for (j = 0; j < 8; j++)
s->LARc[j] = c[i++];
for (j = 0; j < 4; j++)
{
s->Nc[j] = c[i++];
s->bc[j] = c[i++];
s->Mc[j] = c[i++];
s->xmaxc[j] = c[i++];
... | false | false | false | false | false | 0 |
s_rename_search(char *src, char *dest, int quiet_flag)
{
int i;
for (i = 0; i < rename_counter; i++) {
if (rename_pairs[cur_set][i].src && rename_pairs[cur_set][i].dest) {
if (strcmp(src, rename_pairs[cur_set][i].src) == 0) {
return (TRUE);
}
if (strcmp(dest, rename_pairs[cur_set][i].src) =... | false | false | false | false | false | 0 |
read(hsStream* S, plResManager* mgr) {
pfGUIValueCtrl::read(S, mgr);
fUpControl = mgr->readKey(S);
fDownControl = mgr->readKey(S);
fMin = S->readFloat(); // Seriously...
fMax = S->readFloat();
fStep = S->readFloat();
} | false | false | false | false | false | 0 |
HRPconvert(int32 fid, uint16 tag, uint16 ref, int32 xdim, int32 ydim,int16 scheme, comp_info *cinfo, uintn pixel_size)
{
CONSTR(FUNC, "HRPconvert"); /* for HERROR */
filerec_t *file_rec; /* file record */
accrec_t *access_rec=NULL; /* access element record */
crinfo_t *info; ... | false | false | false | false | false | 0 |
session_read(const char *filename) {
char *line;
FILE *f;
session_t *s = NULL;
int ret = 0;
if (!filename) {
plugin_t *p;
if (!in_autoexec) {
session_t *sf;
for (sf = sessions; sf; sf = sf->next)
command_exec(NULL, sf, ("/disconnect"), 1);
sessions_free();
debug(" flushed sessions\n");
}
... | false | false | false | false | true | 1 |
addMetadataModel(MDMODEL md_model, TagInfo *tag_table) {
// check that the model doesn't already exist
if((_table_map.find(md_model) == _table_map.end()) && (tag_table != NULL)) {
// add the tag description table
TAGINFO *info_map = new(std::nothrow) TAGINFO();
if(!info_map) return FALSE;
for(int i = 0; ; i... | false | false | false | false | false | 0 |
mdb_insert_row(MdbTableDef *table, int num_fields, MdbField *fields)
{
int new_row_size;
unsigned char row_buffer[4096];
MdbCatalogEntry *entry = table->entry;
MdbHandle *mdb = entry->mdb;
MdbFormatConstants *fmt = mdb->fmt;
guint32 pgnum;
guint16 rownum;
if (!mdb->f->writable) {
fprintf(stderr, "File is not... | true | true | false | false | false | 1 |
_drbd_wait_ee_list_empty(struct drbd_device *device,
struct list_head *head)
{
DEFINE_WAIT(wait);
/* avoids spin_lock/unlock
* and calling prepare_to_wait in the fast path */
while (!list_empty(head)) {
prepare_to_wait(&device->ee_wait, &wait, TASK_UNINTERRUPTIBLE);
spin_unlock_irq(&device->resource-... | false | false | false | false | false | 0 |
oaes_pseudo_encrypt_ecb( OAES_CTX * ctx, uint8_t * c )
{
size_t _i;
oaes_ctx * _ctx = (oaes_ctx *) ctx;
if( unlikely(NULL == _ctx) )
return OAES_RET_ARG1;
if( unlikely(NULL == c) )
return OAES_RET_ARG2;
if( unlikely(NULL == _ctx->key) )
return OAES_RET_NOKEY;
for ( _i = 0; _i < 10; ++_i )
... | false | false | false | false | false | 0 |
unview_thread(struct pine *state, MAILSTREAM *stream, MSGNO_S *msgmap)
{
PINETHRD_S *thrd = NULL, *topthrd = NULL;
unsigned long rawno;
if(!(stream && msgmap))
return 0;
rawno = mn_m2raw(msgmap, mn_get_cur(msgmap));
if(rawno)
thrd = fetch_thread(stream, rawno);
if(thrd && th... | false | false | false | false | false | 0 |
be_cmd_lock(struct be_adapter *adapter)
{
if (use_mcc(adapter)) {
spin_lock_bh(&adapter->mcc_lock);
return 0;
} else {
return mutex_lock_interruptible(&adapter->mbox_lock);
}
} | false | false | false | false | false | 0 |
b_vformat_attribute_get_nth_value(b_VFormatAttribute *attr, int nth)
{
GList *values = b_vformat_attribute_get_values_decoded(attr);
if (!values)
return NULL;
GString *retstr = (GString *)g_list_nth_data(values, nth);
if (!retstr)
return NULL;
if (!g_utf8_validate(retstr->str, -1, NULL)) {
values = b_vforma... | false | false | false | false | false | 0 |
parse_location(GArray *nodes, ParseLocation *loc)
{
const char *file = parse_find_locale(nodes, "file");
const char *line = parse_find_value(nodes, "line");
loc->base_name = utils_get_utf8_from_locale(file);
loc->func = parse_find_locale(nodes, "func");
loc->addr = parse_find_value(nodes, "addr");
loc->file = pa... | false | false | false | false | false | 0 |
isNegative() const
{
switch (reg.type) {
case TYPE_S8: return reg.data.s8 < 0;
case TYPE_S16: return reg.data.s16 < 0;
case TYPE_S32:
case TYPE_U32: return reg.data.s32 < 0;
case TYPE_F32: return reg.data.u32 & (1 << 31);
case TYPE_F64: return reg.data.u64 & (1ULL << 63);
default:
return ... | false | false | false | false | false | 0 |
gnumeric_small (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
int n;
GnmValue *res = NULL;
gnm_float *xs = collect_floats_value (argv[0], ei->pos,
COLLECT_IGNORE_STRINGS |
COLLECT_IGNORE_BOOLS |
COLLECT_IGNORE_BLANKS |
COLLECT_SORT,
&n, &res);
gnm_float ... | false | false | false | false | false | 0 |
i2c_mux_reg_deselect(struct i2c_adapter *adap, void *data,
unsigned int chan)
{
struct regmux *mux = data;
if (mux->data.idle_in_use)
return i2c_mux_reg_set(mux, mux->data.idle);
return 0;
} | false | false | false | false | false | 0 |
ajSeqoutSetNameDefaultS(AjPSeqout seqout,
AjBool multi, const AjPStr str)
{
static ajint count = 0;
if(ajStrGetLen(seqout->Name))
{
ajDebug("ajSeqoutSetNameDefaultS already has a name '%S'\n",
seqout->Name);
return ajFalse;
}
if (ajStrGetLen(str))
{
if(multi && count)
ajFmtPr... | false | false | false | false | false | 0 |
httpSetUniqueConnLimits(HttpConn *conn)
{
HttpLimits *limits;
if ((limits = mprAllocStruct(HttpLimits)) != 0) {
*limits = *conn->limits;
conn->limits = limits;
}
return limits;
} | false | false | false | false | false | 0 |
_fsel_path_save(E_Import_Dialog *id)
{
const char *fdev = NULL, *fpath = NULL;
e_widget_fsel_path_get(id->fsel_obj, &fdev, &fpath);
if ((fdev) || (fpath))
{
eina_stringshare_replace(&e_config->wallpaper_import_last_dev, fdev);
eina_stringshare_replace(&e_config->wallpaper_import_last_path... | false | false | false | false | false | 0 |
UnRegister(vtkObjectBase *o)
{
if (this->Interactor && this->Interactor->GetRenderWindow() == this &&
this->Interactor != o)
{
if (this->GetReferenceCount() + this->Interactor->GetReferenceCount() == 3)
{
this->vtkObject::UnRegister(o);
vtkRenderWindowInteractor *tmp = this->Interactor... | false | false | false | false | false | 0 |
ata_get_packet (int device) {
unsigned short buf[256];
if (!ioctl(device, HDIO_GET_IDENTITY, buf) && (buf[0] & 0x8000))
return 1;
else
return 0;
} | false | false | false | false | false | 0 |
open (ACE_HANDLE handles[2])
{
ACE_TRACE ("ACE_Pipe::open");
if (this->open () == -1)
return -1;
else
{
handles[0] = this->handles_[0];
handles[1] = this->handles_[1];
return 0;
}
} | false | false | false | false | false | 0 |
r300_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
{
const struct swizzle_data* sd;
unsigned int relevant;
int j;
if (opcode == RC_OPCODE_KIL ||
opcode == RC_OPCODE_TEX ||
opcode == RC_OPCODE_TXB ||
opcode == RC_OPCODE_TXP) {
if (reg.Abs || reg.Negate)
return 0;
for(j = 0; ... | false | false | false | false | false | 0 |
run(void *array, size_t cnt, size_t isize, bool chrono, size_t loops,
const char *what)
{
if (0 == loops)
loops = chrono ? calibrate(array, cnt, isize) : 1;
current_test = what;
if (!qsort_only)
timeit(xsort_test, loops, array, cnt, isize, chrono, what, "xsort");
timeit(xqsort_test, loops, array, cnt, isize,... | false | false | false | false | false | 0 |
irc_info_update(info_window *iw)
{
char message[BUF_LEN * 4];
char temp[BUF_LEN];
char *alpha = NULL;
char *freeme = NULL;
irc_info *ii = (irc_info *)iw->info_data;
eb_account *ea = ii->me;
ay_irc_account *eia = (ay_irc_account *)ea->protocol_account_data;
strncpy(temp, ea->handle, BUF_LEN);
if ((alpha = st... | true | true | false | false | false | 1 |
gtkrange_gtk_range_set_increments(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj range_scm;
GtkRange* range;
ScmObj step_scm;
double step;
ScmObj page_scm;
double page;
ScmObj SCM_SUBRARGS[3];
int SCM_i;
SCM_ENTER_SUBR("gtk-range-set-increments");
for (SCM_i=0; SCM_i<3; SCM_i++) {
SCM_SUB... | false | false | false | false | false | 0 |
cw1200_sdio_init(void)
{
const struct cw1200_platform_data_sdio *pdata;
int ret;
/* FIXME -- this won't support multiple devices */
pdata = global_plat_data;
if (cw1200_sdio_on(pdata)) {
ret = -1;
goto err;
}
ret = sdio_register_driver(&sdio_driver);
if (ret)
goto err;
return 0;
err:
cw1200_sdio_of... | false | false | false | false | false | 0 |
spd__isanum(char *str)
{
int i;
if (str == NULL) return 0;
for(i=0;i<=strlen(str)-1;i++){
if (!isdigit(str[i])) return 0;
}
return 1;
} | false | false | false | false | false | 0 |
OGR2SQLITE_Eof(sqlite3_vtab_cursor* pCursor)
{
OGR2SQLITE_vtab_cursor* pMyCursor = (OGR2SQLITE_vtab_cursor*) pCursor;
#ifdef DEBUG_OGR2SQLITE
CPLDebug("OGR2SQLITE", "Eof");
#endif
if( pMyCursor->nFeatureCount < 0 )
{
return (pMyCursor->poFeature == NULL);
}
else
{
return ( p... | false | false | false | false | false | 0 |
print_file_stack()
{
for (struct st_test_file* err_file= cur_file;
err_file != file_stack;
err_file--)
{
fprintf(stderr, "included from %s at line %d:\n",
err_file->file_name, err_file->lineno);
}
} | false | false | false | false | false | 0 |
str_vector(uint64_t v, bool vertical) const {
std::ostringstream os;
print_vector(&os, v, vertical);
return os.str();
} | false | false | false | false | false | 0 |
gupnp_didl_lite_resource_update_count_is_set (GUPnPDIDLLiteResource *resource)
{
const char *content;
g_return_val_if_fail (GUPNP_IS_DIDL_LITE_RESOURCE (resource), FALSE);
content = xml_util_get_attribute_content (resource->priv->xml_node,
"upd... | false | false | false | false | false | 0 |
tracker_dbus_shutdown (void) {
TrackerBackup* _tmp0_;
TrackerStatus* _tmp3_;
#line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
tracker_dbus_set_available (FALSE);
#line 139 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
_tmp0_ = tracker_dbus_backup;
#line 139 "/home/mart... | false | false | false | false | false | 0 |
dataset_drop_last_variables (DATASET *dset, int delvars)
{
int newv = dset->v - delvars;
int i, err = 0;
if (delvars <= 0) {
return 0;
}
#if FULLDEBUG
fprintf(stderr, "*** dataset_drop_last_variables: dropping %d, newv = %d\n",
delvars, newv);
#endif
if (newv < 1) {
fprintf(stderr, "da... | false | false | false | false | false | 0 |
makeEnlargedSchema ( schema* s, double width )
{
if (width > s->width()) {
return new enlargedSchema(s, width);
} else {
return s;
}
} | false | false | false | false | false | 0 |
BBox_Conic_To( FT_Vector* control,
FT_Vector* to,
TBBox_Rec* user )
{
/* we don't need to check `to' since it is always an `on' point, thus */
/* within the bbox */
if ( CHECK_X( control, user->bbox ) )
BBox_Co... | false | false | false | false | false | 0 |
createCurlTransaction(xmlrpc_env * const envP,
xmlrpc_server_info * const serverP,
xmlrpc_mem_block * const callXmlP,
xmlrpc_mem_block * const responseXmlP,
curlTransaction ** const curlTransactionPP) {
curlTransa... | false | false | false | true | false | 1 |
html_ul(HANDLER_S *hd, int ch, int cmd)
{
if(cmd == GF_DATA){
html_handoff(hd, ch);
}
else if(cmd == GF_RESET){
if(PASS_HTML(hd->html_data)){
html_output_raw_tag(hd->html_data, "ul");
}
else{
HD(hd->html_data)->li_pending = 1;
html_blank(hd->html_data, 0);
}
}
else if(cmd == GF_E... | false | false | false | false | false | 0 |
insert(
const CPose3DPDFPtr &in_posePDF,
const CSensoryFramePtr &in_SF )
{
MRPT_START
TPosePDFSensFramePair pair;
pair.second = in_SF;
pair.first = in_posePDF;
m_posesObsPairs.push_back( pair );
MRPT_END
} | false | false | false | false | false | 0 |
CopySmallPattern8b(const uint8_t* src, uint8_t* dst,
int length, uint32_t pattern) {
int i;
// align 'dst' to 4-bytes boundary. Adjust the pattern along the way.
while ((uintptr_t)dst & 3) {
*dst++ = *src++;
pattern = Rotate8b(pattern);
--length;
}
// Cop... | false | false | false | false | false | 0 |
dmalloc_count_changed(const unsigned long mark,
const int not_freed_b, const int free_b)
{
unsigned long mem_count;
if (! dmalloc_in(DMALLOC_DEFAULT_FILE, DMALLOC_DEFAULT_LINE, 1)) {
return 0;
}
if (! BIT_IS_SET(_dmalloc_flags, DEBUG_LOG_TRANS)) {
dmalloc_message("counting the unfreed me... | false | false | false | false | false | 0 |
store_temp(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct sensor_device_attribute_2 *sensor_attr =
to_sensor_dev_attr_2(attr);
int nr = sensor_attr->nr;
int index = sensor_attr->index;
struct w83l786ng_data *data = dev_get_drvdata(dev);
struct i2c_client *client... | false | false | false | false | false | 0 |
qede_alloc_mem_fp(struct qede_dev *edev,
struct qede_fastpath *fp)
{
int rc, tc;
rc = qede_alloc_mem_sb(edev, fp->sb_info, fp->rss_id);
if (rc)
goto err;
rc = qede_alloc_mem_rxq(edev, fp->rxq);
if (rc)
goto err;
for (tc = 0; tc < edev->num_tc; tc++) {
rc = qede_alloc_mem_txq(edev, &fp->txqs[tc]);... | false | false | false | false | false | 0 |
rio_mport_scan(int mport_id)
{
struct rio_mport *port = NULL;
int rc;
mutex_lock(&rio_mport_list_lock);
list_for_each_entry(port, &rio_mports, node) {
if (port->id == mport_id)
goto found;
}
mutex_unlock(&rio_mport_list_lock);
return -ENODEV;
found:
if (!port->nscan) {
mutex_unlock(&rio_mport_list_lock)... | false | false | false | false | false | 0 |
mg_popappearance(void)
{
struct mgastk *mp;
struct mgcontext *ctx = _mgc;
mp = ctx->astk->next;
if (mp == NULL) {
return -1;
}
if (ctx->astk->ap_seq != mp->ap_seq) ctx->changed |= MC_AP;
if (ctx->astk->mat_seq != mp->mat_seq) ctx->changed |= MC_MAT;
if (ctx->astk->light_seq != mp->light_seq) ctx->c... | false | false | false | false | false | 0 |
LineHasBookMarker(cbStyledTextCtrl* pControl, int line) const
{
if (line == -1)
line = pControl->GetCurrentLine();
//-return pControl->MarkerGet(line) & (1 << BOOKMARK_MARKER);
return pControl->MarkerGet(line) & (1 << GetBrowseMarkerId());
} | false | false | false | false | false | 0 |
sq_getfunctioninfo(HSQUIRRELVM v,SQInteger level,SQFunctionInfo *fi)
{
SQInteger cssize = v->_callsstacksize;
if (cssize > level) {
SQVM::CallInfo &ci = v->_callsstack[cssize-level-1];
if(sq_isclosure(ci._closure)) {
SQClosure *c = _closure(ci._closure);
SQFunctionProto *proto = _funcproto(c->_function);
... | false | false | false | false | false | 0 |
lan78xx_disconnect(struct usb_interface *intf)
{
struct lan78xx_net *dev;
struct usb_device *udev;
struct net_device *net;
dev = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
if (!dev)
return;
udev = interface_to_usbdev(intf);
net = dev->net;
unregister_netdev(net);
cancel_delayed_work_sync(&... | 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.