Module Name:    src
Committed By:   reinoud
Date:           Thu May 26 07:59:09 UTC 2011

Modified Files:
        src/sbin/newfs_udf: newfs_udf.c

Log Message:
Fix accidental use of logical && instead of binary & in rare case.

Bug noticed by Joerg and clang :)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/newfs_udf/newfs_udf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_udf/newfs_udf.c
diff -u src/sbin/newfs_udf/newfs_udf.c:1.11 src/sbin/newfs_udf/newfs_udf.c:1.12
--- src/sbin/newfs_udf/newfs_udf.c:1.11	Fri Jan 21 22:32:13 2011
+++ src/sbin/newfs_udf/newfs_udf.c	Thu May 26 07:59:08 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: newfs_udf.c,v 1.11 2011/01/21 22:32:13 reinoud Exp $ */
+/* $NetBSD: newfs_udf.c,v 1.12 2011/05/26 07:59:08 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -581,7 +581,7 @@
 		(void)printf("\tunrecognised enable/disable req.\n");
 		return EIO;
 	}
-	if ((format_flags && FORMAT_VAT) && UDF_512_TRACK)
+	if ((format_flags & FORMAT_VAT) & UDF_512_TRACK)
 		format_flags |= FORMAT_TRACK512;
 
 	/* determine partition/media access type */

Reply via email to