diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-17 23:46:51 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-17 23:46:51 +1300 |
commit | accb796067efdc583dd5c11e45962333a40392ed (patch) | |
tree | 1c670fc38577e1b406435e8f4083d4e165d9435a | |
parent | Handle path being too long (diff) | |
download | tunics-accb796067efdc583dd5c11e45962333a40392ed.tar.gz tunics-accb796067efdc583dd5c11e45962333a40392ed.zip |
Use sizeof rather than constant
-rw-r--r-- | pwd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3,7 +3,7 @@ int main(void) { char buf[PATH_MAX]; - if (getcwd(buf, PATH_MAX) == NULL) { + if (getcwd(buf, sizeof(buf)) == NULL) { perror("getcwd"); exit(EXIT_FAILURE); } |