Changeset c8dc9ac in mainline for uspace/lib/c/generic/str.c


Ignore:
Timestamp:
2016-10-11T08:20:59Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
48eb2fc2
Parents:
6eda732 (diff), 523b17a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~werkov/helenos/various-fixes

File:
1 edited

Legend:

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

    r6eda732 rc8dc9ac  
    11571157                memmove(str, &str[pos], str_sz - pos);
    11581158                pos = str_sz - pos;
    1159                 str[str_sz - pos] = '\0';
     1159                str[pos] = '\0';
    11601160        }
    11611161}
     
    12501250}
    12511251
    1252 /** Convert string to a number. 
     1252/** Convert string to a number.
    12531253 * Core of strtol and strtoul functions.
    12541254 *
     
    12961296                                str += 2;
    12971297                        }
    1298                 } 
     1298                }
    12991299        }
    13001300       
     
    13351335                *endptr = (char *) str;
    13361336
    1337         if (nptr == str) { 
     1337        if (nptr == str) {
    13381338                /*FIXME: errno = EINVAL*/
    13391339                return 0;
     
    13661366                if ((sgn) && (number == (unsigned long) (LONG_MAX) + 1)) {
    13671367                        /* FIXME: set 0 to errno */
    1368                         return number;         
     1368                        return number;
    13691369                }
    13701370                /* FIXME: set ERANGE to errno */
    1371                 return (sgn ? LONG_MIN : LONG_MAX);     
     1371                return (sgn ? LONG_MIN : LONG_MAX);
    13721372        }
    13731373       
Note: See TracChangeset for help on using the changeset viewer.