Opened 13 years ago

Closed 13 years ago

#3624 closed patch (wontfix)

Code cleanup patch to remove redundant NULL checks

Reported by: Russell Bryant <russell@…> 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)

delete.13705.txt (70.6 KB) - added by Russell Bryant <russell@…> 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by Russell Bryant <russell@…>

Attachment: delete.13705.txt added

comment:1 Changed 13 years ago by danielk

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.