Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-30 02:05:30 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-30 02:05:30 +0400
commitefc1575ecd6c005883f5e4bb292a6a33a4c17b2a (patch)
tree41df41dd3c8695122f44a4d06bf66fd50a2867ed /winsup/cygwin/cygheap.h
parent638180f51f6db54d42f48b4e5daabd159d71484a (diff)
* autoload.cc (NetGetDCName): Change to make this an optional load function.
* cygheap.h (cygheap_user::logsrv): Return NULL when operation fails. (cygheap_user::winname): Ditto. (cygheap_user::domain): Ditto. * uinfo.cc (cygheap_user::env_logsrv): Save results in temp variable. (cygheap_user::env_userprofile): Ditto.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 63585d91a..d2e06bfef 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -144,15 +144,18 @@ public:
const char *logsrv ()
{
- return env_logsrv ("LOGONSERVER=", sizeof ("LOGONSERVER=") - 1);
+ const char *p = env_logsrv ("LOGONSERVER=", sizeof ("LOGONSERVER=") - 1);
+ return (p == almost_null) ? NULL : p;
}
const char *winname ()
{
- return env_name ("USERNAME=", sizeof ("USERNAME=") - 1);
+ const char *p = env_name ("USERNAME=", sizeof ("USERNAME=") - 1);
+ return (p == almost_null) ? NULL : p;
}
const char *domain ()
{
- return env_domain ("USERDOMAIN=", sizeof ("USERDOMAIN=") - 1);
+ const char *p = env_domain ("USERDOMAIN=", sizeof ("USERDOMAIN=") - 1);
+ return (p == almost_null) ? NULL : p;
}
BOOL set_sid (PSID new_sid);
BOOL set_orig_sid ();