Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt Fix a few straggling BE/LE problems.



details:   https://anonhg.NetBSD.org/src/rev/0cd0020e8109
branches:  trunk
changeset: 780571:0cd0020e8109
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jul 30 00:53:59 2012 +0000

description:
Fix a few straggling BE/LE problems.

diffstat:

 sbin/gpt/gpt.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r f5a6dc1554bb -r 0cd0020e8109 sbin/gpt/gpt.c
--- a/sbin/gpt/gpt.c    Sun Jul 29 23:14:13 2012 +0000
+++ b/sbin/gpt/gpt.c    Mon Jul 30 00:53:59 2012 +0000
@@ -31,7 +31,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.16 2012/07/25 01:07:49 matt Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.17 2012/07/30 00:53:59 matt Exp $");
 #endif
 
 #include <sys/param.h>
@@ -196,7 +196,7 @@
                        /* Initial characters. */
                        if (utfbytes != 0) {
                                /* Incomplete encoding. */
-                               s16[s16idx++] = 0xfffd;
+                               s16[s16idx++] = htole16(0xfffd);
                                if (s16idx == s16len) {
                                        s16[--s16idx] = 0;
                                        return;
@@ -225,7 +225,7 @@
                }
                if (utfbytes == 0) {
                        if (utfchar >= 0x10000 && s16idx + 2 >= s16len)
-                               utfchar = htole16(0xfffd);
+                               utfchar = 0xfffd;
                        if (utfchar >= 0x10000) {
                                s16[s16idx++] =
                                    htole16(0xd800 | ((utfchar>>10)-0x40));



Home | Main Index | Thread Index | Old Index