svn commit: r242439 - in head/sys: dev/null geom kern sys
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Nov 2 07:49:34 UTC 2012
On Thu, Nov 01, 2012 at 05:01:05PM +0000, Alfred Perlstein wrote:
> + strlcpy(dumpdevname, devname, sizeof(dumpdevname));
> + if (strlen(dumpdevname) != strlen(devname)) {
> + printf("set_dumper: device name truncated from '%s' -> '%s'\n",
> + devname, dumpdevname);
> + }
More "standard" way to check this is the following:
if (strlcpy(dumpdevname, devname, sizeof(dumpdevname)) >=
sizeof(dumpdevname)) {
printf("set_dumper: device name truncated from '%s' -> '%s'\n",
devname, dumpdevname);
}
--
Pawel Jakub Dawidek http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20121102/596c4ef9/attachment.sig>
More information about the svn-src-all
mailing list