From: Jo Sutton Date: Fri, 19 Jan 2024 20:53:20 +0000 (+1300) Subject: lib:util: Remove inaccurate comment X-Git-Tag: tdb-1.4.11~1747 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac85c1200748e7eaaafcdd1aadacdf1e7b98e6f9;p=thirdparty%2Fsamba.git lib:util: Remove inaccurate comment A C compiler would not be allowed to apply the tail call optimization in this situation, because it would change the observed behaviour of the program. Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- diff --git a/lib/util/time.c b/lib/util/time.c index 47ae32017d0..a47af20a350 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -349,15 +349,7 @@ char *timeval_string(TALLOC_CTX *ctx, const struct timeval *tp, bool hires) return NULL; } - /* - * beautify the talloc_report output - * - * This is not just cosmetics. A C compiler might in theory make the - * talloc_strdup call above a tail call with the tail call - * optimization. This would render "tmp" invalid while talloc_strdup - * tries to duplicate it. The talloc_set_name_const call below puts - * the talloc_strdup call into non-tail position. - */ + /* beautify the talloc_report output */ talloc_set_name_const(result, result); return result; }