summaryrefslogtreecommitdiff
path: root/sci-libs/cfitsio/files/cfitsio-4.5.0-rename-nullptr.patch
blob: 6281d7f7e3241e95a05390cf22dfcd5155256f32 (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
49
50
51
Nullptr is reserved keyword in C23. Rename to something that describes usage better
https://bugs.gentoo.org/944747
--- a/putcol.c
+++ b/putcol.c
@@ -1226,7 +1226,7 @@
     long rept, rowrept, width, tnull, naxes[9] = {1,1,1,1,1,1,1,1,1}, groups;
     double zeros = 0.;
     char message[FLEN_ERRMSG], keyname[FLEN_KEYWORD], nullstr[FLEN_VALUE];
-    char **stringptr, *nullptr, *cptr;
+    char **stringptr, *ptr_to_null, *cptr;
 
     if (*status > 0)
         return(*status);
@@ -2081,24 +2081,24 @@
           {
             stringptr = cols[jj].array;
             dataptr = stringptr + 1;
-            nullptr = *stringptr;
+            ptr_to_null = *stringptr;
             nbytes = 2;
           }
           else
           {
             dataptr = (char *) cols[jj].array + col[jj].nullsize;
-            nullptr = (char *) cols[jj].array;
+            ptr_to_null = (char *) cols[jj].array;
             nbytes = col[jj].nullsize;
           }
 
-          if (memcmp(nullptr, &zeros, nbytes) ) 
+          if (memcmp(ptr_to_null, &zeros, nbytes) ) 
           {
             /* null value flag not zero; must check for and write nulls */
             if (hdutype == IMAGE_HDU)   
             {
                 if (ffppn(cols[jj].fptr, cols[jj].datatype, 
                       felement, cols[jj].repeat * ntodo, dataptr,
-                      nullptr, &tstatus) > 0)
+                      ptr_to_null, &tstatus) > 0)
                 break;
             }
             else
@@ -2113,7 +2113,7 @@
 
                 if (ffpcn(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, frow,
                       felement, cols[jj].repeat * ntodo, dataptr,
-                      nullptr, &tstatus) > 0)
+                      ptr_to_null, &tstatus) > 0)
                 break;
             }
           }