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 |
|---|---|---|---|---|---|---|
writeToFile(const BigFloat& bf, std::ostream& out, int base, int charsPerLine) {
BigInt c(CORE::abs(bf.m()));
// get the absoulte value string
char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2];
mpz_get_str(buffer, base, c.get_mp());
int length = strlen(buffer);
// write type name, base, lengt... | false | false | false | false | false | 0 |
net2272_disable(struct usb_ep *_ep)
{
struct net2272_ep *ep;
unsigned long flags;
ep = container_of(_ep, struct net2272_ep, ep);
if (!_ep || !ep->desc || _ep->name == ep0name)
return -EINVAL;
spin_lock_irqsave(&ep->dev->lock, flags);
net2272_dequeue_all(ep);
net2272_ep_reset(ep);
dev_vdbg(ep->dev->dev, "di... | false | false | false | false | false | 0 |
sylk_rtd_p_parse (SylkReader *state, char *str)
{
char *next;
int font_size;
GnmStyle *font = NULL;
for (; *str != '\0' ; str = next) {
next = sylk_next_token (str);
switch (*str) {
case 'P' : /* format */
g_ptr_array_add (state->formats,
go_format_new_from_XL (str+1));
break;
case 'F' : /* so... | false | false | false | false | false | 0 |
bus_ibus_impl_set_global_engine (BusIBusImpl *ibus,
BusEngineProxy *engine)
{
if (!ibus->use_global_engine)
return;
if (ibus->focused_context) {
bus_input_context_set_engine (ibus->focused_context, engine);
} else if (ibus->fake_context) {
bus_inp... | 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));
CategoryLabelsModel *_t = static_cast<CategoryLabelsModel *>(_o);
switch (_id) {
case 0: _t->labelChanged((*reinterpret_cast< co... | false | false | false | false | false | 0 |
output_attr_index_or_value (dw_attr_ref a)
{
const char *name = dwarf_attr_name (a->dw_attr);
if (dwarf_split_debug_info && AT_index (a) != NOT_INDEXED)
{
dw2_asm_output_data_uleb128 (AT_index (a), "%s", name);
return;
}
switch (AT_class (a))
{
case dw_val_class_addr:
dw2_as... | false | false | false | false | false | 0 |
ring_fl_db(struct adapter *adapter, struct sge_fl *fl)
{
u32 val = adapter->params.arch.sge_fl_db;
/* The SGE keeps track of its Producer and Consumer Indices in terms
* of Egress Queue Units so we can only tell it about integral numbers
* of multiples of Free List Entries per Egress Queue Units ...
*/
if (fl... | false | false | false | false | false | 0 |
save_as_dialog_handle_response(GtkWidget *dialog, gint response)
{
gboolean rename_file = FALSE;
gboolean success = FALSE;
gchar *new_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
switch (response)
{
case GEANY_RESPONSE_RENAME:
/* rename doesn't check for empty filename or overwriting *... | false | false | false | false | false | 0 |
createDecoder()
{
KEncodingDetector *dec = new KEncodingDetector();
if( !d->m_encoding.isNull() )
dec->setEncoding( d->m_encoding.toLatin1().constData(),
d->m_haveEncoding ? KEncodingDetector::UserChosenEncoding : KEncodingDetector::EncodingFromHTTPHeader);
else {
// Inherit the ... | false | false | false | false | false | 0 |
setToDefault()
{
for (int i=0; i<inputOptions.size(); i++) {
inputOptions[i].setSelected(false);
inputOptions[i].setValue(QVariant());
}
for (int i=0; i<outputOptions.size(); i++) {
outputOptions[i].setSelected(false);
outputOptions[i].setValue(QVariant());
}
} | false | false | false | false | false | 0 |
AdvResetSB(ADV_DVC_VAR *asc_dvc)
{
int status;
/*
* Send the SCSI Bus Reset idle start idle command which asserts
* the SCSI Bus Reset signal.
*/
status = AdvSendIdleCmd(asc_dvc, (ushort)IDLE_CMD_SCSI_RESET_START, 0L);
if (status != ADV_TRUE) {
return status;
}
/*
* Delay for the specified SCSI Bus Re... | false | false | false | false | false | 0 |
pci_seq_start(struct seq_file *m, loff_t *pos)
{
struct pci_dev *dev = NULL;
loff_t n = *pos;
for_each_pci_dev(dev) {
if (!n--)
break;
}
return dev;
} | false | false | false | false | false | 0 |
xml_add_job (QofInstance * job_p, gpointer out_p)
{
xmlNodePtr node;
GncJob *job = (GncJob *) job_p;
FILE *out = out_p;
if (ferror(out))
return;
if (!job_should_be_saved (job))
return;
node = job_dom_tree_create (job);
xmlElemDump(out, NULL, node);
xmlFreeNode (node);
... | false | false | false | false | false | 0 |
FindFilename( const wxString filePath)
// ----------------------------------------------------------------------------
{
//Return true if we own a BrowseMarks array by this filepath;
FileBrowse_MarksHash& hash = m_FileBrowse_MarksArchive;
FileBrowse_MarksHash::iterator it = hash.find(filePath);
if ( it... | false | false | false | false | false | 0 |
nt_extract_configuration(AW_window *aww, AW_CL cl_extractType){
GB_transaction dummy2(GLOBAL_gb_main); // open close transaction
char *cn = aww->get_root()->awar(AWAR_CONFIGURATION)->read_string();
GBDATA *gb_configuration = GBT_find_configuration(GLOBAL_gb_main,cn);
if ... | false | false | false | false | false | 0 |
pack_key32(__u32 retain,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey)
{
if (tkey->off > (tkey->off & ~3)) {
fprintf(stderr,
"pack_key32: 32 bit offsets must begin in 32bit boundaries\n");
return -1;
}
tkey->val = htonl(tkey->val & retain);
tkey->mask = htonl(tkey->mask | ~retain);
/* jamal remove thi... | false | false | false | false | false | 0 |
gst_matroska_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
{
GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (GST_PAD_PARENT (sinkpad));
if (active) {
/* if we have a scheduler we can start the task */
demux->segment_running = TRUE;
gst_pad_start_task (sinkpad, (GstTaskFunction) gst_matrosk... | false | false | false | false | false | 0 |
stop_rubberbanding (NautilusCanvasContainer *container,
guint32 time)
{
NautilusCanvasRubberbandInfo *band_info;
GList *icons;
gboolean enable_animation;
band_info = &container->details->rubberband_info;
g_assert (band_info->timer_id != 0);
g_source_remove (band_info->timer_id);
band_info->timer_id = 0;
... | false | false | false | false | false | 0 |
update_statusbar_line(const char *curranswer, size_t index)
{
size_t start_col, page_start;
char *expanded;
assert(prompt != NULL && index <= strlen(curranswer));
start_col = strlenpt(prompt) + 2;
index = strnlenpt(curranswer, index);
page_start = get_statusbar_page_start(start_col, start_col ... | false | false | false | false | false | 0 |
test_kprobes(void)
{
int ret;
struct kprobe *kps[2] = {&kp, &kp2};
/* addr and flags should be cleard for reusing kprobe. */
kp.addr = NULL;
kp.flags = 0;
ret = register_kprobes(kps, 2);
if (ret < 0) {
pr_err("register_kprobes returned %d\n", ret);
return ret;
}
preh_val = 0;
posth_val = 0;
ret = targe... | false | false | false | false | false | 0 |
rb_stat_init(obj, fname)
VALUE obj, fname;
{
struct stat st, *nst;
SafeStringValue(fname);
if (stat(StringValueCStr(fname), &st) == -1) {
rb_sys_fail(RSTRING(fname)->ptr);
}
if (DATA_PTR(obj)) {
free(DATA_PTR(obj));
DATA_PTR(obj) = NULL;
}
nst = ALLOC(struct stat);
*nst = st;
... | false | false | false | false | false | 0 |
realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */
{
#ifdef PHP_WIN32
unsigned long key = realpath_cache_key(path, path_len TSRMLS_CC);
#else
unsigned long key = realpath_cache_key(path, path_len);
#endif
unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cac... | false | false | false | false | false | 0 |
vs30_output_emit_depth_fog(struct svga_shader_emitter *emit,
SVGA3dShaderDestToken *out)
{
SVGA3dShaderDestToken reg;
if (emit->emitted_depth_fog) {
*out = emit->vs_depth_fog;
return TRUE;
}
reg = dst_register( SVGA3DREG_OUTPUT, emit->vs30_output_count++ );
*out ... | false | false | false | false | false | 0 |
get_wasted_bits_(FLAC__int32 signal[], unsigned samples)
{
unsigned i, shift;
FLAC__int32 x = 0;
for(i = 0; i < samples && !(x&1); i++)
x |= signal[i];
if(x == 0) {
shift = 0;
}
else {
for(shift = 0; !(x&1); shift++)
x >>= 1;
}
if(shift > 0) {
for(i = 0; i < samples; i++)
signal[i] >>= shift;
... | false | false | false | false | false | 0 |
QCC_fprintfLocals(FILE *f, gofs_t paramstart, gofs_t paramend)
{
QCC_def_t *var;
temp_t *t;
int i;
for (var = pr.localvars; var; var = var->nextlocal)
{
if (var->ofs >= paramstart && var->ofs < paramend)
continue;
fprintf(f, "local %s %s;\n", TypeName(var->type), var->name);
}
for (t = functemps, i = 0;... | true | true | false | false | false | 1 |
git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset)
{
const char *ptr;
size_t len;
*bom = GIT_BOM_NONE;
/* need at least 2 bytes after offset to look for any BOM */
if (buf->size < offset + 2)
return 0;
ptr = buf->ptr + offset;
len = buf->size - offset;
switch (*ptr++) {
case 0:
i... | false | false | false | false | false | 0 |
atcommand_makehomun(const int fd, struct map_session_data* sd, AtCommandType command, const char* message)
{
int homunid;
nullpo_retr(-1, sd);
if (!message || !*message)
return -1;
if (sscanf(message, "%d", &homunid) < 1)
return -1;
if (homunid < HOM_ID || homunid >= HOM_ID + MAX_HOMUN_DB)
return -1;
if ... | false | false | false | false | false | 0 |
gfs2_glock_put(struct gfs2_glock *gl)
{
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
struct address_space *mapping = gfs2_glock2aspace(gl);
if (lockref_put_or_lock(&gl->gl_lockref))
return;
lockref_mark_dead(&gl->gl_lockref);
gfs2_glock_remove_from_lru(gl);
spin_unlock(&gl->gl_lockref.lock);
rhashtable_remove... | false | false | false | false | false | 0 |
search_mapserver(const char *map)
{
int i, j;
for(i = 0; i < MAX_MAP_SERVERS; i++) {
if (server_fd[i] < 0)
continue;
for(j = 0; j < server[i].map_num; j++) {
if (!strncmp(server[i].map + (j * 16), map, 16))
return i;
}
}
return -1;
} | false | false | false | false | false | 0 |
read_oligos (T this, Sequence_T queryuc) {
Reader_T reader;
int querypos;
Oligostate_T last_state = INIT;
#ifdef PMAP
unsigned int aaindex = 0U;
#else
Storedoligomer_T forward = 0U, revcomp = 0U;
#endif
this->validp = (bool *) CALLOC(this->querylength,sizeof(bool));
#ifdef PMAP
this->oligos = (Storedolig... | false | false | false | false | false | 0 |
emit_defun(Node *n, String *name) {
// String *storage=Getattr(n,"storage");
// if(!storage || (Strcmp(storage,"extern") && Strcmp(storage,"externc")))
// return SWIG_OK;
String *func_name = Getattr(n, "sym:name");
ParmList *pl = Getattr(n, "parms");
int argnum = 0;
func_name = lispify_name(n... | false | false | false | false | false | 0 |
ruv_enumerate_elements (const RUV *ruv, FNEnumRUV fn, void *arg)
{
int cookie;
RUVElement *elem;
int rc = 0;
ruv_enum_data enum_data = {0};
if (ruv == NULL || fn == NULL)
{
/* ONREPL - log error */
return -1;
}
slapi_rwlock_rdlock (ruv->lock);
for (elem = (RUVElemen... | false | false | false | false | false | 0 |
userrec_delete(userrec **list, userrec **last, userrec *x)
{
userrec *entry, *lastchecked = NULL;
entry = *list;
while(entry != NULL)
{
if(entry == x)
{
if(lastchecked == NULL)
{
*list = entry->next;
if(entry == *last)
*last = NULL;
}
else
{
lastchecked->next = entry->next;
... | false | false | false | false | false | 0 |
tp_file_transfer_channel_constructed (GObject *obj)
{
TpFileTransferChannel *self = (TpFileTransferChannel *) obj;
GHashTable *properties;
gboolean valid;
gint64 date;
const gchar *uri;
G_OBJECT_CLASS (tp_file_transfer_channel_parent_class)->constructed (obj);
properties = _tp_channel_get_immutable_prop... | false | false | false | false | false | 0 |
FVB_MakeNamelist(FontViewBase *fv, FILE *file) {
SplineChar *sc;
int i;
for ( i=0; i<fv->sf->glyphcnt; ++i ) {
if ( (sc = fv->sf->glyphs[i])!=NULL && sc->unicodeenc!=-1 ) {
if ( !isuniname(sc->name) && !isuname(sc->name ) )
fprintf( file, "0x%04X %s\n", sc->unicodeenc, sc->name );
}
}
} | false | false | false | false | false | 0 |
setApplicationPath(const QString& path)
{
s_appPath = qstrdup(QFile::encodeName(path).constData());
//if the appName has also been specified, update s_autoRestartCommand to be in the form "absolutePath/appName"
if (s_appName) {
delete[] s_autoRestartCommand;
QFileInfo appExecutable(QDir(pat... | false | false | false | false | false | 0 |
convert_native_args(struct stack *mimic_stack, unsigned long nr_args)
{
struct expression *args_list = NULL;
unsigned long i;
if (nr_args == 0) {
args_list = no_args_expr();
goto out;
}
for (i = 0; i < nr_args; i++) {
struct expression *expr = stack_pop(mimic_stack);
args_list = insert_native_arg(args_li... | false | false | false | false | false | 0 |
changelog5_config_init()
{
/* The FE DSE *must* be initialised before we get here */
/* create the configuration lock, if not yet created. */
if (!s_configLock)
{
s_configLock = slapi_new_rwlock();
}
if (s_configLock == NULL)
{
slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl,
"changelog5_conf... | false | false | false | false | false | 0 |
luaK_patchclose (FuncState *fs, int list, int level) {
level++; /* argument is +1 to reserve 0 as non-op */
while (list != NO_JUMP) {
int next = getjump(fs, list);
lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP &&
(GETARG_A(fs->f->code[list]) == 0 ||
GETARG_A(fs->f->cod... | false | false | false | false | false | 0 |
prompt_backspace(const Arg *arg) {
char *cmd = editor_prompt_get(vis);
if (!cmd || !*cmd)
prompt_enter(NULL);
else
window_backspace_key(vis->win->win);
free(cmd);
} | false | false | false | false | false | 0 |
setFont(Font* font)
{
d_font = font;
d_renderedStringValid = false;
WindowEventArgs args(this);
onFontChanged(args);
} | false | false | false | false | false | 0 |
evd_http_connection_redirect (EvdHttpConnection *self,
const gchar *url,
gboolean permanently,
GError **error)
{
SoupMessageHeaders *headers;
gboolean result;
g_return_val_if_fail (EVD_IS_HTTP_... | false | false | false | false | false | 0 |
cheese_flash_init (CheeseFlash *self)
{
CheeseFlashPrivate *priv = CHEESE_FLASH_GET_PRIVATE (self);
cairo_region_t *input_region;
GtkWindow *window;
GdkScreen *screen;
GdkVisual *visual;
priv->flash_timeout_tag = 0;
priv->fade_timeout_tag = 0;
window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_POPUP));
... | false | false | false | false | false | 0 |
slist_free(slist_t **slist_ptr)
{
g_assert(slist_ptr);
if (*slist_ptr) {
slist_t *slist;
slist = *slist_ptr;
slist_check(slist);
if (--slist->refcount != 0) {
g_critical("%s(): slist is still referenced! "
"(slist=%p, slist->refcount=%d)",
G_STRFUNC, cast_to_constpointer(slist), slist->refcount)... | false | false | false | false | false | 0 |
zero_grad_conv(const ColumnVector& par,
const ColumnVector& grad,
double cf,
double gtol)
{
double test = 0.0; // test will be largest relative component of gradient
for (int i=0; i<par.Nrows(); i++) {
test = std::... | false | false | false | false | false | 0 |
posix_fstatat(PyObject *self, PyObject *args)
{
PyObject *opath;
char *path;
STRUCT_STAT st;
int dirfd, res, flags = 0;
if (!PyArg_ParseTuple(args, "iO&|i:fstatat",
&dirfd, PyUnicode_FSConverter, &opath, &flags))
return NULL;
path = PyBytes_AsString(opath);
Py_BEGIN_ALL... | false | false | false | false | false | 0 |
dmi_checksum(const u8 *buf, u8 len)
{
u8 sum = 0;
int a;
for (a = 0; a < len; a++)
sum += buf[a];
return sum == 0;
} | false | false | false | false | false | 0 |
_ecore_con_server_flush(Ecore_Con_Server *svr)
{
int count, num;
size_t buf_len;
unsigned int *buf_offset;
const unsigned char *buf;
Eina_Binbuf *buf_p;
DBG("(svr=%p,buf=%p)", svr, svr->buf);
if (!svr->fd_handler) return;
#ifdef _WIN32
if (ecore_con_local_win32_server_flush(svr))
return;
#... | false | false | false | false | false | 0 |
_command_send(usb_handle *usb, const char *cmd,
const void *data, unsigned size,
char *response)
{
int r;
if (size == 0) {
return -1;
}
r = _command_start(usb, cmd, size, response);
if (r < 0) {
return -1;
}
r = _command_dat... | false | false | false | false | false | 0 |
concat_paths (const string& path, const string& filename)
{
// concatenate path and filename (or relative subpath)
return
path.substr(0, path.find_last_not_of (PathSeparator)+1) +
PathSeparator +
filename.substr(filename.find_first_not_of (PathSeparator));
} | false | false | false | false | false | 0 |
AddVertexSource(FUDaeGeometryInput::Semantic type)
{
FCDGeometrySource* vertexSource = AddSource(type);
vertexSources.push_back(vertexSource);
// Add this new per-vertex data source to all the existing polygon groups, at offset 0.
size_t polygonsCount = polygons.size();
for (size_t p = 0; p < polygonsCount... | false | false | false | false | false | 0 |
create_one_ec_pool_pp(const std::string &pool_name, Rados &cluster)
{
std::string err = connect_cluster_pp(cluster);
if (err.length())
return err;
bufferlist inbl;
int ret = cluster.mon_command(
"{\"prefix\": \"osd erasure-code-profile set\", \"name\": \"testprofile\", \"profile\": [ \"k=2\", \"m=1\", ... | false | false | false | false | false | 0 |
ExecAssComObjName (
Stat stat )
{
Obj record; /* record, left operand */
UInt rnam; /* name, left operand */
Obj rhs; /* rhs, right operand */
/* evaluate the record (chec... | false | false | false | false | false | 0 |
diff_rects (Rect r1, Rect r2, int *count, Rect result[4])
{
g_assert (count != NULL);
g_assert (result != NULL);
*count = 0;
if (rects_intersect (r1, r2)) {
diff_rects_guts (r1, r2, count, result);
diff_rects_guts (r2, r1, count, result);
} else {
if (!rect_empty (&r1)) {
result[(*count)++] = r1;
}
... | false | false | false | false | false | 0 |
tr1(I r,I *d) {
F s=1;
I t;
if(r<0)
DO(-r,s*=*d)
else
DO(r,if(s*=t=*d++,t<0)R -1)
R s>(LONG_MAX-1)?-1:(I)s;
} | false | false | false | false | false | 0 |
initGISTstate(GISTSTATE *giststate, Relation index)
{
int i;
if (index->rd_att->natts > INDEX_MAX_KEYS)
elog(ERROR, "numberOfAttributes %d > %d",
index->rd_att->natts, INDEX_MAX_KEYS);
giststate->tupdesc = index->rd_att;
for (i = 0; i < index->rd_att->natts; i++)
{
fmgr_info_copy(&(giststate->consiste... | false | false | false | false | false | 0 |
ath10k_mgmt_over_wmi_tx_work(struct work_struct *work)
{
struct ath10k *ar = container_of(work, struct ath10k, wmi_mgmt_tx_work);
struct sk_buff *skb;
int ret;
for (;;) {
skb = skb_dequeue(&ar->wmi_mgmt_tx_queue);
if (!skb)
break;
ret = ath10k_wmi_mgmt_tx(ar, skb);
if (ret) {
ath10k_warn(ar, "failed... | false | false | false | false | false | 0 |
out_ep(Edge * e)
{
if (!triangulate && plot)
{
clip_line(e) ;
}
if (!triangulate && !plot)
{
printf("e %d", e->edgenbr);
printf(" %d ", e->ep[le] != (Site *)NULL ? e->ep[le]->sitenbr : -1) ;
printf("%d\n", e->ep[re] != (Site *)NULL ? e->ep[re]->sitenbr... | false | false | false | false | false | 0 |
Set_Font(void)
{
if(Bouton_font != NULL)
{
gchar *string;
gtk_button_set_label(GTK_BUTTON(Bouton_font), term_conf.font);
string = g_strdup(term_conf.font);
cfgStoreValue(cfg, "font", string, CFG_INI, 0);
g_free(string);
}
if(term_conf.font != NULL)
vte_terminal_set_font_from_string(VTE_TERMINAL(... | false | false | false | false | false | 0 |
bnxt_hwrm_set_coal(struct bnxt *bp)
{
int i, rc = 0;
struct hwrm_ring_cmpl_ring_cfg_aggint_params_input req = {0};
u16 max_buf, max_buf_irq;
u16 buf_tmr, buf_tmr_irq;
u32 flags;
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS,
-1, -1);
/* Each rx completion (2 records) should b... | false | false | false | false | false | 0 |
picasso_handle_hsync (void)
{
if (currprefs.rtgmem_size == 0)
return;
int vsync = isvsync_rtg ();
if (vsync < 0) {
p96hsync++;
if (p96hsync >= p96syncrate * 3) {
p96hsync = 0;
// kickstart vblank vsync_busywait stuff
picasso_handle_vsync ();
... | false | false | false | false | false | 0 |
ArgumentParse_boolean(gchar *arg_string){
register gint i;
gchar *true_string[6] = {"Y", "T", "TRUE", "YES", "ON", "1"},
*false_string[6] = {"N", "F", "FALSE", "NO", "OFF", "0"};
for(i = 0; i < 6; i++){
if(!g_strcasecmp(arg_string, true_string[i]))
return TRUE;
if(!g... | false | false | false | false | false | 0 |
thumb2_final_prescan_insn (rtx insn)
{
rtx first_insn = insn;
rtx body = PATTERN (insn);
rtx predicate;
enum arm_cond_code code;
int n;
int mask;
/* Remove the previous insn from the count of insns to be output. */
if (arm_condexec_count)
arm_condexec_count--;
/* Nothing to do if we are alrea... | false | false | false | false | false | 0 |
containsExtendedCharacters(const OFBool checkAllStrings)
{
/* only check if parameter is true since derived VRs are not affected
by the attribute SpecificCharacterSet (0008,0005) */
if (checkAllStrings)
{
char *str = NULL;
Uint32 len = 0;
/* determine length in order to suppor... | false | false | false | false | false | 0 |
artifact_cmd(void){
int rid;
Blob content;
const char *zFile;
db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
if( g.argc!=4 && g.argc!=3 ) usage("ARTIFACT-ID ?FILENAME? ?OPTIONS?");
zFile = g.argc==4 ? g.argv[3] : "-";
rid = name_to_rid(g.argv[2]);
if( rid==0 ){
fossil_fatal("%s",g.zErrMsg);
}
... | false | false | false | false | false | 0 |
yysyntax_error (char *yyresult, int yystate, int yychar)
{
int yyn = yypact[yystate];
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
return 0;
else
{
int yytype = YYTRANSLATE (yychar);
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
... | true | true | false | false | false | 1 |
isDwoUnit() const {
return DD->useSplitDwarf() && Skeleton;
} | false | false | false | false | false | 0 |
list_add_event(struct perf_event *event, struct perf_event_context *ctx)
{
WARN_ON_ONCE(event->attach_state & PERF_ATTACH_CONTEXT);
event->attach_state |= PERF_ATTACH_CONTEXT;
/*
* If we're a stand alone event or group leader, we go to the context
* list, group events are kept attached to the group so that
* ... | false | false | false | false | false | 0 |
pvscsi_allocate_rings(struct pvscsi_adapter *adapter)
{
adapter->rings_state = pci_alloc_consistent(adapter->dev, PAGE_SIZE,
&adapter->ringStatePA);
if (!adapter->rings_state)
return -ENOMEM;
adapter->req_pages = min(PVSCSI_MAX_NUM_PAGES_REQ_RING,
pvscsi_ring_pages);
adapter->req_depth = adapter->... | false | false | false | false | false | 0 |
resolve_cb (GrlSource *src, guint operation_id, GrlMedia *media, gpointer user_data, const GError *error)
{
g_assert_no_error (error);
g_assert (media);
const gchar *title = grl_media_get_title (media);
const gchar *studio = grl_media_get_studio (media);
printf ("Media: Title='%s', Studio='%s'\n",
title,... | false | false | false | false | false | 0 |
find(CVmHashTable *hashtab, wchar_t *id,
int create)
{
CVmFmtTabStop *entry;
size_t id_chars;
size_t id_bytes;
size_t i;
/*
* Get the length - in characters AND in bytes - of the new ID.
* We mostly work with th... | false | false | false | false | false | 0 |
main (int argc, char ** ARG_UNUSED (argv))
{
int i, j;
switch (argc)
{
case 1:
break;
default:
usage ();
return (1);
}
puts ("/* This file is generated using gencheck. Do not edit. */\n");
puts ("#ifndef GCC_TREE_CHECK_H");
puts ("#define GCC_TREE_CHECK_H\n");
/* Print ... | false | false | false | false | false | 0 |
git__hexdump(const char *buffer, size_t len)
{
static const size_t LINE_WIDTH = 16;
size_t line_count, last_line, i, j;
const char *line;
line_count = (len / LINE_WIDTH);
last_line = (len % LINE_WIDTH);
for (i = 0; i < line_count; ++i) {
line = buffer + (i * LINE_WIDTH);
for (j = 0; j < LINE_WIDTH; ++j, ++... | false | false | false | false | false | 0 |
HasProperty (NPIdentifier aName)
{
if (!IsValid ())
return false;
int propertyIndex = GetClass()->GetPropertyIndex (aName);
NOTE (g_print ("totemNPObject::HasProperty [%p] %s => %s\n", (void*) this, NPN_UTF8FromIdentifier (aName), propertyIndex >= 0 ? "yes" : "no"));
if (propertyIndex >= 0)
return true... | false | false | false | false | false | 0 |
isBaseOf2(ClassDeclaration *cd)
{
if (!cd)
return 0;
//printf("ClassDeclaration::isBaseOf2(this = '%s', cd = '%s')\n", toChars(), cd->toChars());
for (size_t i = 0; i < cd->baseclasses->dim; i++)
{ BaseClass *b = (*cd->baseclasses)[i];
if (b->base == this || isBaseOf2(b->base))
... | false | false | false | false | false | 0 |
httpAddrEqual(const http_addr_t *addr1, /* I - First address */
const http_addr_t *addr2) /* I - Second address */
{
if (!addr1 && !addr2)
return (1);
if (!addr1 || !addr2)
return (0);
if (addr1->addr.sa_family != addr2->addr.sa_family)
return (0);
#ifdef AF_LOCAL
if (addr1->addr.... | false | false | false | false | false | 0 |
gnumeric_simtable (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
{
simtable_t p;
p.index = 0;
p.value = NULL;
function_iterate_argument_values
(ei->pos, callback_function_simtable, &p,
argc, argv, FALSE, CELL_ITER_IGNORE_BLANK);
/* See if there was any value worth using. */
if (p.value == NU... | false | false | false | false | false | 0 |
wait_for_response(int sd)
{
int i;
char buf[1024];
int buf_len, ret;
fd_set fds;
struct timeval tv;
int command;
#ifdef PIPE_DEBUG
printf("child: wait_for_response()\n");
#endif
/* For jpilot-sync */
/* We should never get to this function, but just in case. */
if (pipe_to_parent==STDOUT... | false | false | false | false | false | 0 |
sd_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
/* the video interface for isochronous transfer is 1 */
if (intf->cur_altsetting->desc.bInterfaceNumber != 1)
return -ENODEV;
return gspca_dev_probe2(intf, id, &sd_desc, sizeof(struct sd),
THIS_MODULE);
} | false | false | false | false | false | 0 |
DrawDashedWedge (int x, int y, int tx, int ty, int active,int color)
/* draws the dashed wedge for a bond behind the image plane */
{
int i, xlen, ylen;
GdkGC *thegc;
int len;
float step,factor;
if (xbmflag)
thegc = drawing_area->style->black_gc;
else if (active)
thegc = hlgc;
else
thegc= mygc... | false | false | false | false | false | 0 |
pcxhr_set_audio_source(struct snd_pcxhr* chip)
{
struct pcxhr_rmh rmh;
unsigned int mask, reg;
unsigned int codec;
int err, changed;
switch (chip->chip_idx) {
case 0 : mask = PCXHR_SOURCE_AUDIO01_UER; codec = CS8420_01_CS; break;
case 1 : mask = PCXHR_SOURCE_AUDIO23_UER; codec = CS8420_23_CS; break;
case 2 : m... | false | false | false | false | false | 0 |
Clock_ScanWeekday (char *ptr)
{
switch (*ptr) {
case 'S':
if ((strcmp (ptr, "SUN") == 0) || (strcmp (ptr, "SUNDAY") == 0))
return 0;
else if ((strcmp (ptr, "SAT") == 0) ||
(strcmp (ptr, "SATURDAY") == 0))
return 6;
return -1;
case 'M':
... | false | false | false | false | false | 0 |
append(struct dsv_iterator_state *state)
{
struct pstore_header *header;
struct pstore_table *table;
int output;
off_t f_offset;
output = open(output_file, O_RDWR);
if (output < 0)
die("Failed to open output file '%s': %s", output_file, strerror(errno));
f_offset = seek_or_die(output, 0, SEEK_END);
if (pos... | false | false | false | false | true | 1 |
nemo_launch_application (GAppInfo *application,
GList *files,
GtkWindow *parent_window)
{
GList *uris, *l;
uris = NULL;
for (l = files; l != NULL; l = l->next) {
uris = g_list_prepend (uris, nemo_file_get_activation_uri (l->data));
}
uris = g_list_reverse (uris);
nemo_launch_application_by_uri... | false | false | false | false | false | 0 |
external_notify_params_parse(void *data __UNUSED__, Evas_Object *obj,
const Eina_List *params) {
Elm_Params_Notify *mem;
Edje_External_Param *param;
const Eina_List *l;
mem = calloc(1, sizeof(Elm_Params_Notify));
if (!mem)
return NULL;
EINA_LIST_FOREACH(params, l, param)
{
if (!strcmp(param->name,... | false | false | false | false | false | 0 |
hasAttribute(StringRef Kind) const {
if (!isStringAttribute()) return false;
return pImpl && pImpl->hasAttribute(Kind);
} | false | false | false | false | false | 0 |
filter_set_end(struct filter *m, unsigned pos, uint16_t a)
{
if (!filter_end_isset(m, pos, a)) {
cli_perf_log_count(FILTER_END_LOAD, pos);
m->end[a] &= ~(1 << pos);
}
} | false | false | false | false | false | 0 |
alx_map_tx_skb(struct alx_priv *alx, struct sk_buff *skb)
{
struct alx_tx_queue *txq = &alx->txq;
struct alx_txd *tpd, *first_tpd;
dma_addr_t dma;
int maplen, f, first_idx = txq->write_idx;
first_tpd = &txq->tpd[txq->write_idx];
tpd = first_tpd;
maplen = skb_headlen(skb);
dma = dma_map_single(&alx->hw.pdev->d... | false | false | false | false | false | 0 |
SHA1Update(SHA1_CTX* context, const void *_data, uint32_t len)
{
uint32_t i, j;
const unsigned char *data = _data;
j = (context->count[0] >> 3) & 63;
if ((context->count[0] += len << 3) < (len << 3))
context->count[1]++;
context->count[1] += (len >> 29);
if ((j + len) > 63) {
memcpy(&context->buffe... | false | true | false | false | false | 1 |
GetEditableStateItem( const wxString& name ) const
{
if ( name == wxT("descboxheight") )
{
return (long) GetDescBoxHeight();
}
return wxNullVariant;
} | false | false | false | false | false | 0 |
client3_3_flush (call_frame_t *frame, xlator_t *this,
void *data)
{
clnt_args_t *args = NULL;
gfs3_flush_req req = {{0,},};
int64_t remote_fd = -1;
clnt_conf_t *conf = NULL;
clnt_local_t *local = NULL;
int op_e... | false | true | false | true | false | 1 |
kgdb_console_write(struct console *co, const char *s,
unsigned count)
{
unsigned long flags;
/* If we're debugging, or KGDB has not connected, don't try
* and print. */
if (!kgdb_connected || atomic_read(&kgdb_active) != -1 || dbg_kdb_mode)
return;
local_irq_save(flags);
gdbstub_msg_write(s, count);
loca... | false | false | false | false | false | 0 |
getableAttrlist(void)
{
ipcWarn(wrnlvl(),"%t AipcConnection::getableAttrlist\n");
int i,idx=0;
A sattrs=_attrs.setableAttrs();
A nsattrs=_attrs.nonsetableAttrs();
A z=gv(Et,sattrs->n+nsattrs->n);
for (i=0;i<sattrs->n;++i)z->p[idx++]=sattrs->p[i];
for (i=0;i<nsattrs->n;++i)z->p[idx++]=nsattrs->p[i];
R z;... | false | false | false | false | true | 1 |
GC_dump_regions(void)
{
unsigned i;
ptr_t start, end;
ptr_t p;
size_t bytes;
hdr *hhdr;
for (i = 0; i < GC_n_heap_sects; ++i) {
start = GC_heap_sects[i].hs_start;
bytes = GC_heap_sects[i].hs_bytes;
end = start + bytes;
/* Merge in contiguous sections. */
... | false | false | false | false | false | 0 |
cavan_service_main_loop(struct cavan_service_description *desc)
{
int i;
pthread_t *threads;
for (i = desc->daemon_count - 1, threads = desc->threads; i >= 0; i--)
{
pthread_join(threads[i], NULL);
}
return 0;
} | false | false | false | false | false | 0 |
f_match(file)
char *file;
{
size_t len = strlen(fc_filebase);
if (!DispBadFs && bad_extension(file))
return NO;
return len == 0
# ifdef FILENAME_CASEINSENSITIVE
|| caseeqn(file, fc_filebase, len);
# else
|| strncmp(file, fc_filebase, len) == 0;
# endif
} | false | false | false | false | false | 0 |
FlocaleGetFont(
Display *dpy, char *fontname, char *encoding, char *module)
{
XFontStruct *font = NULL;
FlocaleFont *flf;
char *str,*fn,*tmp;
char *hints = NULL;
hints = GetQuotedString(fontname, &tmp, "/", NULL, NULL, NULL);
str = GetQuotedString(tmp, &fn, ",", NULL, NULL, NULL);
while (!font && fn)
{
if (... | false | false | false | false | false | 0 |
markDictionnary (Dict* dict, XRef * xRef, XRef *countRef, Guint numOffset)
{
Object obj1;
for (int i=0; i<dict->getLength(); i++) {
markObject(dict->getValNF(i, &obj1), xRef, countRef, numOffset);
obj1.free();
}
} | false | false | false | false | false | 0 |
GMT_mapscale_syntax (char option, char *string)
{
if (string[0] == ' ') fprintf (stderr, "%s: GMT SYNTAX ERROR -%c option. Correct syntax:\n", GMT_program, option);
fprintf (stderr, "\t-%c %s\n", option, string);
fprintf (stderr, "\t Use -%cx to specify Cartesian coordinates instead. Scale is calculated at latit... | false | false | false | false | false | 0 |
mares_iconhd_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
{
mares_iconhd_device_t *device = (mares_iconhd_device_t *) abstract;
// Erase the current contents of the buffer and
// pre-allocate the required amount of memory.
if (!dc_buffer_clear (buffer) || !dc_buffer_resize (buffer, device->layout->mems... | 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.