From 63f7cb448b3958d7520d7eab6d092d7e6f11f1d9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Jul 1999 01:47:15 +0000 Subject: Update. * misc/tst-mntent.c: Add test case for addmntent and getmntent. --- misc/mntent_r.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'misc/mntent_r.c') diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 43cb3f7..6d46abb 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -162,14 +162,18 @@ weak_alias (__getmntent_r, getmntent_r) while (*rp != '\0') \ if (*rp == ' ' || *rp == '\t' || *rp == '\\') \ break; \ + else \ + ++rp; \ \ if (*rp != '\0') \ { \ /* In the worst case the length of the string can increase to \ founr times the current length. */ \ - char *wp = (char *) alloca (strlen (name) * 4 + 1); \ + char *wp; \ \ rp = name; \ + name = wp = (char *) alloca (strlen (name) * 4 + 1); \ + \ do \ if (*rp == ' ') \ { \ @@ -193,8 +197,6 @@ weak_alias (__getmntent_r, getmntent_r) else \ *wp++ = *rp; \ while (*rp++ != '\0'); \ - \ - name = wp; \ } \ } while (0) -- cgit v1.1