|
From: | Collin Funk |
Subject: | Re: [PATCH] lib/xstrtol.c: Fix xstrtol() on EINVAL (invalid base) |
Date: | Thu, 25 Jul 2024 13:49:18 -0700 |
User-agent: | Gnus/5.13 (Gnus v5.13) |
Paul Eggert <eggert@cs.ucla.edu> writes: > If the documentation doesn't make it sufficiently clear that the > behavior is not fully specified with an invalid base, we can do that. > But let's not waste time testing corner cases that don't matter. +1. I don't see why anyone would ever pass -1 as a base to strtol. Usually it is a constant written by the programming. In that case -1 doesn't make sense. If you were accepting user input for the base you would have to validate it anyways. Collin
[Prev in Thread] | Current Thread | [Next in Thread] |