From owner-freebsd-hackers Sat Jan 11 00:34:51 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id AAA06267 for hackers-outgoing; Sat, 11 Jan 1997 00:34:51 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id AAA06262 for ; Sat, 11 Jan 1997 00:34:49 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.2/8.7.3) id TAA07745; Sat, 11 Jan 1997 19:04:37 +1030 (CST) From: Michael Smith Message-Id: <199701110834.TAA07745@genesis.atrad.adelaide.edu.au> Subject: Re: unused variable in su In-Reply-To: <199701110142.CAA28453@xp11.frmug.org> from Philippe Charnier at "Jan 11, 97 02:42:11 am" To: charnier@xp11.frmug.org (Philippe Charnier) Date: Sat, 11 Jan 1997 19:04:36 +1030 (CST) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Philippe Charnier stands accused of saying: > Hello, > > In /usr/src/usr.bin/su/su.c, I get: > line 101: char shellbuf[MAXPATHLEN]; > line 171: shell = strcpy(shellbuf, pwd->pw_shell); > > Shellbuf is not referenced elsewhere, is there any reason not to > remove shellbuf (and adjust line 171), or is there a side effect I don't > see? pwd is recycled later, and shell is potentially reset later, so this is the 'correct' way to do it. Don't change it. > Philippe Charnier charnier@lirmm.fr (smtp) -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[