
heder at google
Aug 4, 2009, 7:04 AM
Post #1 of 2
(605 views)
Permalink
|
|
[PATCH] Low: ldirectord: avoid warnings caused by uninitialized '$DEBUG' variable
|
|
'$DEBUG' is initialized to late, which causes a warning in exec_wrapper() and ld_exit() on "ldirectord --help" and "ldirectord --version". Signed-off-by: Hannes Eder <heder [at] google> diff -r a216ec0fee48 ldirectord/ldirectord.in --- a/ldirectord/ldirectord.in Tue Aug 04 14:19:53 2009 +0200 +++ b/ldirectord/ldirectord.in Tue Aug 04 15:58:38 2009 +0200 @@ -834,6 +834,8 @@ "version|v" => \$opt_v) or usage(); # main code +$DEBUG = $opt_d ? 3 : 0; + if ($opt_h) { exec_wrapper("/usr/bin/perldoc -U $LDIRECTORD"); &ld_exit(127, "Exec failed"); @@ -851,7 +853,6 @@ &ld_exit(0, ""); } -$DEBUG = $opt_d ? 3 : 0; if ($DEBUG>0 and -f "./ipvsadm") { $IPVSADM="./ipvsadm"; } else { _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev [at] lists http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
|