1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-20 05:03:10 +03:00

Standard pgindent run for 8.1.

This commit is contained in:
Bruce Momjian
2005-10-15 02:49:52 +00:00
parent 790c01d280
commit 1dc3498251
770 changed files with 34334 additions and 32507 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/unsetenv.c,v 1.4 2004/12/31 22:03:53 pgsql Exp $
* $PostgreSQL: pgsql/src/port/unsetenv.c,v 1.5 2005/10/15 02:49:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -25,17 +25,16 @@ unsetenv(const char *name)
return; /* no work */
/*
* The technique embodied here works if libc follows the Single Unix
* Spec and actually uses the storage passed to putenv() to hold the
* environ entry. When we clobber the entry in the second step we are
* ensuring that we zap the actual environ member. However, there are
* some libc implementations (notably recent BSDs) that do not obey
* SUS but copy the presented string. This method fails on such
* platforms. Hopefully all such platforms have unsetenv() and thus
* won't be using this hack.
* The technique embodied here works if libc follows the Single Unix Spec
* and actually uses the storage passed to putenv() to hold the environ
* entry. When we clobber the entry in the second step we are ensuring
* that we zap the actual environ member. However, there are some libc
* implementations (notably recent BSDs) that do not obey SUS but copy the
* presented string. This method fails on such platforms. Hopefully all
* such platforms have unsetenv() and thus won't be using this hack.
*
* Note that repeatedly setting and unsetting a var using this code will
* leak memory.
* Note that repeatedly setting and unsetting a var using this code will leak
* memory.
*/
envstr = (char *) malloc(strlen(name) + 2);
@ -50,8 +49,8 @@ unsetenv(const char *name)
strcpy(envstr, "=");
/*
* This last putenv cleans up if we have multiple zero-length names as
* a result of unsetting multiple things.
* This last putenv cleans up if we have multiple zero-length names as a
* result of unsetting multiple things.
*/
putenv(envstr);
}