about summary refs log tree commit diff
path: root/grp/tst_fgetgrent.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-08 19:32:12 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-08 19:32:12 +0000
commit4707ba3dde687989ed625e1a1a062e527ac79342 (patch)
treef7a9d9eb95966eb5040fa984f3137cd4c01b0674 /grp/tst_fgetgrent.c
parentf535dd028f68e65f56f999aedbd397c3d0eb4845 (diff)
downloadglibc-4707ba3dde687989ed625e1a1a062e527ac79342.tar.gz
glibc-4707ba3dde687989ed625e1a1a062e527ac79342.tar.xz
glibc-4707ba3dde687989ed625e1a1a062e527ac79342.zip
Update.
1999-06-08  Ulrich Drepper  <drepper@cygnus.com>

	* grp/tst_fgetgrent.c (write_users): Correctly generate long line.
Diffstat (limited to 'grp/tst_fgetgrent.c')
-rw-r--r--grp/tst_fgetgrent.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/grp/tst_fgetgrent.c b/grp/tst_fgetgrent.c
index a76eaab022..2790f2d1d6 100644
--- a/grp/tst_fgetgrent.c
+++ b/grp/tst_fgetgrent.c
@@ -34,7 +34,7 @@ write_users (FILE *f, int large_pos, int pos)
     {
       /* we need more than 2048 bytes for proper testing.  */
       for (i = 0; i < 500; i++)
-	fprintf (f, ",user%03d", i);
+	fprintf (f, "%suser%03d", i == 0 ? ":" : ",", i);
     }
   fprintf (f, "\n");
 
@@ -44,7 +44,7 @@ static void
 write_group (const char *filename, int pos)
 {
   FILE *f;
-  
+
   f = fopen (filename, "w");
   fprintf (f, "one:x:1:one");
   write_users (f, pos, 1);
@@ -64,7 +64,7 @@ test_entry (const char *name, gid_t gid, struct group *g)
       errors++;
       return;
     }
-  
+
   if ((g->gr_gid == gid) && (strcmp (g->gr_name, name) == 0))
     printf ("Ok: %s: %d\n", g->gr_name, g->gr_gid);
   else
@@ -93,7 +93,7 @@ test_fgetgrent (const char *filename)
   fclose (f);
 }
 
-		  
+
 int
 main (int argc, char *argv[])
 {
@@ -112,6 +112,6 @@ main (int argc, char *argv[])
   test_fgetgrent (file);
 
   remove (file);
-  
+
   return (errors != 0);
 }