diff options
author | Bert Belder <bertbelder@gmail.com> | 2014-12-11 17:12:04 +0100 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2014-12-11 17:12:04 +0100 |
commit | e8c4c329e69fff1b656c833883997ac663ea48ef (patch) | |
tree | d1d31befca5f520d7d22d70418e81c39407360f2 /docs/src | |
parent | cb2f6a9743cc6ed32236c17facae52e5965edfd5 (diff) | |
download | libuv-e8c4c329e69fff1b656c833883997ac663ea48ef.tar.gz libuv-e8c4c329e69fff1b656c833883997ac663ea48ef.zip |
test: fix test-cwd-and-chdir
The test used to call uv_cwd() twice, in this fashion:
char buf[PATH_MAX];
size_t size = sizeof buf;
uv_cwd(buf, &size);
uv_cwd(buf, &size);
The `size` variable is supposed to contain the buffer size (including
terminating null) on input, and it is also used as an out parameter for
returning the actual length of the working directory (not including the
terminating null). This makes the second uv_cwd() call fail with
UV_ENOBUFS.
PR-URL: https://github.com/libuv/libuv/pull/54
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'docs/src')
0 files changed, 0 insertions, 0 deletions