diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-29 20:04:23 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-29 20:04:23 +0000 |
commit | 0c57cfd8201749b37ab06866238b64367bfffc57 (patch) | |
tree | 79d75b23d0132aa4c57da15a6c3e2512ab682c2b /util.c | |
parent | 8e5f4073464ef3d5ef6fd81e3c48c18151a98b6f (diff) | |
download | wireshark-0c57cfd8201749b37ab06866238b64367bfffc57.tar.gz wireshark-0c57cfd8201749b37ab06866238b64367bfffc57.tar.bz2 wireshark-0c57cfd8201749b37ab06866238b64367bfffc57.zip |
Just pass the return value of "getuid()" directly on to "getpwuid()";
don't stuff it into a variable.
svn path=/trunk/; revision=1582
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. */ |