diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-23 10:01:57 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-26 09:53:22 +0200 |
commit | 842d63bae55208ad4c47c756e11f98e4fcb95a58 (patch) | |
tree | abb192212c40f0958c7c7f695d8b6a913d6aef5d /cpukit/libblock/src | |
parent | bsp/xilinx-zynq: Add cache support (diff) | |
download | rtems-842d63bae55208ad4c47c756e11f98e4fcb95a58.tar.bz2 |
libblock: Avoid uninitialized variable
Diffstat (limited to 'cpukit/libblock/src')
-rw-r--r-- | cpukit/libblock/src/bdbuf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c index 0fbafaa6f4..b7663f1408 100644 --- a/cpukit/libblock/src/bdbuf.c +++ b/cpukit/libblock/src/bdbuf.c @@ -1348,8 +1348,7 @@ rtems_bdbuf_swapout_workers_create (void) worker_size = rtems_bdbuf_swapout_worker_size (); worker_current = calloc (1, bdbuf_config.swapout_workers * worker_size); - if (!worker_current) - sc = RTEMS_NO_MEMORY; + sc = worker_current != NULL ? RTEMS_SUCCESSFUL : RTEMS_NO_MEMORY; bdbuf_cache.swapout_workers = (rtems_bdbuf_swapout_worker *) worker_current; |