From b4ab74e722aaca406922fe614d9e6541dd87c3bf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 18 Mar 2010 17:35:59 -0400 Subject: C warning cleanup --- IkiWiki/Wrapper.pm | 6 +++--- 1 file 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"); -- cgit v1.2.3