summaryrefslogtreecommitdiff
path: root/src/port/strtol.c
diff options
context:
space:
mode:
authorBruce Momjian2005-12-02 02:49:11 +0000
committerBruce Momjian2005-12-02 02:49:11 +0000
commitcf171317670de8760897f30e99d74b4073cf4874 (patch)
treebac816db170193d20cb075ac95207278d6e515ee /src/port/strtol.c
parentde1dfc12092de69910405a23260761bf58fa2375 (diff)
Remove comment on errno=0 lines, but add mention to port/strtol.c function.
Diffstat (limited to 'src/port/strtol.c')
-rw-r--r--src/port/strtol.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/port/strtol.c b/src/port/strtol.c
index a103b446e62..866dad03e72 100644
--- a/src/port/strtol.c
+++ b/src/port/strtol.c
@@ -45,6 +45,15 @@ static char sccsid[] = "@(#)strtol.c 5.4 (Berkeley) 2/23/91";
#define const
/*
+ * Usage Tip:
+ *
+ * strtol() doesn't give a unique return value to indicate that errno
+ * should be consulted, so in most cases it is best to set errno = 0
+ * before calling this function, and then errno != 0 can be tested
+ * after the function completes.
+ */
+
+/*
* Convert a string to a long integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case