[hackers] [sic] bugfix || anselm

From: <hg_AT_suckless.org>
Date: Mon, 22 Mar 2010 13:29:39 +0000 (UTC)

changeset: 105:64d329a0bc2f
tag: tip
user: anselm_AT_garbe.us
date: Mon Mar 22 13:29:33 2010 +0000
files: sic.c
description:
bugfix

diff -r 5d435650b2b9 -r 64d329a0bc2f sic.c
--- a/sic.c Sat Nov 28 12:16:35 2009 +0000
+++ b/sic.c Mon Mar 22 13:29:33 2010 +0000
@@ -135,9 +135,10 @@
 main(int argc, char *argv[]) {
         int i, c;
         struct timeval tv;
+ const char *user = getenv("USER");
         fd_set rd;
 
- strlcpy(nick, getenv("USER"), sizeof nick);
+ strlcpy(nick, user ? user : "unknown", sizeof nick);
         for(i = 1; i < argc; i++) {
                 c = argv[i][1];
                 if(argv[i][0] != '-' || argv[i][2])
Received on Mon Mar 22 2010 - 13:29:39 UTC

This archive was generated by hypermail 2.2.0 : Mon Mar 22 2010 - 13:36:07 UTC