git: 0549218b43f0 - main - libdiff: Fix type issues.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 May 2024 15:03:52 UTC
The branch main has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=0549218b43f028bb5bde430d7fcc6ead6843aa61
commit 0549218b43f028bb5bde430d7fcc6ead6843aa61
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2024-05-03 15:03:01 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2024-05-03 15:03:50 +0000
libdiff: Fix type issues.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude, markj
Differential Revision: https://reviews.freebsd.org/D45077
---
contrib/libdiff/lib/diff_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/libdiff/lib/diff_main.c b/contrib/libdiff/lib/diff_main.c
index e64b1320e553..1cf91c0a1bdb 100644
--- a/contrib/libdiff/lib/diff_main.c
+++ b/contrib/libdiff/lib/diff_main.c
@@ -54,7 +54,8 @@ diff_chunk_type(const struct diff_chunk *chunk)
static int
read_at(FILE *f, off_t at_pos, unsigned char *buf, size_t len)
{
- int r;
+ ssize_t r;
+
if (fseeko(f, at_pos, SEEK_SET) == -1)
return errno;
r = fread(buf, sizeof(char), len, f);
@@ -153,7 +154,7 @@ diff_atom_cmp(int *cmp,
unsigned char buf_left[chunksz], buf_right[chunksz];
const uint8_t *p_left, *p_right;
off_t n_left, n_right;
- ssize_t r;
+ int r;
if (!remain_right) {
*cmp = 1;