Changeset 1433ecda in mainline for uspace/lib/c/generic/mem.c


Ignore:
Timestamp:
2018-04-04T15:42:37Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/mem.c

    r47b2d7e3 r1433ecda  
    5454        word_size = sizeof(unsigned long);
    5555        fill = word_size - ((uintptr_t) dest & (word_size - 1));
    56         if (fill > n) fill = n;
     56        if (fill > n)
     57                fill = n;
    5758
    5859        pb = dest;
     
    6465        /* Compute remaining size. */
    6566        n -= fill;
    66         if (n == 0) return dest;
     67        if (n == 0)
     68                return dest;
    6769
    6870        n_words = n / word_size;
     
    9395struct along {
    9496        unsigned long n;
    95 } __attribute__ ((packed));
     97} __attribute__((packed));
    9698
    9799static void *unaligned_memcpy(void *dst, const void *src, size_t n)
     
    133135        if (((uintptr_t) dst & (word_size - 1)) !=
    134136            ((uintptr_t) src & (word_size - 1)))
    135                 return unaligned_memcpy(dst, src, n);
     137                return unaligned_memcpy(dst, src, n);
    136138
    137139        /*
     
    143145        mod = (uintptr_t) dst & (word_size - 1);
    144146        fill = word_size - mod;
    145         if (fill > n) fill = n;
     147        if (fill > n)
     148                fill = n;
    146149
    147150        /* Copy the initial segment. */
     
    157160
    158161        n -= fill;
    159         if (n == 0) return dst;
     162        if (n == 0)
     163                return dst;
    160164
    161165        /* Pointers to aligned segment. */
Note: See TracChangeset for help on using the changeset viewer.