Bug 67056 - getopt error in netsaint-plugins/check_mrtg
Summary: getopt error in netsaint-plugins/check_mrtg
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-22 19:40 UTC by wayne
Modified: 2004-05-24 21:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wayne 2004-05-22 19:40:26 UTC
check_mrtg was using a strange combination of argument positions and optarg.  Trivial fix enclosed, please apply this path to ports tree.

Fix: 

Replace the 2 argv references with getopt as below (spaces removed) but it's a small change.
341c341
<  value_warning_threshold=strtoul(argv[5],NULL,10);
---
>  value_warning_threshold=strtoul(optarg,NULL,10);
344c344
<  value_critical_threshold=strtoul(argv[6],NULL,10);
---
>  value_critical_threshold=strtoul(optarg,NULL,10);
How-To-Repeat: build it.
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-05-24 21:40:06 UTC
State Changed
From-To: open->closed

Committed, thanks!