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:
Diffstat (limited to 'winsup/cygwin/sec_helper.cc')
-rw-r--r--winsup/cygwin/sec_helper.cc17
1 files changed, 6 insertions, 11 deletions
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc
index d8cd16062..a32dcb8f5 100644
--- a/winsup/cygwin/sec_helper.cc
+++ b/winsup/cygwin/sec_helper.cc
@@ -443,19 +443,17 @@ set_cygwin_privileges (HANDLE token)
set_privilege (token, SE_CHANGE_NOTIFY_PRIV, !allow_traverse);
}
-/*
- * Function to return a common SECURITY_DESCRIPTOR * that
- * allows all access.
- */
+/* Function to return a common SECURITY_DESCRIPTOR that
+ allows all access. */
-static NO_COPY SECURITY_DESCRIPTOR *null_sdp = 0;
SECURITY_DESCRIPTOR *__stdcall
get_null_sd ()
{
static NO_COPY SECURITY_DESCRIPTOR sd;
+ static NO_COPY SECURITY_DESCRIPTOR *null_sdp;
- if (null_sdp == 0)
+ if (!null_sdp)
{
InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl (&sd, TRUE, 0, FALSE);
@@ -464,11 +462,8 @@ get_null_sd ()
return null_sdp;
}
-/*
- * Initialize global security attributes.
- *
- * Called from dcrt0.cc (_dll_crt0).
- */
+/* Initialize global security attributes.
+ Called from dcrt0.cc (_dll_crt0). */
void
init_global_security ()