summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2014-02-07 20:14:24 -0500
committerGreg Hudson <ghudson@mit.edu>2014-03-20 17:51:30 -0400
commitd03aff9fa23a5ad223bb7e7a8c48c070d64e1aa3 (patch)
tree218c18d67bf8d8e0ff23b9c7802b72d9b623ca53 /src/lib
parentb562400826409deceb0d52ffbe6570670ee9db55 (diff)
downloadkrb5-d03aff9fa23a5ad223bb7e7a8c48c070d64e1aa3.tar.gz
krb5-d03aff9fa23a5ad223bb7e7a8c48c070d64e1aa3.tar.xz
krb5-d03aff9fa23a5ad223bb7e7a8c48c070d64e1aa3.zip
Make use of strtoul() unconditional in locate_kdc
When parsing port numbers, we previously attempted to conditionalize use of strtoul() on whether or not it was available, falling back to atoi() instead, but we did so in a way that would always fall back to using atoi(). We also call strtoul() from elsewhere without that condition, so we don't gain anything by trying to be careful about it here.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/os/locate_kdc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c
index f0b84818d..88d55a875 100644
--- a/src/lib/krb5/os/locate_kdc.c
+++ b/src/lib/krb5/os/locate_kdc.c
@@ -217,14 +217,10 @@ locate_srv_conf_1(krb5_context context, const krb5_data *realm,
if (port) {
unsigned long l;
-#ifdef HAVE_STROUL
char *endptr;
l = strtoul (port, &endptr, 10);
if (endptr == NULL || *endptr != 0)
return EINVAL;
-#else
- l = atoi (port);
-#endif
/* L is unsigned, don't need to check <0. */
if (l > 65535)
return EINVAL;