]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:util: Remove inaccurate comment
authorJo Sutton <josutton@catalyst.net.nz>
Fri, 19 Jan 2024 20:53:20 +0000 (09:53 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 16 Feb 2024 02:41:36 +0000 (02:41 +0000)
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 <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/time.c

index 47ae32017d00c91109bbb6bcc5490e57306ad250..a47af20a35010341c1279cbcca88c7ca76809200 100644 (file)
@@ -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;
 }