bugGNU nano - Bugs: bug #40815, nano-2.3.2/src/global.c:274:...

 
 

bug #40815: nano-2.3.2/src/global.c:274: possible bad if expression ?

Submitted by:  David Binderman <dcb314>
Submitted on:  Thu 05 Dec 2013 09:50:32 AM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Chris Allegretta <astyanax>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 01 Jan 2014 10:22:45 PM UTC, comment #1:

Hey David,

Thank you for noticing this, this was fixed in r4581 and will be in nano 2.3.3.

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Thu 05 Dec 2013 09:50:32 AM UTC, original submission:

I just ran the static analysis tool "cppcheck" over
the source code of nano-2.3.2. It said

[global.c:274] -> [global.c:274]: (style) Same expression on both sides of '||'.

Source code is

else if (str[0] == 'F' || str[0] == 'F')
return FKEY;

Maybe

else if (str[0] == 'F' || str[0] == 'f')
return FKEY;

would be better code.

David Binderman <dcb314>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 01 Jan 2014 10:22:45 PM UTCastyanaxStatusNone=>Fixed
      Assigned toNone=>astyanax
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1