Author: eadler (ports committer)
Date: Mon Dec  5 04:20:13 2011
New Revision: 228274
URL: http://svn.freebsd.org/changeset/base/228274

Log:
  Fix some uninitialized variables in pipe regression tests that result in
  failure.
  
  PR:           misc/161175
  Submitted by: gianni@
  Approved by:  nwhitehorn@
  MFC after:    1 week

Modified:
  head/tools/regression/pipe/pipe-fstatbug.c
  head/tools/regression/pipe/pipe-reverse.c
  head/tools/regression/pipe/pipe-wraparound.c

Modified: head/tools/regression/pipe/pipe-fstatbug.c
==============================================================================
--- head/tools/regression/pipe/pipe-fstatbug.c  Mon Dec  5 03:18:40 2011        
(r228273)
+++ head/tools/regression/pipe/pipe-fstatbug.c  Mon Dec  5 04:20:13 2011        
(r228274)
@@ -41,7 +41,7 @@ int main (void)
 {
 char buffer[32768], buffer2[32768];
 int desc[2];
-int error, successes;
+int error, successes = 0;
 struct stat status;
 pid_t new_pid;
 

Modified: head/tools/regression/pipe/pipe-reverse.c
==============================================================================
--- head/tools/regression/pipe/pipe-reverse.c   Mon Dec  5 03:18:40 2011        
(r228273)
+++ head/tools/regression/pipe/pipe-reverse.c   Mon Dec  5 04:20:13 2011        
(r228274)
@@ -44,6 +44,7 @@ struct stat status;
 pid_t new_pid;
 
 buggy = 0;
+total = 0;
 
 error = pipe(desc);
 
@@ -52,7 +53,7 @@ if (error)
 
 buffer[0] = 'A';
 
-for (i = 0; i < 65535; i++) {
+for (i = 1; i < 65535; i++) {
        buffer[i] = buffer[i - 1] + 1;
        if (buffer[i] > 'Z')
                buffer[i] = 'A';

Modified: head/tools/regression/pipe/pipe-wraparound.c
==============================================================================
--- head/tools/regression/pipe/pipe-wraparound.c        Mon Dec  5 03:18:40 
2011        (r228273)
+++ head/tools/regression/pipe/pipe-wraparound.c        Mon Dec  5 04:20:13 
2011        (r228274)
@@ -44,6 +44,7 @@ struct stat status;
 pid_t new_pid;
 
 buggy = 0;
+total = 0;
 
 error = pipe(desc);
 
@@ -52,7 +53,7 @@ if (error)
 
 buffer[0] = 'A';
 
-for (i = 0; i < 32768; i++) {
+for (i = 1; i < 32768; i++) {
        buffer[i] = buffer[i - 1] + 1;
        if (buffer[i] > 'Z')
                buffer[i] = 'A';
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to