[rtems commit] posix: Remove superfluous includes
Sebastian Huber
sebh at rtems.org
Wed Sep 27 10:11:53 UTC 2017
Module: rtems
Branch: master
Commit: ef18d3680c356cdb56e2b2223f0f7850d789f54a
Changeset: http://git.rtems.org/rtems/commit/?id=ef18d3680c356cdb56e2b2223f0f7850d789f54a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Sep 26 07:52:08 2017 +0200
posix: Remove superfluous includes
---
cpukit/posix/src/barrierattrdestroy.c | 11 ++++-------
cpukit/posix/src/rwlockattrdestroy.c | 11 ++++-------
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/cpukit/posix/src/barrierattrdestroy.c b/cpukit/posix/src/barrierattrdestroy.c
index 96c1e2b..8d27a10 100644
--- a/cpukit/posix/src/barrierattrdestroy.c
+++ b/cpukit/posix/src/barrierattrdestroy.c
@@ -18,13 +18,10 @@
#include "config.h"
#endif
-#include <pthread.h>
#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/condimpl.h>
-#include <rtems/posix/muteximpl.h>
+#include <pthread.h>
+#include <stddef.h>
+#include <stdbool.h>
/*
* Barrier Initialization Attributes
@@ -34,7 +31,7 @@ int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
- if ( !attr || attr->is_initialized == false )
+ if ( attr == NULL || !attr->is_initialized )
return EINVAL;
attr->is_initialized = false;
diff --git a/cpukit/posix/src/rwlockattrdestroy.c b/cpukit/posix/src/rwlockattrdestroy.c
index 19bf0ff..e788339 100644
--- a/cpukit/posix/src/rwlockattrdestroy.c
+++ b/cpukit/posix/src/rwlockattrdestroy.c
@@ -18,13 +18,10 @@
#include "config.h"
#endif
-#include <pthread.h>
#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/condimpl.h>
-#include <rtems/posix/muteximpl.h>
+#include <pthread.h>
+#include <stddef.h>
+#include <stdbool.h>
/*
* RWLock Initialization Attributes
@@ -34,7 +31,7 @@ int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
- if ( !attr || attr->is_initialized == false )
+ if ( attr == NULL || !attr->is_initialized )
return EINVAL;
attr->is_initialized = false;
More information about the vc
mailing list