[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] avoid use of undefined variable in warning
From: |
Ralf Wildenhues |
Subject: |
[PATCH] avoid use of undefined variable in warning |
Date: |
Sun, 5 Oct 2008 21:00:03 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* tests/CuTmpdir.pm (chmod_tree): Do not warn if $dir is
undefined.
---
Hi Jim,
I'm currently debugging my parallel Automake TESTS pending patch
using coreutils' test suite. This turned up as side issue;
I haven't seen this show up otherwise.
I'll post patches when I get the bugs that I see ironed out.
Cheers,
Ralf
tests/CuTmpdir.pm | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/tests/CuTmpdir.pm b/tests/CuTmpdir.pm
index 166e50b..e172bd4 100644
--- a/tests/CuTmpdir.pm
+++ b/tests/CuTmpdir.pm
@@ -45,15 +45,18 @@ sub chmod_1
sub chmod_tree
{
- if (defined $dir && chdir $dir)
+ if (defined $dir)
{
- # Perform the equivalent of find . -type d -print0|xargs -0 chmod -R 700.
- my $options = {untaint => 1, wanted => \&chmod_1};
- find ($options, '.');
- }
- else
- {
- warn "$ME: failed to chdir to $dir: $!\n";
+ if (chdir $dir)
+ {
+ # Perform the equivalent of find . -type d -print0|xargs -0 chmod -R
700.
+ my $options = {untaint => 1, wanted => \&chmod_1};
+ find ($options, '.');
+ }
+ else
+ {
+ warn "$ME: failed to chdir to $dir: $!\n";
+ }
}
}
--
1.6.0.1.309.g48068
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] avoid use of undefined variable in warning,
Ralf Wildenhues <=