[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1254360747.23350.2.camel@localhost>
Date: Thu, 01 Oct 2009 02:32:27 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: "John W. Linville" <linville@...driver.com>
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
Kalle Valo <kalle.valo@...ia.com>,
Kalle Valo <kalle.valo@....fi>,
"Luis R. Rodriguez" <mcgrof@...il.com>
Subject: Re: [PATCH 3/3] at76c50x-usb: set firmware and hardware version in
wiphy
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).
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists