Module Name: src
Committed By: matt
Date: Mon Jul 30 00:53:59 UTC 2012
Modified Files:
src/sbin/gpt: gpt.c
Log Message:
Fix a few straggling BE/LE problems.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sbin/gpt/gpt.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.16 src/sbin/gpt/gpt.c:1.17
--- src/sbin/gpt/gpt.c:1.16 Wed Jul 25 01:07:49 2012
+++ src/sbin/gpt/gpt.c Mon Jul 30 00:53:59 2012
@@ -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 @@ utf8_to_utf16(const uint8_t *s8, uint16_
/* 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 @@ utf8_to_utf16(const uint8_t *s8, uint16_
}
if (utfbytes == 0) {
if (utfchar >= 0x10000 && s16idx + 2 >= s16len)
- utfchar = htole16(0xfffd);
+ utfchar = 0xfffd;
if (utfchar >= 0x10000) {
s16[s16idx++] =
htole16(0xd800 | ((utfchar>>10)-0x40));