aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-29 20:04:23 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-29 20:04:23 +0000
commit0c57cfd8201749b37ab06866238b64367bfffc57 (patch)
tree79d75b23d0132aa4c57da15a6c3e2512ab682c2b /util.c
parent8e5f4073464ef3d5ef6fd81e3c48c18151a98b6f (diff)
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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util.c b/util.c
index 2fe999b83f..32dc58bb66 100644
--- a/util.c
+++ b/util.c
@@ -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. */