aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-03-18 17:35:59 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-03-18 17:40:18 -0400
commitb4ab74e722aaca406922fe614d9e6541dd87c3bf (patch)
tree2bb9b1579fd38baa12e1eb1af4efad50c56c6627
parentfed7383903c402d68ff2fc2d3734c55b35d520a4 (diff)
downloadikiwiki-b4ab74e722aaca406922fe614d9e6541dd87c3bf.tar
ikiwiki-b4ab74e722aaca406922fe614d9e6541dd87c3bf.tar.gz
C warning cleanup
-rw-r--r--IkiWiki/Wrapper.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
index 5427a5c80..830b04877 100644
--- a/IkiWiki/Wrapper.pm
+++ b/IkiWiki/Wrapper.pm
@@ -76,8 +76,8 @@ EOF
{
int fd=open("$config{wikistatedir}/cgilock", O_CREAT | O_RDWR, 0666);
if (fd != -1 && flock(fd, LOCK_EX) == 0) {
- char *fd_s;
- asprintf(&fd_s, "%i", fd);
+ char *fd_s=malloc(8);
+ sprintf(fd_s, "%i", fd);
setenv("IKIWIKI_CGILOCK_FD", fd_s, 1);
}
}
@@ -105,7 +105,7 @@ extern char **environ;
char *newenviron[$#envsave+6];
int i=0;
-addenv(char *var, char *val) {
+void addenv(char *var, char *val) {
char *s=malloc(strlen(var)+1+strlen(val)+1);
if (!s)
perror("malloc");