blob: 8dd08035d592e09da3d1b7135eca883e634c7499 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
$NetBSD: patch-ab,v 1.8 2006/09/24 17:14:55 martin Exp $
--- ataprint.c.orig 2006-04-12 16:54:28.000000000 +0200
+++ ataprint.c 2006-09-24 18:47:09.000000000 +0200
@@ -95,11 +95,12 @@
char tmp[65];
n = n > 64 ? 64 : n;
-#ifndef __NetBSD__
- swapbytes(tmp, in, n);
-#else
- strncpy(tmp, in, n); /* NetBSD delivers host byte order strings */
+#ifdef __NetBSD__
+ if (isbigendian())
+ strncpy(tmp, in, n);
+ else
#endif
+ swapbytes(tmp, in, n);
tmp[n] = '\0';
trim(out, tmp);
}
|