On Wed, Dec 16, 2009 at 03:04:09PM +0000, Matthew Booth wrote:
---
lib/Sys/VirtV2V/HVTarget/Linux.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Sys/VirtV2V/HVTarget/Linux.pm b/lib/Sys/VirtV2V/HVTarget/Linux.pm
index 53784ea..dc546de 100644
--- a/lib/Sys/VirtV2V/HVTarget/Linux.pm
+++ b/lib/Sys/VirtV2V/HVTarget/Linux.pm
@@ -349,7 +349,7 @@ sub _configure_kernel
}
# If we didn't install a new kernel, pick the default kernel
- $boot_kernel = $guestos->get_default_kernel() if(!defined($boot_kernel));
+ $boot_kernel ||= $guestos->get_default_kernel();
return $boot_kernel;
}
--
1.6.5.2
Yes, should be the same in Perl. Unless $boot_kernel could ever be the
literal string "0" ...
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://et.redhat.com/~rjones/libguestfs/
See what it can do:
http://et.redhat.com/~rjones/libguestfs/recipes.html