Fix uninitialized variable warning in sample restore program.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 12 Dec 2007 18:42:37 +0000 (10:42 -0800)
committerMichael Vrable <mvrable@turin.ucsd.edu>
Wed, 12 Dec 2007 18:42:37 +0000 (10:42 -0800)
contrib/restore.pl

index f9c55ce..5562974 100755 (executable)
@@ -128,7 +128,7 @@ sub load_ref {
 
         my $object_size = length $contents;
         my ($start, $length);
-        if ($1 ne "") {
+        if (defined($1)) {
             ($start, $length) = ($2 + 0, $3 + 0);
         } else {
             ($start, $length) = (0, $3 + 0);