[asterisk-bugs] [DAHDI-tools 0014893]: Incorrect construct in dahdi_monitor.c

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Apr 14 11:27:16 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14893 
====================================================================== 
Reported By:                gknispel_proformatique
Assigned To:                
====================================================================== 
Project:                    DAHDI-tools
Issue ID:                   14893
Category:                   General
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2009-04-14 10:49 CDT
Last Modified:              2009-04-14 11:27 CDT
====================================================================== 
Summary:                    Incorrect construct in dahdi_monitor.c
Description: 
in main(), "opt" is a "char" and to parse command line arguments a "while
((opt = getopt(argc, argv, "vmol:f:r:t:s:F:R:T:S:")) != -1)" is done. This
is incorrect and won't work on architectures where char are unsigned.
Declaring "opt" as an "int" will fix the problem.

====================================================================== 

---------------------------------------------------------------------- 
 (0103222) qwell (administrator) - 2009-04-14 11:27
 http://bugs.digium.com/view.php?id=14893#c103222 
---------------------------------------------------------------------- 
This seems wrong at first glance, but the getopt man page agrees with you
in no uncertain terms. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-14 11:27 qwell          Note Added: 0103222                          
======================================================================




More information about the asterisk-bugs mailing list