Assign the result of getopt() to an int rather than to a char (which is

possibly unsigned).
This commit is contained in:
Stefan Farfeleder 2004-07-26 15:04:57 +00:00
parent d6fcfb7ae1
commit f901ebcfb6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132660
2 changed files with 3 additions and 4 deletions

View file

@ -123,7 +123,7 @@ main(int argc, char **argv)
{
DBG_FUNC("main")
char *device, *special;
char ch;
int ch;
size_t len;
struct stat st;
struct csum *dbg_csp;

View file

@ -117,12 +117,11 @@ main(argc, argv)
register struct exportslist *exp;
register struct grouplist *grp;
register int rpcs = 0, mntvers = 1;
char ch;
const char *host;
int estat;
int ch, estat;
while ((ch = getopt(argc, argv, "ade3")) != -1)
switch((char)ch) {
switch (ch) {
case 'a':
if (type == 0) {
type = ALL;