diff options
author | phk <phk@FreeBSD.org> | 2002-10-31 07:56:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-31 07:56:40 +0000 |
commit | 5dbff154c833a0b9d122eeae77d39c72fcc3b02a (patch) | |
tree | 1fc8fce54eb8353f1867b65bf3025727cb4e7e6e /lib/libdisk | |
parent | a1b493e26515595b736dd5ffa8eed2cf8655123d (diff) | |
download | FreeBSD-src-5dbff154c833a0b9d122eeae77d39c72fcc3b02a.zip FreeBSD-src-5dbff154c833a0b9d122eeae77d39c72fcc3b02a.tar.gz |
Style(9) improvements.
Diffstat (limited to 'lib/libdisk')
-rw-r--r-- | lib/libdisk/blocks.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libdisk/blocks.c b/lib/libdisk/blocks.c index 682a54b..313c5cc 100644 --- a/lib/libdisk/blocks.c +++ b/lib/libdisk/blocks.c @@ -22,16 +22,16 @@ read_block(int fd, daddr_t block, u_long sector_size) int i; foo = malloc(sector_size); - if (!foo) - return NULL; + if (foo == NULL) + return (NULL); if (-1 == lseek(fd, (off_t)block * sector_size, SEEK_SET)) { free (foo); - return NULL; + return (NULL); } i = read(fd, foo, sector_size); if ((int)sector_size != i) { free (foo); - return NULL; + return (NULL); } return foo; } @@ -42,9 +42,9 @@ write_block(int fd, daddr_t block, const void *foo, u_long sector_size) int i; if (-1 == lseek(fd, (off_t)block * sector_size, SEEK_SET)) - return -1; + return (-1); i = write(fd, foo, sector_size); if ((int)sector_size != i) - return -1; + return (-1); return 0; } |