Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Apr 2012 08:17:44 +0000 (UTC)
From:      Jeremie Le Hen <jlh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234779 - head/usr.bin/stdbuf
Message-ID:  <201204290817.q3T8HiUI004492@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jlh
Date: Sun Apr 29 08:17:44 2012
New Revision: 234779
URL: http://svn.freebsd.org/changeset/base/234779

Log:
  Use standard getopt(3) error message.
  
  Submitted by:	jilles
  Approved by:	kib (mentor)

Modified:
  head/usr.bin/stdbuf/stdbuf.c

Modified: head/usr.bin/stdbuf/stdbuf.c
==============================================================================
--- head/usr.bin/stdbuf/stdbuf.c	Sun Apr 29 00:59:38 2012	(r234778)
+++ head/usr.bin/stdbuf/stdbuf.c	Sun Apr 29 08:17:44 2012	(r234779)
@@ -52,7 +52,7 @@ main(int argc, char *argv[])
 	int i;
 
 	ibuf = obuf = ebuf = NULL;
-	while ((i = getopt(argc, argv, ":e:i:o:")) != -1) {
+	while ((i = getopt(argc, argv, "e:i:o:")) != -1) {
 		switch (i) {
 		case 'e':
 			ebuf = optarg;
@@ -63,13 +63,8 @@ main(int argc, char *argv[])
 		case 'o':
 			obuf = optarg;
 			break;
-		case ':':
-			warnx("Missing argument for option -%c", optopt);
-			usage(1);
-			break;
 		case '?':
 		default:
-			warnx("Unknown option: %c", optopt);
 			usage(1);
 			break;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204290817.q3T8HiUI004492>