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 |
|---|---|---|---|---|---|---|
opt_port(Jconf *jconf, char *arg[], int argnum)
{
char *p, *q;
p = (char *)malloc(strlen(arg[0]) + 1);
strcpy(p, arg[0]);
for (q = strtok(p, ","); q; q = strtok(NULL, ",")) {
if (adinnet_portnum >= MAXCONNECTION) {
fprintf(stderr, "Error: too many server ports (> %d): %s\n", MAXCONNECTION, arg[0]);
... | false | false | false | false | false | 0 |
reverse_vec_elements (tree x, gimple stmt, gimple_stmt_iterator *gsi)
{
tree vectype = TREE_TYPE (x);
tree mask_vec, builtin_decl;
tree perm_dest, data_ref;
gimple perm_stmt;
builtin_decl = perm_mask_for_reverse (vectype, &mask_vec);
perm_dest = vect_create_destination_var (gimple_assign_lhs (stmt), vecty... | false | false | false | false | false | 0 |
setStopAfterCurrent( bool on )
{
if( on )
The::playlistActions()->stopAfterPlayingTrack();
else
The::playlistActions()->stopAfterPlayingTrack( 0 );
} | false | false | false | false | false | 0 |
dump_exec_params (GdaConnection *cnc, GdaStatement *stmt, GdaSet *params)
{
if (params && (debug_level & 8)) {
GSList *list;
gchar *sql;
sql = gda_statement_to_sql_extended (stmt, cnc, params, GDA_STATEMENT_SQL_PARAMS_SHORT,
NULL, NULL);
g_print ("EVENT> COMMAND: parameters (on cnx %p) for statement... | false | false | false | false | false | 0 |
visit(const char* value,orbOptions::Source) throw (orbOptions::BadParam) {
CORBA::ULong v;
if (!orbOptions::getULong(value,v)) {
throw orbOptions::BadParam(key(),value,
orbOptions::expect_ulong_msg);
}
omniORB::traceLevel = v;
if (v >= 10)
omniORB::traceExceptions = 1;
} | false | false | false | false | false | 0 |
gt_radixsort_lsb_linear_phase(unsigned long *count,
unsigned long *source,
unsigned long *dest,
unsigned long len,
size_t shift)
{
unsigned long idx, ... | false | false | false | false | false | 0 |
SendSignaturePacket(){
// signate the public key of this client and send it
if (m_socket == NULL || credits == NULL || m_SecureIdentState == 0){
wxFAIL;
return;
}
if (!theApp->CryptoAvailable()) {
return;
}
if (credits->GetSecIDKeyLen() == 0) {
return; // We don't have his public key yet, will be back he... | false | false | false | false | false | 0 |
nhrp_packet_send_request(struct nhrp_packet *pkt,
void (*handler)(void *ctx, struct nhrp_packet *packet),
void *ctx)
{
struct nhrp_packet *packet;
packet = nhrp_packet_get(pkt);
packet->retry = 0;
if (packet->hdr.u.request_id == constant_htonl(0)) {
request_id++;
packet->hdr.u.request_id = hto... | false | false | false | false | false | 0 |
is_delim(unsigned char c, const char *delim)
{
int i;
/* Compare to all delimiters */
for (i=0; i<strlen(delim)+1; i++) {
if (delim[i] == c) return 1;
}
/* Not a delimiter */
return 0;
} | false | false | false | false | false | 0 |
gx_dc_ht_binary_fill_rectangle(const gx_device_color * pdevc, int x, int y,
int w, int h, gx_device * dev, gs_logical_operation_t lop,
const gx_rop_source_t * source)
{
gx_rop_source_t no_source;
/* Load the halftone cache for the color */
gx_dc_ht_binary_lo... | false | false | false | false | false | 0 |
exo_icon_view_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint drag_time)
{
ExoIconView *icon_view;
GtkTr... | false | false | false | false | false | 0 |
denali_drv_init(struct denali_nand_info *denali)
{
denali->idx = 0;
/* setup interrupt handler */
/*
* the completion object will be used to notify
* the callee that the interrupt is done
*/
init_completion(&denali->complete);
/*
* the spinlock will be used to synchronize the ISR with any
* element tha... | false | false | false | false | false | 0 |
ml_gdome_di_createDocument(value self, value namespaceURI, value qualifiedName, value doctype)
{
CAMLparam4(self, namespaceURI, qualifiedName, doctype);
GdomeException exc_;
GdomeDocument* res_;
res_ = gdome_di_createDocument(DOMImplementation_val(self), ptr_val_option(namespaceURI,DOMString_val), DOMString_val... | false | false | false | false | false | 0 |
resurrect(const Solver& s, Var v) {
if ( look_ && (s.sharedContext()->type(v) & look_->score.types) != 0 ) {
look_->score.score.resize(s.numVars()+1);
look_->append(s.sharedContext()->preferredLiteralByType(v),
s.sharedContext()->type(v) == Var_t::atom_body_var || type_ != Lookahead::hybrid_lookahead);
}
} | false | false | false | false | false | 0 |
tester_perror( const char *fname, const char *msg )
{
int save_errno = errno;
char buf[ BUFSIZ ];
fprintf( stderr, "%s: %s: (%d) %s %s\n",
progname, fname, save_errno,
AC_STRERROR_R( save_errno, buf, sizeof( buf ) ),
msg ? msg : "" );
} | false | false | false | false | false | 0 |
modsin_partr( xml *node, fields *info, int level )
{
if ( xml_tagexact( node, "detail" ) )
modsin_detail( node, info, level );
else if ( xml_tag_attrib( node, "extent", "unit", "page" ) )
modsin_page( node, info, level );
else if ( xml_tag_attrib( node, "extent", "unit", "pages" ) )
modsin_page( node, info, le... | false | false | false | false | false | 0 |
bitbang_txrx(PROGRAMMER * pgm, unsigned char byte)
{
int i;
unsigned char r, b, rbyte;
rbyte = 0;
for (i=7; i>=0; i--) {
/*
* Write and read one bit on SPI.
* Some notes on timing: Let T be the time it takes to do
* one pgm->setpin()-call resp. par clrpin()-call, then
* - SCK is high fo... | false | false | false | false | false | 0 |
ri_GenerateQual(StringInfo buf,
const char *sep,
const char *leftop, Oid leftoptype,
Oid opoid,
const char *rightop, Oid rightoptype)
{
HeapTuple opertup;
Form_pg_operator operform;
char *oprname;
char *nspname;
opertup = SearchSysCache(OPEROID,
ObjectIdGetDatum(opoid),
0, 0,... | false | false | false | true | false | 1 |
xsh_params_bin_scale(cpl_frameset* raws,
xsh_background_param* backg,
xsh_detect_order_param* det_order)
{
cpl_frame* frame=NULL;
const char* name=NULL;
cpl_propertylist* plist=NULL;
int binx=0;
int biny=0;
check(frame=cpl_frameset_get_first(raws));
check(name=c... | false | false | false | false | false | 0 |
libcsc_init()
{
FILE *fp;
libc = dlopen(LIBC, RTLD_LAZY | RTLD_GLOBAL);
if(!libc)
{
printf("Can't map " LIBC "\n");
exit(1);
}
real_tcsetattr = (int (*)(int, int, const struct termios *))dlsym(libc, "tcsetattr");
real_tcsendbreak = (int (*)(int, int))dlsym(libc, "tcsendbreak");
num_devices = 0... | false | false | false | false | false | 0 |
read(
FLMUINT uiLength,
void * pvBuffer,
FLMUINT * puiBytesRead)
{
RCODE rc = FERR_OK;
FLMUINT uiBytesRead = 0;
flmAssert( m_bSetupCalled);
flmAssert( m_pFileHdl || m_pMultiFileHdl);
if( m_pMultiFileHdl)
{
if( RC_BAD( rc = m_pMultiFileHdl->read( m_ui64Offset,
uiLength, pvBuffer, &uiBytesRead)))... | false | false | false | false | false | 0 |
static_D_J(Class *class, MethodBlock *mb, uintptr_t *ostack) {
if(!initJNILrefs())
return NULL;
*(int64_t*)ostack = (*(int64_t (*)(void*, void*, double))mb->code) (
&jni_env,
class,
*(double *)&ostack[0]);
return ostack + 2;
} | false | false | false | false | false | 0 |
Apply(CommandExecutionContext WXUNUSED(context))
{
wxString prefName = GetString(wxT("PrefName"));
wxString prefValue = GetString(wxT("PrefValue"));
return (gPrefs->Write(prefName, prefValue) && gPrefs->Flush());
} | false | false | false | false | false | 0 |
brcms_c_timers_deinit(struct brcms_c_info *wlc)
{
/* free timer state */
if (wlc->wdtimer) {
brcms_free_timer(wlc->wdtimer);
wlc->wdtimer = NULL;
}
if (wlc->radio_timer) {
brcms_free_timer(wlc->radio_timer);
wlc->radio_timer = NULL;
}
} | false | false | false | false | false | 0 |
define_triangle_SSS(_param p)
{
double t, b, c, s1, s2, s, u, v;
if (p.addr < 2) {
t = POPn;
c = POPn;
b = POPn;
a = POPn;
x = Cos(t);
y = Sin(t);
} else {
c = POPn;
b = POPn;
}
assign_A_B(p.addr);
s1 = (b-a+c)*(b+a-c);
s2 = (a+c-b)*(a+b+c);
if (ZERO(s2)) {
u = -c;
v = 0;
... | false | false | false | false | false | 0 |
csr1212_new_string_descriptor_leaf(const char *s)
{
/* Check if string conform to minimal_ascii format */
if (csr1212_check_minimal_ascii(s))
return NULL;
/* IEEE 1212, par. 7.5.4.1 Textual descriptors (minimal ASCII) */
return csr1212_new_textual_descriptor_leaf(0, 0, 0, s, strlen(s));
} | false | false | false | false | false | 0 |
new_command(
const struct xtalk_device *xtalk_dev,
uint8_t op, uint16_t extra_data)
{
const struct xtalk_protocol *xproto;
struct xtalk_command *cmd;
const struct xtalk_command_desc *desc;
uint16_t len;
xproto = &xtalk_dev->xproto;
desc = get_command_desc(xproto, op);
if (!desc) {
ERR("Unknown op=0x%X.\n... | false | false | false | false | false | 0 |
butterfly_recv(PROGRAMMER * pgm, char * buf, size_t len)
{
int rv;
rv = serial_recv(&pgm->fd, (unsigned char *)buf, len);
if (rv < 0) {
fprintf(stderr,
"%s: butterfly_recv(): programmer is not responding\n",
progname);
exit(1);
}
return 0;
} | false | false | false | false | false | 0 |
remove_persona_tests_test_remove_persona (RemovePersonaTests* self) {
GMainLoop* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
GMainLoop* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
gboolean _tmp4_ = FALSE;
#line 45 "/home/treitter/collabora/folks/tests/eds/remove-persona.vala"
g_return_if_fail (self != NULL);
#line 47 "/home... | false | false | false | false | false | 0 |
lola_stream_reset(struct lola *chip, struct lola_stream *str)
{
if (str->prepared) {
if (str->paused)
lola_sync_pause(chip, str->substream);
str->prepared = 0;
lola_dsd_write(chip, str->dsd, CTL,
LOLA_DSD_CTL_IOCE | LOLA_DSD_CTL_DEIE);
lola_stream_wait_for_fifo(chip, str, false);
lola_stream_cle... | false | false | false | false | false | 0 |
n_tty_receive_char_fast(struct tty_struct *tty, unsigned char c)
{
struct n_tty_data *ldata = tty->disc_data;
if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) {
start_tty(tty);
process_echoes(tty);
}
if (L_ECHO(tty)) {
finish_erasing(ldata);
/* Record the column of first canon char. *... | false | false | false | false | false | 0 |
find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk,
struct gfs2_log_header_host *head)
{
unsigned int orig_blk = *blk;
int error;
for (;;) {
error = get_log_header(jd, *blk, head);
if (error <= 0)
return error;
if (++*blk == jd->jd_blocks)
*blk = 0;
if (*blk == orig_blk) {
gfs2_consist_inod... | false | false | false | false | false | 0 |
bcf_hdr_add_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec)
{
hrec->type = BCF_HL_GEN;
if ( !bcf_hdr_register_hrec(hdr,hrec) )
{
// If one of the hashed field, then it is already present
if ( hrec->type != BCF_HL_GEN )
{
bcf_hrec_destroy(hrec);
return 0;
}
... | false | false | false | false | false | 0 |
english_suffix(timelib_sll number)
{
if (number >= 10 && number <= 19) {
return "th";
} else {
switch (number % 10) {
case 1: return "st";
case 2: return "nd";
case 3: return "rd";
}
}
return "th";
} | false | false | false | false | false | 0 |
is_alphabetic(const char *datestr)
{
const char *s;
int ret = 1;
for (s = datestr; *s; s++) {
if (!isalpha((unsigned char) *s))
ret = 0;
}
return (ret);
} | false | false | false | false | false | 0 |
GetBSSRDF(const DifferentialGeometry &dgGeom,
const DifferentialGeometry &dgShading,
MemoryArena &arena) const {
float e = eta->Evaluate(dgShading);
float mfp = meanfreepath->Evaluate(dgShading);
Spectrum kd = Kd->Evaluate(dgShading).Clamp();
Spectrum sigma_a, sigma_prime_s;
... | false | false | false | false | false | 0 |
gs_strcat_r(char *dest, const char *src)
{
static char *save;
if(!dest || !src) { free(dest); return NULL; }
dest = (char *)REALLOC(save=dest, strlen(dest)+strlen(src)+1);
if(!dest) {free(save); return dest;}
return strcat(dest,src);
} | false | false | false | false | false | 0 |
H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Check arguments */
HDassert(f);
HDassert(leaf);
HDassert(leaf->hdr);
/* If we're going to free the space on disk, the address must be valid */
HDassert(!leaf->c... | false | false | false | false | false | 0 |
setBounds(const Bounds &b)
{
Bounds oldb = *(Bounds*)this;
RDisplay::setBounds(b);
ColoredChar *bufnew;
if (w * h) {
bufnew = ht_malloc(sizeof *buf * w * h);
if (!bufnew) throw std::bad_alloc();
ColoredChar *bb = bufnew;
for (int iy = 0; iy < h; iy++) {
for (int ix = 0; ix < w; ix++) {
if ((ix < oldb... | false | false | false | false | false | 0 |
StripCTParms( OGR_SRSNode * poCurrent )
{
if( poCurrent == NULL )
{
StripVertical();
poCurrent = GetRoot();
}
if( poCurrent == NULL )
return OGRERR_NONE;
if( poCurrent == GetRoot() && EQUAL(poCurrent->GetValue(),"LOCAL_CS") )
{
delete poCurrent;
poRoot ... | false | false | false | false | false | 0 |
construct(const char *name)
{
P16F883 *p = new P16F883(name);
p->P16F88x::create(256);
p->P16F883::create_sfr_map();
p->create_invalid_registers ();
p->create_symbols();
return p;
} | false | false | false | false | false | 0 |
audit_caps(struct common_audit_data *sa, struct aa_profile *profile,
int cap, int error)
{
struct audit_cache *ent;
int type = AUDIT_APPARMOR_AUTO;
aad(sa)->error = error;
if (likely(!error)) {
/* test if auditing is being forced */
if (likely((AUDIT_MODE(profile) != AUDIT_ALL) &&
!cap_raised(pro... | false | false | false | false | false | 0 |
SetCenter(double center[3])
{
if ( this->Center[0] == center[0] &&
this->Center[1] == center[1] &&
this->Center[2] == center[2] )
{
return; //no change
}
else
{
int i;
double v1[3], v2[3];
for ( i=0; i < 3; i++ )
{
v1[i] = this->Point1[i] - this->Origin[i];
... | false | false | false | false | false | 0 |
bgzf_check_EOF(BGZF *fp)
{
static uint8_t magic[28] = "\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0";
uint8_t buf[28];
off_t offset;
offset = _bgzf_tell((_bgzf_file_t)fp->fp);
if (_bgzf_seek(fp->fp, -28, SEEK_END) < 0) return 0;
_bgzf_read(fp->fp, buf, 28);
_bgzf_seek(fp->fp, offset, SE... | false | false | false | false | false | 0 |
radeon_legacy_get_ext_tmds_info_from_table(struct radeon_encoder *encoder,
struct radeon_encoder_ext_tmds *tmds)
{
struct drm_device *dev = encoder->base.dev;
struct radeon_device *rdev = dev->dev_private;
struct radeon_i2c_bus_rec i2c_bus;
/* default for macs */
i2c_bus = combios_setup_i2c_bus(rdev, DDC_MO... | false | false | false | false | false | 0 |
NullRenderTarget(NullRenderer& owner) :
d_owner(owner),
d_area(0, 0, 0, 0)
{
} | false | false | false | false | false | 0 |
pstore_decompress(void *in, void *out, size_t inlen, size_t outlen)
{
int err, ret;
ret = -EIO;
err = zlib_inflateInit2(&stream, WINDOW_BITS);
if (err != Z_OK)
goto error;
stream.next_in = in;
stream.avail_in = inlen;
stream.total_in = 0;
stream.next_out = out;
stream.avail_out = outlen;
stream.total_out ... | false | false | false | false | false | 0 |
ges_timeline_element_copy (GESTimelineElement * self, gboolean deep)
{
GESAsset *asset;
GParameter *params;
GParamSpec **specs;
GESTimelineElementClass *klass;
guint n, n_specs, n_params;
GESTimelineElement *ret = NULL;
g_return_val_if_fail (GES_IS_TIMELINE_ELEMENT (self), FALSE);
klass = GES_TIMELIN... | false | false | false | true | false | 1 |
itree_get2(struct itree *itree, uint128_t key_hash,
uint64_t *log_remno_ptr, int *hpos_ptr)
{
uint64_t found = ohamt_search(&itree->tree, key_hash);
if (found) {
struct tree_item ti = _unpack(found);
*log_remno_ptr = ti.log_remno;
*hpos_ptr = ti.hpos;
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
_xdg_mime_magic_parse_error(FILE *magic_file)
{
int c;
while (1)
{
c = getc_unlocked(magic_file);
if (c == EOF)
return XDG_MIME_MAGIC_EOF;
if (c == '\n')
return XDG_MIME_MAGIC_SECTION;
}
} | false | false | false | false | false | 0 |
_traiter_euro(char *ligne, char **description)
{
char *prochain, *precedent=ligne;
int euro_trouve=0;
*description = *description?*description:strdup("");
while((prochain=strchr(precedent,164))) {
*prochain=0; prochain++;
//premier euro
if(!euro_trouve) {
euro_trouve=1;
*description = gs_strcat_r(*descr... | false | false | false | false | false | 0 |
remove(GAGenome * r)
{
GAGenome * removed=(GAGenome *)0;
if(r == (GAGenome *)0) return removed;
unsigned int i;
for(i=0; i<n && rind[i] != r; i++);
if(i < n) removed = remove(i, RAW);
return removed;
} | false | false | false | false | false | 0 |
ndmca_op_test_data (struct ndm_session *sess)
{
struct ndm_control_agent *ca = &sess->control_acb;
struct ndmconn * conn;
int (*save_call) (struct ndmconn *conn,
struct ndmp_xa_buf *xa);
int rc;
rc = ndmca_connect_data_agent(sess);
if (rc) {
ndmconn_destruct (sess->plumb.data);
return rc;
}
conn... | false | false | false | false | false | 0 |
mdb_date_to_tm(double td, struct tm *t)
{
long int day, time;
int yr, q;
int *cal;
int noleap_cal[] = {0,31,59,90,120,151,181,212,243,273,304,334,365};
int leap_cal[] = {0,31,60,91,121,152,182,213,244,274,305,335,366};
day = (long int)(td);
time = (long int)(fabs(td - day) * 86400.0 + 0.5);
t->tm_hour = time... | false | false | false | false | false | 0 |
method_A6(const int *account, int *weight) {
if (account[1] == 8) {
number2Array("2121212120", weight);
return algo01(10, weight, true, 10, account);
} else {
number2Array("1731731730", weight);
return algo01(10, weight, false, 10, account);
}
} | false | false | false | false | false | 0 |
P_readlnpaoc(f, s, len)
FILE *f;
char *s;
int len;
{
int ch;
for (;;) {
ch = getc(f);
if (ch == EOF || ch == '\n')
break;
if (len > 0) {
*s++ = ch;
--len;
}
}
while (--len >= 0)
*s++ = ' ';
} | false | false | false | false | false | 0 |
JS_NextProperty(JSContext *cx, JSObject *iterobj, jsid *idp)
{
jsint i;
JSObject *obj;
JSScope *scope;
JSScopeProperty *sprop;
JSIdArray *ida;
CHECK_REQUEST(cx);
i = JSVAL_TO_INT(iterobj->fslots[JSSLOT_ITER_INDEX]);
if (i < 0) {
/* Native case: private data is a property tree no... | false | false | false | false | false | 0 |
fuse_prepare_interrupt(struct fuse *f, fuse_req_t req,
struct fuse_intr_data *d)
{
if (f->conf.intr)
fuse_do_prepare_interrupt(req, d);
} | false | false | false | false | false | 0 |
xmlGetAttrN(xmlNodePtr el, unsigned int n)
{
int i;
xmlAttr *attr;
i = 0;
for (attr = el->properties; attr != NULL; attr = attr->next) {
if (attr->type == XML_ATTRIBUTE_NODE) {
if (i++ == n)
return(attr);
}
}
return(NULL);
} | false | false | false | false | false | 0 |
strip_ending_char(char *line, char c)
{
char *p;
if (line == NULL || strlen(line) == 0)
return(line);
p = &LASTCHAR(line);
if (*p == c)
*p = NULLCHAR;
return(line);
} | false | false | false | false | false | 0 |
scm_c_hook_remove (scm_t_c_hook *hook,
scm_t_c_hook_function func,
void *fn_data)
{
scm_t_c_hook_entry **loc = &hook->first;
while (*loc)
{
if ((*loc)->func == func && (*loc)->data == fn_data)
{
scm_t_c_hook_entry *entry = *loc;
*loc = (*loc)->next;
free (entry);
return;
}
lo... | false | false | false | false | false | 0 |
_check_jobs_before_remove(mysql_conn_t *mysql_conn,
char *cluster_name,
char *assoc_char,
List ret_list,
bool *already_flushed)
{
char *query = NULL, *object = NULL;
bool rc = 0;
int i;
MYSQL_RES *result = NULL;
/* if this changes you will need to edit the corresponding
*... | false | false | false | false | false | 0 |
gfx_draw_grid (cairo_t *cr)
{
static const double dashes[] = { 4., 4. };
gint i;
GdkRGBA color;
gdk_rgba_parse (&color, theme[p.theme_id].grid_color);
gdk_cairo_set_source_rgba (cr, &color);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_line_width (cr, 1);
cairo_set_line_cap (cr, CAIRO_LINE... | false | false | false | false | false | 0 |
process_plug ()
{
zmq_assert (engine);
engine->plug (this);
owned_t::process_plug ();
} | false | false | false | false | false | 0 |
setUsername(const QString& user)
{
d->ui.userEdit->setText(user);
if ( user.isEmpty() )
return;
d->activated(user);
if ( d->ui.userEdit->isVisibleTo( this ) )
{
d->ui.passEdit->setFocus();
}
} | false | false | false | false | false | 0 |
pf_replace_alrs (const sc_char *string, sc_prop_setref_t bundle,
sc_bool alr_applied[], sc_int alr_count)
{
sc_int index_;
sc_char *buffer1, *buffer2, **buffer;
const sc_char *marker;
/*
* Begin with NULL buffers and alternate for lazy allocation. To avoid a
* lot of allocation and copy... | false | false | false | false | false | 0 |
GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) {
ASSERT(kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC);
Code* code = NULL;
if (kind == Code::LOAD_IC) {
code = masm->isolate()->builtins()->builtin(Builtins::kLoadIC_Miss);
} else {
code = masm->isolate()->builtins()->builtin(Builtins::kKey... | false | false | false | false | false | 0 |
main (void)
{
hid_t ids[T_NUMCLASSES];
hid_t fapl; /* File Access Property List */
int ninc;
int i;
char filename[1024];
h5_reset();
h5_fixname (FILENAME[0], H5P_DEFAULT, filename, sizeof filename);
HDsrand ((unsigned) HDtime (NULL));
TESTING ("library... | true | true | false | false | false | 1 |
core_insert_filter(request_rec *r)
{
core_dir_config *conf = (core_dir_config *)
ap_get_core_module_config(r->per_dir_config);
const char *filter, *filters = conf->output_filters;
if (filters) {
while (*filters && (filter = ap_getword(r->pool, &filters, ';'))) {
... | false | false | false | false | false | 0 |
dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum)
{
struct dwc3_gadget_ep_cmd_params params;
struct dwc3_ep *dep;
int ret;
dep = dwc->eps[epnum];
if (dep->flags & DWC3_EP_BUSY) {
dwc3_trace(trace_dwc3_ep0, "%s still busy", dep->name);
return 0;
}
memset(¶ms, 0, sizeof(params));
params.param0 = upp... | false | false | false | false | false | 0 |
put(unsigned int new_value)
{
unsigned int new_mask = get_adc_configmask(new_value);
unsigned int diff = mIoMask ^ new_mask;
Dprintf (( "ADCON1_V2::put ( %02X ) - new_mask %02X\n", new_value, new_mask ));
trace.raw(write_trace.get() | value.get());
char newname[20];
for(unsigned int i = 0; i < m_n... | false | false | false | false | false | 0 |
dsp_cmx_search_conf(u32 id)
{
struct dsp_conf *conf;
if (!id) {
printk(KERN_WARNING "%s: conference ID is 0.\n", __func__);
return NULL;
}
/* search conference */
list_for_each_entry(conf, &conf_ilist, list)
if (conf->id == id)
return conf;
return NULL;
} | false | false | false | false | false | 0 |
unescape_http(char *catbuff, const char *s) {
size_t i, j;
for(i = 0, j = 0; s[i] != '\0'; i++) {
int h;
if (s[i] == '%' && (h = ehex(&s[i + 1])) >= 0) {
catbuff[j++] = (char) h;
i += 2;
}
else
catbuff[j++] = s[i];
}
catbuff[j++] = '\0';
return catbuff;
} | false | false | false | false | false | 0 |
cycle_attr(int ch, unsigned *at_code, chtype *attr)
{
bool result = TRUE;
switch (ch) {
case 'v':
if ((*at_code += 1) >= SIZEOF(attrs_to_cycle))
*at_code = 0;
break;
case 'V':
if (*at_code == 1)
*at_code = SIZEOF(attrs_to_cycle) - 1;
else
*at_code -= 1;
break;
default:
result =... | false | false | false | false | false | 0 |
netsnmp_config_parse_add_row(const char *token, char *line)
{
char buf[SNMP_MAXBUF_MEDIUM];
char tname[SNMP_MAXBUF_MEDIUM];
size_t buf_size;
int rc;
data_set_tables *tables;
netsnmp_variable_list *vb; /* containing only types */
netsnmp_table_row ... | true | true | false | false | false | 1 |
slicebefore_ii(VALUE i, VALUE _argp, int argc, VALUE *argv)
{
struct slicebefore_arg *argp = (struct slicebefore_arg *)_argp;
VALUE header_p;
ENUM_WANT_SVALUE();
if (!NIL_P(argp->sep_pat))
header_p = rb_funcall(argp->sep_pat, id_eqq, 1, i);
else if (NIL_P(argp->state))
header_p = r... | false | false | false | false | false | 0 |
gt_graphics_cairo_draw_text_clip(GtGraphics *gg, double x, double y,
const char *text)
{
GtGraphicsCairo *g = gt_graphics_cairo_cast(gg);
gt_assert(g && text && g->layout);
pango_layout_set_text(g->layout, text, -1);
cairo_save(g->cr);
cairo_rectangle(g->cr,
... | false | false | false | false | false | 0 |
ltable_insert(LTable* lt, const gchar* where, Listener* l)
{
gchar** dirnames;
guint i;
GNode* cur;
GNode* found = NULL;
LTableEntry* lte;
const gchar* noroot_where = where + 1;
g_return_if_fail(gconf_valid_key(where, NULL));
if (lt->tree == NULL)
{
lte = ltable_entry_new(NULL, 0);
... | false | false | false | false | false | 0 |
max_string_size (SANE_String_Const s[])
{
size_t max = 0;
while (*s) {
size_t size = strlen(*s++) + 1;
if (size > max)
max = size;
}
return max;
} | false | false | false | false | false | 0 |
chirp_stats_summary(char *buf, int length)
{
int chunk;
char *addr;
struct chirp_stats *s;
if(!stats_table)
stats_table = hash_table_create(0, 0);
chunk = snprintf(buf, length, "bytes_written %" PRIu64 "\nbytes_read %" PRIu64 "\ntotal_ops %" PRIu64 "\n", total_bytes_written, total_bytes_read, total_ops);
leng... | false | false | false | false | false | 0 |
cmd_paste_copy_repeat (GnmCommand const *cmd, WorkbookControl *wbc)
{
CmdPasteCopy const *orig = (CmdPasteCopy const *) cmd;
GnmPasteTarget new_dst;
SheetView *sv = wb_control_cur_sheet_view (wbc);
GnmRange const *r = selection_first_range (sv,
GO_CMD_CONTEXT (wbc), _("Paste Copy"));
GnmCellRegion *newcr;
if (... | false | false | false | false | false | 0 |
average(UInt8 * color) const
{
UIntBiggest r = 0, g = 0, b = 0;
for(size_t i=0; i<entries.size(); ++i)
{
r += entries[i][0];
g += entries[i][1];
b += entries[i][2];
}
color[0] = (UInt8)(r / entries.size... | false | false | false | false | false | 0 |
BigDecimal_IsNaN(VALUE self)
{
Real *p = GetVpValue(self,1);
if(VpIsNaN(p)) return Qtrue;
return Qfalse;
} | false | false | false | false | false | 0 |
_handle_kvs_fence(int fd, Buf buf)
{
uint32_t from_nodeid, num_children, temp32, seq;
char *from_node = NULL;
int rc = SLURM_SUCCESS;
safe_unpack32(&from_nodeid, buf);
safe_unpackstr_xmalloc(&from_node, &temp32, buf);
safe_unpack32(&num_children, buf);
safe_unpack32(&seq, buf);
debug3("mpi/pmi2: in _handle_kv... | false | false | false | false | false | 0 |
geoclue_gsmloc_ofono_set_modems (GeoclueGsmlocOfono *ofono, GPtrArray *modems)
{
GeoclueGsmlocOfonoPrivate *priv = GET_PRIVATE (ofono);
int i;
GList *mlist;
/* empty current modem list */
for (mlist = priv->modems; mlist; mlist = mlist->next) {
modem_free ((Modem*)mlist->data);
}
g_list_free (priv->modems);
... | false | false | false | false | false | 0 |
ruv_supplier_iterator (const ruv_enum_data *enum_data, void *arg)
{
int i;
PRBool found = PR_FALSE;
ReplicaId rid;
struct ruv_it *data = (struct ruv_it*)arg;
PR_ASSERT (data);
rid = csn_get_replicaid (enum_data->min_csn);
/* check if the replica that generated the csn is already in the list */
for (i = 0; i <... | false | false | false | false | false | 0 |
list_rooms_cb (TpChannel *channel,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
TpRoomList *self = TP_ROOM_LIST (weak_object);
if (error != NULL)
{
g_signal_emit (self, signals[SIG_FAILED], 0, error);
}
} | false | false | false | false | false | 0 |
add_cell_ewma_to_conn(or_connection_t *conn, cell_ewma_t *ewma)
{
tor_assert(ewma->heap_index == -1);
scale_single_cell_ewma(ewma,
conn->active_circuit_pqueue_last_recalibrated);
smartlist_pqueue_add(conn->active_circuit_pqueue,
compare_cell_ewma_counts,
... | false | false | false | false | false | 0 |
is_correct_rethrow (MonoMethodHeader *header, guint offset)
{
int i;
MonoExceptionClause *clause;
for (i = 0; i < header->num_clauses; ++i) {
clause = &header->clauses [i];
if (MONO_OFFSET_IN_HANDLER (clause, offset))
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
prop_erase(struct propctx *ctx, const char *name)
{
struct propval *val;
int i;
if(!ctx || !name) return;
for(val = ctx->values; val->name; val++) {
if(!strcmp(name,val->name)) {
if(!val->values) break;
/*
* Yes, this is casting away the const, but
* we should be okay because t... | false | false | false | false | false | 0 |
handleRecord(const int groupcode,
const dimeParam ¶m,
dimeMemHandler * const memhandler)
{
switch(groupcode) {
case 70:
this->flags = param.int16_data;
return true;
case 10:
case 20:
case 30:
this->coords[groupcode/10-1] = param.double_data;
return true;
case 71:
case 72:
case ... | false | false | false | false | false | 0 |
st_nci_se_wt_timeout(unsigned long data)
{
/*
* No answer from the secure element
* within the defined timeout.
* Let's send a reset request as recovery procedure.
* According to the situation, we first try to send a software reset
* to the secure element. If the next command is still not
* answering in ti... | false | false | false | false | false | 0 |
KillConnection(int in_fd) {
NetworkServer::KillConnection(in_fd);
// Close the fd
if (in_fd)
close(in_fd);
} | false | false | false | false | false | 0 |
free_watches (DBusTransport *transport)
{
DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport;
_dbus_verbose ("start\n");
if (socket_transport->read_watch)
{
if (transport->connection)
_dbus_connection_remove_watch_unlocked (transport->connection,
... | false | false | false | false | false | 0 |
rn_cmdok(struct event *unused)
{
/* VALID STATES => NVT_WAITRCPW || NVT_WAITRASC */
int state = Nvt.state;
unused = unused;
switch (state) {
case NVT_WAITRASCM:
NVT_SETSTATE("rn_cmdok", NVT_OPER);
break;
case NVT_WAITRCPW:
NVT_SETSTATE("rn_cmdok", NVT_WAITPTYWR);
break;
}
np_cmdok(); /* Passes control t... | false | false | false | false | false | 0 |
gunzip(const QString& path)
{
QByteArray data;
QFile file(path);
if (!file.open(QFile::ReadOnly)) {
return data;
}
gzFile gz = gzdopen(file.handle(), "rb");
if (gz == NULL) {
return data;
}
static const int buffer_size = 0x40000;
char buffer[buffer_size];
memset(buffer, 0, buffer_size);
int read = 0;
... | false | false | false | false | false | 0 |
ide_cd_probe(ide_drive_t *drive)
{
struct cdrom_info *info;
struct gendisk *g;
struct request_sense sense;
ide_debug_log(IDE_DBG_PROBE, "driver_req: %s, media: 0x%x",
drive->driver_req, drive->media);
if (!strstr("ide-cdrom", drive->driver_req))
goto failed;
if (drive->media != ide_cdrom && drive->m... | false | false | false | false | false | 0 |
goo_canvas_item_accessible_get_item_extents (GooCanvasItem *item,
GdkRectangle *rect)
{
GooCanvas *canvas;
GooCanvasBounds bounds;
canvas = goo_canvas_item_get_canvas (item);
if (!canvas)
{
rect->x = rect->y = rect->width = rect->height = 0;
return;
}
/* Get the bounds in devi... | false | false | false | false | false | 0 |
val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
String *res= args[0]->val_str(str);
char *endptr,ans[65],*ptr;
longlong dec;
int from_base= (int) args[1]->val_int();
int to_base= (int) args[2]->val_int();
int err;
// Note that abs(INT_MIN) is undefined.
if (args[0]->null_value || args[1]->null_value ... | false | false | false | false | false | 0 |
releaseNode(struct Node *node)
{
if (NULL == node) return;
releaseNode(node->leftChild);
releaseNode(node->midChild);
releaseNode(node->rightChild);
releaseNode(node);
} | 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.