[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Database fixes.
From: |
Stephen Wilson |
Subject: |
Re: [Axiom-developer] Database fixes. |
Date: |
Wed, 8 Dec 2004 19:34:43 -0500 |
User-agent: |
Mutt/1.4.2i |
Hello,
I was reading your code and am confused over an edit in `addtopath'
in cfuns-c.c.pamphlet:
====================================================================
newpath = (char *) malloc(1 + strlen(path) + strlen(dir) +
strlen("PATH=:"));
if (newpath == NULL)
return -1;
#ifndef MSYSplatform
sprintf(newpath, "PATH=%s;%s", path, dir);
#else /* MSYSplatform */
#endif /* MSYSplatform */
return putenv(newpath);
}
====================================================================
I have never programed on windows. Is malloc guaranteed to return
initialized data (i.e., zeroed) on windows? I would be concernced in
passing a fresh pointer from malloc to putenv.
Thanks,
Steve