diff options
author | markm <markm@FreeBSD.org> | 2004-04-15 07:24:10 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2004-04-15 07:24:10 +0000 |
commit | 26c9f4b6365f7a81f59cc31e09a6c8e25fa5193d (patch) | |
tree | 59b103a2899e4488cbd168c327615dde0a9891e1 /share | |
parent | 8669a5b76291862cb2cf54eb6dc20ed25daef756 (diff) | |
download | FreeBSD-src-26c9f4b6365f7a81f59cc31e09a6c8e25fa5193d.zip FreeBSD-src-26c9f4b6365f7a81f59cc31e09a6c8e25fa5193d.tar.gz |
Do a style fixup on the example function.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/uio.9 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/share/man/man9/uio.9 b/share/man/man9/uio.9 index 180c6da..0126754 100644 --- a/share/man/man9/uio.9 +++ b/share/man/man9/uio.9 @@ -134,21 +134,21 @@ fooread(dev_t dev, struct uio *uio, int flag) { int rv, amnt; + rv = 0; while (uio->uio_resid > 0) { if (data_available > 0) { amnt = MIN(uio->uio_resid, data_available); - if ((rv = uiomove(buffer, amnt, uio)) - != 0) - goto error; + rv = uiomove(buffer, amnt, uio); + if (rv != 0) + break; data_available -= amnt; - } else { + } else tsleep(...); /* wait for a better time */ - } } - return 0; -error: - /* do error cleanup here */ - return rv; + if (rv != 0) { + /* do error cleanup here */ + } + return (rv); } .Ed .Sh RETURN VALUES |