fix for warning C4204: non-constant aggregate initializer

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-11-08 12:29:03 -05:00
parent 575200952a
commit 8321939c90
2 changed files with 7 additions and 3 deletions

View file

@ -216,11 +216,14 @@ int nfs41_server_find_or_create(
IN const netaddr4 *addr,
OUT nfs41_server **server_out)
{
const struct server_info info = { server_scope, server_owner_major_id };
struct server_info info;
struct list_entry *entry;
nfs41_server *server;
int status;
info.owner = server_owner_major_id;
info.scope = server_scope;
dprintf(SRVLVL, "--> nfs41_server_find_or_create(%s)\n", info.owner);
EnterCriticalSection(&g_server_list.lock);

View file

@ -315,8 +315,9 @@ static int readdir_copy_entry(
lookup_entry(args->root, args->state->session,
&args->state->file, entry);
} else if (entry->attr_info.type == NF4LNK) {
const nfs41_component name = { entry->name,
(unsigned short)entry->name_len - 1 };
nfs41_component name;
name.name = entry->name;
name.len = (unsigned short)entry->name_len - 1;
/* look up the symlink target to see whether it's a directory */
lookup_symlink(args->root, args->state->session,
&args->state->file, &name, &entry->attr_info);