misc/162262: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Sun Nov 6 21:20:09 UTC 2011


The following reply was made to PR misc/162262; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: misc/162262: commit references a PR
Date: Sun,  6 Nov 2011 21:13:06 +0000 (UTC)

 Author: ae
 Date: Sun Nov  6 21:12:52 2011
 New Revision: 227280
 URL: http://svn.freebsd.org/changeset/base/227280
 
 Log:
   Initialize "acc" value inside the loop to reset failed attempts.
   
   PR:		misc/162262
   MFC after:	3 days
 
 Modified:
   head/sbin/fdisk/fdisk.c
 
 Modified: head/sbin/fdisk/fdisk.c
 ==============================================================================
 --- head/sbin/fdisk/fdisk.c	Sun Nov  6 21:11:22 2011	(r227279)
 +++ head/sbin/fdisk/fdisk.c	Sun Nov  6 21:12:52 2011	(r227280)
 @@ -922,11 +922,12 @@ ok(const char *str)
  static int
  decimal(const char *str, int *num, int deflt, uint32_t maxval)
  {
 -	long long acc = 0;
 +	long long acc;
  	int c;
  	char *cp;
  
  	while (1) {
 +		acc = 0;
  		printf("Supply a decimal value for \"%s\" [%d] ", str, deflt);
  		fflush(stdout);
  		if (fgets(lbuf, LBUF, stdin) == NULL)
 @@ -962,7 +963,6 @@ decimal(const char *str, int *num, int d
  			printf("%s is an invalid decimal number.  Try again.\n",
  				lbuf);
  	}
 -
  }
  
  
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-bugs mailing list