[rtems commit] posix: Fix use of uninitialized variable

Sebastian Huber sebh at rtems.org
Wed Jan 25 12:32:59 UTC 2017


Module:    rtems
Branch:    master
Commit:    090bdc7e9451467946463a2658adb9e777813f1c
Changeset: http://git.rtems.org/rtems/commit/?id=090bdc7e9451467946463a2658adb9e777813f1c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jan 25 11:45:49 2017 +0100

posix: Fix use of uninitialized variable

Update #2859.

---

 cpukit/posix/src/shmopen.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/posix/src/shmopen.c b/cpukit/posix/src/shmopen.c
index fec443a..3f3789f 100644
--- a/cpukit/posix/src/shmopen.c
+++ b/cpukit/posix/src/shmopen.c
@@ -100,6 +100,8 @@ static int shm_close( rtems_libio_t *iop )
   ISR_lock_Context       lock_ctx;
   int err;
 
+  err = 0;
+
   _Objects_Allocator_lock();
 
   --shm->reference_count;




More information about the vc mailing list