]> sipb.mit.edu Git - ikiwiki.git/commitdiff
C warning cleanup
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 18 Mar 2010 21:35:59 +0000 (17:35 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 18 Mar 2010 21:40:18 +0000 (17:40 -0400)
IkiWiki/Wrapper.pm

index 5427a5c80b1f0762775231eadb9663b6f8841d2f..830b0487734e352fe4b6c2585616c480d794713a 100644 (file)
@@ -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");