summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2000-09-02 22:13:10 +0000
committerbrian <brian@cvs.openbsd.org>2000-09-02 22:13:10 +0000
commit6e75e7e51ee3c9a40392ffc10622920ac306f21a (patch)
treeb9bd0e6d5a2cbe744097ac1d05e28fc50a18c66c
parente922589b0a6487e748875ef97cc069472ea052c6 (diff)
strtok() -> strsep()
-rw-r--r--usr.sbin/ppp/ppp/radlib.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ppp/radlib.c b/usr.sbin/ppp/ppp/radlib.c
index 74620a652c1..266090a1127 100644
--- a/usr.sbin/ppp/ppp/radlib.c
+++ b/usr.sbin/ppp/ppp/radlib.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: radlib.c,v 1.3 2000/08/13 22:05:47 brian Exp $
+ * $OpenBSD: radlib.c,v 1.4 2000/09/02 22:13:09 brian Exp $
*/
#include <sys/types.h>
@@ -306,7 +306,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;
@@ -379,8 +379,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') {