Changeset 087c4c56 in mainline


Ignore:
Timestamp:
2011-07-19T00:14:28Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
df874db
Parents:
5273eb6
Message:

Bugfixes in memcmp() and strncmp().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/string.c

    r5273eb6 r087c4c56  
    283283        for (size_t i = 0; i < n; ++i) {
    284284                if (s1[i] != s2[i]) {
    285                         return s2[i] - s1[i];
     285                        return s1[i] - s2[i];
    286286                }
    287287        }
     
    322322        for (size_t i = 0; i < n; ++i) {
    323323                if (s1[i] != s2[i]) {
    324                         return s2[i] - s1[i];
     324                        return s1[i] - s2[i];
    325325                }
    326326                if (s1[i] == '\0') {
Note: See TracChangeset for help on using the changeset viewer.