[haiku-bugs] [Haiku] #13598: [Patch] mail/AddressTextControl.cpp: Fix ordered comparison between pointer and zero

  • From: "mt" <trac@xxxxxxxxxxxx>
  • Date: Wed, 12 Jul 2017 11:35:42 -0000

#13598: [Patch] mail/AddressTextControl.cpp: Fix ordered comparison between 
pointer
and zero
-------------------------------+------------------------------
 Reporter:  mt                 |        Owner:  czeidler
     Type:  bug                |       Status:  new
 Priority:  normal             |    Milestone:  Unscheduled
Component:  Applications/Mail  |      Version:  R1/Development
 Keywords:                     |   Blocked By:
 Blocking:                     |  Has a Patch:  0
 Platform:  All                |
-------------------------------+------------------------------
 Since strstr() returns pointer or NULL, I think comparison at line 779 may
 be replaced null pointer check.

 http://cgit.haiku-
 os.org/haiku/tree/src/apps/mail/AddressTextControl.cpp#n779
 {{{
 /home/haiku/haiku/haiku/src/apps/mail/AddressTextControl.cpp:779:37:
 error: ordered comparison between pointer and zero ('char *' and 'int')
                                                                 if
 (strstr(buffer, "email") <= 0)
 ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~}}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/13598>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: