diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 16:18:02 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 16:18:02 -0700 |
commit | ac899c005274ff974565c8ab5c125c51feed4d69 (patch) | |
tree | c621dbd992dbfe3cae021f7f27b2818a8c7ed082 /firmware/microblaze | |
parent | 727d8711f94bf7fe634fc33659b77bc4b4884d9c (diff) | |
download | uhd-ac899c005274ff974565c8ab5c125c51feed4d69.tar.gz uhd-ac899c005274ff974565c8ab5c125c51feed4d69.tar.bz2 uhd-ac899c005274ff974565c8ab5c125c51feed4d69.zip |
Small fix for fngets
Diffstat (limited to 'firmware/microblaze')
-rw-r--r-- | firmware/microblaze/lib/hal_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/microblaze/lib/hal_io.c b/firmware/microblaze/lib/hal_io.c index f93b20030..a8654bce7 100644 --- a/firmware/microblaze/lib/hal_io.c +++ b/firmware/microblaze/lib/hal_io.c @@ -249,7 +249,7 @@ fngets(hal_uart_name_t u, char * const s, int len) char *x = s; while(((*x=(char)hal_uart_getc(u)) != '\n') && ((x-s) < len)) x++; *x = 0; - return (x-s)-1; + return (x-s); } int @@ -259,7 +259,7 @@ fngets_timeout(hal_uart_name_t u, char * const s, int len) while(((*x=(char)hal_uart_getc_timeout(u)) != '\n') && ((x-s) < len)) x++; *x = 0; if(x==s) return 0; - return (x-s)-1; + return (x-s); } char * |