summaryrefslogtreecommitdiffstats
path: root/lib/libradius
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2000-08-29 21:49:11 +0000
committerache <ache@FreeBSD.org>2000-08-29 21:49:11 +0000
commite751e78811592941f8f93161f2fb1adef30bf953 (patch)
treeebe371b775e1d2430b8bee4e24a804a3aa0baaa5 /lib/libradius
parent58751a777acc4db3f45a313f06ef5808d9c40250 (diff)
downloadFreeBSD-src-e751e78811592941f8f93161f2fb1adef30bf953.zip
FreeBSD-src-e751e78811592941f8f93161f2fb1adef30bf953.tar.gz
strtok -> strsep (no strtok allowed in libraries)
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 1860fed..4742106 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') {
OpenPOWER on IntegriCloud