From f2dedc73e09c843a4abde36e0af87731d00cbd9e Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Mon, 10 Aug 2015 10:29:32 +0000 Subject: [PATCH] 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 --- usr.sbin/fstyp/geli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }