Browse Source

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>
Ian Abbott 12 years ago
parent
commit
a7e240a40c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/comedi/drivers/comedi_bond.c

+ 1 - 1
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;