[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master dbe99b2 1/2: Checking contents of checkuplim v

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master dbe99b2 1/2: Checking contents of checkuplim values instead of pointer
Date: Wed, 11 Jul 2018 17:58:47 -0400 (EDT)

branch: master
commit dbe99b229bd73f88d6d19ce414bd8573cbb8315d
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Checking contents of checkuplim values instead of pointer
    In MakeCatalog's `--checkuplim' option, we store the object (and possible)
    clump ID into a two element `p->checkuplim' array. Back when it was
    initially defined, the space for this array was only allocated if the user
    called it. But very soon afterwards, we converted it into a static array
    (initiated with blank values). So to see if the user has called this
    option, must check the values: the array will always be non-NULL.
    However, in one instance (in `bin/mkcatalog/ui.c'), we were still simply
    checking the pointer value not being NULL! This has been corrected with
    this commit and we are now checking the contents.
    This issue came up in a compiler warning, which was reported by Jenny
 THANKS                       | 1 +
 bin/mkcatalog/ui.c           | 2 +-
 doc/announce-acknowledge.txt | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/THANKS b/THANKS
index 695d37d..1213412 100644
--- a/THANKS
+++ b/THANKS
@@ -50,6 +50,7 @@ support in Gnuastro. The list is ordered alphabetically (by 
family name).
     Teymoor Saifollahi                   address@hidden
     Yahya Sefidbakht                     address@hidden
     Alejandro Serrano Borlaff            address@hidden
+    Jenny Sorce                          address@hidden
     Lee Spitler                          address@hidden
     Richard Stallman                     address@hidden
     Ole Streicher                        address@hidden
diff --git a/bin/mkcatalog/ui.c b/bin/mkcatalog/ui.c
index 8acc535..5f0eaf7 100644
--- a/bin/mkcatalog/ui.c
+++ b/bin/mkcatalog/ui.c
@@ -1203,7 +1203,7 @@ ui_preparations_outnames(struct mkcatalogparams *p)
   /* If an upperlimit check image is requsted, then set its filename. */
-  if(p->checkuplim)
+  if(p->checkuplim[0]!=GAL_BLANK_INT32)
       /* See if the directory should be respected. */
       p->cp.keepinputdir = p->cp.output ? 1 : p->cp.keepinputdir;
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 854acc7..baac507 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -8,3 +8,4 @@ Geoffry Krouchi
 Alan Lefor
 Dmitrii Oparin
 Teymoor Saifollahi
+Jenny Sorce

reply via email to

[Prev in Thread] Current Thread [Next in Thread]