diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-03-08 11:53:37 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-03-08 11:53:37 +0000 |
commit | c3024e8f3379a5e1412f0f9158857dee595417a2 (patch) | |
tree | c357e02c79c31584dfed4b64f88930c84b0f4d01 /usr.bin | |
parent | 9a664b1bab7e8a1315c8c320f4bd2128933c7f22 (diff) |
correct usage of lseek(2);
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/buf.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/diff3.c | 10 | ||||
-rw-r--r-- | usr.bin/cvs/diff_internals.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/rcs.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/remote.c | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/cvs/buf.c b/usr.bin/cvs/buf.c index 266199d9ee7..b7e274c1c86 100644 --- a/usr.bin/cvs/buf.c +++ b/usr.bin/cvs/buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.69 2008/02/27 22:34:04 joris Exp $ */ +/* $OpenBSD: buf.c,v 1.70 2008/03/08 11:53:36 joris Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -296,7 +296,7 @@ cvs_buf_write_stmp(BUF *b, char *template, struct timeval *tv) cvs_worklist_add(template, &temp_files); - if (lseek(fd, SEEK_SET, 0) < 0) + if (lseek(fd, 0, SEEK_SET) < 0) fatal("cvs_buf_write_stmp: lseek: %s", strerror(errno)); return (fd); diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c index adfb540da98..f98c55e4584 100644 --- a/usr.bin/cvs/diff3.c +++ b/usr.bin/cvs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.45 2008/03/01 14:40:23 joris Exp $ */ +/* $OpenBSD: diff3.c,v 1.46 2008/03/08 11:53:36 joris Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,7 +72,7 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.45 2008/03/01 14:40:23 joris Exp $"; + "$OpenBSD: diff3.c,v 1.46 2008/03/08 11:53:36 joris Exp $"; #endif /* not lint */ #include <ctype.h> @@ -216,11 +216,11 @@ cvs_merge_file(struct cvs_file *cf, int verbose) argv[argc++] = path2; argv[argc++] = path3; - if (lseek(fds[2], SEEK_SET, 0) < 0) + if (lseek(fds[2], 0, SEEK_SET) < 0) fatal("cvs_merge_file: lseek fds[2]: %s", strerror(errno)); - if (lseek(fds[3], SEEK_SET, 0) < 0) + if (lseek(fds[3], 0, SEEK_SET) < 0) fatal("cvs_merge_file: lseek fds[3]: %s", strerror(errno)); - if (lseek(fds[4], SEEK_SET, 0) < 0) + if (lseek(fds[4], 0, SEEK_SET) < 0) fatal("cvs_merge_file: lseek fds[4]: %s", strerror(errno)); diff3_conflicts = diff3_internal(argc, argv, cf->file_path, r2); diff --git a/usr.bin/cvs/diff_internals.c b/usr.bin/cvs/diff_internals.c index 16b4fd7f663..2c022d7d9f5 100644 --- a/usr.bin/cvs/diff_internals.c +++ b/usr.bin/cvs/diff_internals.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff_internals.c,v 1.19 2008/02/27 22:34:04 joris Exp $ */ +/* $OpenBSD: diff_internals.c,v 1.20 2008/03/08 11:53:36 joris Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -318,7 +318,7 @@ cvs_diffreg(const char *file1, const char *file2, int _fd1, int _fd2, BUF *out) if (fd2 == -1) fatal("cvs_diffreg: dup: %s", strerror(errno)); - if (lseek(fd1, SEEK_SET, 0) < 0) + if (lseek(fd1, 0, SEEK_SET) < 0) fatal("cvs_diffreg: lseek: %s", strerror(errno)); f1 = fdopen(fd1, "r"); @@ -327,7 +327,7 @@ cvs_diffreg(const char *file1, const char *file2, int _fd1, int _fd2, BUF *out) goto closem; } - if (lseek(fd2, SEEK_SET, 0) < 0) + if (lseek(fd2, 0, SEEK_SET) < 0) fatal("cvs_diffreg: lseek: %s", strerror(errno)); f2 = fdopen(fd2, "r"); diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index d9f7de5b515..56f1fbd7de3 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.256 2008/03/02 19:31:08 tobias Exp $ */ +/* $OpenBSD: rcs.c,v 1.257 2008/03/08 11:53:36 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -3072,7 +3072,7 @@ rcs_rev_write_stmp(RCSFILE *rfp, RCSNUM *rev, char *template, int mode) cvs_worklist_add(template, &temp_files); rcs_rev_write_fd(rfp, rev, fd, mode); - if (lseek(fd, SEEK_SET, 0) < 0) + if (lseek(fd, 0, SEEK_SET) < 0) fatal("rcs_rev_write_stmp: lseek: %s", strerror(errno)); return (fd); diff --git a/usr.bin/cvs/remote.c b/usr.bin/cvs/remote.c index f707a1dc5f3..4ed44f6bfa4 100644 --- a/usr.bin/cvs/remote.c +++ b/usr.bin/cvs/remote.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remote.c,v 1.21 2008/02/27 22:34:04 joris Exp $ */ +/* $OpenBSD: remote.c,v 1.22 2008/03/08 11:53:36 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -173,7 +173,7 @@ cvs_remote_send_file(const char *path, int _fd) if (fd == -1) fatal("cvs_remote_send_file: dup: %s", strerror(errno)); - if (lseek(fd, SEEK_SET, 0) < 0) + if (lseek(fd, 0, SEEK_SET) < 0) fatal("cvs_remote_send_file: %s: lseek: %s", path, strerror(errno)); |