diff options
author | Volker Lendecke <vl@samba.org> | 2011-03-16 20:34:30 +0100 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-03-16 21:58:08 +0100 |
commit | 2581cb7ada25432474f06525ffa9b857bae91e8f (patch) | |
tree | 1628786234e057360f54ac042645411113cfc1bd /source3/utils | |
parent | a7a638c3cf6ee4a8f56d18a4d2e35fa5097c9183 (diff) | |
download | samba-2581cb7ada25432474f06525ffa9b857bae91e8f.tar.gz samba-2581cb7ada25432474f06525ffa9b857bae91e8f.tar.bz2 samba-2581cb7ada25432474f06525ffa9b857bae91e8f.zip |
s3: Fix Coverity ID 1402: PASS_BY_VALUE
There's no point in passing GROUP_MAP on the stack
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Mar 16 21:58:08 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_groupmap.c | 22 |
1 files changed, 11 insertions, 11 deletions
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<entries; i++) { - print_map_entry( map[i], long_list ); + print_map_entry(&map[i], long_list); } SAFE_FREE(map); |