commit - be33dff7fa389c620154dc06efbeae69bd002950
commit + e45f7eba7c3fe929b6bd5852f390301aeace98aa
blob - d7d7afe8b98daec948e859725cc2686ec675b8f5
blob + 3ed493e1548c3314613c3fc0bee9db8553a9b33a
--- lib/patch.c
+++ lib/patch.c
char buf[BUFSIZ];
size_t len, r, w;
- if (fseek(orig, copypos, SEEK_SET) == -1)
- return got_error_from_errno("fseek");
+ if (fseeko(orig, copypos, SEEK_SET) == -1)
+ return got_error_from_errno("fseeko");
while (pos == -1 || copypos < pos) {
len = sizeof(buf);
if (err == NULL) {
*pos = match;
*lineno = match_lineno;
- if (fseek(orig, match, SEEK_SET) == -1)
- err = got_error_from_errno("fseek");
+ if (fseeko(orig, match, SEEK_SET) == -1)
+ err = got_error_from_errno("fseeko");
}
free(line);
* try to apply the hunk again starting the search
* after the previous partial match.
*/
- if (fseek(orig, pos, SEEK_SET) == -1) {
- err = got_error_from_errno("fseek");
+ if (fseeko(orig, pos, SEEK_SET) == -1) {
+ err = got_error_from_errno("fseeko");
goto done;
}
linelen = getline(&line, &linesize, orig);
blob - 96d97895737dd64fc733a5a4dcbcc4b195ffe58e
blob + 0e9106ae59e928cb2940be6f14a61271e7d97522
--- libexec/got-read-patch/got-read-patch.c
+++ libexec/got-read-patch/got-read-patch.c
break;
/* rewind to previous line */
- if (fseek(fp, linelen * -1, SEEK_CUR) == -1)
- err = got_error_from_errno("fseek");
+ if (fseeko(fp, -linelen, SEEK_CUR) == -1)
+ err = got_error_from_errno("fseeko");
break;
}
}
if (err)
goto done;
if (*done) {
- if (fseek(fp, linelen * -1, SEEK_CUR) == -1)
- err = got_error_from_errno("fseek");
+ if (fseeko(fp, -linelen, SEEK_CUR) == -1)
+ err = got_error_from_errno("fseeko");
goto done;
}