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 |
|---|---|---|---|---|---|---|
xmlSecGCryptKeyDataDsaAdoptKey(xmlSecKeyDataPtr data, gcry_sexp_t dsa_key) {
xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecGCryptKeyDataDsaId), -1);
xmlSecAssert2(dsa_key != NULL, -1);
return xmlSecGCryptAsymKeyDataAdoptKey(data, dsa_key);
} | false | false | false | false | false | 0 |
get_yank_buffer(writing)
int writing;
{
register int i;
yankappend = FALSE;
if (((yankbuffer == 0 && !writing) || yankbuffer == '"') && y_previous != NULL)
{
y_current = y_previous;
return;
}
i = yankbuffer;
if (isdigit(i))
i -= '0';
else if (islower(i))
i -= 'a' - 10;
else if (isupper(i))
{
i -=... | false | false | false | false | false | 0 |
SingletonFor(StackFrame::Type type,
StackFrame::State* state) {
if (type == StackFrame::NONE) return NULL;
StackFrame* result = SingletonFor(type);
ASSERT(result != NULL);
result->state_ = *state;
return result;
} | false | false | false | false | false | 0 |
sublis(alist, tree)
object alist, tree;
{
object x;
cs_check(alist);
for (x = alist; !endp(x); x = x->c.c_cdr) {
item_compared = car(x->c.c_car);
if (TEST(tree)) {
vs_check_push(cdr(x->c.c_car));
return;
}
}
if (type_of(tree) == t_cons) {
sublis(alist, tree->c.c_car);
sublis(alist, tree->c.c_cd... | false | false | false | false | false | 0 |
parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
UnicodeString& tzID, UTimeZoneTimeType* timeType /* = NULL */) const {
if (timeType) {
*timeType = UTZFMT_TIME_TYPE_UNKNOWN;
}
tzID.setToBogus();
int32_t startIdx = pos.getIndex();
UBool isGeneric = FA... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Test libi2d's BMP support", rcsid);
OFCommandLine cmd;
cmd.setOptionColumns(LONGCOL, SHORTCOL);
cmd.setParamColumn(LONGCOL + SHORTCOL + 4);
cmd.addGroup("general options:", LONGCOL, SHORTCOL + 2);
cmd.addOptio... | false | false | false | false | false | 0 |
ferode_2_64(l_uint32 *datad,
l_int32 w,
l_int32 h,
l_int32 wpld,
l_uint32 *datas,
l_int32 wpls)
{
l_int32 i;
register l_int32 j, pwpls;
register l_uint32 *sptr, *dptr;
pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */... | false | false | false | false | false | 0 |
textsnapshot_ctor(const fn_call& fn)
{
as_object* ptr = ensure<ValidThis>(fn);
MovieClip* mc = (fn.nargs == 1) ? fn.arg(0).toMovieClip() : 0;
ptr->setRelay(new TextSnapshot_as(mc));
return as_value();
} | false | false | false | false | false | 0 |
synctex_updater_free(synctex_updater_t updater){
if (NULL==updater) {
return;
}
if (updater->length>0) {
SYNCTEX_fprintf(SYNCTEX_FILE,"!%i\n",updater->length);
}
if (SYNCTEX_NO_GZ) {
fclose((FILE *)SYNCTEX_FILE);
} else {
gzclose((gzFile)SYNCTEX_FILE);
}
free(updater);
printf("... done.\n");
return;
} | false | false | false | false | false | 0 |
__logfs_seek_data(struct inode *inode, u64 bix)
{
struct logfs_inode *li = logfs_inode(inode);
if (bix < I0_BLOCKS) {
bix = seek_holedata_direct(inode, bix, 1);
if (bix < I0_BLOCKS)
return bix;
}
if (bix < maxbix(li->li_height)) {
if (!li->li_data[INDIRECT_INDEX])
bix = maxbix(li->li_height);
else
... | false | false | false | false | false | 0 |
signalListeners(UT_uint32 iSignal) const
{
if(m_bIgnoreSignals)
return true;
if(iSignal == PD_SIGNAL_UPDATE_LAYOUT)
{
m_iUpdateCount++;
}
else
{
m_iUpdateCount = 0;
}
if(m_iUpdateCount > 1)
{
return true;
}
PL_ListenerId lid;
PL_ListenerId lidCount = m_vecListeners.getItemCount();
// for each... | false | false | false | false | false | 0 |
spatial_compose97i_dy(DWTCompose *cs, IDWTELEM *buffer, int width, int height, int stride){
int y = cs->y;
IDWTELEM *b0= cs->b0;
IDWTELEM *b1= cs->b1;
IDWTELEM *b2= cs->b2;
IDWTELEM *b3= cs->b3;
IDWTELEM *b4= buffer + mirror(y+3, height-1)*stride;
IDWTELEM *b5= buffer + mirror(y+4, height-1)... | false | false | false | false | false | 0 |
matrix_replace_submatrix (gretl_matrix *M,
const gretl_matrix *S,
matrix_subspec *spec)
{
int mr = gretl_matrix_rows(M);
int mc = gretl_matrix_cols(M);
int sr = gretl_matrix_rows(S);
int sc = gretl_matrix_cols(S);
int sscalar = 0;
int err = 0;
if (spec == NULL) {
fprintf(... | false | false | false | false | false | 0 |
qla1280_reset_adapter(struct scsi_qla_host *ha)
{
struct device_reg __iomem *reg = ha->iobase;
ENTER("qla1280_reset_adapter");
/* Disable ISP chip */
ha->flags.online = 0;
WRT_REG_WORD(®->ictrl, ISP_RESET);
WRT_REG_WORD(®->host_cmd,
HC_RESET_RISC | HC_RELEASE_RISC | HC_DISABLE_BIOS);
RD_REG_WORD(&... | false | false | false | false | false | 0 |
append( FoliaElement *child ){
bool ok = false;
try {
ok = child->checkAtts();
ok = addable( child );
}
catch ( exception& ){
delete child;
throw;
}
if ( ok ){
child->fixupDoc( mydoc );
data.push_back(child);
if ( !child->_parent ) // Only for WordRef i ... | false | false | false | false | false | 0 |
_become_slurm_user(void)
{
gid_t slurm_user_gid;
/* Determine SlurmUser gid */
slurm_user_gid = gid_from_uid(slurmctld_conf.slurm_user_id);
if (slurm_user_gid == (gid_t) -1) {
fatal("Failed to determine gid of SlurmUser(%u)",
slurmctld_conf.slurm_user_id);
}
/* Initialize supplementary groups ID list ... | false | false | false | false | false | 0 |
crush_get_next_bucket_id(struct crush_map *map)
{
int pos;
for (pos=0; pos < map->max_buckets; pos++)
if (map->buckets[pos] == 0)
break;
return -1 - pos;
} | false | false | false | false | false | 0 |
cypress_protocol_handler(struct psmouse *psmouse)
{
struct cytp_data *cytp = psmouse->private;
if (psmouse->pktcnt >= cytp->pkt_size) {
cypress_process_packet(psmouse, 0);
return PSMOUSE_FULL_PACKET;
}
return cypress_validate_byte(psmouse);
} | false | false | false | false | false | 0 |
debug_max_secondary_weapons(object *objp)
{
int index;
ship *shipp = &Ships[objp->instance];
ship_info *sip = &Ship_info[shipp->ship_info_index];
ship_weapon *swp = &shipp->weapons;
for ( index = 0; index < MAX_SHIP_SECONDARY_BANKS; index++ )
{
swp->secondary_bank_ammo[index] = sip->secondary_bank_ammo_capacit... | false | false | false | false | false | 0 |
parse_port_sequence(char *sequence, opendoor_t *door)
{
char *num;
char *protocol;
char *port;
door->seqcount = 0; /* reset seqcount */
while((num = strsep(&sequence, ","))) {
if(door->seqcount >= SEQ_MAX) {
fprintf(stderr, "config: section %s: too many ports in knock sequence\n", door->name);
logprint("e... | false | false | false | false | false | 0 |
rli_end()
{
if (loglevel > 1)
logit(LOG_INFO, "rli_end:");
event_cancel(expire);
if (event_exists(rli_llupdates))
event_cancel(rli_llupdates);
if (event_exists(rli_bfupdates))
event_cancel(rli_bfupdates);
if (event_exists(rli_bfiupdates))
event_cancel(rli_bfiupdates);
if (senderlist) {
... | false | false | false | false | false | 0 |
tree_is_indexable (tree t)
{
if (TREE_CODE (t) == PARM_DECL)
return true;
else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t)
&& !TREE_STATIC (t))
return false;
/* Variably modified types need to be streamed alongside function
bodies because they can refer to local entities. Together... | false | false | false | false | false | 0 |
scsi_set_blocked(struct scsi_cmnd *cmd, int reason)
{
struct Scsi_Host *host = cmd->device->host;
struct scsi_device *device = cmd->device;
struct scsi_target *starget = scsi_target(device);
/*
* Set the appropriate busy bit for the device/host.
*
* If the host/device isn't busy, assume that something actual... | false | false | false | false | false | 0 |
transform_primary(const wchar_t* p1, const wchar_t* p2)
{
static wchar_t s_delim;
static const int s_collate_type = ::boost::re_detail::find_sort_syntax(static_cast<const c_regex_traits<wchar_t>*>(0), &s_delim);
std::wstring result;
//
// What we do here depends upon the format of the sort key returned ... | false | false | false | false | false | 0 |
n_set_phrase(struct Luser *lptr, struct NickInfo *nptr, int
ac, char **av)
{
char *prphrase;
if (ac < 4)
{
notice(n_NickServ, lptr->nick,
"Syntax: \002SET <nickname> PHRASE <newphrase>\002");
notice(n_NickServ, lptr->nick, ERR_MORE_INFO, n_NickServ,
"SET PHRASE");
return;
}
RecordCommand... | false | false | false | false | false | 0 |
APar_LocateDataReference(short chunk_offset_idx, FILE* file) {
uint32_t data_ref_idx = 0;
short sampletable_atom_idx = 0;
short minf_atom_idx = 0;
AtomicInfo *stsd_atom, *dinf_atom, *dref_atom, *target_reference_atom = NULL;
sampletable_atom_idx = APar_FindParentAtom(chunk_offset_idx, parsedAtoms[chunk_offset_id... | false | false | false | false | false | 0 |
afp_createfile(struct afp_volume * volume, unsigned char flag,
unsigned int did,
char * pathname)
{
struct {
struct dsi_header dsi_header __attribute__((__packed__));
uint8_t command;
uint8_t flag;
uint16_t volid;
uint32_t did;
} __attribute__((__packed__)) * request_packet;
char * path, *msg;
struct... | false | false | false | false | false | 0 |
_cupsSNMPOIDToString(const int *src, /* I - OID */
char *dst, /* I - String buffer */
size_t dstsize) /* I - Size of string buffer */
{
char *dstptr, /* Pointer into string buffer */
*dstend; /* End of string buffer */
DEBUG_printf(("4_cupsSNMPOIDToString(src... | false | false | false | false | false | 0 |
delete_directive(Statement **stm_head, Directive *dir_stm)
{
Directive *dpt = NULL, *tpt;
if (stm_head != NULL) {
if (*stm_head != NULL) {
for (dpt = (*stm_head)->dir_pre_head;
dpt != dir_stm && dpt != NULL;
dpt = dpt->next);
if (dpt->prev == N... | false | false | false | false | false | 0 |
_handle_msg(void *arg, slurm_msg_t *msg)
{
struct step_launch_state *sls = (struct step_launch_state *)arg;
uid_t req_uid = g_slurm_auth_get_uid(msg->auth_cred, NULL);
uid_t uid = getuid();
srun_user_msg_t *um;
int rc;
if ((req_uid != slurm_uid) && (req_uid != 0) && (req_uid != uid)) {
error ("Security violati... | false | false | false | false | false | 0 |
Display_paintbrush_in_menu(void)
{
switch(Paintbrush_shape)
{
case PAINTBRUSH_SHAPE_COLOR_BRUSH:
Display_sprite_in_menu(BUTTON_PAINTBRUSHES, MENU_SPRITE_COLOR_BRUSH);
break;
case PAINTBRUSH_SHAPE_MONO_BRUSH:
Display_sprite_in_menu(BUTTON_PAINTBRUSHES, MENU_SPRITE_MONO_BRUSH);
break;
... | false | false | false | false | false | 0 |
httpClearFields(http_t *http) /* I - Connection to server */
{
DEBUG_printf(("httpClearFields(http=%p)", http));
if (http)
{
memset(http->fields, 0, sizeof(http->fields));
if (http->mode == _HTTP_MODE_CLIENT)
{
if (http->hostname[0] == '/')
httpSetField(http, HTTP_FIELD_HOST, "localhost");
... | false | false | false | false | false | 0 |
md_special(char *fullname, unsigned char **sdata) {
static unsigned char *dat=NULL;
int len;
if (dat!=NULL) {
free(dat);
dat=NULL;
}
if (HA_ISCHR(mdhd.attr)||HA_ISBLK(mdhd.attr)) {
if ((dat=malloc(sizeof(dev_t)))==NULL) error(1,ERR_MEM,"md_special()");
*(dev_t*)dat=filestat.st_rdev;
*... | false | false | false | false | true | 1 |
_kadm5_c_init_context(kadm5_client_context **ctx,
kadm5_config_params *params,
krb5_context context)
{
krb5_error_code ret;
char *colon;
*ctx = malloc(sizeof(**ctx));
if(*ctx == NULL)
return ENOMEM;
memset(*ctx, 0, sizeof(**ctx));
krb5_add_et_list (context, initialize_kadm5_err... | false | false | false | false | false | 0 |
do_pwrite (const char *path, const char *content, size_t size, int64_t offset)
{
int fd;
if (offset < 0) {
reply_with_error ("offset is negative");
return -1;
}
CHROOT_IN;
fd = open (path, O_WRONLY|O_CLOEXEC);
CHROOT_OUT;
if (fd == -1) {
reply_with_perror ("open: %s", path);
return -1;
... | false | false | false | false | true | 1 |
nfs4_print_deviceid(const struct nfs4_deviceid *id)
{
u32 *p = (u32 *)id;
dprintk("%s: device id= [%x%x%x%x]\n", __func__,
p[0], p[1], p[2], p[3]);
} | false | true | false | false | false | 1 |
cl_uuid_compare(const cl_uuid_t* uu1, const cl_uuid_t* uu2)
{
if (uu1 == NULL || uu2 == NULL){
cl_log(LOG_ERR, "cl_uuid_compare: "
" wrong argument (%s is NULL)",
uu1 == NULL?"uu1":"uu2");
assert(0);
}
return uuid_compare(uu1->uuid, uu2->uuid);
} | false | false | false | false | false | 0 |
test_root(ext4_group_t a, int b)
{
while (1) {
if (a < b)
return 0;
if (a == b)
return 1;
if ((a % b) != 0)
return 0;
a = a / b;
}
} | false | false | false | false | false | 0 |
fsl_ssi_imx_clean(struct platform_device *pdev,
struct fsl_ssi_private *ssi_private)
{
if (!ssi_private->use_dma)
imx_pcm_fiq_exit(pdev);
if (!ssi_private->has_ipg_clk_name)
clk_disable_unprepare(ssi_private->clk);
} | false | false | false | false | false | 0 |
camel_data_cache_remove (CamelDataCache *cdc,
const gchar *path,
const gchar *key,
GError **error)
{
CamelStream *stream;
gchar *real;
gint ret;
real = data_cache_path (cdc, FALSE, path, key);
stream = camel_object_bag_get (cdc->priv->busy... | false | false | false | false | false | 0 |
open (const string & fname, gz_type t)
{
if (t == READ) file = gzopen (fname.c_str (),"rb6");
else file = gzopen (fname.c_str (),"wb6");
if (!file) return false;
opened = true;
return true;
} | false | false | false | false | false | 0 |
DtsCrystalHDVersion(HANDLE hDevice, PBC_INFO_CRYSTAL bCrystalInfo)
{
DTS_LIB_CONTEXT *Ctx = NULL;
DTS_GET_CTX(hDevice,Ctx);
if(Ctx->DevId == BC_PCI_DEVID_LINK)
bCrystalInfo->device = 0;
else if(Ctx->DevId == BC_PCI_DEVID_FLEA)
bCrystalInfo->device = 1;
bCrystalInfo->dilVersion.dilRelease = DIL_MAJOR_VERSI... | false | false | false | false | false | 0 |
delete_repository_button_clicked(GtkButton *button) {
Playlist *mpl;
gchar *message;
gchar *key;
gint response;
g_return_if_fail (repository_view);
mpl = itdb_playlist_mpl(repository_view->itdb);
message
= g_strdup_printf(_("Are you sure you want to delete repository \"%s\"? Thi... | false | false | false | false | false | 0 |
test_status_worktree__long_filenames(void)
{
char path[260*4+1];
const char *expected_paths[] = {path};
const unsigned int expected_statuses[] = {GIT_STATUS_WT_NEW};
git_repository *repo = cl_git_sandbox_init("empty_standard_repo");
git_status_options opts = GIT_STATUS_OPTIONS_INIT;
status_entry_counts counts = ... | false | false | false | false | false | 0 |
check_win()
{
gint timeout, timeout_tux;
if (currentUiMode == UIMODE_SOUND){
timeout = 200;
timeout_tux = 500;
}
else {
timeout = 1000;
timeout_tux = 2000;
}
// Check win
if (compare_card((gpointer) firstCard, (gpointer) secondCard) == 0) {
gc_sound_play_ogg ("sounds/flip.wav", NUL... | false | false | false | false | false | 0 |
ssh_execute_message_callback(ssh_session session, ssh_message msg) {
int ret;
if(session->ssh_message_callback != NULL) {
ret = session->ssh_message_callback(session, msg,
session->ssh_message_callback_data);
if(ret == 1) {
ret = ssh_message_reply_default(msg);
... | false | false | false | false | false | 0 |
get_signals_list(GHashTable *hash)
{
int *signals, *pos;
if (hash == NULL) {
/* no expandos in text - never needs updating */
return NULL;
}
pos = signals = g_new(int, g_hash_table_size(hash)*2 + 1);
g_hash_table_foreach(hash, (GHFunc) get_signal_hash, &pos);
*pos = -1;
g_hash_table_destroy(... | false | false | false | false | false | 0 |
shapeVisSweep(ShapeRef *shape)
{
Router *router = shape->router();
if ( !(router->InvisibilityGrph) )
{
// Clear shape from graph.
shape->removeFromGraph();
}
VertInf *startIter = shape->firstVert();
VertInf *endIter = shape->lastVert()->lstNext;
for (VertInf *i = startIte... | false | false | false | false | false | 0 |
gen_mem_thread_fence (rtx operand0)
{
rtx _val = 0;
start_sequence ();
{
rtx operands[1];
operands[0] = operand0;
#line 351 "../../src/gcc/config/aarch64/atomics.md"
{
enum memmodel model = (enum memmodel) INTVAL (operands[0]);
if (model != MEMMODEL_RELAXED && model != MEMMODEL_CONSUME)
emit... | false | false | false | false | false | 0 |
copy_ae(AdrBk_Entry *src)
{
AdrBk_Entry *a;
a = adrbk_newentry();
a->tag = src->tag;
a->nickname = cpystr(src->nickname ? src->nickname : "");
a->fullname = cpystr(src->fullname ? src->fullname : "");
a->fcc = cpystr(src->fcc ? src->fcc : "");
a->extra = cpystr(src->extra ? src->ext... | false | false | false | false | false | 0 |
UpgradeGlobalVariable(GlobalVariable *GV) {
StringRef Name(GV->getName());
// We are only upgrading one symbol here.
if (Name == ".llvm.eh.catch.all.value") {
GV->setName("llvm.eh.catch.all.value");
return true;
}
return false;
} | false | false | false | false | false | 0 |
_scsih_scsi_lookup_find_by_target(struct MPT3SAS_ADAPTER *ioc, int id,
int channel)
{
u8 found;
unsigned long flags;
int i;
spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
found = 0;
for (i = 0 ; i < ioc->scsiio_depth; i++) {
if (ioc->scsi_lookup[i].scmd &&
(ioc->scsi_lookup[i].scmd->device->id == id ... | false | false | false | false | false | 0 |
InternalUpdate()
{
int i;
int nTransforms = this->Concatenation->GetNumberOfTransforms();
int nPreTransforms = this->Concatenation->GetNumberOfPreTransforms();
// check to see whether someone has been fooling around with our matrix
int doTheLegacyHack = 0;
if (this->Matrix->GetMTime() > this->MatrixUpdateM... | false | false | false | false | false | 0 |
ztrans(fftw_complex *a, fftw_complex *b, int n1, int n2) {
int ii, jj, i, j;
int tmin1, tmin2;
int lda, ldb;
lda = n1;
ldb = n2;
#ifdef _OPENMP
#pragma omp parallel for private(i,j,jj,tmin1,tmin2)
#endif
for (ii = 0; ii < n1; ii += FFTE_NBLK)
for (jj = 0; jj < n2; jj += FFTE_NBLK) {
V3MIN( tmin... | false | false | false | false | false | 0 |
convert_decseq(const char **pos)
{
int val, c, bytes;
for (val = 0, bytes = 3; bytes && (c = decdigit(**pos)) >= 0;
(*pos)++, bytes--) {
int tmp = (val * 10) + c;
if (tmp > 255)
break;
val = tmp;
}
return val;
} | false | false | false | false | false | 0 |
is_this_block_change(Block *bpt, int b_num)
{
Block *pred;
Block *succ;
int i, j;
for (i = 1; i <= b_num; i++) {
pred = search_do_loop(bpt, bpt->pred, i);
if (pred != NULL) {
for (j = 1; j <= b_num; j++) {
succ = search_do_loop(bpt, bpt->succ, j);
... | false | false | false | false | false | 0 |
wl_update_parse_object_weapons(p_object *pobjp, wss_unit *slot)
{
int i, j, sidx, pilot_index, max_count;
subsys_status *ss;
Assert(slot->ship_class >= 0);
pilot_index = wl_get_pilot_subsys_index(pobjp);
if ( pilot_index == -1 )
return;
ss = &Subsys_status[pilot_index];
for ( i = 0; i < MAX_SHIP... | false | false | false | false | false | 0 |
GC_reclaim_block(struct hblk *hbp, word report_if_found)
{
hdr * hhdr = HDR(hbp);
size_t sz = hhdr -> hb_sz; /* size of objects in current block */
struct obj_kind * ok = &GC_obj_kinds[hhdr -> hb_obj_kind];
struct hblk ** rlh;
if( sz > MAXOBJBYTES ) { /* 1 big object */
if( !mark_bit_... | false | false | false | false | false | 0 |
AskForSide( Mission &m ) const {
string pnames( "[_1] " );
pnames += m.GetPlayer(PLAYER_ONE).Name();
pnames += "|[_2] ";
pnames += m.GetPlayer(PLAYER_TWO).Name();
DialogWindow *pwin = new DialogWindow( MSG(MSG_PLAYER_SELECTION),
MSG(MSG_ASK_SIDE), pnames, 0, 0, view );
pwin->SetButto... | false | false | false | false | false | 0 |
parse_touchquery(u8 *data, struct w8001_touch_query *query)
{
memset(query, 0, sizeof(*query));
query->panel_res = data[1];
query->sensor_id = data[2] & 0x7;
query->capacity_res = data[7];
query->x = data[3] << 9;
query->x |= data[4] << 2;
query->x |= (data[2] >> 5) & 0x3;
query->y = data[5] << 9;
query->y ... | false | false | false | false | false | 0 |
doWait()
{
SE_LOG_DEBUG(NULL, "D-Bus transport: wait - old state: %s, %s",
SessionCommon::ConnectionStateToString(m_state).c_str(),
m_error.c_str());
if (SuspendFlags::getSuspendFlags().getState() == SuspendFlags::NORMAL) {
// Block for one iteration. Both D-Bus calls a... | false | false | false | false | false | 0 |
applySettingToBatches( BatchSettingId id, bool value,
const InstanceBatchVec &container )
{
InstanceBatchVec::const_iterator itor = container.begin();
InstanceBatchVec::const_iterator end = container.end();
while( itor != end )
{
... | false | false | false | false | false | 0 |
populate_list(MainInfo *min, P_CmdSeq *page)
{
page->cmdseq = NULL;
if(min->cfg.commands.cmdseq != NULL)
{
gtk_list_store_clear(page->store);
g_hash_table_foreach(min->cfg.commands.cmdseq, copy_and_insert_cmdseq, page);
}
} | false | false | false | false | false | 0 |
IN_DrawCoopStats(void)
{
int i;
int x;
int ypos;
static int sounds;
IN_DrTextB(DEH_String("KILLS"), 95, 35);
IN_DrTextB(DEH_String("BONUS"), 155, 35);
IN_DrTextB(DEH_String("SECRET"), 232, 35);
x = 160 - MN_TextBWidth(LevelNames[(gameepisode - 1) * 9 + prevmap - 1] +
... | false | false | false | false | false | 0 |
dialog_set_view_center_to_origin_cb(GtkWidget * widget, gpointer data) {
AmitkStudy * study = data;
AmitkPoint shift;
GList * objects;
g_return_if_fail(AMITK_IS_STUDY(data));
/* move all children by the given amount */
objects = AMITK_OBJECT_CHILDREN(study);
shift = point_neg(AMITK_STUDY_VIEW_CENTER(... | false | false | false | false | false | 0 |
bf_file_openmode(Var arglist, Byte next, void *vdata, Objid progr)
{
package r;
Var fhandle = arglist.v.list[1];
char buffer[5] = {0, 0, 0, 0, 0};
file_mode mode;
file_type type;
Var rv;
if(!file_verify_caller(progr)) {
r = file_raise_notokcall("file_name", progr);
} else if (!file_handle_valid(fh... | true | true | false | false | true | 1 |
doinit() {
int ineu[5] = {1000022,1000023,1000025,1000035,1000045};
for(unsigned int i = 0; i < 5; ++i) {
addToList(1000021, ineu[i], 21);
}
GeneralFFVVertex::doinit();
tMSSMPtr theSS = dynamic_ptr_cast<tMSSMPtr>(generator()->standardModel());
if(!theSS)
throw InitException() << "SSGNGVertex::doinit... | false | false | false | false | false | 0 |
ucftp_get_addrbytes(const char *line, int addrbytes[6])
{
int i;
int j;
int val;
const char *s;
for(s = line; *s && *s != '('; s++);
if(!*s)
return -1;
s++;
for(i = 0; i < 6; i++) {
val = 0;
for(j = 0; j < 3; j++) {
if(!isdigit((int) *s))
... | false | false | false | false | false | 0 |
setItems( const QStringList& list )
{
clear();
foreach ( QString s, list )
{
append( s );
}
updateDragLabel();
} | false | false | false | false | false | 0 |
_CheckComponent (Object obj, char **component)
{
char *name = NULL;
char *junk = NULL;
if (obj == NULL)
name = DEFAULT_COMPONENT;
else
{
if (DXExtractString (obj, &name) != NULL)
{
if (DXExtractNthString (obj, 1, &junk) != NULL)
{
DXSetError (ERROR_BAD_PARAMETER, "#10200", "component... | false | false | false | false | false | 0 |
newsfeed_parser_atom10_start(void * data, const char * el, const char ** attr)
{
struct newsfeed_parser_context * ctx;
int r;
ctx = data;
if (ctx->depth == 1) {
if (strcasecmp(el, "entry") == 0) {
/* Start of new feed item found.
* Create a new FeedItem, freeing the one we already have, i... | false | false | false | false | false | 0 |
message_id(FILE *fo, struct header *hp)
{
char *cp;
time_t now;
time(&now);
if ((cp = value("hostname")) != NULL)
fprintf(fo, "Message-ID: <%lx.%s@%s>\n",
(long)now, getrandstring(24), cp);
else if ((cp = skin(myorigin(hp))) != NULL && strchr(cp, '@') != NULL)
fprintf(fo, "Message-ID: <%lx.%s%%%s>\n",
... | false | false | false | false | false | 0 |
hash_set(HASH * Hash, const char *key, const char *value, const int delta)
{
HASH_ITEM *Item;
HASH_SLOT *Slot;
int size;
Item = hash_lookup(Hash, key, 0);
if (Item == NULL) {
/* add entry */
Hash->sorted = 0;
Hash->nItems++;
Hash->Items = realloc(Hash->Items, Hash->nItems * sizeof(HASH_ITEM))... | false | false | false | false | false | 0 |
decode_mc4_mce(struct mce *m)
{
struct cpuinfo_x86 *c = &boot_cpu_data;
int node_id = amd_get_nb_id(m->extcpu);
u16 ec = EC(m->status);
u8 xec = XEC(m->status, 0x1f);
u8 offset = 0;
pr_emerg(HW_ERR "MC4 Error (node %d): ", node_id);
switch (xec) {
case 0x0 ... 0xe:
/* special handling for DRAM ECCs */
if... | false | false | false | false | false | 0 |
gd_tagged_entry_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GdTaggedEntry *self = GD_TAGGED_ENTRY (widget);
gint x, y, width, height;
GdTaggedEntryTag *tag;
GList *l;
gtk_widget_set_allocation (widget, allocation);
GTK_WIDGET_CLASS (gd_tagged_entry_parent_c... | false | false | false | false | false | 0 |
outputCard(int formatType,int numberFields,
CoinFileOutput *output,
std::string head, const char * name,
const char outputValue[2][24],
const char outputRow[2][100])
{
// fprintf(fp,"%s",head.c_str());
std::string line = head;
int i;
if (formatType==0||(formatType>=2&&for... | false | false | false | false | false | 0 |
sp_acopy(struct sorted_process *sp_head, struct process **ar, int max_size)
{
struct sorted_process *sp_cur, *sp_tmp;
int x;
sp_cur = sp_head;
for (x = 0; x < max_size && sp_cur != NULL; x++) {
ar[x] = sp_cur->proc;
sp_tmp = sp_cur;
sp_cur = sp_cur->less;
free_sp(sp_tmp);
}
} | false | false | false | false | false | 0 |
parse_pat(struct section_buf *sb, const unsigned char *buf, int section_length,
int transport_stream_id)
{
(void)transport_stream_id;
while (section_length > 0) {
struct service *s;
int service_id = (buf[0] << 8) | buf[1];
info("service_id = 0x%X\n",service_id);
if (service_id == 0)
goto skip; /* ... | false | false | false | false | false | 0 |
recalc_over_size_extlg(Qmap_tab *over_size_tab, Expand_tlg *ex_tlg,
int size, Module_table *module, int entry)
{
List *li;
for (li = ex_tlg->tlg_list; li != NULL; li = li->next) {
recalc_over_size_tlg(over_size_tab, li->data,
size, module, entry);
... | false | false | false | false | false | 0 |
initsoln(n,k,C,a,constraints,pX0,py0,pZ0)
int n;
int k;
struct blockmatrix C;
double *a;
struct constraintmatrix *constraints;
struct blockmatrix *pX0;
double **py0;
struct blockmatrix *pZ0;
{
int i,j;
double alpha,beta;
double maxnrmA,nrmA;
double nrmC;
double scale1, ... | false | true | false | false | false | 1 |
loadFromConfigFile(
const mrpt::utils::CConfigFileBase &ini,
const std::string §ionName )
{
MRPT_START
using internal::TMetricMapTypesRegistry;
// Delete previous contents:
clear();
TMetricMapTypesRegistry & mmr = TMetricMapTypesRegistry::Instance();
const TMetricMapTypesRegistry::TListRegisteredMaps & ... | false | false | false | false | false | 0 |
scif_cleanup_qp(struct scif_dev *dev)
{
struct scif_qp *qp = &dev->qpairs[0];
if (!qp)
return;
scif_iounmap((void *)qp->remote_qp, sizeof(struct scif_qp), dev);
scif_iounmap((void *)qp->outbound_q.rb_base,
sizeof(struct scif_qp), dev);
qp->remote_qp = NULL;
qp->local_write = 0;
qp->inbound_q.current_wr... | false | false | false | false | false | 0 |
pch_udc_pcd_ep_disable(struct usb_ep *usbep)
{
struct pch_udc_ep *ep;
struct pch_udc_dev *dev;
unsigned long iflags;
if (!usbep)
return -EINVAL;
ep = container_of(usbep, struct pch_udc_ep, ep);
dev = ep->dev;
if ((usbep->name == ep0_string) || !ep->ep.desc)
return -EINVAL;
spin_lock_irqsave(&ep->dev->loc... | false | false | false | false | false | 0 |
v4DoBind(fdInfoType *client,v4HeadType *req)
{
register fdInfoType *peer=client->peer;
register int outFd=peer->fd,res;
struct sockaddr_in sin;
int len=sizeof(sin);
v4HeadType reply;
memset(&reply,0,sizeof(reply));
#ifdef ONLY_GOOD_CLIENTS
reply.version=SOCKS_V4;
#else
reply.version=... | false | false | false | false | false | 0 |
parse_ieee_nn (struct ieee_info *info, const bfd_byte **pp)
{
const bfd_byte *nn_start;
bfd_vma varindx;
const char *name;
unsigned long namlen;
nn_start = *pp;
if (! ieee_read_number (info, pp, &varindx)
|| ! ieee_read_id (info, pp, &name, &namlen))
return FALSE;
if (varindx < 32)
{
... | false | false | false | false | false | 0 |
git_config(config_fn_t fn, void *data)
{
char *repo_config = NULL;
int ret;
repo_config = git_pathdup("config");
ret = git_config_early(fn, data, repo_config);
if (repo_config)
free(repo_config);
return ret;
} | false | false | false | false | false | 0 |
nemo_window_show (GtkWidget *widget)
{
NemoWindow *window;
window = NEMO_WINDOW (widget);
window->details->sidebar_id = g_settings_get_string (nemo_window_state,
NEMO_WINDOW_STATE_SIDE_PANE_VIEW);
if (g_settings_get_boolean (nemo_window_state, NEMO_WIN... | false | false | false | false | false | 0 |
list(unsigned int uOptions, char* pstrBuffer, unsigned int* puKey)
{
int iTMLLPos;
if (puKey)
nbl_decrypt_headers(pstrBuffer, puKey, NBL_HEADER_CHUNKS);
nbl_list_files(pstrBuffer, NBL_HEADER_CHUNKS);
if (!nbl_has_tmll(pstrBuffer))
return;
iTMLLPos = nbl_get_tmll_pos(pstrBuffer);
if (uOptions & OPTION_VERBO... | false | false | false | false | false | 0 |
localnisdomain()
{
char *buf = 0;
int myerror = 0;
myerror = yp_get_default_domain(&buf);
/* yp_get_default_domain failed, abort. */
if (myerror) {
printf("%s: %s\n", progname, yperr_string(myerror));
exit (1);
}
return buf;
} | false | false | false | false | false | 0 |
formatAndAppend(const Format* formatter, const Formattable& arg, UErrorCode& ec) {
UnicodeString s;
formatter->format(arg, s, ec);
if (U_SUCCESS(ec)) {
append(s);
}
} | false | false | false | false | false | 0 |
gst_videomixer2_sink_clip (GstCollectPads * pads,
GstCollectData * data, GstBuffer * buf, GstBuffer ** outbuf,
GstVideoMixer2 * mix)
{
GstVideoMixer2Pad *pad = GST_VIDEO_MIXER2_PAD (data->pad);
GstVideoMixer2Collect *mixcol = pad->mixcol;
GstClockTime start_time, end_time;
start_time = GST_BUFFER_TIMES... | false | false | false | false | false | 0 |
sdb_buildCache(sqlite3 *sqlDB, sdbDataType type,
const char *cacheTable, const char *table)
{
char *newStr;
int sqlerr = SQLITE_OK;
newStr = sqlite3_mprintf(CREATE_CACHE_CMD, cacheTable, table);
if (newStr == NULL) {
return CKR_HOST_MEMORY;
}
sqlerr = sqlite3_exec(sqlDB, newStr, NULL, 0, NU... | false | false | false | false | false | 0 |
get_pubkey_end( GETKEY_CTX ctx )
{
if( ctx ) {
memset (&ctx->kbpos, 0, sizeof ctx->kbpos);
keydb_release (ctx->kr_handle);
if( !ctx->not_allocated )
xfree( ctx );
}
} | false | false | false | false | false | 0 |
fn_copy_values(const void *pvalues, int count, int size, gs_memory_t *mem)
{
if (pvalues) {
void *values = gs_alloc_byte_array(mem, count, size, "fn_copy_values");
if (values)
memcpy(values, pvalues, count * size);
return values;
} else
return 0; /* caller must chec... | false | true | false | false | false | 1 |
EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid,
EVP_PBE_KEYGEN *keygen)
{
EVP_PBE_CTL *pbe_tmp;
if (!pbe_algs)
pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
if (!(pbe_tmp = (EVP_PBE_CTL*) OPENSSL_malloc (sizeof(EVP_PBE_CTL))))
{
EVPerr(EVP_F_EVP_PBE_ALG_ADD_TYPE,ERR_R_MALLOC_FAILURE)... | false | false | false | false | false | 0 |
enumerate_sections (const ACE_Configuration_Section_Key& key,
int index,
ACE_TString& name)
{
ACE_ASSERT (this->allocator_);
// cast to a heap section key
ACE_Configuration_Section_Key_Heap* pKey =
dynamic_cast<ACE_Configu... | false | false | false | false | false | 0 |
settingsDialog( SDL_Surface *screen ) {
bool run = true;
actChoice = SC_FINISH;
wasLeftColumn = true;
draw( screen );
while(run) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
switch(event.type) {
case SDL_KEYDOWN: {
switch(event.key.keysym.sym) {
case SDLK_UP: {... | false | false | false | false | false | 0 |
ssh_packet_set_callbacks(ssh_session session, ssh_packet_callbacks callbacks){
if(session->packet_callbacks == NULL){
session->packet_callbacks = ssh_list_new();
}
if (session->packet_callbacks != NULL) {
ssh_list_append(session->packet_callbacks, callbacks);
}
} | false | false | false | false | false | 0 |
gib_list_sort_merge(gib_list * l1, gib_list * l2, gib_compare_fn cmp)
{
gib_list list, *l, *lprev;
l = &list;
lprev = NULL;
while (l1 && l2)
{
if (cmp(l1->data, l2->data) < 0)
{
l->next = l1;
l = l->next;
l->prev = lprev;
lprev = l;
l1 = l1->next... | false | false | false | false | false | 0 |
try_initialize_more (Ekiga::ServiceCore& core,
int* /*argc*/,
char** /*argv*/[])
{
boost::shared_ptr<Ekiga::PresenceCore> presence_core = core.get<Ekiga::PresenceCore> ("presence-core");
boost::shared_ptr<Ekiga::CallCore> call_core = core.get<Ekiga::CallCore> ("call-core");
boost::shared_ptr... | 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.