Opened 17 years ago
Closed 17 years ago
#3624 closed patch (wontfix)
Code cleanup patch to remove redundant NULL checks
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | unknown |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Checking for NULL before delete is redundant. This patch removes most of these checks from programs/, libs/libmyth, libs/libmythtv, and libs/libmythui. There are many places where the pointer is set to NULL after delete. Most of those are still there, except for the ones setting member variables to NULL in a destructor, since that doesn't really provide any benefit.
Attachments (1)
Change History (2)
Changed 17 years ago by
Attachment: | delete.13705.txt added |
---|
comment:1 Changed 17 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Redundancy is good, especially in an application that we hope to someday port to embedded devices with less standards compliant libraries. Also setting pointers to NULL after deletion is not only a good habit, but it makes debugging significantly easier.