Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 2021 11:18:52 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: fa977a3b2bb2 - main - diff: eliminate a useless lseek
Message-ID:  <202101271118.10RBIqus083681@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/src/commit/?id=fa977a3b2bb2d0e6c2957b14474c31b58dd3a8e1

commit fa977a3b2bb2d0e6c2957b14474c31b58dd3a8e1
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2021-01-26 10:42:20 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2021-01-27 11:18:45 +0000

    diff: eliminate a useless lseek
    
    fdopen with the "r" already position the stream at the beginning
    of the file.
---
 usr.bin/diff/diffreg.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
index 4e887ab27c7b..a8d668ea0984 100644
--- a/usr.bin/diff/diffreg.c
+++ b/usr.bin/diff/diffreg.c
@@ -491,7 +491,6 @@ opentemp(const char *f)
 		}
 	}
 	close(ifd);
-	lseek(ofd, (off_t)0, SEEK_SET);
 	return (fdopen(ofd, "r"));
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101271118.10RBIqus083681>