lkml.org 
[lkml]   [2012]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 91/95] Staging: speakup: fix an improperly-declared variable.
    3.2-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Christopher Brannon <chris@the-brannons.com>

    commit 4ea418b8b2fa8a70d0fcc8231b65e67b3a72984b upstream.

    A local static variable was declared as a pointer to a string
    constant. We're assigning to the underlying memory, so it
    needs to be an array instead.

    Signed-off-by: Christopher Brannon <chris@the-brannons.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/staging/speakup/main.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
    index 92b34e2..40e2488 100644
    --- a/drivers/staging/speakup/main.c
    +++ b/drivers/staging/speakup/main.c
    @@ -1854,7 +1854,7 @@ static void speakup_bits(struct vc_data *vc)

    static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u_short key)
    {
    - static u_char *goto_buf = "\0\0\0\0\0\0";
    + static u_char goto_buf[8];
    static int num;
    int maxlen, go_pos;
    char *cp;



    \
     
     \ /
      Last update: 2012-09-10 02:21    [W:2.137 / U:0.412 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site