From owner-freebsd-bugs Sun Nov 25 10:20:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F2E9137B405 for ; Sun, 25 Nov 2001 10:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAPIK1p83493; Sun, 25 Nov 2001 10:20:01 -0800 (PST) (envelope-from gnats) Date: Sun, 25 Nov 2001 10:20:01 -0800 (PST) Message-Id: <200111251820.fAPIK1p83493@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ian Dowse Subject: Re: bin/24955:/usr/bin/tail -F in 4.1+ doesn't work if file inode changes (works in 4.0) Reply-To: Ian Dowse Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/24955; it has been noted by GNATS. From: Ian Dowse To: Maxim Konovalov Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/24955:/usr/bin/tail -F in 4.1+ doesn't work if file inode changes (works in 4.0) Date: Sun, 25 Nov 2001 18:15:04 +0000 In message <20011124220954.I87876-200000@news1.macomnet.ru>, Maxim Konovalov wr ites: >Hello Ian, > >Here is the final patch. Committed, thanks! >I attached a cumulative patch which includes >the changes below and changes for WARNS?=2. Thanks, I'll commit this separately. I just had a glance at that patch, and one thing I noticed was that where gcc complains about something like while (c = *p++) { it's better to take the opportunity to make the code more readable rather than just adding brackets. e.g, change it to: while ((c = *p++) != '\0') { Also, with constness warnings, try to avoid adding code to strdup a string unless you actually need to modify it (e.g. make the pointer const if possible). I didn't check the example carefully though, so what you did may be the easiest way. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message