for (e = cache->mru; e != NULL; e = next) {
next = e->next;
- if (memcache_is_talloc(e->n)
+ if (memcache_is_talloc((enum memcache_number)e->n)
&& (e->valuelength == sizeof(void *))) {
DATA_BLOB key, value;
void *ptr;
{
static int initialized = 0;
static const char *s = NULL;
- static const struct swrap_file_hdr h;
- static const struct swrap_packet p;
+ static const struct swrap_file_hdr h = { 0, };
+ static const struct swrap_packet p = { 0, };
if (initialized == 1) {
return s;
d = (double)(t);
d *= 1.0e7;
- *nt = d;
+ *nt = (NTTIME)d;
/* convert to a negative value */
*nt=~*nt;
low = ~(nttime & 0xFFFFFFFF);
low = low/(1000*1000*10);
- sec=high+low;
+ sec=(int)(high+low);
days=sec/(60*60*24);
hours=(sec - (days*60*60*24)) / (60*60);
cli->inbuf = (char *)SMB_MALLOC(cli->bufsize+SAFETY_MARGIN);
cli->oplock_handler = cli_oplock_ack;
cli->case_sensitive = False;
- cli->smb_rw_error = 0;
+ cli->smb_rw_error = SMB_READ_OK;
cli->use_spnego = lp_client_use_spnego();
close(cli->fd);
}
cli->fd = -1;
- cli->smb_rw_error = 0;
+ cli->smb_rw_error = SMB_READ_OK;
SAFE_FREE(cli);
}
if (lp_host_msdfs()) {
*r->out.version = DFS_MANAGER_VERSION_NT4;
} else {
- *r->out.version = 0;
+ *r->out.version = (enum dfs_ManagerVersion)0;
}
}
r_u->size_secdesc = sd_size;
r_u->sec_desc = psd;
- psd->dacl->revision = (uint16) NT4_ACL_REVISION;
+ psd->dacl->revision = NT4_ACL_REVISION;
unbecome_user();
close_cnum(conn, user.vuid);
if ( !regkey )
return WERR_BADFID;
- *r->out.value_length = *r->out.type = 0;
+ *r->out.value_length = *r->out.type = REG_NONE;
DEBUG(7,("_reg_info: policy key name = [%s]\n", regkey->key->name));
DEBUG(7,("_reg_info: policy key type = [%08x]\n", regkey->key->type));
static void create_wks_info_100(struct wkssvc_NetWkstaInfo100 *info100)
{
- info100->platform_id = 0x000001f4; /* unknown */
+ info100->platform_id = PLATFORM_ID_NT; /* unknown */
info100->version_major = lp_major_announce_version();
info100->version_minor = lp_minor_announce_version();
total_space = dsize * (double)bsize;
free_space = dfree * (double)bsize;
- dsize = (total_space+63*512) / (64*512);
- dfree = (free_space+63*512) / (64*512);
+ dsize = (SMB_BIG_UINT)((total_space+63*512) / (64*512));
+ dfree = (SMB_BIG_UINT)((free_space+63*512) / (64*512));
if (dsize > 0xFFFF) dsize = 0xFFFF;
if (dfree > 0xFFFF) dfree = 0xFFFF;