aboutsummaryrefslogtreecommitdiff
path: root/lib/libradius
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-08-29 21:49:11 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-08-29 21:49:11 +0000
commitc51599104027f5a104dcd4bb3571a4bb44fa7e5e (patch)
treea7c9979321aa0ce6a8f96f65fcfdd986ea8361b9 /lib/libradius
parentd9e630b5920d738f2b4385c88ff3f17b899b1dd1 (diff)
downloadsrc-c51599104027f5a104dcd4bb3571a4bb44fa7e5e.tar.gz
src-c51599104027f5a104dcd4bb3571a4bb44fa7e5e.zip
strtok -> strsep (no strtok allowed in libraries)
Notes
Notes: svn path=/head/; revision=65222
Diffstat (limited to 'lib/libradius')
-rw-r--r--lib/libradius/radlib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libradius/radlib.c b/lib/libradius/radlib.c
index 1860fedd9ee3..47421065743c 100644
--- a/lib/libradius/radlib.c
+++ b/lib/libradius/radlib.c
@@ -305,7 +305,7 @@ rad_config(struct rad_handle *h, const char *path)
int nfields;
char msg[ERRSIZE];
char *type;
- char *host;
+ char *host, *res;
char *port_str;
char *secret;
char *timeout_str;
@@ -378,8 +378,9 @@ rad_config(struct rad_handle *h, const char *path)
continue;
/* Parse and validate the fields. */
- host = strtok(host, ":");
- port_str = strtok(NULL, ":");
+ res = host;
+ host = strsep(&res, ":");
+ port_str = strsep(&res, ":");
if (port_str != NULL) {
port = strtoul(port_str, &end, 10);
if (*end != '\0') {