Changes in uspace/lib/c/generic/str.c [a18a8b9:ee3f6f6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/str.c
ra18a8b9 ree3f6f6 534 534 535 535 if (c1 == 0 || c2 == 0) 536 break; 536 break; 537 537 } 538 538 … … 588 588 break; 589 589 590 ++len; 590 ++len; 591 591 } 592 592 … … 1058 1058 memmove(str, &str[pos], str_sz - pos); 1059 1059 pos = str_sz - pos; 1060 str[ pos] = '\0';1060 str[str_sz - pos] = '\0'; 1061 1061 } 1062 1062 } … … 1151 1151 } 1152 1152 1153 /** Convert string to a number. 1153 /** Convert string to a number. 1154 1154 * Core of strtol and strtoul functions. 1155 1155 * … … 1197 1197 str += 2; 1198 1198 } 1199 } 1199 } 1200 1200 } 1201 1201 … … 1236 1236 *endptr = (char *) str; 1237 1237 1238 if (nptr == str) { 1238 if (nptr == str) { 1239 1239 /*FIXME: errno = EINVAL*/ 1240 1240 return 0; … … 1267 1267 if ((sgn) && (number == (unsigned long) (LONG_MAX) + 1)) { 1268 1268 /* FIXME: set 0 to errno */ 1269 return number; 1269 return number; 1270 1270 } 1271 1271 /* FIXME: set ERANGE to errno */ 1272 return (sgn ? LONG_MIN : LONG_MAX); 1272 return (sgn ? LONG_MIN : LONG_MAX); 1273 1273 } 1274 1274
Note:
See TracChangeset
for help on using the changeset viewer.