diff options
author | John Crispin <blogic@openwrt.org> | 2011-06-09 07:08:54 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2011-06-09 07:08:54 +0000 |
commit | 4d115d3804e995b7f4a4a401352d7340cf30bbdb (patch) | |
tree | 44f58e6048e16b3753ae781363b1bdbba07c3c24 /target/linux/generic/files | |
parent | fe5712255bf9741bd16ceb1ddffc5b8a0504b8e6 (diff) | |
download | upstream-4d115d3804e995b7f4a4a401352d7340cf30bbdb.tar.gz upstream-4d115d3804e995b7f4a4a401352d7340cf30bbdb.tar.bz2 upstream-4d115d3804e995b7f4a4a401352d7340cf30bbdb.zip |
[ledtrig-netdev]
we dont need 1024 bytes buffer. 128 bytes is enough.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27143 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r-- | target/linux/generic/files/drivers/leds/ledtrig-netdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c index 8dba8e654d..6c56acb27d 100644 --- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c +++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c @@ -182,13 +182,13 @@ static ssize_t led_mode_store(struct device *dev, { struct led_classdev *led_cdev = dev_get_drvdata(dev); struct led_netdev_data *trigger_data = led_cdev->trigger_data; - char copybuf[1024]; + char copybuf[128]; int new_mode = -1; char *p, *token; /* take a copy since we don't want to trash the inbound buffer when using strsep */ strncpy(copybuf, buf, sizeof(copybuf)); - copybuf[1023] = 0; + copybuf[sizeof(copybuf) - 1] = 0; p = copybuf; while ((token = strsep(&p, " \t\n")) != NULL) { |