aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-23 10:16:12 +0100
committerRon Yorston <rmy@pobox.com>2020-08-23 10:16:12 +0100
commit64ecd10486934c12336dac84c67a1939dce0e096 (patch)
tree73e8bc6b07176b84295fd07f19828292a240f693 /libbb/lineedit.c
parentd6b557547551dd80a389f361a995a97ef5930a63 (diff)
downloadbusybox-w32-64ecd10486934c12336dac84c67a1939dce0e096.tar.gz
busybox-w32-64ecd10486934c12336dac84c67a1939dce0e096.tar.bz2
busybox-w32-64ecd10486934c12336dac84c67a1939dce0e096.zip
win32: code shrink Unix-style path handling
Replace auto_add_system_drive() with alloc_system_drive() which leaves space for a possible filename extension. This makes it possible to drop alloc_win32_extension() and auto_win32_extension(). Saves 144 bytes.
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index f6577e372..b35da1874 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -913,8 +913,9 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
913 struct dirent *next; 913 struct dirent *next;
914 struct stat st; 914 struct stat st;
915 char *found; 915 char *found;
916
916#if ENABLE_PLATFORM_MINGW32 917#if ENABLE_PLATFORM_MINGW32
917 char *lpath = auto_add_system_drive(paths[i]); 918 char *lpath = auto_string(alloc_system_drive(paths[i]));
918 dir = opendir(lpath); 919 dir = opendir(lpath);
919#else 920#else
920 dir = opendir(paths[i]); 921 dir = opendir(paths[i]);