Changeset 27143


Ignore:
Timestamp:
2011-06-09T09:08:54+02:00 (7 years ago)
Author:
blogic
Message:

[ledtrig-netdev]
we dont need 1024 bytes buffer. 128 bytes is enough.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/leds/ledtrig-netdev.c

    r21952 r27143  
    183183        struct led_classdev *led_cdev = dev_get_drvdata(dev); 
    184184        struct led_netdev_data *trigger_data = led_cdev->trigger_data; 
    185         char copybuf[1024]; 
     185        char copybuf[128]; 
    186186        int new_mode = -1; 
    187187        char *p, *token; 
     
    189189        /* take a copy since we don't want to trash the inbound buffer when using strsep */ 
    190190        strncpy(copybuf, buf, sizeof(copybuf)); 
    191         copybuf[1023] = 0; 
     191        copybuf[sizeof(copybuf) - 1] = 0; 
    192192        p = copybuf; 
    193193 
Note: See TracChangeset for help on using the changeset viewer.