Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
compat: convert modes to use portable file type values
[gitweb.git]
/
http-backend.c
diff --git
a/http-backend.c
b/http-backend.c
index 57290d9bdafc730afaac3ddf8564d85ead39eb31..80790bbaef95a56ac737c7763e48035e3e0754ee 100644
(file)
--- a/
http-backend.c
+++ b/
http-backend.c
@@
-610,9
+610,7
@@
int main(int argc, char **argv)
cmd = c;
n = out[0].rm_eo - out[0].rm_so;
- cmd_arg = xmalloc(n);
- memcpy(cmd_arg, dir + out[0].rm_so + 1, n-1);
- cmd_arg[n-1] = '\0';
+ cmd_arg = xmemdupz(dir + out[0].rm_so + 1, n - 1);
dir[out[0].rm_so] = 0;
break;
}