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 |
|---|---|---|---|---|---|---|
DXNewAmbientLight(RGBColor color)
{
Light l = _NewLight(&_dxdlight_class);
if (!l)
return NULL;
l->kind = ambient;
l->relative = invalid_relative;
l->color = color;
return l;
} | false | false | false | false | false | 0 |
set_cube_gaussians( double* sigma_array, int sz )
{
g_cube_number = sz;
if( m_cube_sigmas ) deallocate( m_cube_sigmas );
m_cube_sigmas = allocate<double>(g_cube_number);
for( int r=0; r<g_cube_number; r++ )
{
m_cube_sigmas[r] = sigma_array[r];
if( m_verbosity > 1 ) cout<<"[daisy] sigma"<<r<... | false | false | false | false | false | 0 |
bin_query_latency_fold (GstElement * item, GValue * ret, QueryFold * fold)
{
if (gst_element_query (item, fold->query)) {
GstClockTime min, max;
gboolean live;
gst_query_parse_latency (fold->query, &live, &min, &max);
GST_DEBUG_OBJECT (item,
"got latency min %" GST_TIME_FORMAT ", max %" GST_... | false | false | false | false | false | 0 |
detect_cookie_mozilla_v3(
std::string profile_root, std::string& project_url, std::string& name, std::string& value
) {
bool retval = false;
bool firstpass = true;
std::string cookieFilePath;
std::string cookieCopyFilePath;
std::string hostname;
char query[1024];
sql... | false | false | false | false | false | 0 |
setInstType( const InstTypeT type )
{
vt_assert( inst_avail != 0 );
// instrumentation available ?
if( !isInstAvail( type ) )
return false;
inst_type = type;
if( type == INST_TYPE_COMPINST )
comp_instflags = compinst_flags;
else if( type == INST_TYPE_DYNINST )
comp_instflags = dyninst_flags;
... | false | false | false | false | false | 0 |
make_names_stack(STACK_OF(OPENSSL_STRING) *ns)
{
int i;
STACK_OF(GENERAL_NAMES) *ret;
GENERAL_NAMES *gens = NULL;
GENERAL_NAME *gen = NULL;
ret = sk_GENERAL_NAMES_new_null();
if (!ret)
goto err;
for (i = 0; i < sk_OPENSSL_STRING_num(ns); i++)
{
char *str = sk_OPENSSL_STRING_value(ns, i);
gen = a2i_GENER... | false | false | false | false | false | 0 |
isl_vec_set_si(__isl_take isl_vec *vec, int v)
{
vec = isl_vec_cow(vec);
if (!vec)
return NULL;
isl_seq_set_si(vec->el, v, vec->size);
return vec;
} | false | false | false | false | false | 0 |
NextInterestingTime( void ) const
{
// default to the last time
REAL ret = LastTime();
// look for a later destination
gDestination * run = currentDestination;
while ( run )
{
REAL time = run->GetGameTime();
if ( time > ret )
ret = time;
run = run->next;
... | false | false | false | false | false | 0 |
dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream,
int cmd)
{
struct snd_soc_dpcm *dpcm;
int ret = 0;
list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) {
struct snd_soc_pcm_runtime *be = dpcm->be;
struct snd_pcm_substream *be_substream =
snd_soc_dpcm_get_substream(be, s... | false | false | false | false | false | 0 |
_dwarf_setup_loc(Dwarf_Attribute attr,
Dwarf_Debug * dbg_ret,
Dwarf_CU_Context *cucontext_ret,
Dwarf_Half * form_ret, Dwarf_Error * error)
{
Dwarf_Debug dbg = 0;
Dwarf_Half form = 0;
int blkres = DW_DLV_ERROR;
if (attr == NULL) {
_dwarf_error(NULL, error, DW_DLE_ATTR_NULL);
... | false | false | false | false | false | 0 |
ssd_cleanup_log(struct ssd_device *dev)
{
if (dev->log_buf) {
kfree(dev->log_buf);
dev->log_buf = NULL;
}
sfifo_free(&dev->log_fifo);
if (dev->internal_log.log) {
vfree(dev->internal_log.log);
dev->internal_log.nr_log = 0;
dev->internal_log.log = NULL;
}
} | false | false | false | false | false | 0 |
set_verbosity(int so, char *command)
{
int new_verbosity_level = verbosity_level;
char vbuf[80], *v = vbuf;
command += 10;
while ( *command ) {
switch( *command ) {
case 'a':
new_verbosity_level = -1;
break;
case 'A':
new_verbosity_level = LOG_SEVERE | LOG_PRINT;
break;
case 'c':
new_verb... | false | false | false | false | true | 1 |
HandleChangeChunkSize(RTMP *r, const RTMPPacket *packet)
{
if (packet->m_nBodySize >= 4)
{
r->m_inChunkSize = AMF_DecodeInt32(packet->m_body);
RTMP_Log(RTMP_LOGDEBUG, "%s, received: chunk size change to %d", __FUNCTION__,
r->m_inChunkSize);
}
} | false | false | false | false | false | 0 |
gt_hashtable_add_with_storage_ptr(GtHashtable *ht, const void *elem,
void **stor_ptr)
{
int insert_count;
gt_assert(ht && elem);
gt_rwlock_wrlock(ht->lock);
if (ht->current_fill + 1 > ht->high_fill)
gt_ht_resize(ht, ht->table_size_log + 1);
insert_count = gt_ht_insert... | false | false | false | false | false | 0 |
gst_event_has_name (GstEvent * event, const gchar * name)
{
g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
if (event->structure == NULL)
return FALSE;
return gst_structure_has_name (event->structure, name);
} | false | false | false | false | false | 0 |
set_handshake_callbacks(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
{
if (bev_ssl->underlying) {
bufferevent_setcb(bev_ssl->underlying,
be_openssl_handshakecb, be_openssl_handshakecb,
be_openssl_eventcb,
bev_ssl);
return do_handshake(bev_ssl);
} else {
struct bufferevent *bev = &b... | false | false | false | false | false | 0 |
exif_tagdate(cchar *exifdate, char *tagdate)
{
time_t tnow;
struct tm *snow;
if (! exifdate || strlen(exifdate) < 10) { // bad EXIF date, use current date
tnow = time(0);
snow = localtime(&tnow);
snprintf(tagdate,8,"%4d%02d%02d",
snow->t... | false | false | false | false | false | 0 |
handle_upload_common(int is_append, int is_unique)
{
struct stat statbuf;
char *tempname;
off_t bytes_transferred;
off_t offset;
int local_file_fd;
int remote_fd;
offset = G.restart_pos;
G.restart_pos = 0;
if (!port_or_pasv_was_seen())
return; /* port_or_pasv_was_seen emitted error response */
tempname =... | false | false | false | false | false | 0 |
util_map_texcoords2d_onto_cubemap(unsigned face,
const float *in_st, unsigned in_stride,
float *out_str, unsigned out_stride,
boolean allow_scale)
{
int i;
float rx, ry, rz;
/* loop over quad v... | false | false | false | false | false | 0 |
AddSectionToTheEnd(MCSectionData &SD, MCAsmLayout &Layout) {
// Create dummy fragments and assign section ordinals.
unsigned SectionIndex = 0;
for (MCAssembler::iterator it = begin(), ie = end(); it != ie; ++it)
SectionIndex++;
SD.setOrdinal(SectionIndex);
// Assign layout order indices to sections and ... | false | false | false | false | false | 0 |
glade_gtk_grid_get_children (GladeWidgetAdaptor *adaptor,
GtkContainer *container)
{
GList *children = NULL;
g_return_val_if_fail (GTK_IS_GRID (container), NULL);
gtk_container_forall (container, gtk_grid_children_callback, &children);
/* GtkGrid has the children list alre... | false | false | false | false | false | 0 |
UpdateVideoWindowed(int window_resized)
{
VIDEOMODE_MODE_t display_mode = CurrentDisplayMode();
#if SUPPORTS_ROTATE_VIDEOMODE
int rotate = VIDEOMODE_rotate90 && (PLATFORM_SupportsVideomode(display_mode, TRUE, TRUE)
|| PLATFORM_SupportsVideomode(display_mode, FALSE, TRUE));
#else
... | false | false | false | false | false | 0 |
getmntfile (const char *name) {
struct mntentchn *mc, *mc0;
mc0 = mtab_head();
for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
if (streq(mc->m.mnt_dir, name) ||
streq(mc->m.mnt_fsname, name))
return mc;
return NULL;
} | false | false | false | false | false | 0 |
grab_addon_item(int index)
{
struct upgrade_socket *socket;
// If the socket is empty, do nothing and return FALSE to inform
// the caller that no drag could be initiated.
if (ui.addon_items[index].type == -1) {
return FALSE;
}
// Mark the item as being dragged. We move it to a temporary
// field so that it ... | false | false | false | false | false | 0 |
decode(unsigned int tbi)
{
unsigned int tv = trace.get(tbi);
return new ResetTraceObject(cpu, (RESET_TYPE) (tv&0xff));
} | false | false | false | false | false | 0 |
set_frame_distances(MpegEncContext * s){
assert(s->current_picture_ptr->pts != AV_NOPTS_VALUE);
s->time= s->current_picture_ptr->pts*s->avctx->time_base.num;
if(s->pict_type==FF_B_TYPE){
s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
assert(s->pb_time > 0 && s->pb_time < s->pp_tim... | false | false | false | false | false | 0 |
UpdateItemColor(long index)
{
wxListItem item;
item.SetId( index );
item.SetColumn( ID_SEARCH_COL_SIZE );
item.SetMask(
wxLIST_MASK_STATE |
wxLIST_MASK_TEXT |
wxLIST_MASK_IMAGE |
wxLIST_MASK_DATA |
wxLIST_MASK_WIDTH |
wxLIST_MASK_FORMAT);
if (GetItem(item)) {
CMuleColour newcol(wxSYS_COLOUR_WINDOWTE... | false | false | false | false | false | 0 |
efx_mcdi_mac_pull_stats(struct efx_nic *efx)
{
__le64 *dma_stats = efx->stats_buffer.addr;
int attempts = EFX_MAC_STATS_WAIT_ATTEMPTS;
dma_stats[MC_CMD_MAC_GENERATION_END] = EFX_MC_STATS_GENERATION_INVALID;
efx_mcdi_mac_stats(efx, EFX_STATS_PULL, 0);
while (dma_stats[MC_CMD_MAC_GENERATION_END] ==
EFX_MC_STAT... | false | false | false | false | false | 0 |
gotoBookmark()
{
if (!m_didBookmark)
return 0;
m_current = m_bookmark.current;
m_data = m_bookmark.data;
m_eos = m_bookmark.eos;
m_left = m_bookmark.left;
m_len = m_bookmark.len;
return 1;
} | false | false | false | false | false | 0 |
handle_header_value_start(struct ntb_mail_parser *parser,
const uint8_t *data,
size_t length,
struct ntb_error **error)
{
size_t i;
/* Skip leading spaces */
for (i = 0; i < length && ascii_islwsp(data[i]); i++);
... | false | false | false | false | false | 0 |
generateAbstractionSchema(schema* x, Tree t)
{
Tree a,b;
while (isBoxSymbolic(t,a,b)) {
x = makeParSchema(x, generateInputSlotSchema(a));
t = b;
}
return makeSeqSchema(x, generateDiagramSchema(t));
} | false | false | false | false | false | 0 |
fluid_sample_null_ptr(fluid_sample_t** sample)
{
if (*sample != NULL) {
fluid_sample_decr_ref(*sample);
*sample = NULL;
}
} | false | false | false | false | false | 0 |
dhcpv6_request(struct connman_dhcpv6 *dhcp,
gboolean add_addresses)
{
GDHCPClient *dhcp_client;
uint32_t T1, T2;
DBG("dhcp %p add %d", dhcp, add_addresses);
dhcp_client = dhcp->dhcp_client;
g_dhcp_client_clear_requests(dhcp_client);
g_dhcp_client_set_request(dhcp_client, G_DHCPV6_CLIENTID);
g_dhcp_client_... | false | false | false | false | false | 0 |
get_old_results(vector<OLD_RESULT>& r) {
int retval;
SET_LOCALE sl;
char buf[256];
RPC rpc(this);
r.clear();
retval = rpc.do_rpc("<get_old_results/>\n");
if (retval) return retval;
while (rpc.fin.fgets(buf, 256)) {
if (match_tag(buf, "</old_results>")) break;
if (match_... | false | false | false | false | false | 0 |
CreateConnection(const Candidate& address,
CandidateOrigin origin) {
// We only support TCP protocols
if ((address.protocol() != "tcp") && (address.protocol() != "ssltcp"))
return NULL;
// We can't accept TCP connections incoming on other ports
if (origin == ORIGIN_OTH... | false | false | false | false | false | 0 |
cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
int *state)
{
struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
u8 ircode[4];
int i;
struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD,
.buf = ircode, .len = 4 };
*event = 0;
*state = REMOTE_NO_KEY_PRESSED;
if (c... | false | false | false | false | false | 0 |
Open(const wxString& filename)
{
FileLogger::Open(filename);
fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\">\n<hea... | false | false | false | false | false | 0 |
boinc_zip(
int bZipType, const std::string szFileZip, const ZipFileList* pvectszFileIn
) {
int carg;
char** av;
int iRet = 0, i = 0, nVecSize = 0;
if (pvectszFileIn) nVecSize = pvectszFileIn->size();
// if unzipping but no file out, so it just uses cwd, only 3 args
//if (bZipType == UNZIP_... | false | false | false | false | false | 0 |
IPrcParse(const pfPrcTag* tag, plResManager* mgr) {
if (tag->getName() == "Stream") {
fUncompressedSize = tag->getParam("UncompressedSize", "0").toUint();
fCompressionType = tag->getParam("CompressionType", "0").toUint();
delete[] fStream;
fStreamLength = tag->getContents().getSize(... | false | false | false | false | false | 0 |
SHA512_Last(SHA512_CTX* context) {
unsigned int usedspace;
usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
#if BYTE_ORDER == LITTLE_ENDIAN
/* Convert FROM host byte order */
REVERSE64(context->bitcount[0],context->bitcount[0]);
REVERSE64(context->bitcount[1],context->bitcount[1]);
#endif
if (useds... | false | false | false | false | false | 0 |
GetNonBarryPlugin() const
{
const_iterator b = begin(), e = end();
for( ; b != e; ++b ) {
if( (*b)->GetAppName() != Config::Barry::AppName() )
return (*b).get();
}
return 0;
} | false | false | false | false | false | 0 |
assign(const ParsedValues& p) {
if (!p.ctx) return false;
struct Assign {
Assign(ParsedOptions* x) : self(x) {}
void assign(const ParsedValues& p) {
begin = it = p.begin();
// assign parsed values
std::string ctx = p.ctx ? p.ctx->caption() : "";
for (ParsedValues::iterator end = p.end(); it != end; ++... | false | false | false | false | false | 0 |
rflat(int4 nodeid, char *buffer, int4 ldlength, int4 malength, int4 tag)
{
struct flreq *request; /* flatd request structure */
struct flreply *reply; /* flatd reply structure */
struct nmsg nhead; /* message descriptor */
int mask; /* signal mask */
if (malength == 0) return(0);
LAM_ZERO_ME(nhead);
reques... | false | false | false | false | false | 0 |
appendFmtMark(void)
{
UT_return_val_if_fail (m_pPieceTable, false);
checkForSuspect();
// can only be used while loading the document
return m_pPieceTable->appendFmtMark();
} | false | false | false | false | false | 0 |
Forget_Frame (Object frame) {
for (; !Nullp (frame); frame = Cdr (frame))
SYMBOL(Car (Car (frame)))->value = Unbound;
} | false | false | false | false | false | 0 |
memcg_destroy_kmem(struct mem_cgroup *memcg)
{
if (memcg->kmem_acct_activated) {
memcg_destroy_kmem_caches(memcg);
static_key_slow_dec(&memcg_kmem_enabled_key);
WARN_ON(page_counter_read(&memcg->kmem));
}
mem_cgroup_sockets_destroy(memcg);
} | false | false | false | false | false | 0 |
ssd_ram_read(struct ssd_device *dev, void *buf, size_t length, loff_t ofs, int ctrl_idx)
{
int left = length;
size_t len;
loff_t off = ofs;
int ret = 0;
if (ctrl_idx >= dev->hw_info.nr_ctrl || (uint64_t)(ofs + length) > dev->hw_info.ram_size || !length
|| (length & (dev->hw_info.ram_align - 1)) != 0 || ((uint6... | false | false | false | false | false | 0 |
changekcode(VOID_A)
{
if (!emupid) return;
sendword(emufd, TE_CHANGEKCODE);
sendword(emufd, inputkcode);
sendword(emufd, outputkcode);
} | false | false | false | false | false | 0 |
folder_icons_new(GtkWidget *widget)
{
PixmapFolders *pf = g_new0(PixmapFolders, 1);
#if 1
GtkIconSize size = GTK_ICON_SIZE_MENU;
/* Attempt to use stock gtk icons */
pf->close = gtk_widget_render_icon(widget, GTK_STOCK_DIRECTORY, size, NULL);
pf->open = gtk_widget_render_icon(widget, GTK_STOCK_OPEN, size, NU... | false | false | false | false | false | 0 |
test_refs_unicode__create_and_lookup(void)
{
git_reference *ref0, *ref1, *ref2;
git_repository *repo2;
const char *REFNAME = "refs/heads/" "\305" "ngstr" "\366" "m";
const char *master = "refs/heads/master";
/* Create the reference */
cl_git_pass(git_reference_lookup(&ref0, repo, master));
cl_git_pass(git_refe... | false | false | false | false | false | 0 |
ompi_comm_nextcid_check_flag (ompi_comm_request_t *request)
{
struct mca_comm_nextcid_context *context = request->context;
if (1 == context->rflag) {
/* set the according values to the newcomm */
context->newcomm->c_contextid = context->nextcid;
context->newcomm->c_f_to_c_index = contex... | false | false | false | false | false | 0 |
GC_start_rtn_prepare_thread(void *(**pstart)(void *),
void **pstart_arg,
struct GC_stack_base *sb, void *arg)
{
struct start_info * si = arg;
pthread_t self = pthread_self();
GC_thread me;
DCL_LOCK_STATE;
# ifdef DEBUG_TH... | false | false | false | false | false | 0 |
JustSummoned(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_BIG_WILL)
{
m_bigWillGuid = pSummoned->GetObjectGuid();
pSummoned->setFaction(FACTION_FRIENDLY);
pSummoned->SetWalk(false);
pSummoned->GetMotionMaster()->MovePoint(1, aAffray... | false | false | false | false | false | 0 |
create_filesystem_object(struct archive_write_disk *a)
{
/* Create the entry. */
const char *linkname;
mode_t final_mode, mode;
int r;
/* We identify hard/symlinks according to the link names. */
/* Since link(2) and symlink(2) don't handle modes, we're done here. */
linkname = archive_entr... | false | false | false | false | true | 1 |
Writeout(Aoutfile *f)
{
if (itemtype != -1) f->PutStr(ItemDefs[itemtype].abr);
else f->PutStr("NO_ITEM");
f->PutInt(amount);
f->PutInt(baseamount);
if (itemtype == I_SILVER) {
if (skill != -1) f->PutStr(SkillDefs[skill].abbr);
else f->PutStr("NO_SKILL");
}
f->PutInt(productivity);
} | false | false | false | false | false | 0 |
qcaspi_tx_cmd(struct qcaspi *qca, u16 cmd)
{
__be16 tx_data;
struct spi_message *msg = &qca->spi_msg1;
struct spi_transfer *transfer = &qca->spi_xfer1;
int ret;
tx_data = cpu_to_be16(cmd);
transfer->len = sizeof(tx_data);
transfer->tx_buf = &tx_data;
transfer->rx_buf = NULL;
ret = spi_sync(qca->spi_dev, msg)... | false | false | false | false | false | 0 |
ExtendCLOG(TransactionId newestXact)
{
int pageno;
/*
* No work except at first XID of a page. But beware: just after
* wraparound, the first XID of page zero is FirstNormalTransactionId.
*/
if (TransactionIdToPgIndex(newestXact) != 0 &&
!TransactionIdEquals(newestXact, FirstNormalTransactionId))
retur... | false | false | false | false | false | 0 |
opConcat(Object args[], int numArgs) {
state->concatCTM(args[0].getNum(), args[1].getNum(),
args[2].getNum(), args[3].getNum(),
args[4].getNum(), args[5].getNum());
const char *prevOp = getPreviousOperator();
double a0 = args[0].getNum();
double a1 = args[1].getNum();
double a2 = args[2].getNum();
... | false | false | false | false | false | 0 |
ProcAuGetCloseDownMode(ClientPtr client)
{
REQUEST(auReq);
auGetCloseDownModeReply rep;
REQUEST_SIZE_MATCH(auReq);
rep.type = Au_Reply;
rep.sequenceNumber = client->sequence;
rep.closeDownMode = client->closeDownMode;
rep.length = 0;
WriteAuReplyToClient(client, sizeof(auGetCloseDownM... | false | false | false | false | false | 0 |
get_just_from_ibuf(Ibuffer ibuf)
{
/* size of Just, then members */
Just j_collect = NULL;
int i;
int n = ibuf_xread(ibuf);
for (i = 0; i < n; i++) {
int type = ibuf_xread(ibuf);
Just j = get_just();
j->type = type;
switch (type) {
case INPUT_JUST:
case GOAL_JUST:
/* nothing */
... | false | false | false | false | false | 0 |
Execute( aiScene* pScene)
{
DefaultLogger::get()->debug("JoinVerticesProcess begin");
// get the total number of vertices BEFORE the step is executed
int iNumOldVertices = 0;
if (!DefaultLogger::isNullLogger()) {
for( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
iNumOldVertices += pScene->mMeshes[a]->mN... | false | false | false | false | false | 0 |
CMN_realtime_free(CMNWork *c)
{
int i;
free(c->cmean_init);
free(c->now.mfcc_sum);
if (c->var) {
free(c->cvar_init);
free(c->now.mfcc_var);
}
for(i=0;i<c->clist_max;i++) {
if (c->var) free(c->clist[i].mfcc_var);
free(c->clist[i].mfcc_sum);
}
free(c->clist);
free(c);
} | false | false | false | false | false | 0 |
alloc_htc_packet_container(struct htc_target *target)
{
struct htc_packet *packet;
spin_lock_bh(&target->rx_lock);
if (target->pipe.htc_packet_pool == NULL) {
spin_unlock_bh(&target->rx_lock);
return NULL;
}
packet = target->pipe.htc_packet_pool;
target->pipe.htc_packet_pool = (struct htc_packet *) packet->... | false | false | false | false | false | 0 |
valid_initial_value_p (x, insn, call_seen, loop_start)
rtx x;
rtx insn;
int call_seen;
rtx loop_start;
{
if (CONSTANT_P (x))
return 1;
/* Only consider pseudos we know about initialized in insns whose luids
we know. */
if (GET_CODE (x) != REG
|| REGNO (x) >= max_reg_before_loo... | false | false | false | false | false | 0 |
eoFill(GfxState *state) {
if (!doHTML) {
return;
}
fill(state);
} | false | false | false | false | false | 0 |
CPLGetErrorHandlerUserData(void)
{
CPLErrorContext *psCtx = CPLGetErrorContext();
return (void*) psCtx->psHandlerStack ? psCtx->psHandlerStack->pUserData : pErrorHandlerUserData;
} | false | false | false | false | false | 0 |
print_latex_hbox(const label_state& style,
const std::string& label) const
{
std::stringstream text_buf;
bool need_ff(style.fontface() != "rm"); // roman
bool need_fs(style.fontsize() != "nsz"); // normalsize
text_buf << "\\hbox{\\color{" << print(style.text_color()) << "}";
if (nee... | false | false | false | false | false | 0 |
ml_gdome_nnm_getNamedItem(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeNode* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_nnm_getNamedItem(NamedNodeMap_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.getNamedItem"... | false | false | false | false | false | 0 |
onUpdUncollapse(FXObject* sender,FXSelector,void*){
if(!collapsed)
sender->handle(this,FXSEL(SEL_COMMAND,ID_CHECK),NULL);
else
sender->handle(this,FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
return 1;
} | false | false | false | false | false | 0 |
mayLoopAccessLocation(Value *Ptr, ModRefInfo Access, Loop *L,
const SCEV *BECount, unsigned StoreSize,
AliasAnalysis &AA,
Instruction *IgnoredStore) {
// Get the location that may be stored across the loop. Since th... | false | false | false | false | false | 0 |
USB_ReqSetInterface (void) {
USB_COMMON_DESCRIPTOR *pD;
uint32_t ifn = 0, alt = 0, old = 0, msk = 0;
uint32_t n, m;
uint32_t set;
switch (SetupPacket.bmRequestType.BM.Recipient) {
case REQUEST_TO_INTERFACE:
if (USB_Configuration == 0) return (FALSE);
set = FALSE;
pD = (USB_COMMON_DESCR... | false | false | false | false | false | 0 |
update_lookupswitch_targets(struct pc_map *pc_map,
unsigned char *code,
unsigned long pc,
unsigned char *new_code)
{
unsigned long switch_pc;
switch_pc = pc;
pc += 1 + get_tableswitch_padding(pc);
/* update default target */
update_switch_target(pc_map, code, switch_pc, pc, new_code);
pc += 4;
... | false | false | false | false | false | 0 |
doclistener_changeStrux(const PX_ChangeRecord_StruxChange * pcrxc)
{
_assertRunListIntegrity();
UT_ASSERT(pcrxc->getType()==PX_ChangeRecord::PXT_ChangeStrux);
// Check if the block has borders. If this changes we might have to update other blocks
bool b_bordersMergedWithPrev = false, b_bordersMergedWithNext... | false | false | false | false | false | 0 |
SPF_debugx( const char *file, int line, const char *format, ... )
{
char errmsg[SPF_SYSLOG_SIZE];
va_list ap;
if (SPF_debug_handler == NULL)
return;
va_start(ap, format);
vsnprintf(errmsg, sizeof(errmsg), format, ap);
va_end(ap);
SPF_debug_handler(file, line, errmsg);
} | false | false | false | false | false | 0 |
_sched_callback( unsigned int reg, void *magic )
{
struct schedTable_entry *entry = (struct schedTable_entry *)magic;
int ret;
netsnmp_variable_list assign;
if ( !entry ) {
DEBUGMSGTL(("disman:schedule:callback", "missing entry\n"));
return;
}
entry->schedLastRun = time(NULL);
... | false | false | false | false | false | 0 |
tokenize(const string &str, vector<float> &tokens, const string &delimiters) {
// Skip delimiters at beginning.
string::size_type lastPos = str.find_first_not_of(delimiters, 0);
// Find first "non-delimiter".
string::size_type pos = str.find_first_of(delimiters, lastPos);
tokens.clear();
float... | false | false | false | false | false | 0 |
isValid() const
{
// Not empty
if (_fullContent.isEmpty())
return false;
// Contains the two EOF tags in the correct order
int beginFirst = _fullContent.indexOf(::EOF_TAG1);
if (beginFirst == -1)
return false;
beginFirst += QString(::EOF_TAG1).size();
int beginSecond = _ful... | false | false | false | false | false | 0 |
G_CheckChaseStats (edict_t *ent)
{
int i;
gclient_t *cl;
for (i = 1; i <= maxclients->value; i++) {
cl = g_edicts[i].client;
if (!g_edicts[i].inuse || cl->chase_target != ent)
continue;
memcpy(cl->ps.stats, ent->client->ps.stats, sizeof(cl->ps.stats));
G_SetSpectatorStats(g_edicts + i);
}
} | false | true | false | false | false | 1 |
eb_irc_read_prefs_config(LList *values)
{
char *c;
if ((c = value_pair_get_value(values, "do_irc_debug"))) {
do_irc_debug = atoi(c);
free(c);
}
} | true | true | false | false | true | 1 |
isExecutable(const std::string &filename) {
struct stat statbuf;
if (stat(filename.c_str(), &statbuf) != 0)
return false;
return statbuf.st_mode & S_IXUSR ||
statbuf.st_mode & S_IXGRP ||
statbuf.st_mode & S_IXOTH;
} | false | false | false | false | false | 0 |
checkModificationConstraints( const ContainerBase* container )
{
if ( container->getMap()->actplayer == container->getOwner() || container->getMap()->actplayer==-1 )
return true;
return false;
} | false | false | false | false | false | 0 |
mpeg4_sequence_header(struct go7007 *go, unsigned char *buf, int ext)
{
const unsigned char head[] = { 0x00, 0x00, 0x01, 0xb0, go->pali,
0x00, 0x00, 0x01, 0xb5, 0x09,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x20, };
int i, aspect_ratio;
int fps = go->sensor_framerate / go->fps_scale;
CODE_GEN(c, buf + 2 + s... | false | false | false | false | false | 0 |
cut_run_context_is_canceled (CutRunContext *context)
{
CutRunContextPrivate *priv;
priv = CUT_RUN_CONTEXT_GET_PRIVATE(context);
return priv->canceled || priv->crashed;
} | false | false | false | false | false | 0 |
setContainer(fp_Container * pContainer)
{
if (pContainer == getContainer())
{
return;
}
if (getContainer())
{
clearScreen();
}
fp_Container::setContainer(pContainer);
if(pContainer == NULL)
{
return;
}
UT_ASSERT(pContainer->getContainerType() == FP_CONTAINER_TABLE);
fp_TableContainer * pTable = stati... | false | false | false | false | false | 0 |
_mv88e6xxx_vtu_getnext(struct dsa_switch *ds,
struct mv88e6xxx_vtu_stu_entry *entry)
{
struct mv88e6xxx_vtu_stu_entry next = { 0 };
int ret;
ret = _mv88e6xxx_vtu_wait(ds);
if (ret < 0)
return ret;
ret = _mv88e6xxx_vtu_cmd(ds, GLOBAL_VTU_OP_VTU_GET_NEXT);
if (ret < 0)
return ret;
ret = _mv88e6xxx_reg... | false | false | false | false | false | 0 |
ares__expand_name_for_response(const unsigned char *encoded,
const unsigned char *abuf, int alen,
char **s, long *enclen)
{
int status = ares_expand_name(encoded, abuf, alen, s, enclen);
if (status == ARES_EBADNAME)
status = ARES_EBADRESP;
... | false | false | false | false | false | 0 |
perf_event_delayed_put(struct task_struct *task)
{
int ctxn;
for_each_task_context_nr(ctxn)
WARN_ON_ONCE(task->perf_event_ctxp[ctxn]);
} | false | false | false | false | false | 0 |
setComboContent(QComboBox *combo, PermissionsTarget target,
mode_t permissions, mode_t partial) {
combo->clear();
if (d->isIrregular) //#176876
return;
if (d->pmode == PermissionsOnlyLinks) {
combo->addItem(i18n("Link"));
combo->setC... | false | false | false | false | false | 0 |
prt_ary(cd, outer)
struct code *cd;
int outer;
{
int i;
for (i = 0; cd->ElemTyp(i) != A_End; ++i)
switch (cd->ElemTyp(i)) {
case A_Str:
/*
* Simple C code in a string.
*/
fprintf(codefile, "%s", cd->Str(i));
break;
case A_Va... | false | false | false | false | false | 0 |
virtio_gpu_user_framebuffer_create(struct drm_device *dev,
struct drm_file *file_priv,
struct drm_mode_fb_cmd2 *mode_cmd)
{
struct drm_gem_object *obj = NULL;
struct virtio_gpu_framebuffer *virtio_gpu_fb;
int ret;
/* lookup object associated with res handle */
obj = drm_gem_object_lookup(dev, file_p... | false | false | false | false | false | 0 |
onPairsButtonClicked(VisuUiMain *main, GtkButton *button _U_)
{
GtkWidget *wd;
if (!main->pairsDialog)
{
visu_ui_pairs_initBuild(main);
wd = lookup_widget(main->pairsDialog, "closebutton3");
g_signal_connect_swapped(G_OBJECT(wd), "clicked",
G_CALLBACK(onPairsCloseClicked),
... | false | false | false | false | false | 0 |
aim_conn_getnext(aim_session_t *sess)
{
aim_conn_t *newconn;
if (!(newconn = malloc(sizeof(aim_conn_t))))
return NULL;
memset(newconn, 0, sizeof(aim_conn_t));
if (!(newconn->inside = malloc(sizeof(aim_conn_inside_t)))) {
free(newconn);
return NULL;
}
memset(newconn->inside, 0, sizeof(aim_conn_inside_t));
... | false | false | false | false | false | 0 |
clutter_stage_manager_get_default (void)
{
ClutterMainContext *context = _clutter_context_get_default ();
if (G_UNLIKELY (context->stage_manager == NULL))
context->stage_manager = g_object_new (CLUTTER_TYPE_STAGE_MANAGER, NULL);
return context->stage_manager;
} | false | false | false | false | false | 0 |
transform_to_log_area_ratios(int16_t r[8])
{
int16_t temp;
int i;
/* The following scaling for r[..] and LAR[..] has been used:
r[..] = integer (real_r[..]*32768.); -1 <= real_r < 1.
LAR[..] = integer (real_LAR[..] * 16384);
with -1.625 <= real_LAR <= 1.625
*/
/* Comp... | false | false | false | false | false | 0 |
exif_mnote_data_set_offset (ExifMnoteData *d, unsigned int o)
{
if (!d || !d->methods.set_offset) return;
d->methods.set_offset (d, o);
} | false | false | false | false | false | 0 |
Scm_ShowStackTrace(ScmPort *out, ScmObj stacklite,
int maxdepth, int skip, int offset, int format)
{
ScmObj cp;
int depth = offset;
if (maxdepth == 0) maxdepth = STACK_DEPTH_LIMIT;
SCM_FOR_EACH(cp, stacklite) {
if (skip-- > 0) continue;
if (format == FMT_ORIG) {... | false | false | false | false | false | 0 |
SetTextControlValue(const wxString& name, const wxString& value)
{
wxWizardPage* page = m_pWizard->GetCurrentPage();
if (page)
{
wxTextCtrl* win = dynamic_cast<wxTextCtrl*>(page->FindWindowByName(name, page));
if (win)
win->SetValue(value);
}
} | false | false | false | false | false | 0 |
global_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
const char *var = pbx_builtin_getvar_helper(NULL, data);
*buf = '\0';
if (var)
ast_copy_string(buf, var, len);
return 0;
} | false | false | false | false | false | 0 |
handle_id3v2_txxx (xmms_xform_t *xform, xmms_id3v2_header_t *head,
const gchar *_key, gchar *buf, gsize len)
{
const gchar *enc;
gchar *cbuf;
const gchar *key, *val;
const gchar *metakey;
gsize clen;
enc = binary_to_enc (buf[0]);
cbuf = convert_id3_text (enc, &buf[1], len - 1, &clen);
if (!c... | false | false | false | false | false | 0 |
connectionInfo( const QString &name ) const
{
for ( int i = 0; i < mConnectionInfos.count(); ++i )
if ( mConnectionInfos[ i ].name() == name )
return mConnectionInfos[ i ];
return ConnectionInfo();
} | 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.