#1544: disallow empty value strings when setting numbers in CCTK_ParameterSet ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by eschnett):
According to the strtol documentation: {{{ If endptr is not NULL, strtol() stores the address of the first invalid character in *endptr. If there were no digits at all, however, strtol() stores the original value of str in *endptr. (Thus, if *str is not `\0' but **endptr is `\0' on return, the entire string was valid.) }}} Thus it should not be necessary to check whether the whole string consists of whitespace.