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 |
|---|---|---|---|---|---|---|
setBorderColor(UT_RGBColor clr)
{
m_borderColor = clr;
UT_String s = UT_String_sprintf("%02x%02x%02x", clr.m_red, clr.m_grn, clr.m_blu);
m_vecProps.addOrReplaceProp("left-color", s.c_str());
m_vecProps.addOrReplaceProp("right-color", s.c_str());
m_vecProps.addOrReplaceProp("top-color", s.c_str());
m_v... | false | false | false | false | false | 0 |
getRandomSurfacePoint(Vector3& p, Vector3& N) const {
float h = height();
float r = radius();
// Create a random point on a standard cylinder and then rotate to the global frame.
// Relative areas (factor of 2PI already taken out)
float capRelArea = square(r) / 2.0f;
float sideRelArea = r * h... | false | false | false | false | false | 0 |
string_array_contains (char **array,
const char *str)
{
char **p;
if (!array)
return FALSE;
for (p = array; *p; p++)
if (g_ascii_strcasecmp (*p, str) == 0) {
return TRUE;
}
return FALSE;
} | false | false | false | false | false | 0 |
setIndirectBoundaries(uint32_t indexR, uint32_t *start, uint32_t *end) {
// Set values for the top - TODO: once we have values for all the indirects, we are going
// to initalize here.
ucolIndirectBoundaries[indexR].startCE = start[0];
ucolIndirectBoundaries[indexR].startContCE = start[1];
if(end) ... | false | false | false | false | false | 0 |
grl_metadata_store_source_store_metadata (GrlSource *source,
GrlSourceStoreMetadataSpec *sms)
{
GRL_DEBUG ("grl_metadata_store_source_set_metadata");
const gchar *media_id, *source_id;
GError *error = NULL;
GList *failed_keys = NULL;
source_id = grl_media_get_source... | false | false | false | false | false | 0 |
remove_object_files(const char *odb_dir, object_data *d)
{
if (gitfo_unlink(d->file) < 0) {
fprintf(stderr, "can't delete object file \"%s\"\n", d->file);
return -1;
}
if ((gitfo_rmdir(d->dir) < 0) && (errno != ENOTEMPTY)) {
fprintf(stderr, "can't remove object directory \"%s\"\n", d->dir);
return -1;
}
i... | false | false | false | false | false | 0 |
zx_scan_pi_or_comment(struct zx_ctx* c)
{
const char* name;
char quote;
switch (*c->p) {
case '?': /* processing instruction <?xml ... ?> */
name = c->p-1;
DD("Processing Instruction detected (%.*s)", 5, name);
while (1) {
quote = '>';
ZX_LOOK_FOR(c,'>');
if (c->p[-1] == '?')
br... | false | false | false | false | true | 1 |
str16ncpy(dest, src, n)
char16 *dest, *src;
size_t n;
{
while ((n > 0) && *src)
{
*dest++ = *src++;
n--;
}
*dest = 0; /* We always terminate the string here */
} | false | false | false | false | false | 0 |
get_seed_file_info( char *file_name, seed_file_info* file_info,
bool print_file_info ) {
FILE *file_handle = NULL;
uint8_t *buffer = NULL;
long end_offset;
long file_length;
long records_read;
seed_header header_seed; /* SEED header struct*/
uint8_t* header_ptr = NU... | false | false | false | false | true | 1 |
profile_enter( OBJECT * rulename, profile_frame * frame )
{
if ( DEBUG_PROFILE )
{
clock_t start = clock();
profile_info * p;
if ( !profile_hash && rulename )
profile_hash = hashinit( sizeof( profile_info ), "profile" );
if ( rulename )
{
int fou... | false | false | false | false | false | 0 |
bnx2_init_rxbd_rings(struct bnx2_rx_bd *rx_ring[], dma_addr_t dma[],
u32 buf_size, int num_rings)
{
int i;
struct bnx2_rx_bd *rxbd;
for (i = 0; i < num_rings; i++) {
int j;
rxbd = &rx_ring[i][0];
for (j = 0; j < BNX2_MAX_RX_DESC_CNT; j++, rxbd++) {
rxbd->rx_bd_len = buf_size;
rxbd->rx_bd_flags =... | false | false | false | false | false | 0 |
msgcache_write_tags(MsgInfo *msginfo, FILE *fp)
{
GSList *cur = msginfo->tags;
int w_err = 0, wrote = 0;
WRITE_CACHE_DATA_INT(msginfo->msgnum, fp);
for (; cur; cur = cur->next) {
gint id = GPOINTER_TO_INT(cur->data);
if (tags_get_tag(id) != NULL) {
WRITE_CACHE_DATA_INT(id, fp);
}
}
WRITE_CACHE_DATA_INT(... | false | false | false | false | false | 0 |
io_tofilep(lua_State *L)
{
if (!(L->base < L->top && tvisudata(L->base) &&
udataV(L->base)->udtype == UDTYPE_IO_FILE))
lj_err_argtype(L, 1, "FILE*");
return (IOFileUD *)uddata(udataV(L->base));
} | false | false | false | false | false | 0 |
show_ggvis_window (GtkAction *action, PluginInstance *inst)
{
GSList *l;
GGobiData *d;
gboolean ok = false;
/* Before doing anything, make sure there is input data, and that
it includes an edge set */
if (g_slist_length(inst->gg->d) < 1) {
g_printerr ("ggvis: can't initialize without data\n");
r... | false | false | false | false | false | 0 |
TrimRepresentation(Vector<char> representation) {
int len = strlen(representation.start());
int i;
for (i = len - 1; i >= 0; --i) {
if (representation[i] != '0') break;
}
representation[i + 1] = '\0';
} | false | false | false | false | false | 0 |
remove_block_if_useless (MonoCompile *cfg, MonoBasicBlock *bb, MonoBasicBlock *previous_bb) {
MonoBasicBlock *target_bb = NULL;
MonoInst *inst;
/* Do not touch handlers */
if (bb->region != -1) {
bb->not_useless = TRUE;
return FALSE;
}
MONO_BB_FOR_EACH_INS (bb, inst) {
switch (inst->opcode) {
case OP_N... | false | false | false | false | false | 0 |
preprocess(std::istream &istr, std::map<std::string, std::string> &result, const std::string &filename, const std::list<std::string> &includePaths)
{
std::list<std::string> configs;
std::string data;
preprocess(istr, data, configs, filename, includePaths);
for (std::list<std::string>::const_iterator it ... | false | false | false | false | false | 0 |
Xsettimeout(fp, timeout)
XFILE *fp;
int timeout;
{
if (checkfp(fp, 0) < 0) return;
fp -> timeout = timeout;
} | false | false | false | false | false | 0 |
lbcd_proto2_convert(struct lbcd_reply *lb)
{
uint32_t weightval_i;
uint16_t weightval_s;
/* Convert host weight to a short, handling network byte order */
weightval_i = ntohl(lb->weights[0].host_weight);
if (weightval_i > (uint16_t) -1)
weightval_s = (uint16_t) -1;
else
weightva... | false | false | false | false | false | 0 |
cp_parser_objc_method_definition_list (cp_parser* parser)
{
cp_token *token = cp_lexer_peek_token (parser->lexer);
while (token->keyword != RID_AT_END && token->type != CPP_EOF)
{
tree meth;
if (token->type == CPP_PLUS || token->type == CPP_MINUS)
{
cp_token *ptk;
tree sig, attribute;
bo... | false | false | false | false | false | 0 |
globus_l_gass_copy_ftp_read_callback(
void * callback_arg,
globus_ftp_client_handle_t * handle,
globus_object_t * error,
globus_byte_t * bytes,
globus_size_t nbytes,
globus_off_t offset,
globus_boo... | false | false | false | false | false | 0 |
nvpair_database_insert( struct nvpair_database *db, const char *key, struct nvpair *nv )
{
struct nvpair *old = hash_table_remove(db->table,key);
hash_table_insert(db->table,key,nv);
if(db->logdir) {
if(old) {
log_updates(db,key,old,nv);
nvpair_delete(old);
} else {
log_create(db,key,nv);
}
}
lo... | false | false | false | false | true | 1 |
ValidateBaseCode()
{
bool pass = true, fail;
byte data[255];
for (unsigned int i=0; i<255; i++)
data[i] = i;
const char *hexEncoded =
"000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627"
"28292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F"
"505152535455... | false | false | false | false | false | 0 |
setinst(unsigned char chan)
{
unsigned char op = op_table[chan];
unsigned short insnr = channel[chan].inst;
// set instrument data
opl->write(0x63 + op, inst[insnr].data[0]);
opl->write(0x83 + op, inst[insnr].data[1]);
opl->write(0x23 + op, inst[insnr].data[3]);
opl->write(0xe3 + op, inst[insnr].data[4])... | false | false | false | false | false | 0 |
rtw_ies_remove_ie23a(u8 *ies, uint *ies_len, uint offset, u8 eid,
u8 *oui, u8 oui_len)
{
int ret = _FAIL;
u8 *target_ie;
u32 target_ielen;
u8 *start;
uint search_len;
if (!ies || !ies_len || *ies_len <= offset)
goto exit;
start = ies + offset;
search_len = *ies_len - offset;
while (1) {
target_i... | false | false | false | false | false | 0 |
setup_convert_check(struct git_attr_check *check)
{
static struct git_attr *attr_crlf;
static struct git_attr *attr_ident;
static struct git_attr *attr_filter;
if (!attr_crlf) {
attr_crlf = git_attr("crlf", 4);
attr_ident = git_attr("ident", 5);
attr_filter = git_attr("filter", 6);
user_convert_tail = &use... | false | false | false | false | false | 0 |
_c2s_component_presence(c2s_t c2s, nad_t nad) {
int attr;
char from[1024];
sess_t sess;
union xhashv xhv;
if((attr = nad_find_attr(nad, 0, -1, "from", NULL)) < 0) {
nad_free(nad);
return;
}
strncpy(from, NAD_AVAL(nad, attr), NAD_AVAL_L(nad, attr));
from[NAD_AVAL_L(nad, ... | false | false | false | false | true | 1 |
wbcg_find_for_workbook (Workbook *wb,
WBCGtk *candidate,
GdkScreen *pref_screen,
GdkDisplay *pref_display)
{
gboolean has_screen, has_display;
g_return_val_if_fail (IS_WORKBOOK (wb), NULL);
g_return_val_if_fail (candidate == NULL || IS_WBC_GTK (candidate), NULL);
if (candidate && wb_control_get_workbook ... | false | false | false | false | false | 0 |
edit_input_c2d(byte b)
{
int h = -1;
if (b >= '0' && b <= '9') {
h = b-'0';
}
return h;
} | false | false | false | false | false | 0 |
Compute_Head_CRC(FILE *ptx, dword Offset,byte hdr_size)
{
byte CRC = 0, tmp, i;
fseek(ptx,Offset+2,0);
fo... | false | false | false | false | true | 1 |
btt_data_read(struct arena_info *arena, struct page *page,
unsigned int off, u32 lba, u32 len)
{
int ret;
u64 nsoff = to_namespace_offset(arena, lba);
void *mem = kmap_atomic(page);
ret = arena_read_bytes(arena, nsoff, mem + off, len);
kunmap_atomic(mem);
return ret;
} | false | false | false | false | false | 0 |
vvcopy(vvec *src, vvec *dest)
{
char *newbase;
if(src->base == NULL) {
*dest = *src;
} else {
vvneeds(dest, src->allocated);
newbase = dest->base;
*dest = *src;
dest->base = newbase;
memcpy(dest->base, src->base, dest->allocated * dest->elsize);
}
} | false | true | false | false | false | 1 |
IsEditorBaseOpen(EditorBase* eb)
// ----------------------------------------------------------------------------
{
cbAuiNotebook* m_pNotebook = Manager::Get()->GetEditorManager()->GetNotebook();
for (size_t i = 0; i < m_pNotebook->GetPageCount(); ++i)
{
//wxWindow* winPage = m_pNotebook->GetPage(i);... | false | false | false | false | false | 0 |
real2complex(int count, Pointer from, Pointer to, int itemsize)
{
int i;
Pointer efrom, eto;
efrom = INC(from, itemsize * (count-1));
eto = INC(to, 2 * itemsize * (count-1));
for (i=count; i>0; i--) {
memset(eto, '\0', itemsize);
eto = DEC(to, itemsize);
memcpy(efrom, eto, itemsize);
efrom = DE... | false | true | false | false | false | 1 |
simplify_merge_declarations_of_blocks_in_func(struct stmt *fb)
{
struct stmt *cs;
int retval;
retval = 0;
for (cs = fb->stmt_first; cs; cs = cs->next) {
retval |= simplify_merge_declarations_to_func(fb, cs);
}
return retval;
} | false | false | false | false | false | 0 |
CreateMessageLegacy( void ) const
{
nDescriptor * descriptor = this->DoGetDescriptorLegacy();
if ( descriptor )
{
nMessage* m = tNEW( nMessage )( *descriptor );
this->DoFillToMessageLegacy( *m );
return m;
}
else
{
retur... | false | false | false | false | false | 0 |
DruidPassable (float x, float y)
{
finepoint testpos[DIRECTIONS + 1];
int ret = -1;
int i;
/* get 8 Check-Points on the druidsurface */
testpos[OBEN].x = x;
testpos[OBEN].y = y - Droid_Radius;
testpos[RECHTSOBEN].x = x + Droid_Radius;
testpos[RECHTSOBEN].y = y - Droid_Radius;
testpos[RECHTS].x = x + ... | false | false | false | false | false | 0 |
sh_eth_set_ringparam(struct net_device *ndev,
struct ethtool_ringparam *ring)
{
struct sh_eth_private *mdp = netdev_priv(ndev);
int ret;
if (ring->tx_pending > TX_RING_MAX ||
ring->rx_pending > RX_RING_MAX ||
ring->tx_pending < TX_RING_MIN ||
ring->rx_pending < RX_RING_MIN)
return -EINVAL;
if ... | false | false | false | false | false | 0 |
register_commands_configure_med(struct cmd_node *configure, struct cmd_node *unconfigure)
{
if (lldpctl_key_get_map(
lldpctl_k_med_policy_type)[0].string == NULL)
return;
struct cmd_node *configure_med = commands_new(
configure,
"med", "MED configuration",
NULL, NULL, NULL);
struct cmd_node *unconfigu... | false | false | false | false | false | 0 |
mkplan(const solver *ego, const problem *p_, planner *plnr)
{
const problem_dft *p;
P *pln;
INT n;
static const plan_adt padt = {
X(dft_solve), awake, print, X(plan_null_destroy)
};
if (!applicable(ego, p_, plnr))
return (plan *)0;
pln = MKPLAN_DFT(P, &padt, apply);
... | false | false | false | false | false | 0 |
compute_slopes(GwyDataField *dfield,
gint kernel_size,
GwyDataField *xder,
GwyDataField *yder)
{
gint xres, yres;
gdouble minxd, maxxd, minyd, maxyd;
xres = gwy_data_field_get_xres(dfield);
yres = gwy_data_field_get_yres(dfield);
if (kernel_size) {
... | false | false | false | false | false | 0 |
MapFirst(const OBMol *queried, Mapping &map, const OBBitVec &mask)
{
class MapFirstFunctor : public Functor
{
private:
Mapping &m_map;
public:
MapFirstFunctor(Mapping &map) : m_map(map)
{
}
bool operator()(Mapping &map... | false | false | false | false | false | 0 |
kml_wr_init(const char* fname)
{
char u = 's';
waypt_init_bounds(&kml_bounds);
kml_time_min = 0;
kml_time_max = 0;
if (opt_units) {
u = tolower(opt_units[0]);
}
switch (u) {
case 's':
fmt_setunits(units_statute);
break;
case 'm':
fmt_setunits(units_metric);
break;
case 'n':
... | false | false | false | false | false | 0 |
getCellAtRowColumn(UT_sint32 row, UT_sint32 col) const
{
UT_Point pt;
pt.x = col;
pt.y = row;
if((row >= getNumRows()) || (row <0))
{
return NULL;
}
if((col >= getNumCols()) || (col < 0))
{
return NULL;
}
UT_sint32 u =-1;
u = binarysearchCons(&pt, compareCellPosBinary);
if (u != -1)
{
fp_CellContaine... | false | false | false | false | false | 0 |
dump()
{
for (unsigned int i=0 ; i<dest.size() ; i++)
{
fputc(dest[i], stdout);
}
} | false | false | false | false | false | 0 |
gth_transform_resize (cairo_matrix_t *matrix,
GthTransformResize resize,
cairo_rectangle_int_t *original,
cairo_rectangle_int_t *boundary)
{
int x1, y1, x2, y2;
x1 = original->x;
y1 = original->y;
x2 = original->x + original->width;
y2 = original->y + original->height;
switch ... | false | false | false | false | false | 0 |
ppd_add_size(ppd_file_t *ppd, /* I - PPD file */
const char *name) /* I - Name of size */
{
ppd_size_t *size; /* Size */
if (ppd->num_sizes == 0)
size = malloc(sizeof(ppd_size_t));
else
size = realloc(ppd->sizes, sizeof(ppd_size_t) * (ppd->num_sizes + 1));
if (size == NULL)
retur... | false | false | false | false | false | 0 |
generateEvalCode(CompileState* comp)
{
// This is basically just a number cast
OpValue curV = expr->generateEvalCode(comp);
if (curV.type != OpType_number) {
OpValue numVal;
CodeGen::emitConvertTo(comp, &curV, OpType_number, &numVal);
curV = numVal;
}
return curV;
} | false | false | false | false | false | 0 |
mar_parse_dqt (PJDEC_INST g)
{
int len, i;
BYTE pt;
long *tbl_p;
len = read_uint(g) - 2;
while (len >= 65) {
len -= 65;
pt = read_byte (g);
if ((pt & 0xfcu) != 0)
longjmp (g->syntax_error, NOT_IMPLEMENTED);
tbl_p = g->quant_tbls[pt & 3];
DUMP ... | false | false | false | false | false | 0 |
port100_tg_set_rf(struct nfc_digital_dev *ddev, u8 rf)
{
struct port100 *dev = nfc_digital_get_drvdata(ddev);
struct sk_buff *skb;
struct sk_buff *resp;
int rc;
if (rf >= NFC_DIGITAL_RF_TECH_LAST)
return -EINVAL;
skb = port100_alloc_skb(dev, sizeof(struct port100_tg_rf_setting));
if (!skb)
return -ENOMEM;
... | false | true | false | false | false | 1 |
checkDatabaseVersion()
{
QSqlDatabase DB = QSqlDatabase::database(Constants::DB_TEMPLATES_NAME);
if (!connectDatabase(DB, __LINE__)) {
return;
}
DB.transaction();
QSqlQuery query(DB);
QString version;
if (query.exec(q->select(Constants::Table_Versi... | false | false | false | false | false | 0 |
acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
{
int trips = 0;
int result;
acpi_status status;
int i;
if (tz->trips.critical.flags.valid)
trips++;
if (tz->trips.hot.flags.valid)
trips++;
if (tz->trips.passive.flags.valid)
trips++;
for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE &&
tz->trips.a... | false | false | false | false | false | 0 |
jws_verify_init(jws_t* obj, const char* compact, size_t compactlen)
{
char* ptr;
size_t len;
memset(obj, 0, sizeof(jws_t));
obj->mode = JWS_MODE_VERIFY;
// set up pointer and sizes to the parts
obj->compact = compact;
obj->compactlen = compactlen;
ptr = memchr(compact, '.', compactlen);
if (ptr ==... | false | false | false | false | false | 0 |
tds_process_cancel(TDSSOCKET * tds)
{
CHECK_TDS_EXTRA(tds);
/* silly cases, nothing to do */
if (!tds->in_cancel)
return TDS_SUCCEED;
/* TODO handle cancellation sending data */
if (tds->state != TDS_PENDING)
return TDS_SUCCEED;
/* TODO support TDS5 cancel, wait for cancel packet first, then wait for done *... | false | false | false | false | false | 0 |
emit_text(const char *buf, int size)
{
struct token *tok;
int i;
for (i = 0; i < size; i++) {
int c = buf[i];
if (c == '@' || c == '`' || c == '*' || c == '\n' || c == '\\' || c == '\t')
break;
}
tok = new_token(TOK_TEXT);
tok->text = buf;
tok->len = i;
emit_token(tok);
return i;
} | false | false | false | false | false | 0 |
_gcry_mpi_mod_barrett (gcry_mpi_t r, gcry_mpi_t x, mpi_barrett_t ctx)
{
gcry_mpi_t m = ctx->m;
int k = ctx->k;
gcry_mpi_t y = ctx->y;
gcry_mpi_t r1 = ctx->r1;
gcry_mpi_t r2 = ctx->r2;
mpi_normalize (x);
if (mpi_get_nlimbs (x) > 2*k )
{
mpi_mod (r, x, m);
return;
}
/* 1. q1 = floor(... | false | false | false | false | false | 0 |
snd_pcm_hooks_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
{
snd_pcm_hooks_t *h = pcm->private_data;
struct list_head *pos, *next;
int err = snd_pcm_generic_hw_params(pcm, params);
if (err < 0)
return err;
list_for_each_safe(pos, next, &h->hooks[SND_PCM_HOOK_TYPE_HW_PARAMS]) {
snd_pcm_hook_t *hook = ... | false | false | false | false | false | 0 |
rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
enum dev_state state)
{
u32 reg, reg2;
unsigned int i;
char put_to_sleep;
char bbp_state;
char rf_state;
put_to_sleep = (state != STATE_AWAKE);
rt2x00mmio_register_read(rt2x00dev, PWRCSR1, ®);
rt2x00_set_field32(®, PWRCSR1_SET_STATE, 1);
rt2x0... | false | false | false | false | false | 0 |
unpack(const struct optstruct *opts)
{
char name[512], *dbdir;
const char *localdbdir = NULL;
if(optget(opts, "datadir")->active)
localdbdir = optget(opts, "datadir")->strarg;
if(optget(opts, "unpack-current")->enabled) {
dbdir = freshdbdir();
snprintf(name, sizeof(name), "%s"PATHSEP"%s.cvd", localdbdir ... | false | false | false | false | false | 0 |
team_nl_team_get(struct genl_info *info)
{
struct net *net = genl_info_net(info);
int ifindex;
struct net_device *dev;
struct team *team;
if (!info->attrs[TEAM_ATTR_TEAM_IFINDEX])
return NULL;
ifindex = nla_get_u32(info->attrs[TEAM_ATTR_TEAM_IFINDEX]);
dev = dev_get_by_index(net, ifindex);
if (!dev || dev->... | false | false | false | false | false | 0 |
max_version (
char * pathname)
{
char * p;
char * filename;
int pathlen = strlen (pathname);
int version;
p = pathname + pathlen - 1;
while ((p > pathname) && (*p != '/'))
{
p--;
}
if (*p == '/')
{
int dirlen = p - pathname;
char *dirname;
... | false | true | false | false | true | 1 |
set_previous_curve_callback(GtkObject *button, gpointer xopt)
{
option_t *opt = (option_t *)xopt;
GtkWidget *gcurve =
GTK_WIDGET(STPUI_GAMMA_CURVE(opt->info.curve.gamma_curve)->curve);
const stp_curve_t *seed = opt->info.curve.current;
if (!seed)
seed = opt->info.curve.deflt;
set_stpui_curve_values(gc... | false | false | false | false | false | 0 |
SOCKET_update_timeout(CSOCKET_COMMON *socket)
{
struct timeval timeout;
if (socket->socket < 0)
return TRUE;
timeout.tv_sec = socket->timeout / 1000;
timeout.tv_usec = (socket->timeout % 1000) * 1000;
if (setsockopt(socket->socket, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) < 0)
{
GB.Error("Can... | false | false | false | false | false | 0 |
QTNEq(QTNode *a, QTNode *b)
{
uint32 sign = a->sign & b->sign;
if (!(sign == a->sign && sign == b->sign))
return 0;
return (QTNodeCompare(a, b) == 0) ? true : false;
} | false | false | false | false | false | 0 |
mpir_set_executable_names(const char *executable_name)
{
#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P
/* Use symbols from the runjob.so library provided by IBM.
* Do NOT use debugger symbols local to the srun command */
#else
int i;
for (i = 0; i < MPIR_proctable_size; i++) {
MPIR_proctable[i].executable_n... | false | false | false | false | false | 0 |
GetValues( double &x, double &y )
{
if( xTC_->GetValue().empty() )
{
wxMessageDialog *md = new wxMessageDialog( this, wxT("Please enter an x-coordinate value"),
wxT("Error"), wxOK|wxICON_INFORMATION );
md->ShowModal();
return false;
}
if( yTC_->GetValue... | false | false | false | false | false | 0 |
destroyAllTextureTargets()
{
while (!d_pimpl->d_textureTargets.empty())
destroyTextureTarget(*d_pimpl->d_textureTargets.begin());
} | false | false | false | false | false | 0 |
adjuststack (LexState *ls, int n) {
if (n > 0)
code_oparg(ls, POP, 2, n-1, -n);
else if (n < 0)
code_oparg(ls, PUSHNIL, 1, (-n)-1, -n);
} | false | false | false | false | false | 0 |
l1_info4_ind(struct FsmInst *fi, int event, void *arg)
{
struct layer1 *l1 = fi->userdata;
mISDN_FsmChangeState(fi, ST_L1_F7);
l1->dcb(l1->dch, INFO3_P8);
if (test_and_clear_bit(FLG_L1_DEACTTIMER, &l1->Flags))
mISDN_FsmDelTimer(&l1->timerX, 4);
if (!test_bit(FLG_L1_ACTIVATED, &l1->Flags)) {
if (test_and_clear... | false | false | false | false | false | 0 |
spi_erase_eeprom_byte(struct rtsx_chip *chip, u16 addr)
{
int retval;
retval = spi_init_eeprom(chip);
if (retval != STATUS_SUCCESS) {
rtsx_trace(chip);
return STATUS_FAIL;
}
retval = spi_eeprom_program_enable(chip);
if (retval != STATUS_SUCCESS) {
rtsx_trace(chip);
return STATUS_FAIL;
}
rtsx_init_cmd... | false | false | false | false | false | 0 |
vn_reference_lookup_pieces (tree vuse, alias_set_type set, tree type,
VEC (vn_reference_op_s, heap) *operands,
vn_reference_t *vnresult, vn_lookup_kind kind)
{
struct vn_reference_s vr1;
vn_reference_t tmp;
tree cst;
if (!vnresult)
vnresult = &tmp;
*vnresult = NULL;
vr1.vuse = vuse ? SSA... | false | true | false | false | false | 1 |
print_oid_report(FILE * fp)
{
struct tree *tp;
clear_tree_flags(tree_head);
for (tp = tree_head; tp; tp = tp->next_peer)
print_subtree_oid_report(fp, tp, 0);
} | false | false | false | false | false | 0 |
big5_mbc_enc_len0(const UChar* p, const UChar* e, int tridx, const int tbl[])
{
int firstbyte = *p++;
state_t s = trans[tridx][firstbyte];
#define RETURN(n) \
return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
ONIGENC_CONSTRUCT_MBCLEN_INVALID()
if (s < 0) RETURN(1);
if (... | false | false | false | false | false | 0 |
tds_bcp_start(TDSSOCKET *tds, TDSBCPINFO *bcpinfo)
{
tdsdump_log(TDS_DBG_FUNC, "tds_bcp_start(%p, %p)\n", tds, bcpinfo);
tds_submit_query(tds, bcpinfo->insert_stmt);
/*
* In TDS 5 we get the column information as a result set from the "insert bulk" command.
* We're going to ignore it.
*/
if (tds_process_s... | false | false | false | false | false | 0 |
gretl_strdup (const char *src)
{
char *targ = NULL;
if (src != NULL) {
size_t n = strlen(src) + 1;
targ = malloc(n);
if (targ != NULL) {
memcpy(targ, src, n);
}
}
return targ;
} | false | false | false | false | false | 0 |
ocb_done_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned long ptlen,
unsigned char *ct, unsigned char *tag, unsigned long *taglen)
{
LTC_ARGCHK(ocb != NULL);
LTC_ARGCHK(pt != NULL);
LTC_ARGCHK(ct != NULL);
LTC_ARGCHK(tag != NULL);
LTC_ARGCHK(taglen != NULL);
... | false | false | false | false | false | 0 |
__ecereMethod_Documentor_Cycle(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int idle)
{
if(quit)
__ecereMethod___ecereNameSpace__ecere__gui__Window_Destroy(mainForm, 0);
return 0x1;
} | false | false | false | false | false | 0 |
createTypeDIE(const DICompositeType *Ty) {
auto *Context = resolve(Ty->getScope());
DIE *ContextDIE = getOrCreateContextDIE(Context);
if (DIE *TyDIE = getDIE(Ty))
return TyDIE;
// Create new type.
DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty);
constructTypeDIE(TyDIE, cast<DICompositeTyp... | false | false | false | false | false | 0 |
xmt_parse_mf_field(GF_XMTParser *parser, GF_FieldInfo *info, GF_Node *n, char *value)
{
u32 res;
GF_FieldInfo sfInfo;
sfInfo.fieldType = gf_sg_vrml_get_sf_type(info->fieldType);
sfInfo.name = info->name;
gf_sg_vrml_mf_reset(info->far_ptr, info->fieldType);
if (!value || !strlen(value)) return;
while (value[0] ... | false | false | false | false | false | 0 |
Initialize(vtkShaderProgram2* pgm,
vtkShader2Type mode)
{
if (this->Shader != pgm)
{
this->SetShader(pgm);
if (pgm)
{
vtkShader2 *s=vtkShader2::New();
s->SetSourceCode(vtkLightingHelper_s);
s->SetType(mode);
s->SetContext(this->Shader->GetContext());
this->Shader->Ge... | false | false | false | false | false | 0 |
setTCPNoDelay(PRFileDesc* fd)
{
PRStatus status = PR_SUCCESS;
PRSocketOptionData opt;
opt.option = PR_SockOpt_NoDelay;
opt.value.no_delay = PR_FALSE;
status = PR_GetSocketOption(fd, &opt);
if (status == PR_FAILURE) {
return;
}
opt.option = PR_SockOpt_NoDelay;
opt.value.no_del... | false | true | false | false | false | 1 |
poly_float(t_poly *x, t_float f)
{
int i;
t_voice *v;
t_voice *firston, *firstoff;
unsigned int serialon, serialoff, onindex = 0, offindex = 0;
if (x->x_vel > 0)
{
/* note on. Look for a vacant voice */
for (v = x->x_vec, i = 0, firston = firstoff = 0,
serialon =... | false | false | false | false | false | 0 |
H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc, H5B2_compare_t comp,
void *udata, H5B2_found_t op, void *op_data)
{
H5B2_internal_t *internal; /* Pointer to internal node */
unsigned idx; /* Locatio... | false | false | false | false | false | 0 |
dcb_settype (DCB_TYPEDEF * d, TYPEDEF * t)
{
int n ;
for (n = 0 ; n < MAX_TYPECHUNKS ; n++)
{
d->BaseType[n] = t->chunk[n].type ;
d->Count [n] = t->chunk[n].count ;
}
if (t->varspace) {
d->Members = dcb_varspace (t->varspace) ;
} else {
d->Members = NO_MEMBERS ;
}
} | false | false | false | false | false | 0 |
__lock_dump_object(lt, mbp, op)
DB_LOCKTAB *lt;
DB_MSGBUF *mbp;
DB_LOCKOBJ *op;
{
struct __db_lock *lp;
SH_TAILQ_FOREACH(lp, &op->holders, links, __db_lock)
__lock_printlock(lt, mbp, lp, 1);
SH_TAILQ_FOREACH(lp, &op->waiters, links, __db_lock)
__lock_printlock(lt, mbp, lp, 1);
return (0);
} | false | false | false | false | false | 0 |
fsl_asrc_dma_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
struct snd_card *card = rtd->card->snd_card;
struct snd_pcm_substream *substream;
struct snd_pcm *pcm = rtd->pcm;
int ret, i;
ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
if (ret) {
dev_err(card->dev, "failed to set DMA mask\n");
ret... | false | false | false | false | false | 0 |
contains_file(const char * file1, const char * file2) {
int result = 0;
char * ancestor = make_canonical_path(file1);
char * d = make_canonical_path(file2);
char * parent = make_dirname(d);
while (strcmp(d, parent) != 0) {
if (is_same_file(ancestor, parent)) {
result = 1;
break;
}
free... | false | false | false | false | false | 0 |
ecryptfs_read_update_atime(struct kiocb *iocb,
struct iov_iter *to)
{
ssize_t rc;
struct path *path;
struct file *file = iocb->ki_filp;
rc = generic_file_read_iter(iocb, to);
if (rc >= 0) {
path = ecryptfs_dentry_to_lower_path(file->f_path.dentry);
touch_atime(path);
}
return rc;
} | false | false | false | false | false | 0 |
tsi721_issue_pending(struct dma_chan *dchan)
{
struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan);
dev_dbg(dchan->device->dev, "%s: Enter\n", __func__);
if (tsi721_dma_is_idle(bdma_chan) && bdma_chan->active) {
spin_lock_bh(&bdma_chan->lock);
tsi721_advance_work(bdma_chan);
spin_unlock_bh(&bdma_chan-... | false | false | false | false | false | 0 |
enableAccessControls(bool enable) {
d->ownerPermCombo->setEnabled(enable);
d->groupPermCombo->setEnabled(enable);
d->othersPermCombo->setEnabled(enable);
if (d->extraCheckbox)
d->extraCheckbox->setEnabled(enable);
if ( d->cbRecursive )
d->cbRecursive->setEnabled(enable);
} | false | false | false | false | false | 0 |
fmpz_add(fmpz_t coeffs_out, const fmpz_t in1, const fmpz_t in2)
{
fmpz_t coeffs1 = in1;
fmpz_t coeffs2 = in2;
long carry;
unsigned long size1 = ABS(coeffs1[0]);
unsigned long size2 = ABS(coeffs2[0]);
if (size1 < size2)
{
SWAP_PTRS(coeffs1, coeffs2);
size1 = ABS(coeffs1[0]);
... | false | false | false | false | false | 0 |
ExecAssignment (
PTreeNode *pt,
ObjStruct *os,
int numInputs,
Pointer *inputs,
Pointer result,
InvalidComponentHandle *invalids,
InvalidComponentHandle outInvalid)
{
if (DefineSymbol(pt->u.s, os, inputs[0], invalids[0]) == ERROR)
return ERROR;
return _dxfComputeCopy(pt,
os,... | false | false | false | false | false | 0 |
power_supply_attr_is_visible(struct kobject *kobj,
struct attribute *attr,
int attrno)
{
struct device *dev = container_of(kobj, struct device, kobj);
struct power_supply *psy = dev_get_drvdata(dev);
umode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
int i;
if (attrno == POWER_SUPPLY_PROP_TYPE)
return ... | false | false | false | false | false | 0 |
knh_NameSpace_getcid(CTX ctx, kNameSpace *ns, kbytes_t sname)
{
DBG_ASSERT(IS_NameSpace(ns));
if(knh_bytes_equals(sname, STEXT("Script"))) {
return O_cid(K_GMASCR);
}
L_TAIL:
if(DP(ns)->name2ctDictSetNULL != NULL) {
const knh_ClassTBL_t *ct = (knh_ClassTBL_t*)knh_DictSet_get(ctx, DP(ns)->name2ctDictSetNULL, sn... | false | false | false | false | false | 0 |
NEGC(UINT32 m, UINT32 n)
{
UINT32 temp;
temp = sh2.r[m];
sh2.r[n] = -temp - (sh2.sr & T);
if (temp || (sh2.sr & T))
sh2.sr |= T;
else
sh2.sr &= ~T;
} | false | false | false | false | false | 0 |
showGLEWebsite() {
QUrl url("http://www.gle-graphics.org/");
QDesktopServices::openUrl(url);
} | false | false | false | false | false | 0 |
xmmsc_result_notifier_set_full (xmmsc_result_t *res, xmmsc_result_notifier_t func,
void *user_data, xmmsc_user_data_free_func_t free_func)
{
xmmsc_result_callback_t *cb;
x_return_if_fail (res);
x_return_if_fail (func);
/* The pending call takes one ref */
xmmsc_result_ref (res);
... | false | false | false | false | false | 0 |
setShellRadii(real *rshell) const
{
static const real facl[] = {
1.0, 1.33, 1.6, 1.83, 2.03, 2.22, 2.39, 2.55, 2.70, 2.84 };
real thlog = std::log(SET_SHELL_RADII_ORBITAL_THR);
int ishela, iprim;
for(ishela=0; ishela <bis.noOfShells; ishela++) {
const ShellSpecStruct& currShell = bis.sh... | false | false | false | false | false | 0 |
toLower(const string& name) {
// Copy string without initial and trailing blanks.
if (name.find_first_not_of(" \n\t\v\b\r\f\a") == string::npos) return "";
int firstChar = name.find_first_not_of(" \n\t\v\b\r\f\a");
int lastChar = name.find_last_not_of(" \n\t\v\b\r\f\a");
string temp = name.substr( firstC... | false | false | false | false | false | 0 |
copy_file(int fd, ext2_ino_t newfile)
{
ext2_file_t e2_file;
errcode_t retval;
int got;
unsigned int written;
char buf[8192];
char *ptr;
retval = ext2fs_file_open(current_fs, newfile,
EXT2_FILE_WRITE, &e2_file);
if (retval)
return retval;
while (1) {
got = read(fd, buf, sizeof(buf));
if (got =... | 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.