aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/id.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-10-09 13:43:32 -0500
committerRob Landley <rob@landley.net>2014-10-09 13:43:32 -0500
commit3d56716d362d6a827c5f81029ac64c71b56a2f5c (patch)
tree93377ffa6621214916c82b0985483e4d13822336 /toys/posix/id.c
parent7196d758a0728bd43451f869eb85528b6cd20bea (diff)
downloadtoybox-3d56716d362d6a827c5f81029ac64c71b56a2f5c.tar.gz
Various bugfixes (mostly resource leaks) from Ashwini Sharma's static analysis, plus occasional tweak by me while reviewing them.
Diffstat (limited to 'toys/posix/id.c')
-rw-r--r--toys/posix/id.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/id.c b/toys/posix/id.c
index b4d9c00b..000d7b4c 100644
--- a/toys/posix/id.c
+++ b/toys/posix/id.c
@@ -9,7 +9,7 @@
USE_ID(NEWTOY(id, ">1nGgru[!Ggu]", TOYFLAG_BIN))
USE_GROUPS(OLDTOY(groups, id, NULL, TOYFLAG_USR|TOYFLAG_BIN))
USE_LOGNAME(OLDTOY(logname, id, ">0", TOYFLAG_BIN))
-USE_LOGNAME(OLDTOY(whoami, id, ">0", TOYFLAG_BIN))
+USE_WHOAMI(OLDTOY(whoami, id, ">0", TOYFLAG_BIN))
config ID
bool "id"
@@ -132,7 +132,7 @@ void do_id(char *username)
void id_main(void)
{
- // FLAG macros can be 0 if "id" command enabled, so snapshot them here.
+ // FLAG macros can be 0 if "id" command not enabled, so snapshot them here.
if (FLAG_u) TT.do_u = toys.optflags & FLAG_u;
if (FLAG_n) TT.do_n = toys.optflags & FLAG_n;
if (FLAG_G) TT.do_G = toys.optflags & FLAG_G;