From 4b6019c82e3786b2415b903e619c0371b3f07595 Mon Sep 17 00:00:00 2001 From: Beman Date: Tue, 9 Dec 2014 07:10:25 -0500 Subject: [PATCH] Use hex in literal for value where octal is confusing. --- test/endian_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/endian_test.cpp b/test/endian_test.cpp index 290522b..10d6340 100644 --- a/test/endian_test.cpp +++ b/test/endian_test.cpp @@ -121,7 +121,7 @@ namespace View v = { 0x0102030405060708LL }; // initialize v.i - if ( memcmp( v.c, "\10\7\6\5\4\3\2\1", 8) == 0 ) + if ( memcmp( v.c, "\x8\7\6\5\4\3\2\1", 8) == 0 ) { cout << "This machine is little-endian.\n"; # ifndef BOOST_LITTLE_ENDIAN @@ -131,7 +131,7 @@ namespace exit(1); # endif } - else if ( memcmp( v.c, "\1\2\3\4\5\6\7\10", 8) == 0 ) + else if ( memcmp( v.c, "\1\2\3\4\5\6\7\x8", 8) == 0 ) { cout << "This machine is big-endian.\n"; # ifndef BOOST_BIG_ENDIAN