Re: [PATCH] CLEANUP/MINOR removal of unused function U2A

2018-10-23 Thread Willy Tarreau
Hello John,

On Tue, Oct 23, 2018 at 11:15:22AM +0300, John Cherouvim wrote:
> Hello
> 
> I'm removing an unused function.
> stats.c is only using U2H and LIM2A. U2A was not being referenced from
> anywhere.

Well, it's only an inline function which costs zero resource, and it's in
the file which provides various utility functions that ease development.
Thus I don't see any benefit in getting rid of it since it's not specific
to stats but may be used for anything else.

Thanks,
Willy



[PATCH] CLEANUP/MINOR removal of unused function U2A

2018-10-23 Thread John Cherouvim

Hello

I'm removing an unused function.
stats.c is only using U2H and LIM2A. U2A was not being referenced from 
anywhere.


thanks




From 692996c782d14240c563c319010ad89939400157 Mon Sep 17 00:00:00 2001
From: Ioannis Cherouvim <743305+cherou...@users.noreply.github.com>
Date: Tue, 23 Oct 2018 10:55:56 +0300
Subject: [PATCH] CLEANUP/MINOR removal of unused function U2A

---
include/common/standard.h | 13 -
1 file changed, 13 deletions(-)

diff --git a/include/common/standard.h b/include/common/standard.h
index 3e13f30..c88e139 100644
--- a/include/common/standard.h
+++ b/include/common/standard.h
@@ -169,19 +169,6 @@ char *utoa_pad(unsigned int n, char *dst, size_t size);
 */
extern const char *limit_r(unsigned long n, char *buffer, int size, 
const char *alt);


-/* returns a locally allocated string containing the ASCII 
representation of
- * the number 'n' in decimal. Up to NB_ITOA_STR calls may be used in 
the same
- * function call (eg: printf), shared with the other similar functions 
making

- * use of itoa_str[].
- */
-static inline const char *U2A(unsigned long n)
-{
-const char *ret = ultoa_r(n, itoa_str[itoa_idx], sizeof(itoa_str[0]));
-if (++itoa_idx >= NB_ITOA_STR)
-itoa_idx = 0;
-return ret;
-}
-
/* returns a locally allocated string containing the HTML representation of
 * the number 'n' in decimal. Up to NB_ITOA_STR calls may be used in 
the same
 * function call (eg: printf), shared with the other similar functions 
making

--
2.6.1.windows.1