gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 375f5ab: Fits: removed extra left-over comment


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 375f5ab: Fits: removed extra left-over comment
Date: Mon, 10 Jun 2019 06:06:04 -0400 (EDT)

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

    Fits: removed extra left-over comment
    
    In a previous commit (784b220, "Fits: --primaryimghdu allows
    copying/cutting to zero-th extension"), I had left-over a commented message
    in `fits_hdu_copy' which I had put to help during its development! This
    should have been removed before the commit, but I had forgot! It has been
    removed with this commit.
    
    Also, in the same function, I noticed that since `out' is now set within
    the loop, it is cleaner to check if its not NULL before closing the file.
---
 bin/fits/fits.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/bin/fits/fits.c b/bin/fits/fits.c
index 11b3d3b..09b0f06 100644
--- a/bin/fits/fits.c
+++ b/bin/fits/fits.c
@@ -339,15 +339,6 @@ fits_hdu_copy(struct fitsparams *p, int cut1_copy0, int *r)
   fitsfile *in, *out=NULL;
   gal_list_str_t *list = cut1_copy0 ? p->cut : p->copy;
 
-  /* Open the output file.
-
-############################################# USE this after checking the
-nature of the first extension to be copied. If its a table, use the
-library's function.  #############################################
-
-*/
-
-
   /* Copy all the given extensions. */
   while(list)
     {
@@ -384,7 +375,7 @@ library's function.  
#############################################
     }
 
   /* Close the output file. */
-  fits_close_file(out, &status);
+  if(out) fits_close_file(out, &status);
 }
 
 



reply via email to

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