From 93f8a2e834eed69aff7ef3be8c2baba14bab0658 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 18 Sep 2009 23:07:26 +0200 Subject: convert // comments to /**/; remove empty #if/#endif pairs. no code changes Signed-off-by: Denys Vlasenko --- librt/shm.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'librt') diff --git a/librt/shm.c b/librt/shm.c index dd2132457..40e69fa2e 100644 --- a/librt/shm.c +++ b/librt/shm.c @@ -72,15 +72,16 @@ int shm_open(const char *name, int oflag, mode_t mode) fd = open(shm_name, oflag, mode); if (fd >= 0) { fcntl(fd, F_SETFD, FD_CLOEXEC); - // thus far, {G,S}ETFD only has this single flag, - // and setting it never fails. - //int fdflags = fcntl(fd, F_GETFD); - //if (fdflags >= 0) - // fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC); - //if (fdflags < 0) { - // close(fd); - // fd = -1; - //} + /* thus far, {G,S}ETFD only has this single flag, + * and setting it never fails. + *int fdflags = fcntl(fd, F_GETFD); + *if (fdflags >= 0) + * fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC); + *if (fdflags < 0) { + * close(fd); + * fd = -1; + *} + */ } #endif free(shm_name); /* doesn't affect errno */ -- cgit v1.2.3