diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2015-08-10 10:29:32 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2015-08-10 10:29:32 +0000 |
commit | f2dedc73e09c843a4abde36e0af87731d00cbd9e (patch) | |
tree | ae342560a0d895ce4a6acd82eeb06ff5471a853e /usr.sbin/fstyp | |
parent | ac7d1ed24c4e65083c5f869349ce5649fd63f690 (diff) | |
download | src-f2dedc73e09c843a4abde36e0af87731d00cbd9e.tar.gz src-f2dedc73e09c843a4abde36e0af87731d00cbd9e.zip |
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
Notes
Notes:
svn path=/head/; revision=286569
Diffstat (limited to 'usr.sbin/fstyp')
-rw-r--r-- | usr.sbin/fstyp/geli.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/fstyp/geli.c b/usr.sbin/fstyp/geli.c index a6ce740e87e5..7f6d9a5d3ad4 100644 --- a/usr.sbin/fstyp/geli.c +++ b/usr.sbin/fstyp/geli.c @@ -61,7 +61,7 @@ fstyp_geli(FILE *fp, char *label __unused, size_t labelsize __unused) 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); } |