[rtems commit] ramdisk: Fix device name generation
Sebastian Huber
sebh at rtems.org
Fri Jun 27 14:26:23 UTC 2014
Module: rtems
Branch: 4.10
Commit: f8811e4364798c57d65dbccaa19f183cb7749ef9
Changeset: http://git.rtems.org/rtems/commit/?id=f8811e4364798c57d65dbccaa19f183cb7749ef9
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Mar 22 15:10:37 2013 +0100
ramdisk: Fix device name generation
---
cpukit/libblock/src/ramdisk-config.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpukit/libblock/src/ramdisk-config.c b/cpukit/libblock/src/ramdisk-config.c
index 2552406..83bf6e9 100644
--- a/cpukit/libblock/src/ramdisk-config.c
+++ b/cpukit/libblock/src/ramdisk-config.c
@@ -52,7 +52,7 @@ ramdisk_initialize(
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
- name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
+ name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
More information about the vc
mailing list