svn commit: r286569 - head/usr.sbin/fstyp
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Aug 10 10:29:33 UTC 2015
Author: bz
Date: Mon Aug 10 10:29:32 2015
New Revision: 286569
URL: https://svnweb.freebsd.org/changeset/base/286569
Log:
Rather than hardcoding a string and limiting the comparison to these
characters use the defined constant so that in case of change this
would not break.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D3340
MFC after: 2 weeks
Modified:
head/usr.sbin/fstyp/geli.c
Modified: head/usr.sbin/fstyp/geli.c
==============================================================================
--- head/usr.sbin/fstyp/geli.c Mon Aug 10 09:02:34 2015 (r286568)
+++ head/usr.sbin/fstyp/geli.c Mon Aug 10 10:29:32 2015 (r286569)
@@ -61,7 +61,7 @@ fstyp_geli(FILE *fp, char *label __unuse
if (error)
goto gelierr;
- if (strncmp(md.md_magic, "GEOM::ELI", 9) == 0) {
+ if (strcmp(md.md_magic, G_ELI_MAGIC) == 0) {
free(buf);
return (0);
}
More information about the svn-src-all
mailing list