projects
/
platform
/
upstream
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Imported Upstream version 2.14.3
[platform/upstream/git.git]
/
git-compat-util.h
diff --git
a/git-compat-util.h
b/git-compat-util.h
index
7d2c0ca
..
bf4869d
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)))