diff options
author | Erik Arfvidson <erik.arfvidson@unisys.com> | 2016-04-13 12:07:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-28 22:09:37 -0700 |
commit | 38d56c2fad91a02d289df40b029300310fb6c75a (patch) | |
tree | 88a3355feb78ae753e7dc6964ab23d62950cf053 /drivers/staging/unisys | |
parent | 6a957193ba83e5487705f63011307d202fff69f8 (diff) |
staging: unisys: added display string size define
Display string size that is guaranteed to be no longer the 99 characters.
Don't use a magic number throughout the code, define it once and use it
throughout.
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorbus_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 547be8b50956..6216f4beb58a 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -33,6 +33,9 @@ static int visorbus_forcenomatch; static int visorbus_debugref; #define SERIALLOOPBACKCHANADDR (100 * 1024 * 1024) +/* Display string that is guaranteed to be no longer the 99 characters*/ +#define LINESIZE 99 + #define CURRENT_FILE_PC VISOR_BUS_PC_visorbus_main_c #define POLLJIFFIES_TESTWORK 100 #define POLLJIFFIES_NORMALCHANNEL 10 @@ -279,7 +282,7 @@ static ssize_t typeguid_show(struct device *dev, struct device_attribute *attr, char *buf) { struct visor_device *vdev = to_visor_device(dev); - char typeid[99]; + char typeid[LINESIZE]; if (!vdev->visorchannel) return 0; @@ -291,7 +294,7 @@ static ssize_t zoneguid_show(struct device *dev, struct device_attribute *attr, char *buf) { struct visor_device *vdev = to_visor_device(dev); - char zoneid[99]; + char zoneid[LINESIZE]; if (!vdev->visorchannel) return 0; |