1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

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
This commit is contained in:
Volker Lendecke 2011-03-16 20:34:30 +01:00 committed by Volker Lendecke
parent a7a638c3cf
commit 2581cb7ada

View File

@ -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);