Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
diff: --indent-heuristic is no longer experimental
[gitweb.git]
/
git-compat-util.h
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 7d2c0ca75922ea1ca8c67ec798ff8ce1249c925f..bf4869dcef39b12dcb650d5fc4a87ace8ea91848 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-900,9
+900,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)))