From 4707ba3dde687989ed625e1a1a062e527ac79342 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Jun 1999 19:32:12 +0000 Subject: Update. 1999-06-08 Ulrich Drepper * grp/tst_fgetgrent.c (write_users): Correctly generate long line. --- grp/tst_fgetgrent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'grp') 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); } -- cgit 1.4.1