bugGPSD - Bugs: bug #44551, libgpsd_core.c:939: possible error...

 
 

bug #44551: libgpsd_core.c:939: possible error in if statement ?

Submitter:  David Binderman <dcb314>
Submitted:  Mon 16 Mar 2015 02:15:18 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  esr
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 16 Mar 2015 03:21:13 PM UTC, comment #2: 


>Good catch! Fixed.


You are welcome.

>Curiously, fixing this didn't break any of my end-to-end tests.


Might be time for a new test.

BTW, I found this bug by running cppcheck, a static analysis tool,
over the source code of gpsd.

I couldn't find any other problems with gpsd, but cppcheck might
be useful on other softwares.

David Binderman <dcb314>
Mon 16 Mar 2015 02:39:20 PM UTC, comment #1: 

Good catch!  Fixed.

Curiously, fixing this didn't break any of my end-to-end tests.

Eric S. Raymond <esr>
Group administrator
Mon 16 Mar 2015 02:15:18 PM UTC, original submission:  

[libgpsd_core.c:939] -> [libgpsd_core.c:939]: (style) Same expression on both sides of '&&'.

    && isnan(oldfix->time) == 0 && isnan(oldfix->time) == 0

Maybe better code

    && isnan(oldfix->time) == 0 && isnan(fix->time) == 0

David Binderman <dcb314>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by esr (Posted a comment)
  • -email is unavailable- added by dcb314 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-03 esr Open/ClosedOpen Closed
    2015-03-16 esr StatusNone Fixed
        Assigned toNone esr

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code