aboutsummaryrefslogtreecommitdiff
path: root/lib/libufs/type.c
diff options
context:
space:
mode:
authorJuli Mallett <jmallett@FreeBSD.org>2003-06-09 09:32:29 +0000
committerJuli Mallett <jmallett@FreeBSD.org>2003-06-09 09:32:29 +0000
commit1081253fa0d38c8e91b704fac81243aae9d547b6 (patch)
tree0e4c5f45f47c1d045d3eb607b082c94f3fb35ed3 /lib/libufs/type.c
parentfeff4d850744d7dcc302b688d65ffeabab528e32 (diff)
downloadsrc-1081253fa0d38c8e91b704fac81243aae9d547b6.tar.gz
src-1081253fa0d38c8e91b704fac81243aae9d547b6.zip
Reduce diffs with code in Perforce:
Parenthesise return values.
Notes
Notes: svn path=/head/; revision=116084
Diffstat (limited to 'lib/libufs/type.c')
-rw-r--r--lib/libufs/type.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/libufs/type.c b/lib/libufs/type.c
index 3d65167b2c53..47afff3a103e 100644
--- a/lib/libufs/type.c
+++ b/lib/libufs/type.c
@@ -65,16 +65,16 @@ ufs_disk_ctor(const char *name)
new = malloc(sizeof(*new));
if (new == NULL) {
ERROR(new, "unable to allocate memory for disk");
- return NULL;
+ return (NULL);
}
if (ufs_disk_fillout(new, name) == -1) {
ERROR(new, "could not fill out disk");
free(new);
- return NULL;
+ return (NULL);
}
- return new;
+ return (new);
}
void
@@ -107,20 +107,20 @@ ufs_disk_close(struct uufsd *disk)
free((char *)(uintptr_t)disk->d_name);
disk->d_name = NULL;
}
- return 0;
+ return (0);
}
int
ufs_disk_fillout(struct uufsd *disk, const char *name)
{
if (ufs_disk_fillout_blank(disk, name) == -1) {
- return -1;
+ return (-1);
}
if (sbread(disk) == -1) {
ERROR(disk, "could not read superblock to fill out disk");
- return -1;
+ return (-1);
}
- return 0;
+ return (0);
}
int
@@ -147,12 +147,12 @@ again: if (stat(name, &st) < 0) {
goto again;
}
ERROR(disk, "could not find special device");
- return -1;
+ return (-1);
}
fd = open(name, O_RDONLY);
if (fd == -1) {
ERROR(disk, "could not open special device");
- return -1;
+ return (-1);
}
disk->d_bsize = 1;
@@ -170,13 +170,13 @@ again: if (stat(name, &st) < 0) {
name = strdup(name);
if (name == NULL) {
ERROR(disk, "could not allocate memory for disk name");
- return -1;
+ return (-1);
}
disk->d_mine |= MINE_NAME;
}
disk->d_name = name;
- return 0;
+ return (0);
}
int
@@ -185,17 +185,17 @@ ufs_disk_write(struct uufsd *disk)
ERROR(disk, NULL);
if (disk->d_mine & MINE_WRITE)
- return 0;
+ return (0);
close(disk->d_fd);
disk->d_fd = open(disk->d_name, O_RDWR);
if (disk->d_fd < 0) {
ERROR(disk, "failed to open disk for writing");
- return -1;
+ return (-1);
}
disk->d_mine |= MINE_WRITE;
- return 0;
+ return (0);
}