gnuastro-devel
[Top][All Lists]
Advanced

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

[gnuastro-devel] [bug #51536] Suspicious assignment


From: Vladimir Markelov
Subject: [gnuastro-devel] [bug #51536] Suspicious assignment
Date: Sat, 22 Jul 2017 00:48:30 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0

URL:
  <http://savannah.gnu.org/bugs/?51536>

                 Summary: Suspicious assignment
                 Project: GNU Astronomy Utilities
            Submitted by: vvm
            Submitted on: Fri 21 Jul 2017 09:48:28 PM PDT
                Category: Warp
                Severity: 2 - Minor
              Item Group: Source code
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Looking source code I found a strange ternary operator. I would have fixed it
if I had been sure 100%.
So, I just add a bug and a person who knows algorithm better will fix it.

gnuastro\bin\warp\ui.c 
line #521

x[3] = w[3]>0 ? 1.0f : 1.0f;   /* Has to be positive. */

Both cases are the same. Looking at line #518 and taking into account that the
condition is the opposite I suppose the correct line should be 

x[3] = w[3]>0 ? 1.0f : -1.0f;   /* Has to be positive. */

I can be wrong.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51536>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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