projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Ok, this is a pretty major update to sh.c. I renamed all the variables and
[oweals/busybox.git]
/
whoami.c
diff --git
a/whoami.c
b/whoami.c
index 6a5dd2c04ef9b5bfe37ce5bd252b41ee80ef1cec..38a2b30787f02c3a321306fcc2dd8b29320d9738 100644
(file)
--- a/
whoami.c
+++ b/
whoami.c
@@
-26,14
+26,14
@@
extern int whoami_main(int argc, char **argv)
{
- char
*user = xmalloc(9)
;
+ char
user[9]
;
uid_t uid = geteuid();
if (argc > 1)
usage(whoami_usage);
my_getpwuid(user, uid);
- if (user) {
+ if (
*
user) {
puts(user);
return EXIT_SUCCESS;
}