summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-23 13:01:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:41 -0500
commit69a694d7ba3a8cd90445838e8a3f7d409e55fe24 (patch)
treeb369125b145d5dc7c04ac5a0461fc55324c43f8b /source4/script
parentbc97484e39682c86cae9afef970eb26fa4e521f8 (diff)
downloadsamba-69a694d7ba3a8cd90445838e8a3f7d409e55fe24.tar.gz
samba-69a694d7ba3a8cd90445838e8a3f7d409e55fe24.tar.bz2
samba-69a694d7ba3a8cd90445838e8a3f7d409e55fe24.zip
r12449: Fix some warnings
(This used to be commit 95f6e49cb897a392c67566b8a0f674a717a1783d)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/mkproto.pl16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index 5db9424cd8..22b012ad8c 100755
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -27,28 +27,28 @@ GetOptions(
'private-define=s' => \$private_define
);
-if ($public_define eq undef and $public_file ne undef) {
+if (not defined($public_define) and defined($public_file)) {
$public_define = $public_file;
$public_define =~ tr{./}{__};
-} elsif ($public_define eq undef) {
+} elsif (not defined($public_define)) {
$public_define = '_PROTO_H_';
}
-if ($private_define eq undef and $private_file ne undef) {
+if (not defined($private_define) and defined($private_file)) {
$private_define = $private_file;
$private_define =~ tr{./}{__};
-} elsif ($public_define eq undef) {
+} elsif (not defined($public_define)) {
$public_define = '_PROTO_H_';
}
-if ($public_file ne undef) {
+if (defined($public_file)) {
open PUBLIC, ">$public_file";
$public_fd = \*PUBLIC;
}
if ($private_file eq $public_file) {
$private_fd = $public_fd;
-} elsif ($private_file ne undef) {
+} elsif (not defined($private_file)) {
open PRIVATE, ">$private_file";
$private_fd = \*PRIVATE;
}
@@ -153,12 +153,12 @@ sub process_file($$$)
close(FH);
}
-if ($public_file != $private_file) {
+if ($public_file ne $private_file) {
print_header($private_fd, $private_define);
}
print_header($public_fd, $public_define);
process_file($public_fd, $private_fd, $_) foreach (@ARGV);
print_footer($public_fd, $public_define);
-if ($public_file != $private_file) {
+if ($public_file ne $private_file) {
print_footer($private_fd, $private_define);
}