0021-pwdx: Fix a misleading comment.
It sounds like an off-by-one, but the code itself is correct.
This commit is contained in:
parent
73008f26ea
commit
f69d54f05b
2
pwdx.c
2
pwdx.c
@ -104,7 +104,7 @@ int main(int argc, char *argv[])
|
|||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
char *s;
|
char *s;
|
||||||
ssize_t len, buflen;
|
ssize_t len, buflen;
|
||||||
/* Constant 10 is the length of strings "/proc/" + "/cwd" + 1 */
|
/* Constant 10 is the length of strings "/proc/" + "/cwd" */
|
||||||
char *buf;
|
char *buf;
|
||||||
buflen = 10 + strlen(argv[i]) + 1;
|
buflen = 10 + strlen(argv[i]) + 1;
|
||||||
buf = xmalloc(buflen);
|
buf = xmalloc(buflen);
|
||||||
|
Loading…
Reference in New Issue
Block a user