diff options
| author | Michael Brown | 2011-03-27 20:36:00 +0200 |
|---|---|---|
| committer | Michael Brown | 2011-03-27 20:37:42 +0200 |
| commit | 3c1bdfd5d905eb5e916d588d59494d53ea968eb0 (patch) | |
| tree | b16b938b4450fa2221da70d2e1a2d2ace7f8a7db /src/hci | |
| parent | [image] Use image_set_name() only if name != NULL (diff) | |
| download | ipxe-3c1bdfd5d905eb5e916d588d59494d53ea968eb0.tar.gz ipxe-3c1bdfd5d905eb5e916d588d59494d53ea968eb0.tar.xz ipxe-3c1bdfd5d905eb5e916d588d59494d53ea968eb0.zip | |
[image] Remove redundant call to basename()
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>
Diffstat (limited to 'src/hci')
| -rw-r--r-- | src/hci/commands/image_cmd.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/hci/commands/image_cmd.c b/src/hci/commands/image_cmd.c index c9a188a2d..1ff3ff49b 100644 --- a/src/hci/commands/image_cmd.c +++ b/src/hci/commands/image_cmd.c @@ -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 ) { |
