diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-28 13:01:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-28 13:01:34 +0000 |
commit | 853752fdb3c0f56c35adc7b0caaa751f8a1ee7a2 (patch) | |
tree | 080d6c525c6cfcfe8eb6dbaf4402ebc43bf126af | |
parent | 714d3a4a7e5a095fb88ffbe0191f4165b8e69102 (diff) |
Use consistent 'return' idiom -- no parenthesis since that was the style
of the existing code.
-rw-r--r-- | sbin/pdisk/dpme.h | 4 | ||||
-rw-r--r-- | sbin/pdisk/file_media.c | 10 | ||||
-rw-r--r-- | sbin/pdisk/io.c | 10 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.c | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/sbin/pdisk/dpme.h b/sbin/pdisk/dpme.h index d93b459fda8..c314d0f84b6 100644 --- a/sbin/pdisk/dpme.h +++ b/sbin/pdisk/dpme.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dpme.h,v 1.23 2016/01/27 16:38:37 krw Exp $ */ +/* $OpenBSD: dpme.h,v 1.24 2016/01/28 13:01:33 krw Exp $ */ /* * dpme.h - Disk Partition Map Entry (dpme) @@ -48,7 +48,7 @@ #define DPISTRLEN 32 struct ddmap { - uint32_t ddBlock; /* 1st driver's starting block (in sbBlkSize blocks!) */ + uint32_t ddBlock; /* 1st driver's starting sbBlkSize block */ uint16_t ddSize; /* size of 1st driver (512-byte blks) */ uint16_t ddType; /* system type (1 for Mac+) */ }; diff --git a/sbin/pdisk/file_media.c b/sbin/pdisk/file_media.c index f1f58cfd903..567fc1ab347 100644 --- a/sbin/pdisk/file_media.c +++ b/sbin/pdisk/file_media.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_media.c,v 1.43 2016/01/26 21:07:54 krw Exp $ */ +/* $OpenBSD: file_media.c,v 1.44 2016/01/28 13:01:33 krw Exp $ */ /* * file_media.c - @@ -88,7 +88,7 @@ read_block(int fd, uint64_t sector, void *address) off = pread(fd, address, DEV_BSIZE, sector * DEV_BSIZE); if (off == DEV_BSIZE) - return (1); + return 1; if (off == 0) fprintf(stderr, "end of file encountered"); @@ -97,7 +97,7 @@ read_block(int fd, uint64_t sector, void *address) else fprintf(stderr, "short read"); - return (0); + return 0; } static int @@ -107,10 +107,10 @@ write_block(int fd, uint64_t sector, void *address) off = pwrite(fd, address, DEV_BSIZE, sector * DEV_BSIZE); if (off == DEV_BSIZE) - return (1); + return 1; warn("writing to file failed"); - return (0); + return 0; } int diff --git a/sbin/pdisk/io.c b/sbin/pdisk/io.c index 53b99a0bdc2..43093032eac 100644 --- a/sbin/pdisk/io.c +++ b/sbin/pdisk/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.27 2016/01/27 16:38:37 krw Exp $ */ +/* $OpenBSD: io.c,v 1.28 2016/01/28 13:01:33 krw Exp $ */ /* * io.c - simple io and input parsing routines @@ -50,9 +50,9 @@ int my_getch() { if (unget_count > 0) - return (unget_buf[--unget_count]); + return unget_buf[--unget_count]; else - return (getc(stdin)); + return getc(stdin); } @@ -209,7 +209,7 @@ get_number(int first_char) ret_value = ret_value * base + digit; } my_ungetch(c); - return (ret_value); + return ret_value; } char * @@ -266,7 +266,7 @@ get_string(int eos) return NULL; } } - return (strdup(buf)); + return strdup(buf); } diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c index 39d2a7e4768..877a754754c 100644 --- a/sbin/pdisk/partition_map.c +++ b/sbin/pdisk/partition_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.c,v 1.73 2016/01/28 01:00:53 krw Exp $ */ +/* $OpenBSD: partition_map.c,v 1.74 2016/01/28 13:01:33 krw Exp $ */ /* * partition_map.c - partition map routines @@ -134,7 +134,7 @@ open_partition_map(int fd, char *name, uint64_t mediasz, uint32_t sectorsz) free_partition_map(map); map = create_partition_map(fd, name, mediasz, sectorsz); if (map) - return (map); + return map; } } |