PERFORCE change 145775 for review

Robert Watson rwatson at FreeBSD.org
Thu Jul 24 09:32:59 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=145775

Change 145775 by rwatson at 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");


More information about the p4-projects mailing list