summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-15 08:28:18 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-15 08:28:18 +0000
commit6a443e2eb2ce6dcde4d01be4a48fd1158dc96356 (patch)
tree12dfa549d6bd6d5934d21b8426e7cd167e9c4f44 /pack.c
parenta160986d90cf90a86e01d60eddb04ffe0e584c36 (diff)
* pack.c (pack_pack): simplify comparison of explicit_endian
as pointed by nobu. * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pack.c b/pack.c
index 45a5de0d4f..5d89efcaf2 100644
--- a/pack.c
+++ b/pack.c
@@ -770,7 +770,7 @@ pack_pack(VALUE ary, VALUE fmt)
pack_integer:
if (explicit_endian) {
- bigendian_p = ((explicit_endian - '<') != 0);
+ bigendian_p = explicit_endian == '>';
}
switch (integer_size) {
@@ -1666,7 +1666,7 @@ pack_unpack(VALUE str, VALUE fmt)
unpack_integer:
if (explicit_endian) {
- bigendian_p = ((explicit_endian - '<') != 0);
+ bigendian_p = explicit_endian == '>';
}
switch (integer_size) {