Changeset 9350bfdd in mainline
- Timestamp:
- 2011-07-28T22:51:32Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7ae249d
- Parents:
- 955c2b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/unistd.c
r955c2b0 r9350bfdd 110 110 return NULL; 111 111 } 112 113 /* Save the original value to comply with the "no modification on 114 * success" semantics. 115 */ 116 int orig_errno = errno; 117 errno = EOK; 118 112 119 char *ret = getcwd(buf, size); 113 /* Check errno to avoid shadowing possible ENOMEM. */ 114 if (ret == NULL && errno == EOK) { 115 errno = ERANGE; 116 } 120 if (ret == NULL) { 121 /* Check errno to avoid shadowing other possible errors. */ 122 if (errno == EOK) { 123 errno = ERANGE; 124 } 125 } else { 126 /* Success, restore previous errno value. */ 127 errno = orig_errno; 128 } 129 117 130 return ret; 118 131 }
Note:
See TracChangeset
for help on using the changeset viewer.