Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

[PATCH] Low: ldirectord: avoid warnings caused by uninitialized '$DEBUG' variable

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


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/


horms at verge

Aug 4, 2009, 4:47 PM

Post #2 of 2 (543 views)
Permalink
Re: [PATCH] Low: ldirectord: avoid warnings caused by uninitialized '$DEBUG' variable [In reply to]

On Tue, Aug 04, 2009 at 04:04:53PM +0200, Hannes Eder wrote:
> '$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>

Thanks, Applied.
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.