1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Remove a useless loop over the long options before passing through some

options to diff(1)
This commit is contained in:
Baptiste Daroussin 2017-04-08 08:42:25 +00:00
parent 85bb63bd29
commit bcc76a2e83
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316638

View File

@ -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'.