summaryrefslogtreecommitdiff
blob: 625208d08effd8355ce8373dd61e40f24681c55b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Author: Ole Streicher <olebole@debian.org>
Description: fix nullification of fitswdm.c
 Fitswdm.c uses toNULLLONG to set an integer to some minimal value
 (funnily, not 0 but LONG_MIN!). However, this will lead to a wrong
 result if long!=int, since the argument is an int. On LinuxAMD64, this
 was fixed, but not generally. This patch make the special case for
 LinuxAMD64 as the general one.
--- a/prim/dio/libsrc/fitswdm.c
+++ b/prim/dio/libsrc/fitswdm.c
@@ -237,12 +237,7 @@
          {                      /* NULL fill if needed  */
          pi = p.i + ns;
          i = n - ns;
-
-#ifdef LinuxAMD64
          while (i--) toNULLINT (*pi++);
-#else
-         while (i--) toNULLLONG (*pi++);
-#endif
          }
       ioff += n;
       np = 4 * ns;
@@ -279,12 +274,7 @@
          while (n--)
          if (isNULLFLOAT (*pf))
             {
-
-#ifdef LinuxAMD64
             toNULLINT (*pi++);
-#else
-            toNULLLONG (*pi++);
-#endif
             *pf++;
             }
          else
@@ -332,12 +322,7 @@
          while (n--)
          if (isNULLFLOAT (*pd))
             {
-
-#ifdef LinuxAMD64
             toNULLINT (*pi++);
-#else
-            toNULLLONG (*pi++);
-#endif
             *pd++;
             }
          else