diff options
author | Ron Yorston <rmy@pobox.com> | 2020-08-13 11:43:26 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-08-13 14:58:01 +0100 |
commit | 7d639339e0c46311f8873d560e6f168e71473cd9 (patch) | |
tree | e483966b030472f5c0ae85c0a11f090acbaa57ff /include | |
parent | 258ad6a1d52f1811f9de1d6b976f3797f5b31a2b (diff) | |
download | busybox-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.h | 2 |
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 | ||
547 | int unc_root_len(const char *dir); | 547 | int unc_root_len(const char *dir); |
548 | int root_len(const char *path); | 548 | int root_len(const char *path); |
549 | char *get_system_drive(void); | 549 | const char *get_system_drive(void); |
550 | int chdir_system_drive(void); | 550 | int chdir_system_drive(void); |
551 | char *xabsolute_path(char *path); | 551 | char *xabsolute_path(char *path); |
552 | char *get_drive_cwd(const char *path, char *buffer, int size); | 552 | char *get_drive_cwd(const char *path, char *buffer, int size); |