aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-13 11:43:26 +0100
committerRon Yorston <rmy@pobox.com>2020-08-13 14:58:01 +0100
commit7d639339e0c46311f8873d560e6f168e71473cd9 (patch)
treee483966b030472f5c0ae85c0a11f090acbaa57ff /include
parent258ad6a1d52f1811f9de1d6b976f3797f5b31a2b (diff)
downloadbusybox-w32-7d639339e0c46311f8873d560e6f168e71473cd9.tar.gz
busybox-w32-7d639339e0c46311f8873d560e6f168e71473cd9.tar.bz2
busybox-w32-7d639339e0c46311f8873d560e6f168e71473cd9.zip
win32: use a static buffer in get_system_drive()
Allocate static storage for the system drive string instead of making a new allocation on every call. This is easier to manage. Adds 16 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 5c0b0a7f4..91e4dc1a5 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -546,7 +546,7 @@ void hide_console(void);
546 546
547int unc_root_len(const char *dir); 547int unc_root_len(const char *dir);
548int root_len(const char *path); 548int root_len(const char *path);
549char *get_system_drive(void); 549const char *get_system_drive(void);
550int chdir_system_drive(void); 550int chdir_system_drive(void);
551char *xabsolute_path(char *path); 551char *xabsolute_path(char *path);
552char *get_drive_cwd(const char *path, char *buffer, int size); 552char *get_drive_cwd(const char *path, char *buffer, int size);