getopt returns -1 not EOF
This commit is contained in:
parent
e8ddcfd6a1
commit
f4627296cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39017
@ -23,7 +23,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: cvt-wtmp.c,v 1.4 1997/02/22 14:08:01 peter Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -82,7 +82,7 @@ main(int argc, char **argv)
|
||||
int errs, i, nflag, forceflag, rv;
|
||||
|
||||
errs = nflag = forceflag = 0;
|
||||
while ((i = getopt(argc, argv, "fn")) != EOF)
|
||||
while ((i = getopt(argc, argv, "fn")) != -1)
|
||||
switch (i)
|
||||
{
|
||||
case 'f':
|
||||
|
Loading…
Reference in New Issue
Block a user