1111 * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1212 * Portions Copyright (c) 1994, Regents of the University of California
1313 *
14- * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.3 2006/07/19 05:21:57 tgl Exp $
14+ * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.4 2006/07/19 16:23:17 tgl Exp $
1515 *
1616 *-------------------------------------------------------------------------
1717 */
@@ -320,8 +320,8 @@ load_resultmap(void)
320320 progname , buf , strerror (errno ));
321321 exit_nicely (2 );
322322 }
323- memset ( buf , 0 , sizeof ( buf ));
324- while (fgets (buf , sizeof (buf )- 1 , f ))
323+
324+ while (fgets (buf , sizeof (buf ), f ))
325325 {
326326 char * platform ;
327327 char * expected ;
@@ -969,8 +969,7 @@ run_schedule(const char *schedule)
969969 exit_nicely (2 );
970970 }
971971
972- memset (scbuf , 0 , sizeof (scbuf ));
973- while (fgets (scbuf , sizeof (scbuf )- 1 , scf ))
972+ while (fgets (scbuf , sizeof (scbuf ), scf ))
974973 {
975974 char * test = NULL ;
976975 char * c ;
@@ -1396,7 +1395,7 @@ main(int argc, char *argv[])
13961395 makeprog , top_builddir , temp_install , outputdir );
13971396 if (system (buf ))
13981397 {
1399- fprintf (stderr , _ ("\n%s: installation failed\nExamine %s/log/install.log for the reason.\n" ), progname , outputdir );
1398+ fprintf (stderr , _ ("\n%s: installation failed\nExamine %s/log/install.log for the reason.\nCommand was: %s\ n" ), progname , outputdir , buf );
14001399 exit_nicely (2 );
14011400 }
14021401
@@ -1410,7 +1409,7 @@ main(int argc, char *argv[])
14101409 outputdir );
14111410 if (system (buf ))
14121411 {
1413- fprintf (stderr , _ ("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\n" ), progname , outputdir );
1412+ fprintf (stderr , _ ("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\nCommand was: %s\ n" ), progname , outputdir , buf );
14141413 exit_nicely (2 );
14151414 }
14161415
0 commit comments