lkml.org 
[lkml]   [2007]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [x86 setup 20/33] Console-writing code for the new x86 setup code

    On Jul 9 2007 19:51, H. Peter Anvin wrote:
    >+
    >+static inline int isdigit(int ch)
    >+{
    >+ return (ch >= '0') && (ch <= '9');
    >+}

    I'd say static inline unsigned int isdigit(unsigned char), since ASCII does not
    realistically exceed 255.

    >+static int strnlen(const char *s, int maxlen)

    unsigned int, and unsigned int, too?
    The glibc strnlen type also uses unsigned types.




    Jan
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-07-10 20:39    [W:2.461 / U:0.712 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site