diff options
author | jhb <jhb@FreeBSD.org> | 2001-10-23 17:31:11 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-10-23 17:31:11 +0000 |
commit | 7157fafb71371ec0183b1994649b8f73e30484f6 (patch) | |
tree | d09b7e0a8f1db85ae665c925c50b65e9cb9b54eb /usr.sbin | |
parent | 151e529d3a891a754c242305144d46b11b9ccdf1 (diff) | |
download | FreeBSD-src-7157fafb71371ec0183b1994649b8f73e30484f6.zip FreeBSD-src-7157fafb71371ec0183b1994649b8f73e30484f6.tar.gz |
Move the 'type' variable inside the block where it is actually used.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/system.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/system.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index 7cbb12f..983ec3d 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/system.c @@ -144,7 +144,7 @@ systemInitialize(int argc, char **argv) /* Are we running as init? */ if (getpid() == 1) { - int fd, type; + int fd; RunningAsInit = 1; setsid(); @@ -159,10 +159,10 @@ systemInitialize(int argc, char **argv) * To make _sure_ we're on a VTY and don't have /dev/console switched * away to a serial port or something, attempt to set the cursor appearance. */ - type = 0; /* normal */ if (OnVTY) { - int fd2; + int fd2, type; + type = 0; /* normal */ if ((fd2 = open("/dev/console", O_RDWR)) != -1) { if (ioctl(fd2, CONS_CURSORTYPE, &type) == -1) { OnVTY = FALSE; diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index 7cbb12f..983ec3d 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/sysinstall/system.c @@ -144,7 +144,7 @@ systemInitialize(int argc, char **argv) /* Are we running as init? */ if (getpid() == 1) { - int fd, type; + int fd; RunningAsInit = 1; setsid(); @@ -159,10 +159,10 @@ systemInitialize(int argc, char **argv) * To make _sure_ we're on a VTY and don't have /dev/console switched * away to a serial port or something, attempt to set the cursor appearance. */ - type = 0; /* normal */ if (OnVTY) { - int fd2; + int fd2, type; + type = 0; /* normal */ if ((fd2 = open("/dev/console", O_RDWR)) != -1) { if (ioctl(fd2, CONS_CURSORTYPE, &type) == -1) { OnVTY = FALSE; |