Copy respective revisions from usr.sbin/sendmail/*/* - use -1 with getopt.
This commit is contained in:
parent
b26579db36
commit
b2ee1660ba
@ -51,7 +51,7 @@ char **argv;
|
||||
{
|
||||
int opt;
|
||||
|
||||
while ((opt = getopt(argc, argv, "o:")) != EOF) {
|
||||
while ((opt = getopt(argc, argv, "o:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'o':
|
||||
if (!freopen(optarg, "w", stdout)) {
|
||||
|
@ -259,7 +259,7 @@ main(argc, argv)
|
||||
#endif
|
||||
|
||||
from = NULL;
|
||||
while ((ch = getopt(argc, argv, "df:r:l")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "df:r:l")) != -1)
|
||||
switch(ch) {
|
||||
case 'd': /* Backward compatible. */
|
||||
break;
|
||||
|
@ -55,7 +55,7 @@ main(argc, argv)
|
||||
cfile = _PATH_SENDMAILCF;
|
||||
sfile = NULL;
|
||||
mnames = TRUE;
|
||||
while ((ch = getopt(argc, argv, "C:f:o")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "C:f:o")) != -1)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ main(argc, argv)
|
||||
#else
|
||||
#define OPTIONS "C:Ndforsv"
|
||||
#endif
|
||||
while ((opt = getopt(argc, argv, OPTIONS)) != EOF)
|
||||
while ((opt = getopt(argc, argv, OPTIONS)) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ main(argc, argv)
|
||||
#endif
|
||||
|
||||
filename = "/etc/aliases";
|
||||
while ((ch = getopt(argc, argv, "f:")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "f:")) != -1)
|
||||
switch((char)ch) {
|
||||
case 'f':
|
||||
filename = optarg;
|
||||
|
@ -145,7 +145,7 @@ main(argc, argv)
|
||||
|
||||
debug = 0;
|
||||
domain = "UUCP"; /* Default "domain". */
|
||||
while ((ch = getopt(argc, argv, "D:T")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "D:T")) != -1)
|
||||
switch (ch) {
|
||||
case 'T':
|
||||
debug = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user