[Top][All Lists]

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

[gnuastro-commits] master 4bacee8 1/2: gal_qsort_index_arr initialized t

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 4bacee8 1/2: gal_qsort_index_arr initialized to NULL
Date: Wed, 2 May 2018 12:46:49 -0400 (EDT)

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

    gal_qsort_index_arr initialized to NULL
    We had defined `gal_qsort_index_arr' in `lib/qsort.c', but hadn't
    initialized it. To be clean (definitely force a segmentation fault when the
    user doesn't set it), it is now initialized to NULL. It is written to be
    initialized to NULL in the comment, but apparently the actual initalization
    was forgotten.
 lib/qsort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/qsort.c b/lib/qsort.c
index 9800b5c..258eddb 100644
--- a/lib/qsort.c
+++ b/lib/qsort.c
@@ -30,7 +30,7 @@ along with Gnuastro. If not, see 
 #include <gnuastro/qsort.h>
 /* Initialize the array for sorting indexs to NULL. */
-float *gal_qsort_index_arr;
+float *gal_qsort_index_arr=NULL;
 gal_qsort_index_float_decreasing(const void * a, const void * b)

reply via email to

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