diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-01-29 20:04:23 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-01-29 20:04:23 +0000 |
commit | ee527b2efa5d8864f5df1c5664ac5bdcb0840ba6 (patch) | |
tree | 79d75b23d0132aa4c57da15a6c3e2512ab682c2b /util.c | |
parent | 11a2d7021758b3d8d5d5ef1063878bc8c9d9736d (diff) |
Just pass the return value of "getuid()" directly on to "getpwuid()";
don't stuff it into a variable.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1582 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* util.c * Utility routines * - * $Id: util.c,v 1.33 2000/01/29 19:08:12 guy Exp $ + * $Id: util.c,v 1.34 2000/01/29 20:04:23 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -586,7 +586,6 @@ get_home_dir(void) char *env_value; static const char *home = NULL; #ifndef WIN32 - uid_t uid; struct passwd *pwd; #endif @@ -606,8 +605,7 @@ get_home_dir(void) What about Windows 9x? */ home = "C:" #else - uid = getuid(); - pwd = getpwuid(uid); + pwd = getpwuid(getuid()); if (pwd != NULL) { /* This is cached, so we don't need to worry about allocating multiple ones of them. */ |