[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH] applets/usage_pod.c: Prefer fputs
From: Gray Wolf <wolf () wolfsden ! cz>
Date: 2021-02-18 18:46:37
Message-ID: 20210218184637.28329-1-wolf () wolfsden ! cz
[Download RAW message or body]
When printf has just single %s argument, it can be replaced with fputs,
which is faster. One could hope that compiler would optimize that, but
there is no reason not to use the fputs directly.
---
applets/usage_pod.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/applets/usage_pod.c b/applets/usage_pod.c
index 9e6d3f0ee..fb3602a79 100644
--- a/applets/usage_pod.c
+++ b/applets/usage_pod.c
@@ -71,7 +71,7 @@ int main(void)
} else {
printf(", ");
}
- printf("%s", usage_array[i].aname);
+ fputs(usage_array[i].aname, stdout);
col += len2;
}
printf("\n\n");
--
2.30.1
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic