[Home]

Summary:DAHTOOL-00027: [patch] Meaningless comparisons fopen() < 0 in dahdi_monitor.c
Reporter:Guillaume Knispel (gknispel_proformatique)Labels:
Date Opened:2009-04-14 11:02:11Date Closed:2009-04-21 08:44:59
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:2.1.0.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) dahdi_monitor_fix_check_fopen_result.patch
Description:The result of fopen() in dahdi_monitor.c is tested with and "fopen() < 0" construct, which makes no sens.

"fopen() == NULL" sould be done.
Comments:By: Digium Subversion (svnbot) 2009-04-21 08:44:59

Repository: dahdi
Revision: 6421

U   tools/trunk/dahdi_monitor.c

------------------------------------------------------------------------
r6421 | seanbright | 2009-04-21 08:44:58 -0500 (Tue, 21 Apr 2009) | 11 lines

Correct error check for fopen() calls in dahdi_monitor.c.

dahdi_monitor.c was checking for an error calling fopen() by determining if the
return value was less than 0.  fopen(), however, returns a FILE * and returns
NULL on failure.

(closes issue DAHTOOL-27)
Reported by: gknispel_proformatique
Patches:
     dahdi_monitor_fix_check_fopen_result.patch uploaded by gknispel (license 261)

------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=6421