The branch main has been updated by bapt:

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

commit fa977a3b2bb2d0e6c2957b14474c31b58dd3a8e1
Author:     Baptiste Daroussin <[email protected]>
AuthorDate: 2021-01-26 10:42:20 +0000
Commit:     Baptiste Daroussin <[email protected]>
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"));
 }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to