[hackers] [libixp] Fix use of uninitialised global variable user. || sqweek

From: <hg_AT_suckless.org>
Date: Sun, 21 Sep 2008 03:40:55 +0000 (UTC)

changeset: 103:39a592508b0d
user: sqweek <sqweek_AT_gmail.com>
date: Sat Sep 20 11:04:28 2008 +0800
files: examples/ixpsrv.c
description:
Fix use of uninitialised global variable user.

diff -r 4b197157ebca -r 39a592508b0d examples/ixpsrv.c
--- a/examples/ixpsrv.c Sat Sep 20 11:03:59 2008 +0800
+++ b/examples/ixpsrv.c Sat Sep 20 11:04:28 2008 +0800
@@ -502,6 +502,9 @@
         if(!address)
                 fatal("$IXP_ADDRESS not set\n");
 
+ if(!(user = getenv("USER")))
+ fatal("$USER not set\n");
+
         fd = ixp_announce(address);
         if(fd < 0)
                 fatal("%s\n", errstr);
Received on Sun Sep 21 2008 - 03:40:55 UTC

This archive was generated by hypermail 2.2.0 : Sun Sep 21 2008 - 03:48:04 UTC