Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sbin/gpt Pull up the following revisions(s) (requested by...
details: https://anonhg.NetBSD.org/src/rev/60c964b7a9c7
branches: netbsd-6
changeset: 775415:60c964b7a9c7
user: sborrill <sborrill%NetBSD.org@localhost>
date: Fri Oct 26 09:02:27 2012 +0000
description:
Pull up the following revisions(s) (requested by riz in ticket #619):
sbin/gpt/gpt.c: revision 1.16-1.17
Endianness fixes.
diffstat:
sbin/gpt/gpt.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r 44348c515cd6 -r 60c964b7a9c7 sbin/gpt/gpt.c
--- a/sbin/gpt/gpt.c Thu Oct 25 17:30:14 2012 +0000
+++ b/sbin/gpt/gpt.c Fri Oct 26 09:02:27 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.15 2011/08/27 17:38:16 joerg Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.15.4.1 2012/10/26 09:02:27 sborrill 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;
@@ -227,10 +227,12 @@
if (utfchar >= 0x10000 && s16idx + 2 >= s16len)
utfchar = 0xfffd;
if (utfchar >= 0x10000) {
- s16[s16idx++] = 0xd800 | ((utfchar>>10)-0x40);
- s16[s16idx++] = 0xdc00 | (utfchar & 0x3ff);
+ s16[s16idx++] =
+ htole16(0xd800 | ((utfchar>>10)-0x40));
+ s16[s16idx++] =
+ htole16(0xdc00 | (utfchar & 0x3ff));
} else
- s16[s16idx++] = utfchar;
+ s16[s16idx++] = htole16(utfchar);
if (s16idx == s16len) {
s16[--s16idx] = 0;
return;
Home |
Main Index |
Thread Index |
Old Index