Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2008 09:32:59 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 145775 for review
Message-ID:  <200807240932.m6O9WxpD022064@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145775

Change 145775 by rwatson@rwatson_cinnamon_macosx on 2008/07/24 09:32:12

	Always include config.h before any BSM-related includes.
	
	Use %zu to print size_t.

Affected files ...

.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#19 edit
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#54 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#19 (text+ko) ====

@@ -27,9 +27,11 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#18 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#19 $
  */
 
+#include <config/config.h>
+
 #include <bsm/libbsm.h>
 
 #include <errno.h>
@@ -38,7 +40,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <config/config.h>
 #ifndef HAVE_STRLCAT
 #include <compat/strlcat.h>
 #endif

==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#54 (text+ko) ====

@@ -32,7 +32,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#53 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#54 $
  */
 
 #include <sys/types.h>
@@ -1474,7 +1474,7 @@
 		size = AUR_BYTE_SIZE;
 		if (xml) {
 			open_attr(fp, "type");
-			fprintf(fp, "%u", size);
+			fprintf(fp, "%zu", size);
 			close_attr(fp);
 			open_attr(fp, "count");
 			print_1_byte(fp, tok->tt.arb.uc, "%u");
@@ -1500,7 +1500,7 @@
 		size = AUR_SHORT_SIZE;
 		if (xml) {
 			open_attr(fp, "type");
-			fprintf(fp, "%u", size);
+			fprintf(fp, "%zu", size);
 			close_attr(fp);
 			open_attr(fp, "count");
 			print_1_byte(fp, tok->tt.arb.uc, "%u");
@@ -1529,7 +1529,7 @@
 		size = AUR_INT32_SIZE;
 		if (xml) {
 			open_attr(fp, "type");
-			fprintf(fp, "%u", size);
+			fprintf(fp, "%zu", size);
 			close_attr(fp);
 			open_attr(fp, "count");
 			print_1_byte(fp, tok->tt.arb.uc, "%u");
@@ -1557,7 +1557,7 @@
 		size = AUR_INT64_SIZE;
 		if (xml) {
 			open_attr(fp, "type");
-			fprintf(fp, "%u", size);
+			fprintf(fp, "%zu", size);
 			close_attr(fp);
 			open_attr(fp, "count");
 			print_1_byte(fp, tok->tt.arb.uc, "%u");



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