Opened 2 years ago

Closed 2 years ago

#13598 closed bug (fixed)

[Patch] mail/AddressTextControl.cpp: Fix ordered comparison between pointer and zero

Reported by: mt Owned by: czeidler
Priority: normal Milestone: Unscheduled
Component: Applications/Mail Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

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)
                                                                    ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~}}}

Attachments (1)

0030-AddressTextControl.cpp-Fix-ordered-comparison-betwee.patch (884 bytes ) - added by mt 2 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by mt, 2 years ago

Has a Patch: set

comment:2 by korli, 2 years ago

Patch LGTM

comment:3 by pulkomandy, 2 years ago

Resolution: fixed
Status: newclosed

Applied in hrev51281. Thanks!

Note: See TracTickets for help on using tickets.