]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[image] Remove redundant call to basename()
authorMichael Brown <mcb30@ipxe.org>
Sun, 27 Mar 2011 18:36:00 +0000 (19:36 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sun, 27 Mar 2011 18:37:42 +0000 (19:37 +0100)
There is no need to explicitly call basename() to construct an image
name in imgfetch_core_exec(), since image_set_uri() will do so
automatically anyway (and will do so without getting confused by URIs
with query strings).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/hci/commands/image_cmd.c

index c9a188a2d877077dfbeea589e9988cdcff6aa019..1ff3ff49be4c8972b97842c3ee3d250aba50a38d 100644 (file)
@@ -22,7 +22,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
-#include <libgen.h>
 #include <getopt.h>
 #include <ipxe/image.h>
 #include <ipxe/command.h>
@@ -76,8 +75,6 @@ static int imgfetch_core_exec ( int argc, char **argv,
 
        /* Parse URI string */
        uri_string = argv[optind];
-       if ( ! opts.name )
-               opts.name = basename ( uri_string );
 
        /* Parse command line */
        if ( argv[ optind + 1 ] != NULL ) {