From: Dan Carpenter Date: Tue, 18 May 2010 09:47:45 +0200 Subject: [ath9k-devel] [patch -next 1/2 v2] ath9k/debug: improve the snprintf() handling In-Reply-To: <20100515133441.GB5381@bicker> References: <20100514132437.GG5695@bicker> <20100515133441.GB5381@bicker> Message-ID: <20100518074601.GA25162@bicker> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Sat, May 15, 2010 at 03:34:41PM +0200, Dan Carpenter wrote: > The snprintf() function returns the number of bytes that *would* have > been written (not counting the NULL terminator). We want to pass NULL > terminated strings to the user so we need to add one to the snprintf > return value. Actually this is a filesystem so we don't want to pass null terminated strings do we? Probably the first version of this patch was the better one. (What I love about open source is the discussions. But normally it's not just one discussing and sending out patches to his ownself. :P). regards, dan carpenter