RE: Possible Bug in INT_STRLEN_MAXIMUM macro
-----Original Message----- From: Randy Thelen [SMTP:rthelen@netapp.com] Sent: Friday, August 21, 1998 7:17 PM To: tz@elsie.nci.nih.gov Cc: guy@netapp.com Subject: Possible Bug in INT_STRLEN_MAXIMUM macro The INT_STRLEN_MAXIMUM macro in lib/private.h used by, among other files, asctime.c, states in its comment field: /* ** 302 / 1000 is log10(2.0) rounded up. ... */ And then in the macro definition we find: #define INT_STRLEN_MAXIMUM(type) \ ... * 302 / 100 ... Me thinks this is not what was intended. Possibly it's an error, possibly it's the right thing. Could you send mail back telling me if this was on purpose? -- Randy Thelen Software Engineer Network Appliance, Inc. The bad news is that the macro definition indeed fails to match the comment; the good news is that the error results in over-generous sizing of arrays designed to hold ASCII representations of numbers. I've changed the "100" in the "#define" to the correct "1000"; the change will show up in the next version of tzcode. --ado
participants (1)
-
Olson, Arthur David (NCI)