[ET Trac] [Einstein Toolkit] #1544: disallow empty value strings when setting numbers in CCTK_ParameterSet

Einstein Toolkit trac-noreply at einsteintoolkit.org
Wed Feb 12 15:49:00 CST 2014


#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.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1544#comment:2>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list