From 8489ebce32f4b6cf5c1c1120fd474e26f7659db7 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 13 Feb 2021 10:17:16 +0000 Subject: win32: code shrink Rewrite the recent change to tab completion so it only needs one call to sprintf. Then replace sprintf with strcpy/stpcpy, both there and in a couple of other places. Saves 40 bytes. --- shell/ash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index c400612d9..f8a18cdc5 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2119,7 +2119,7 @@ stack_add_system_drive(const char *path) const char *sd = need_system_drive(path); char *p = growstackto(strlen(path) + 5 + (sd ? strlen(sd) : 0)); - sprintf(p, "%s%s", sd ?: "", path); + strcpy(stpcpy(p, sd ?: ""), path); return p; } #endif -- cgit v1.2.3-55-g6feb