diff options
author | nate <nate@FreeBSD.org> | 1996-07-11 15:04:43 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1996-07-11 15:04:43 +0000 |
commit | 444ae829e76fb8a27e40cc47259ed397ee5aee50 (patch) | |
tree | 4e45d3519ae816e8410bbf96e7d6baee82cdead9 /usr.sbin/pccard/pccardd | |
parent | 3c83c32022ac3eaa388e186fb8285500596cff48 (diff) | |
download | FreeBSD-src-444ae829e76fb8a27e40cc47259ed397ee5aee50.zip FreeBSD-src-444ae829e76fb8a27e40cc47259ed397ee5aee50.tar.gz |
In num_tok, allow the user to specify '0' as plain '0' instead of
forcing them to use '00', and/or '0x0'.
Submitted by: Johann Tonsing <jtonsing@mikom.csir.co.za>
Diffstat (limited to 'usr.sbin/pccard/pccardd')
-rw-r--r-- | usr.sbin/pccard/pccardd/file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pccard/pccardd/file.c b/usr.sbin/pccard/pccardd/file.c index 0e11ca1..b8dc30b 100644 --- a/usr.sbin/pccard/pccardd/file.c +++ b/usr.sbin/pccard/pccardd/file.c @@ -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: file.c,v 1.6 1996/06/18 23:50:51 nate Exp $ + * $Id: file.c,v 1.7 1996/06/19 01:08:58 nate Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -457,7 +457,8 @@ num_tok(void) if (c == '0') { base = 8; c = *s++; - if (c == 'x' || c == 'X') { + if (c == '\0') return 0; + else if (c == 'x' || c == 'X') { c = *s++; base = 16; } |