From 2581cb7ada25432474f06525ffa9b857bae91e8f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 16 Mar 2011 20:34:30 +0100 Subject: s3: Fix Coverity ID 1402: PASS_BY_VALUE There's no point in passing GROUP_MAP on the stack Autobuild-User: Volker Lendecke Autobuild-Date: Wed Mar 16 21:58:08 CET 2011 on sn-devel-104 --- source3/utils/net_groupmap.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c index 5efc5aee81..7ae348c109 100644 --- a/source3/utils/net_groupmap.c +++ b/source3/utils/net_groupmap.c @@ -56,19 +56,19 @@ static bool get_sid_from_input(struct dom_sid *sid, char *input) Dump a GROUP_MAP entry to stdout (long or short listing) **********************************************************/ -static void print_map_entry ( GROUP_MAP map, bool long_list ) +static void print_map_entry (const GROUP_MAP *map, bool long_list) { if (!long_list) - d_printf("%s (%s) -> %s\n", map.nt_name, - sid_string_tos(&map.sid), gidtoname(map.gid)); + d_printf("%s (%s) -> %s\n", map->nt_name, + sid_string_tos(&map->sid), gidtoname(map->gid)); else { - d_printf("%s\n", map.nt_name); - d_printf(_("\tSID : %s\n"), sid_string_tos(&map.sid)); - d_printf(_("\tUnix gid : %u\n"), (unsigned int)map.gid); - d_printf(_("\tUnix group: %s\n"), gidtoname(map.gid)); + d_printf("%s\n", map->nt_name); + d_printf(_("\tSID : %s\n"), sid_string_tos(&map->sid)); + d_printf(_("\tUnix gid : %u\n"), (unsigned int)map->gid); + d_printf(_("\tUnix group: %s\n"), gidtoname(map->gid)); d_printf(_("\tGroup type: %s\n"), - sid_type_lookup(map.sid_name_use)); - d_printf(_("\tComment : %s\n"), map.comment); + sid_type_lookup(map->sid_name_use)); + d_printf(_("\tComment : %s\n"), map->comment); } } @@ -142,7 +142,7 @@ static int net_groupmap_list(struct net_context *c, int argc, const char **argv) return -1; } - print_map_entry( map, long_list ); + print_map_entry(&map, long_list ); } else { GROUP_MAP *map=NULL; @@ -151,7 +151,7 @@ static int net_groupmap_list(struct net_context *c, int argc, const char **argv) return -1; for (i=0; i