From owner-svn-src-all@freebsd.org Mon Aug 10 10:29:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 516DC998B8F; Mon, 10 Aug 2015 10:29:33 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 420D5DAA; Mon, 10 Aug 2015 10:29:33 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7AATXRX070504; Mon, 10 Aug 2015 10:29:33 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7AATXoh070503; Mon, 10 Aug 2015 10:29:33 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201508101029.t7AATXoh070503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 10 Aug 2015 10:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286569 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 10:29:33 -0000 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); }