redundant code in unzip.c ?

Rob Landley rob at landley.net
Tue Jun 6 23:19:30 UTC 2006


Glenn, what do you know about this one?

Rob

On Sunday 04 June 2006 4:25 pm, Bernhard Fischer wrote:
> Hi,
>
> in unzip.c, one can read:
>
> Index: archival/unzip.c
> ===================================================================
> --- archival/unzip.c    (revision 15268)
> +++ archival/unzip.c    (working copy)
> @@ -320,9 +320,9 @@
>                     if (verbosity == v_normal) {
>                         printf("   creating: %s\n", dst_fn);
>                     }
>                     unzip_create_leading_dirs(dst_fn);
> +// isn't this call ---v already done by unzip_create_leading_dirs above?
>                     if (bb_make_directory(dst_fn, 0777, 0)) {
> +// --------------------^
> -		bb_error_msg_and_die("Failed to create directory");
> +		bb_error_msg_and_die("Exiting");
>                     }
>                 } else {
>
> Also, repeating the error message which was already emitted by
> bb_make_directory() sounds odd, so just saying "Exiting" should be
> enough, i'd say.
> If the call really is redundant, the whole if should be deleted.
>
> Comments?
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox

-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list