Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'sg/travis-retrieve-trash-upon-failure'
[gitweb.git]
/
compat
/
setenv.c
diff --git
a/compat/setenv.c
b/compat/setenv.c
index fc1439a6439393ff5224e98ab126607ceaa4994d..7849f258d20195ac27c9be921fb8b65ac094a408 100644
(file)
--- a/
compat/setenv.c
+++ b/
compat/setenv.c
@@
-18,7
+18,7
@@
int gitsetenv(const char *name, const char *value, int replace)
namelen = strlen(name);
valuelen = strlen(value);
- envstr = malloc(
(namelen + valuelen +
2));
+ envstr = malloc(
st_add3(namelen, valuelen,
2));
if (!envstr) {
errno = ENOMEM;
return -1;