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); } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"