aboutsummaryrefslogtreecommitdiff
path: root/bin/dd/args.c
diff options
context:
space:
mode:
authorBrian Feldman <green@FreeBSD.org>2000-07-01 05:36:25 +0000
committerBrian Feldman <green@FreeBSD.org>2000-07-01 05:36:25 +0000
commitc15c898eff1b25d67ee37850fbc38c0370276536 (patch)
tree0d692e89342e5ef3661e27911e6995bcafe120a7 /bin/dd/args.c
parent5bbd55b4157a11a89b50a9935703e49e6a3851d1 (diff)
downloadsrc-c15c898eff1b25d67ee37850fbc38c0370276536.tar.gz
src-c15c898eff1b25d67ee37850fbc38c0370276536.zip
Various cleanups are made to reduce warnings and make code prettier :)
Also, check for ftruncate() return value and die on failure, but only try to ftruncate() when the file is a regular file.
Notes
Notes: svn path=/head/; revision=62311
Diffstat (limited to 'bin/dd/args.c')
-rw-r--r--bin/dd/args.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/dd/args.c b/bin/dd/args.c
index 9843ddbf9176..e118712194ea 100644
--- a/bin/dd/args.c
+++ b/bin/dd/args.c
@@ -132,11 +132,12 @@ jcl(argv)
* just wanted to set both the input and output block sizes
* and didn't want the bs semantics, so we don't warn.
*/
- if (ddflags & (C_BLOCK|C_LCASE|C_SWAB|C_UCASE|C_UNBLOCK))
+ if (ddflags & (C_BLOCK | C_LCASE | C_SWAB | C_UCASE |
+ C_UNBLOCK))
ddflags &= ~C_BS;
/* Bs supersedes ibs and obs. */
- if (ddflags & C_BS && ddflags & (C_IBS|C_OBS))
+ if (ddflags & C_BS && ddflags & (C_IBS | C_OBS))
warnx("bs supersedes ibs and obs");
}