]> andersk Git - openssh.git/blobdiff - openbsd-compat/bsd-cygwin_util.c
ignore generated Makefile
[openssh.git] / openbsd-compat / bsd-cygwin_util.c
index eb983def2d5ec7d14ea568c7480cb774c5094786..b408dde2db6b9b8d38a2caceed61c45620dca9d2 100644 (file)
@@ -29,8 +29,6 @@
 
 #include "includes.h"
 
-RCSID("$Id$");
-
 #ifdef HAVE_CYGWIN
 
 #include <fcntl.h>
@@ -247,6 +245,7 @@ static struct wenv {
        { NL("COMMONPROGRAMFILES=") },
        { NL("COMPUTERNAME=") },
        { NL("COMSPEC=") },
+       { NL("CYGWIN=") },
        { NL("NUMBER_OF_PROCESSORS=") },
        { NL("OS=") },
        { NL("PATH=") },
@@ -260,16 +259,16 @@ static struct wenv {
        { NL("SYSTEMROOT=") },
        { NL("TMP=") },
        { NL("TEMP=") },
-       { NL("WINDIR=") },
+       { NL("WINDIR=") }
 };
 
 char **
 fetch_windows_environment(void)
 {
        char **e, **p;
-       int i, idx = 0;
+       unsigned int i, idx = 0;
 
-       p = xmalloc(WENV_SIZ * sizeof(char *));
+       p = xcalloc(WENV_SIZ + 1, sizeof(char *));
        for (e = environ; *e != NULL; ++e) {
                for (i = 0; i < WENV_SIZ; ++i) {
                        if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen))
This page took 0.140788 seconds and 4 git commands to generate.