Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Apr 2017 08:42:25 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316638 - head/usr.bin/sdiff
Message-ID:  <201704080842.v388gPBk048266@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sat Apr  8 08:42:25 2017
New Revision: 316638
URL: https://svnweb.freebsd.org/changeset/base/316638

Log:
  Remove a useless loop over the long options before passing through some
  options to diff(1)

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

Modified: head/usr.bin/sdiff/sdiff.c
==============================================================================
--- head/usr.bin/sdiff/sdiff.c	Sat Apr  8 08:41:05 2017	(r316637)
+++ head/usr.bin/sdiff/sdiff.c	Sat Apr  8 08:42:25 2017	(r316638)
@@ -213,7 +213,6 @@ main(int argc, char **argv)
 	int ch, fd[2] = {-1}, status;
 	pid_t pid=0;
 	const char *outfile = NULL;
-	struct option *popt;
 	char **diffargv, *diffprog = DIFF_PATH, *filename1, *filename2,
 	     *tmp1, *tmp2, *s1, *s2;
 	int i;
@@ -260,7 +259,6 @@ main(int argc, char **argv)
 		case 'i':
 		case 't':
 		case 'W':
-			for(popt = longopts; ch != popt->val && popt->name != NULL; popt++);
 			diffargv[1]  = realloc(diffargv[1], sizeof(char) * strlen(diffargv[1]) + 2);
 			/*
 			 * In diff, the 'W' option is 'w' and the 'w' is 'W'.



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