diff options
author | Ian Abbott | 2013-08-23 14:44:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-08-26 06:41:56 -0700 |
commit | a7e240a40c0e9cff7572cda74daea18985ff4aad (patch) | |
tree | 5c47c6d7ad0849efe6aa283f34e77e7dc4bb0824 | |
parent | c2b03cec564afc8c313f39ca7a7b654e8ebda079 (diff) |
staging: comedi: comedi_bond: no need to initialize file[]
The `char file[]` variable in `do_dev_config()` doesn't need to be
initialized as it gets overwritten with a `snprintf()`. It just needs
to be long enough.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_bond.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 253a67da8e03..00c065a3dafd 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -200,7 +200,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) * building our device list. */ for (i = 0; i < COMEDI_NDEVCONFOPTS && (!i || it->options[i]); ++i) { - char file[] = "/dev/comediXXXXXX"; + char file[sizeof("/dev/comediXXXXXX")]; int minor = it->options[i]; struct comedi_device *d; int sdev = -1, nchans, tmp; |