Changeset 6c441cf8 in mainline for kernel/generic/src/lib/func.c


Ignore:
Timestamp:
2008-02-27T11:49:17Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
56976a17
Parents:
fdb7795
Message:

code cleanup (mostly signed/unsigned)
allow extra compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/lib/func.c

    rfdb7795 r6c441cf8  
    140140int strncmp(const char *src, const char *dst, size_t len)
    141141{
    142         int i;
     142        unsigned int i;
    143143       
    144         for (i = 0; *src && *dst && i < len; src++, dst++, i++) {
     144        for (i = 0; (*src) && (*dst) && (i < len); src++, dst++, i++) {
    145145                if (*src < *dst)
    146146                        return -1;
     
    169169void strncpy(char *dest, const char *src, size_t len)
    170170{
    171         int i;
     171        unsigned int i;
    172172        for (i = 0; i < len; i++) {
    173173                if (!(dest[i] = src[i]))
Note: See TracChangeset for help on using the changeset viewer.