Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Apr 2016 03:32:15 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r298441 - head/sbin/fsck_msdosfs
Message-ID:  <201604220332.u3M3WF2S055444@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Fri Apr 22 03:32:14 2016
New Revision: 298441
URL: https://svnweb.freebsd.org/changeset/base/298441

Log:
  Use macro MAX() from sys/param.h.
  
  MFC after:	2 weeks.

Modified:
  head/sbin/fsck_msdosfs/dir.c

Modified: head/sbin/fsck_msdosfs/dir.c
==============================================================================
--- head/sbin/fsck_msdosfs/dir.c	Thu Apr 21 21:30:51 2016	(r298440)
+++ head/sbin/fsck_msdosfs/dir.c	Fri Apr 22 03:32:14 2016	(r298441)
@@ -223,7 +223,7 @@ resetDosDirSection(struct bootblock *boo
 	b1 = boot->bpbRootDirEnts * 32;
 	b2 = boot->bpbSecPerClust * boot->bpbBytesPerSec;
 
-	if ((buffer = malloc(len = b1 > b2 ? b1 : b2)) == NULL) {
+	if ((buffer = malloc(len = MAX(b1, b2))) == NULL) {
 		perr("No space for directory buffer (%zu)", len);
 		return FSFATAL;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604220332.u3M3WF2S055444>