Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
bisect--helper: use OPT_CMDMODE instead of OPT_BOOL
[gitweb.git]
/
git-compat-util.h
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 9bc15b0363d562fc55268419055e9cdbbeee50c3..cedad4d5818a6e5c6e1732d34cf8fef6dab36718 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-898,9
+898,11
@@
static inline char *xstrdup_or_null(const char *str)
static inline size_t xsize_t(off_t len)
{
- if (len > (size_t) len)
+ size_t size = (size_t) len;
+
+ if (len != (off_t) size)
die("Cannot handle files this big");
- return
(size_t)len
;
+ return
size
;
}
__attribute__((format (printf, 3, 4)))