diff options
author | Bojan Prtvar <prtvar.b@gmail.com> | 2014-04-03 16:56:10 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-18 23:21:05 (GMT) |
commit | f1552cbdc7d3cb42f3c9e88b2ad6cd5bfe90881a (patch) | |
tree | 7849a303bc527d933b9198113764cf929b864613 /drivers/staging | |
parent | 938acb99ce6c8883075c4c6e64409dd765bdb9e9 (diff) | |
download | linux-f1552cbdc7d3cb42f3c9e88b2ad6cd5bfe90881a.tar.xz |
staging: vme: Simplfy string usage in vme_user_probe()
We can avoid usage of sprintf() and magic-sized array with simple pointer assignment.
Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
Reviewed-by: wharms <wharms@bfs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vme/devices/vme_user.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index 481192a..5fa7f83 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -684,7 +684,7 @@ static int vme_user_match(struct vme_dev *vdev) static int vme_user_probe(struct vme_dev *vdev) { int i, err; - char name[12]; + char *name; /* Save pointer to the bridge device */ if (vme_user_bridge != NULL) { @@ -794,13 +794,13 @@ static int vme_user_probe(struct vme_dev *vdev) switch (type[i]) { case MASTER_MINOR: - sprintf(name, "bus/vme/m%%d"); + name = "bus/vme/m%d"; break; case CONTROL_MINOR: - sprintf(name, "bus/vme/ctl"); + name = "bus/vme/ctl"; break; case SLAVE_MINOR: - sprintf(name, "bus/vme/s%%d"); + name = "bus/vme/s%d"; break; default: err = -EINVAL; |