diff options
author | Christopher Faylor <me@cgf.cx> | 2006-07-17 19:30:30 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-07-17 19:30:30 +0000 |
commit | f62412f235c387d46e192244db43ce62d9a9e7be (patch) | |
tree | d73718103abbf20830156b3b28ffb827ac31f99a /winsup/cygwin/sec_helper.cc | |
parent | b04b2e6b6d8edee67190de6ffc5abd8b56916ffa (diff) | |
download | cygnal-f62412f235c387d46e192244db43ce62d9a9e7be.tar.gz cygnal-f62412f235c387d46e192244db43ce62d9a9e7be.tar.bz2 cygnal-f62412f235c387d46e192244db43ce62d9a9e7be.zip |
GCC 4.1 fixes.
* cygheap.h (cygheap_user): Remove unneeded class names from function
declaration.
* fhandler.h (fhandler_base): Ditto.
(fhandler_dev_floppy): Ditto.
(fhandler_console): Ditto.
* wininfo.h (wininfo): Ditto.
* exceptions.cc (sigpacket::process): Avoid compiler errors about gotos and
initialization.
* fhandler_fifo.cc (fhandler_fifo::open): Ditto.
* fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto.
* mmap.cc (mmap64): Ditto.
* pipe.cc (fhandler_pipe::open): Ditto.
* spawn.cc (spawn_guts): Ditto.
* sec_helper.cc: Fix some comments.
(get_null_sd): Move file-scope static to only function where it is used.
Diffstat (limited to 'winsup/cygwin/sec_helper.cc')
-rw-r--r-- | winsup/cygwin/sec_helper.cc | 17 |
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 () |