All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@iki.fi>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	"Luis R. Rodriguez" <mcgrof@gmail.com>
Subject: Re: [PATCH 3/3] at76c50x-usb: set firmware and hardware version in wiphy
Date: Thu, 01 Oct 2009 17:27:17 +0300	[thread overview]
Message-ID: <877hvfqjei.fsf@purkki.valot.fi> (raw)
In-Reply-To: <1254360747.23350.2.camel@localhost> (Ben Hutchings's message of "Thu\, 01 Oct 2009 02\:32\:27 +0100")

Ben Hutchings <bhutchings@solarflare.com> writes:

> On Wed, 2009-09-30 at 21:19 -0400, John W. Linville wrote:
> [...]
>> +	len = sizeof(wiphy->fw_version);
>> +	snprintf(wiphy->fw_version, len, "%d.%d.%d-%d",
>> +		 priv->fw_version.major, priv->fw_version.minor,
>> +		 priv->fw_version.patch, priv->fw_version.build);
>> +	/* null terminate the strings in case they were truncated */
>> +	wiphy->fw_version[len - 1] = '\0';
> [...]
>
> This last statement is unnecessary; snprintf() always null-terminates
> (unless the length is zero).

Yes, the extra null termination is unnecessary. This was my mistake in
the first patchset I sent.

-- 
Kalle Valo

  reply	other threads:[~2009-10-01 14:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 18:02 [PATCH 0/2] cfg80211: firmware and hardware version Kalle Valo
2009-09-24 18:02 ` [PATCH 1/2] cfg80211: add firmware and hardware version to wiphy Kalle Valo
2009-09-24 18:32   ` Luis R. Rodriguez
2009-09-24 19:14     ` Kalle Valo
2009-09-24 20:08       ` Luis R. Rodriguez
2009-09-24 18:02 ` [PATCH 2/2] at76c50x-usb: set firmware and hardware version in wiphy Kalle Valo
2009-09-24 18:35   ` Luis R. Rodriguez
2009-09-24 19:10     ` Kalle Valo
2009-09-24 20:11       ` Luis R. Rodriguez
2009-09-25 19:11         ` Kalle Valo
2009-09-25 19:27           ` Luis R. Rodriguez
2009-09-26 12:07           ` Johannes Berg
2009-09-26 13:59             ` Kalle Valo
2009-09-24 21:13   ` Joerg Albert
2009-09-25 19:06     ` Kalle Valo
2009-09-24 18:09 ` [PATCH 1/2] iw: update nl80211.h from wireless-testing Kalle Valo
2009-09-24 18:09 ` [PATCH 2/2] iw: print firmware and hardware version Kalle Valo
2009-09-24 20:20 ` [PATCH 0/2] cfg80211: " Luis R. Rodriguez
2009-09-25  4:42   ` John W. Linville
2009-09-25 16:47     ` Kalle Valo
2009-09-25 16:53       ` Luis R. Rodriguez
2009-10-01  1:13         ` John W. Linville
2009-10-01  1:19           ` [PATCH 1/3] wireless: implement basic ethtool support for cfg80211 devices John W. Linville
2009-10-01  1:19             ` John W. Linville
2009-10-01  1:19             ` [PATCH 2/3] cfg80211: add firmware and hardware version to wiphy John W. Linville
2009-10-01  1:19               ` [PATCH 3/3] at76c50x-usb: set firmware and hardware version in wiphy John W. Linville
2009-10-01  1:19                 ` John W. Linville
2009-10-01  1:32                 ` Ben Hutchings
2009-10-01 14:27                   ` Kalle Valo [this message]
2009-10-01  1:30             ` [PATCH 1/3] wireless: implement basic ethtool support for cfg80211 devices Ben Hutchings
2009-10-01  8:51             ` Johannes Berg
2009-10-01  8:51               ` Johannes Berg
2009-10-01 14:18           ` [PATCH 0/2] cfg80211: firmware and hardware version Kalle Valo
2009-10-01 15:18             ` John W. Linville
2009-10-01 15:33               ` Ben Hutchings
2009-10-01 16:56                 ` John W. Linville
2009-10-01 16:56                   ` John W. Linville
2009-10-01 16:20               ` Kalle Valo
2009-10-01 17:07                 ` John W. Linville
2009-10-01 19:56                   ` Luis R. Rodriguez
2009-10-01 19:56                     ` Luis R. Rodriguez
2009-10-01 20:12                     ` Inaky Perez-Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hvfqjei.fsf@purkki.valot.fi \
    --to=kalle.valo@iki.fi \
    --cc=bhutchings@solarflare.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.