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 |
|---|---|---|---|---|---|---|
svg_get_color(gx_device_svg *svg, const gx_drawing_color *pdc)
{
gx_color_index color = gx_no_color_index;
if (gx_dc_is_pure(pdc))
color = gx_dc_pure_color(pdc);
return color;
} | false | false | false | false | false | 0 |
qt202x_phy_get_module_eeprom(struct efx_nic *efx,
struct ethtool_eeprom *ee, u8 *data)
{
int mmd, reg_base, rc, i;
if (efx->phy_type == PHY_TYPE_QT2025C) {
mmd = MDIO_MMD_PCS;
reg_base = 0xd000;
} else {
mmd = MDIO_MMD_PMAPMD;
reg_base = 0x8007;
}
for (i = 0; i < ee->len; i++) {
rc = efx_mdio_re... | false | false | false | false | false | 0 |
libbfio_memory_range_io_handle_free(
libbfio_memory_range_io_handle_t **memory_range_io_handle,
libcerror_error_t **error )
{
static char *function = "libbfio_memory_range_io_handle_free";
if( memory_range_io_handle == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
LIBCE... | false | false | false | false | false | 0 |
define_builtin_macros_for_lp64 (cpp_reader *pfile)
{
if (TYPE_PRECISION (long_integer_type_node) == 64
&& POINTER_SIZE == 64
&& TYPE_PRECISION (integer_type_node) == 32)
{
cpp_define (pfile, "_LP64");
cpp_define (pfile, "__LP64__");
}
} | false | false | false | false | false | 0 |
lbs_cfg_disconnect(struct wiphy *wiphy, struct net_device *dev,
u16 reason_code)
{
struct lbs_private *priv = wiphy_priv(wiphy);
if (dev == priv->mesh_dev)
return -EOPNOTSUPP;
lbs_deb_enter_args(LBS_DEB_CFG80211, "reason_code %d", reason_code);
/* store for lbs_cfg_ret_disconnect() */
priv->disassoc_reason =... | false | false | false | false | false | 0 |
_modbus_tcp_build_request_basis(modbus_t *ctx, int function,
int addr, int nb,
uint8_t *req)
{
modbus_tcp_t *ctx_tcp = ctx->backend_data;
/* Increase transaction ID */
if (ctx_tcp->t_id < UINT16_MAX)
ctx_tcp->t_id... | false | false | false | false | false | 0 |
chirp_reli_fstatfs( struct chirp_file *file, struct chirp_statfs *buf, time_t stoptime )
{
chirp_reli_flush(file,stoptime);
RETRY_FILE( result = chirp_client_fstatfs(client,file->fd,buf,stoptime); )
} | false | false | false | false | false | 0 |
gst_audio_resample_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstAudioResample *resample = GST_AUDIO_RESAMPLE (parent);
GstBaseTransform *trans;
gboolean res = TRUE;
trans = GST_BASE_TRANSFORM (resample);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_LATENCY:
{
GstClockTim... | false | false | false | false | false | 0 |
gst_qtdemux_set_index (GstElement * element, GstIndex * index)
{
GstQTDemux *demux = GST_QTDEMUX (element);
GST_OBJECT_LOCK (demux);
if (demux->element_index)
gst_object_unref (demux->element_index);
if (index) {
demux->element_index = gst_object_ref (index);
} else {
demux->element_index = NULL;... | false | false | false | false | false | 0 |
write_data(FILE *fp, int n, double **buf)
{
for (int i = 0; i < n; i++)
fprintf(fp,"%d %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e "
"%d %d %d\n",
(int) buf[i][0],(int) buf[i][1],
buf[i][2],buf[i][3],buf[i][4],
buf[i][5],buf[i][6],buf[i][7],
(int)... | false | false | false | false | false | 0 |
do_depts_conflict(lListElem *new, lListElem *old)
{
lList *new_users = NULL;
lList *old_users = NULL;
lListElem *np;
lList *alp = NULL;
const char *nname;
DENTER(TOP_LAYER, "do_depts_conflict");
new_users = lGetList(new, US_entries);
old_users = lGetList(old, US_entries);
if (!old_u... | false | false | false | false | false | 0 |
ParseMessageSetItem(io::CodedInputStream* input,
ExtensionFinder* extension_finder,
FieldSkipper* field_skipper) {
// TODO(kenton): It would be nice to share code between this and
// WireFormatLite::ParseAndMergeMessageSetItem(), but I t... | false | false | false | false | false | 0 |
o_islist(void)
{
VALUE *vp;
int r;
vp = stack;
if (vp->v_type == V_ADDR)
vp = vp->v_addr;
r = (vp->v_type == V_LIST);
freevalue(stack);
stack->v_num = (r ? qlink(&_qone_) : qlink(&_qzero_));
stack->v_type = V_NUM;
stack->v_subtype = V_NOSUBTYPE;
} | false | false | false | false | false | 0 |
nautilus_bookmarks_window_key_press_event_cb (GtkWindow *window,
GdkEventKey *event,
gpointer user_data)
{
if (event->state & GDK_CONTROL_MASK && event->keyval == GDK_KEY_w) {
gtk_widget_destroy (GTK_WIDGET (window));
return TRUE;
}
return FALSE;
} | false | false | false | false | false | 0 |
grow_arrays(int nmax)
{
for (int m = 0; m < nvalue; m++) {
if (style[m] == MOLECULE) {
memory->grow(atom->molecule,nmax,"atom:molecule");
size_t nbytes = (nmax-nmax_old) * sizeof(int);
memset(&atom->molecule[nmax_old],0,nbytes);
} else if (style[m] == INTEGER) {
memory->grow(atom->ivec... | false | false | false | false | false | 0 |
tsquery_opr_selec(QueryItem *item, char *operand,
TextFreq *lookup, int length, float4 minfreq)
{
LexemeKey key;
TextFreq *searchres;
Selectivity selec,
s1,
s2;
/* since this function recurses, it could be driven to stack overflow */
check_stack_depth();
if (item->type == QI_VAL)
{
QueryOpera... | false | false | false | false | false | 0 |
pcmcia_load_firmware(struct pcmcia_device *dev, char *filename)
{
struct pcmcia_socket *s = dev->socket;
const struct firmware *fw;
int ret = -ENOMEM;
cistpl_longlink_mfc_t mfc;
int old_funcs, new_funcs = 1;
if (!filename)
return -EINVAL;
dev_dbg(&dev->dev, "trying to load CIS file %s\n", filename);
if (re... | false | false | false | false | false | 0 |
filter_add_drop_host_rule(const struct record *rec, filter_t *filter)
{
rule_t *rule;
record_check(rec);
g_assert(filter != NULL);
rule = filter_new_ip_rule(rec->results_set->addr, -1,
filter_get_drop_target(), RULE_FLAG_ACTIVE);
filter_prepend_rule(filter, rule);
} | false | false | false | false | false | 0 |
BaseIDTOString(unsigned char Id)
{
if (Id >= ID_USER_PACKET_ENUM)
return 0;
const char *IDTable[((int)ID_USER_PACKET_ENUM)+1]=
{
"ID_CONNECTED_PING",
"ID_UNCONNECTED_PING",
"ID_UNCONNECTED_PING_OPEN_CONNECTIONS",
"ID_CONNECTED_PONG",
"ID_DETECT_LOST_CONNECTIONS",
"ID_OPEN_CONNECTION_... | false | false | false | false | false | 0 |
gupnp_didl_lite_writer_finalize (GObject *object)
{
GObjectClass *object_class;
GUPnPDIDLLiteWriterPrivate *priv;
priv = GUPNP_DIDL_LITE_WRITER (object)->priv;
if (priv->language)
g_free (priv->language);
object_class = G_OBJECT_CLASS (gupnp_didl_... | false | false | false | false | false | 0 |
callback()
{
//cout << "eeprom call back\n";
switch(eecon2.get_eestate()) {
case EECON2::EEREAD:
//cout << "eeread\n";
eecon2.unarm();
if(eecon1.value.get() & EECON1::EEPGD) {
// read program memory
int opcode = cpu->pma->get_opcode(rd_adr);
eedata.value.put(opcode & 0xff);
... | false | false | false | false | false | 0 |
BackwardMoving()
{
//BACKWARD MOVING
int carret = 0;
int y = maxY;
int x = maxX;
score = maxVal;
BackDirection prev = crosswise;
while(B[y][x].backDirection != stop)
{
if (prev == up && B[y][x].continueUp) //CONTINUE GOING UP
{ /... | false | false | false | false | false | 0 |
make_xid_obj_low (gcv_object_t *prealloc, gcv_object_t *type,
gcv_object_t *dpy, XID xid)
{
if (nullp (*prealloc)) {
/* (make-instance type :display dpy :id xid) */
pushSTACK(*type);
pushSTACK(O(object_Kdisplay)); pushSTACK(*dpy);
pushSTACK(O(object_Kid)); pushST... | false | false | false | false | false | 0 |
add_to_unconfirmed(struct nfs4_client *clp)
{
unsigned int idhashval;
struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
lockdep_assert_held(&nn->client_lock);
clear_bit(NFSD4_CLIENT_CONFIRMED, &clp->cl_flags);
add_clp_to_name_tree(clp, &nn->unconf_name_tree);
idhashval = clientid_hashval(clp->cl_clienti... | false | false | false | false | false | 0 |
call_ipbyhost(char *hostn, IP ip, int ok)
{
devent_t *de = dns_events, *ode = NULL, *nde = NULL;
while (de) {
nde = de->next;
if ((de->lookup == RES_IPBYHOST) && (!de->res_data.hostname ||
!egg_strcasecmp(de->res_data.hostname, hostn))) {
/* Remove the event from the list here, to avoid confl... | false | false | false | false | false | 0 |
pwait(void)
{
int ch;
struct spr_req nreply;
FILE *setupfl = (FILE *) 0;
if (!setupnam)
return 1;
rerun_align:
for (;;) {
if (!execorsend("DOCST", dsstr, in_params.pi_docstart, in_params.pi_flags & PI_EX_DOCST, 0))
return 0;
if (in_params.pi_flags & PI_EX_ALIGN) {
if (pfile < 0 && !open... | false | true | false | false | true | 1 |
ReadMilliseconds(DateToken token) {
// Read first three significant digits of the original numeral,
// as inferred from the value and the number of digits.
// I.e., use the number of digits to see if there were
// leading zeros.
int number = token.number();
int length = token.length();
if (length < 3) {
... | false | false | false | false | false | 0 |
check() throw ( exception ) {
const unsigned int a_size( 23 );
char a[a_size];
char type_a[4];
char length_a[4];
int length;
bool found_IDAT = false;
if ( ! in->read( a, a_size ) ) return false;
if ( ! equals( a, 0, MAGIC, 0, 5 ) ) return false;
width = getIntBigEndian( a, 13 );
height = g... | false | false | false | false | false | 0 |
main (int argc, char **argv)
{
int index;
set_program_name (argv[0]);
iu_argp_init ("telnetd", default_program_authors);
openlog ("telnetd", LOG_PID | LOG_ODELAY, LOG_DAEMON);
argp_parse (&argp, argc, argv, 0, &index, NULL);
if (argc != index)
error (EXIT_FAILURE, 0, "junk arguments in the command l... | false | false | false | false | false | 0 |
dPrint_SuperNode_Matrix(char *what, SuperMatrix *A)
{
SCformat *Astore;
register int i, j, k, c, d, n, nsup;
double *dp;
int *col_to_sup, *sup_to_col, *rowind, *rowind_colptr;
printf("\nSuperNode matrix %s:\n", what);
printf("Stype %d, Dtype %d, Mtype %d\n", A->Stype,A->Dtype,A->M... | false | false | false | false | false | 0 |
GetKeyword( const char *pszPath,
const char *pszDefault )
{
const char *pszResult;
pszResult = CSLFetchNameValue( papszKeywordList, pszPath );
if( pszResult == NULL )
return pszDefault;
else
return pszResult;
} | false | false | false | false | false | 0 |
mystrtok (char *str, int len, char *tok)
{
char *str0 = str;
int z = 0;
while (*str != tok [0])
{
str ++;
z ++;
if (z >= len)
return NULL;
}
*str = 0;
return str0;
} | false | false | false | false | false | 0 |
create_tables_cb( const gchar* type, gpointer data_p, gpointer be_p )
{
GncSqlObjectBackend* pData = data_p;
GncSqlBackend* be = be_p;
g_return_if_fail( type != NULL && data_p != NULL && be_p != NULL );
g_return_if_fail( pData->version == GNC_SQL_BACKEND_VERSION );
if ( pData->create_tables != NUL... | false | false | false | false | false | 0 |
qr_validate_cache_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
{
qr_local_t *local = NULL;
int32_t op_ret = -1, op_errno = -1;
GF_ASSERT (frame);
GF_VALIDATE_OR_GOTO (frame->this->name, this, out);
local = frame->local;
if (local == NULL) {
... | false | false | false | true | false | 1 |
TypeToString(TypeEnumType type)
{
switch(type)
{
case INT:
return "int";
case FLOAT:
return "float";
case STRING:
return "string";
case LIST:
return "list";
case FLAG:
return "flag";
case BOOL:
return "boolean";
case IMAGE:
return "image";
... | false | false | false | false | false | 0 |
giraffe_table_save(GiTable *self, const cxchar *filename)
{
if (filename == NULL) {
return 1;
}
if (self) {
cxint code;
cpl_table *table = giraffe_table_get(self);
cpl_propertylist *plist = giraffe_table_get_properties(self);
if (cpl_propertylist_is_empty(plist)... | false | false | false | false | false | 0 |
do_readlink(int argc, char **argv, char **result)
{
int n;
char buf[MAXPATHLEN], *filename;
filename = argv[1];
if ((n = readlink(filename, buf, sizeof(buf))) == -1) {
*result = strdup(strerror(errno));
return(-1);
}
buf[n] = '\0';
*result = strdup(buf);
return(1);
} | false | false | false | false | false | 0 |
i7300_idle_ioat_selftest(u8 *ctl,
struct ioat_dma_descriptor *desc, unsigned long desc_phys)
{
u64 chan_sts;
memset(desc, 0, 2048);
memset((u8 *) desc + 2048, 0xab, 1024);
desc[0].size = 1024;
desc[0].ctl = 0;
desc[0].src_addr = desc_phys + 2048;
desc[0].dst_addr = desc_phys + 1024;
desc[0].next = 0;
writ... | false | false | false | false | false | 0 |
add_val(VMG_ vm_val_t *result,
vm_obj_id_t self, const vm_val_t *val)
{
vm_val_t val2;
/* convert it */
val2 = *val;
if (!cvt_to_bignum(vmg_ self, &val2))
{
/* this type is not convertible to BigNumber, so we can't add it */
err_throw(VMERR_BAD_T... | false | false | false | false | false | 0 |
read_ipv6_address(char *line, unsigned int len, struct in6_addr *iid){
char *ptr, *ipv6addr;
ptr= line;
/* Skip initial spaces (e.g. " IPv6_address") */
while( (*ptr==' ' || *ptr=='\t') && ptr < (line+len))
ptr++;
/* If we got to end of line or there is a comment or equal sign, there is no IPv6 address */
i... | false | false | false | false | false | 0 |
stop_timers()
{
alarm(0);
signal(SIGALRM, SIG_IGN);
signal(SIGALRM, wakeup_call);
#ifdef ITIMER_VIRTUAL
{
struct itimerval itimer, oitimer;
itimer.it_value.tv_sec = 0;
itimer.it_value.tv_usec = 0;
itimer.it_interval.tv_sec = 0;
itimer.it_interval.tv_usec = 0;
setitimer(ITIMER_VIRTUAL, &itimer, ... | false | false | false | false | false | 0 |
sstate_readline(upstype_t *ups)
{
int i, ret;
char buf[SMALLBUF];
if ((!ups) || (ups->sock_fd < 0)) {
return;
}
ret = read(ups->sock_fd, buf, sizeof(buf));
if (ret < 0) {
switch(errno)
{
case EINTR:
case EAGAIN:
return;
default:
upslog_with_errno(LOG_WARNING, "Read from UPS [%s] failed", ups... | true | true | false | false | true | 1 |
tf_typep(int32 pnum)
{
struct expr_t *xp;
if (__tfrec == NULL) return(bad_notfcontext_err("tf_typep"));
if (pnum < 0 || pnum >= __tfrec->tfanump1) return(TF_NULLPARAM);
if (pnum == 0)
{
if (!__tfrec->tf_func) return(TF_NULLPARAM);
if (__tfrec->fretreal) return(TF_READWRITEREAL);
return(TF_READWRITE);
... | false | false | false | false | false | 0 |
xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
xmlChar *buf = NULL, *tmp;
int len = 0;
int size = 50;
xmlChar stop;
int count = 0;
*id = NULL;
if (RAW == '"') {
NEXT;
stop = '"';
} else if (RAW == '\'') {
NEXT;
stop = '\'';
} else {
... | false | false | false | false | false | 0 |
tick_check_oneshot_broadcast_this_cpu(void)
{
if (cpumask_test_cpu(smp_processor_id(), tick_broadcast_oneshot_mask)) {
struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
/*
* We might be in the middle of switching over from
* periodic to oneshot. If the CPU has not yet
* switched over, leave the de... | false | false | false | false | false | 0 |
ieee_write_undefined_tag (h, p)
struct ieee_name_type_hash_entry *h;
PTR p;
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_name_type *nt;
for (nt = h->types; nt != NULL; nt = nt->next)
{
unsigned int name_indx;
char code;
if (nt->kind == DEBUG_KIND_ILLEGAL)
c... | false | false | false | false | false | 0 |
readable(struct StringIO *ptr)
{
if (!READABLE(ptr)) {
rb_raise(rb_eIOError, "not opened for reading");
}
return ptr;
} | false | false | false | false | false | 0 |
gz_fetch(gz_statep state)
{
z_streamp strm = &(state->strm);
do {
switch(state->how) {
case LOOK: /* -> LOOK, MODE_COPY (only if never GZIP), or MODE_GZIP */
if (gz_look(state) == -1)
return -1;
if (state->how == LOOK)
return 0;
... | false | false | false | false | false | 0 |
paintSingleField( const MapRenderer::FieldRenderInfo& fieldInfo, int layer, const SPoint& pos )
{
if ( fieldInfo.gamemap != gamemap && gamemap) {
reset();
gamemap = NULL;
return;
}
if ( fieldInfo.visibility >= visible_ago) {
if ( fields.find( fieldInfo.po... | false | false | false | false | false | 0 |
resetAlign()
{
/* remove gaps from older alignments (code = gap_pos1) EXCEPT for
gaps that were INPUT with the seqs. which have code =
gap_pos2
*/
register int sl;
int i, j;
int _gapPos1 = userParameters->getGapPos1();
int _gapPos2 = userParameters->getGapPos2();
bool _re... | false | false | false | false | false | 0 |
classify_header( const char* header )
{
for( unsigned short i = 0; i < XI_HTTP_HEADER_COUNT - 1; ++i )
{
if( strcasecmp( header, XI_HTTP_TOKEN_NAMES[ i ] ) == 0 )
return ( http_header_type_t ) i;
}
return XI_HTTP_HEADER_UNKNOWN;
} | false | false | false | false | false | 0 |
pack_pragma(Octstr *packed, Octstr *value)
{
Octstr *nocache;
nocache = octstr_imm("no-cache");
if (octstr_case_compare(value, nocache) == 0)
wsp_pack_short_integer(packed, WSP_CACHE_CONTROL_NO_CACHE);
else {
Parameter *parm;
Octstr *encoding;
encoding = octstr_create("... | false | false | false | false | false | 0 |
open_for_write_new_handle_common (GVfsDBusMount *object,
GDBusMethodInvocation *invocation,
GUnixFDList *fd_list,
const gchar *arg_path_data,
guint16 arg_mode,
... | false | false | false | false | false | 0 |
git_filter_list_apply_to_blob(
git_buf *out,
git_filter_list *filters,
git_blob *blob)
{
git_buf in = GIT_BUF_INIT;
git_off_t rawsize = git_blob_rawsize(blob);
if (!git__is_sizet(rawsize)) {
giterr_set(GITERR_OS, "Blob is too large to filter");
return -1;
}
in.ptr = (char *)git_blob_rawcontent(blob);
i... | false | false | false | false | false | 0 |
edevstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group)
{
bool io_open = false;
int devcount = 0;
int numasc = 0;
int numpga = 0;
int i;
#ifdef USE_USBUTILS
time_t howoldsec = 0;
#endif
#ifdef HAVE_AN_ASIC
numasc = numascs();
#endif
#... | false | false | false | false | true | 1 |
FuncAPPEND_VECGF2( Obj self, Obj vecl, Obj vecr )
{
UInt lenl, lenr;
lenl = LEN_GF2VEC(vecl);
lenr = LEN_GF2VEC(vecr);
if (True == DoFilter(IsLockedRepresentationVector, vecl) && lenr > 0)
{
ErrorMayQuit("Append to locked compressed vector is forbidden", 0, 0);
return 0;
}
ResizeBag(vecl, ... | false | false | false | false | false | 0 |
RequiresEdgeSubdivision(double *leftPoint,
double *midPoint,
double *rightPoint,
double vtkNotUsed(alpha))
{
assert("pre: leftPoint_exists" && left... | false | false | false | false | false | 0 |
_nfs40_proc_get_locations(struct inode *inode,
struct nfs4_fs_locations *locations,
struct page *page, struct rpc_cred *cred)
{
struct nfs_server *server = NFS_SERVER(inode);
struct rpc_clnt *clnt = server->client;
u32 bitmask[2] = {
[0] = FATTR4_WORD0_FSID | FATTR4_WORD0_FS_LOCATIONS,
};
struc... | false | false | false | false | false | 0 |
FetchNumPackets(int in_phy) {
if (in_phy == KIS_PHY_ANY)
return num_packets;
map<int, int>::iterator i = phy_packets.find(in_phy);
if (i != phy_packets.end())
return i->second;
return 0;
} | false | false | false | false | false | 0 |
measurePerformance( UINT8* strLogFile,
UINT32 lowerBoundEntries,
UINT32 upperBoundEntries,
UINT32 stepBy,
UINT32 meassuresPerStep,
UINT32 insertsPerMeasure)
{
initRandom();
CADatabase* pDatabase=NULL;
UINT32 aktNr... | false | false | false | false | false | 0 |
GrgClearWindows(WinInfo,Signal)
GrgWindow *WinInfo;
losig_list *Signal;
{
rdsrec_list *Rec;
char End_Equi;
long pt;
GrgWinChRec *sc,*old;
ptype_list *ptl;
chain_list *scanchain;
if(GrgWinDebug)
fprintf(stderr,"Debut du nettoyage des fenetres.\n");
for( scanchain = (chain_list*)(getptype( Signal->... | false | false | false | false | false | 0 |
get_next_ulong(char **str_p, unsigned long *val, char *sep, int base)
{
char *p_val;
int ret;
if (!str_p || !(*str_p))
return -EINVAL;
p_val = strsep(str_p, sep);
if (!p_val)
return -EINVAL;
ret = kstrtoul(p_val, base, val);
if (ret)
return -EINVAL;
return 0;
} | false | false | false | false | false | 0 |
dmac_bput (uaecptr addr, uae_u32 b)
{
#ifdef JIT
special_mem |= S_WRITE;
#endif
addr &= 65535;
b &= 0xff;
if (addr == 0x48) {
map_banks (&dmac_bank, b, 0x10000 >> 16, 0x10000);
write_log (_T("CDTV DMAC autoconfigured at %02X0000\n"), b);
configured = b;
expamem_next ();
return;
}
if (addr == 0x4c) {
w... | false | false | false | false | false | 0 |
FT_Stroker_GetBorderCounts( FT_Stroker stroker,
FT_StrokerBorder border,
FT_UInt *anum_points,
FT_UInt *anum_contours )
{
FT_UInt num_points = 0, num_contours = 0;
FT_Error error;
if ( ... | false | false | false | false | false | 0 |
_tile_preloaded_cb(void *data,
Evas *e __UNUSED__,
Evas_Object *o __UNUSED__,
void *event_info __UNUSED__)
{
Elm_Photocam_Grid_Item *git = data;
if (git->want)
{
git->want = 0;
evas_object_show(git->img);
git->have = 1;
... | false | false | false | false | false | 0 |
main() {
string all1000Digits;
cin >> all1000Digits;
vector<unsigned int> singleDigits;
singleDigits.reserve(1000);
transform (all1000Digits.begin(), all1000Digits.end(),
back_inserter(singleDigits),
CInt());
unsigned int product, maxProduct(0);
... | false | false | false | false | false | 0 |
gui_load_timeout_callback(gpointer data) {
struct control * cp = (struct control*)data;
if (cp->ir->reinit_running) {
ir_wavedisplay_set_progress(IR_WAVEDISPLAY(cp->wave_display), cp->ir->src_progress);
return TRUE;
}
g_thread_join(cp->gui_load_thread);
cp->gui_load_thread = NULL;
ir_wavedisplay_set_progress(... | false | false | false | false | false | 0 |
driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
{
int i;
__glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
if (psc->swrast->base.version >= 3) {
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->b... | false | false | false | false | false | 0 |
FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source) {
if (bitmap) {
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
if ((!header->read_only) && (header->locked_pages.empty())) {
if ((target != source) && ((target >= 0) && (target < FreeImage_GetPageCount(bitmap))) && ((so... | false | false | false | false | false | 0 |
gen_fix_truncsfhi2 (rtx operand0,
rtx operand1)
{
rtx _val = 0;
start_sequence ();
{
rtx operands[2];
operands[0] = operand0;
operands[1] = operand1;
#line 4549 "../../src/gcc/config/i386/i386.md"
{
if (TARGET_FISTTP)
{
emit_insn (gen_fix_trunchi_fisttp_i387_1 (operands[0], operands[1]));
... | false | false | false | false | false | 0 |
set_control_line(struct ipw_hardware *hw, int prio,
unsigned int channel_idx, int line, int state)
{
struct ipw_control_packet *packet;
int protocolid = TL_PROTOCOLID_COM_CTRL;
if (prio == PRIO_SETUP)
protocolid = TL_PROTOCOLID_SETUP;
packet = alloc_ctrl_packet(sizeof(struct ipw_control_packet),
(chann... | false | false | false | false | false | 0 |
adjust_cpus_nppcu(uint16_t ntasks_per_core, uint16_t threads,
int cpus)
{
if ((ntasks_per_core != 0) && (ntasks_per_core != 0xffff) &&
(threads != 0)) {
/* Adjust the number of CPUs according to the percentage of the
* hwthreads/core being used. */
cpus = cpus * ntasks_per_core / threads;
}
retu... | false | false | false | false | false | 0 |
free_temp_slots (void)
{
struct temp_slot *p, *next;
bool some_available = false;
for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
{
next = p->next;
if (!p->keep)
{
make_slot_available (p);
some_available = true;
}
}
if (some_available)
{
remove_unused_temp_... | false | false | false | false | false | 0 |
tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd)
{
struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(rtd->card);
snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE,
&tegra_rt5677_hp_jack,
&tegra_rt5677_hp_jack_pins, 1);
if (gpio_is_valid(machine->gpio_hp_det)) {
... | false | false | false | false | false | 0 |
get_last_pattern(int dep)
{
if (tree_length < dep)
return NULL_PATTERN;
else
return tree[tree_length - dep];
} | false | false | false | false | false | 0 |
Do( const int& dum, const Audio& phaseModIn, Audio& out )
{
if( !AbleToExecute() ) return true;
ApplyControls();
TData* ptr = out.GetBuffer().GetPtr();
TData* phaseModptr = phaseModIn.GetBuffer().GetPtr();
for (int i=0;i<out.GetSize();i++)
{
(*ptr++) = mAmp * TData(sin(mPhase + mModIndex*(*phaseModptr++)));... | false | false | false | false | false | 0 |
AcpiTbAddTable (
ACPI_TABLE_DESC *TableDesc,
UINT32 *TableIndex)
{
UINT32 i;
ACPI_STATUS Status = AE_OK;
ACPI_FUNCTION_TRACE (TbAddTable);
if (!TableDesc->Pointer)
{
Status = AcpiTbVerifyTable (TableDesc);
if (ACPI_FAI... | false | false | false | false | false | 0 |
dsc_parse_order(CDSC *dsc)
{
char *p;
if ((dsc->page_order != CDSC_ORDER_UNKNOWN) &&
(dsc->scan_section == scan_comments)) {
int rc = dsc_error(dsc, CDSC_MESSAGE_DUP_COMMENT, dsc->line,
dsc->line_length);
switch (rc) {
case CDSC_RESPONSE_OK:
case C... | false | false | false | false | false | 0 |
instr2instrSC(
SmallVectorImpl<MachineInstr *> &Instrs,
SmallVectorImpl<const MCSchedClassDesc *> &InstrsSC) {
for (auto *InstrPtr : Instrs) {
unsigned Opc = InstrPtr->getOpcode();
unsigned Idx = TII->get(Opc).getSchedClass();
const MCSchedClassDesc *SC = SchedModel.getSchedClassDesc(Idx);
Ins... | false | false | false | false | false | 0 |
mailimf_resent_bcc_parse(const char * message, size_t length,
size_t * index, struct mailimf_bcc ** result)
{
struct mailimf_address_list * addr_list;
struct mailimf_bcc * bcc;
size_t cur_token;
int r;
int res;
cur_token = * index;
bcc = NULL;
r = mailimf_token_case_insensitive_parse(message, leng... | false | false | false | false | false | 0 |
seqReadCodata(AjPSeq thys, AjPSeqin seqin)
{
AjPFilebuff buff;
AjBool ok = ajTrue;
AjBool done = ajFalse;
buff = seqin->Input->Filebuff;
if(!ajTextinStoreReadline(seqin->Input, &seqReadLine, &thys->TextPtr))
return ajFalse;
ajDebug("first line '%S'\n", seqReadLine);
if(!ajStrPref... | false | false | false | false | false | 0 |
login_callback(){
int user = nCallbackLoginLogout::User();
if ( sn_GetNetState() != nSERVER || user == 0 || user > MAXCLIENTS )
return;
se_serverLag[user].Reset();
se_serverLag[user].SetClient(user);
} | false | false | false | false | false | 0 |
fetch_operand(struct sim_device *dev,
int amode, int reg, int is_byte,
uint16_t *addr_ret, uint32_t *data_ret)
{
uint16_t addr = 0;
uint32_t mask = is_byte ? 0xff : 0xffff;
switch (amode) {
case MSP430_AMODE_REGISTER:
if (reg == MSP430_REG_R3) {
if (data_ret)
*data_ret = 0;
return 0;
}
if (... | false | false | false | false | false | 0 |
onDestructionStarted(WindowEventArgs& e)
{
// if we are attached to a menuitem, we make sure that gets updated
Window* p = getParent();
if (p && p->testClassName("MenuItem"))
{
static_cast<MenuItem*>(p)->setPopupMenu(0);
}
MenuBase::onDestructionStarted(e);
} | false | false | false | false | false | 0 |
OnTestCaseEnd(const TestCase& test_case) {
Send(String::Format("event=TestCaseEnd&passed=%d&elapsed_time=%sms\n",
test_case.Passed(),
StreamableToString(test_case.elapsed_time()).c_str()));
} | false | false | false | false | false | 0 |
stp_flush_debug_messages(stp_vars_t *v)
{
int verified_flag = stp_get_verified(v);
debug_msgbuf_t *msgbuf = (debug_msgbuf_t *)stp_get_errdata(v);
stp_set_errfunc((stp_vars_t *) v, msgbuf->ofunc);
stp_set_errdata((stp_vars_t *) v, msgbuf->odata);
stp_set_verified((stp_vars_t *) v, verified_flag);
if (msgbuf-... | false | false | false | false | false | 0 |
show ()
{
fixed = gtk_fixed_new ();
gtk_fixed_set_has_window(GTK_FIXED(fixed),TRUE);
gtk_widget_set_size_request (fixed, Skin->skim.dialog.w,
Skin->skim.dialog.h);
gtk_fixed_put (GTK_FIXED (g_pReciteWord->fixed), fixed,
(Skin->reciteword.width - Skin->skim.dialog.w) / 2,
(Skin->reciteword... | false | false | false | false | false | 0 |
writeHandler(std::ostream& ostr)
{
ostr << "void " << _class << "::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)\n";
ostr << "{\n";
writeResponse(ostr);
if (_page.has("page.precondition"))
{
ostr << "\tif (!(" << _page.get("page.precondition") << ")) return;\n\n";
... | false | false | false | false | false | 0 |
rsym_occurrences(int symbol, Topform c)
{
int n = 0;
Literals lit;
for (lit = c->literals; lit; lit = lit->next)
if (SYMNUM(lit->atom) == symbol)
n++;
return n;
} | false | false | false | false | false | 0 |
shadertype_to_opengl(CL_ShaderType type)
{
switch (type)
{
case cl_shadertype_vertex:
return CL_VERTEX_SHADER;
case cl_shadertype_fragment:
return CL_FRAGMENT_SHADER;
default:
throw CL_Error("Unknown shader type!");
}
} | false | false | false | false | false | 0 |
elm_naviframe_item_simple_promote(Evas_Object *obj,
Evas_Object *content)
{
Elm_Naviframe_Item *itr;
ELM_NAVIFRAME_CHECK(obj);
ELM_NAVIFRAME_DATA_GET(obj, sd);
EINA_INLIST_FOREACH (sd->stack, itr)
{
if (elm_object_item_content_get((Elm_Object_Item *)itr) == c... | false | false | false | false | false | 0 |
abi_widget_get_content(AbiWidget * w, const char * extension_or_mimetype, const char * exp_props, gint * iLength)
{
UT_return_val_if_fail(w && w->priv, NULL);
UT_return_val_if_fail(w->priv->m_pDoc, NULL);
IEFileType ieft = s_abi_widget_get_file_type(extension_or_mimetype, NULL, 0, false);
// Don't put this auto-s... | false | false | false | false | false | 0 |
CheckControl(char *ctrl)
{
char *p;
char *q;
char save;
/* Snip off the first word. */
for (p = ctrl; ISWHITE(*p); p++)
continue;
for (ctrl = p; *p && !ISWHITE(*p); p++)
continue;
if (p == ctrl)
return "Empty control message";
save = *p;
*p = '\0';
if (strcasecmp(ctrl, "canc... | false | false | false | false | false | 0 |
elf_load_segment ( struct image *image, Elf_Phdr *phdr,
Elf_Ehdr *ehdr, physaddr_t *entry,
physaddr_t *max ) {
physaddr_t dest;
physaddr_t end;
userptr_t buffer;
unsigned long e_offset;
int rc;
/* Do nothing for non-PT_LOAD segments */
if ( phdr->p_type != PT_LOAD )
return 0;
/* Check segm... | false | false | false | false | false | 0 |
bus_panel_proxy_register_properties (BusPanelProxy *panel,
IBusPropList *prop_list)
{
g_assert (BUS_IS_PANEL_PROXY (panel));
g_assert (IBUS_IS_PROP_LIST (prop_list));
GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)prop_list);
g_dbus_proxy_ca... | false | false | false | false | false | 0 |
operator<<(XMLOutput& out, ios_base& (*val)(ios_base&))
{
ostringstream s;
s << val;
out.print(s.str().c_str());
return out;
} | false | false | false | false | false | 0 |
provider_changed_cb (GeoclueMasterClient *client,
char *iface,
char *name,
char *description,
gpointer userdata)
{
if (strlen (name) == 0) {
g_print ("No provider available\n");
} else {
g_print ("now using provider: %s\n", name)... | false | false | false | false | false | 0 |
sdbm_close_internal(DBM *db, bool clearfiles, bool destroy)
{
sdbm_check(db);
#ifdef LRU
if (!clearfiles && db->dirbuf_dirty && !(db->flags & DBM_BROKEN))
flush_dirbuf(db);
lru_close(db);
#else
WFREE_NULL(db->pagbuf, DBM_PBLKSIZ);
#endif
WFREE_NULL(db->dirbuf, DBM_DBLKSIZ);
fd_forget_and_close(&db->dirf);
fd_... | false | false | false | false | false | 0 |
sky2_rx_submit(struct sky2_port *sky2,
const struct rx_ring_info *re)
{
int i;
sky2_rx_add(sky2, OP_PACKET, re->data_addr, sky2->rx_data_size);
for (i = 0; i < skb_shinfo(re->skb)->nr_frags; i++)
sky2_rx_add(sky2, OP_BUFFER, re->frag_addr[i], PAGE_SIZE);
} | false | false | false | false | false | 0 |
set_h(int i, float v) {
if (!(i < 0 || i >= MAXH)) {
h[i] = v;
}
} | 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.