From accb796067efdc583dd5c11e45962333a40392ed Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 17 Mar 2016 23:46:51 +1300 Subject: Use sizeof rather than constant --- pwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pwd.c') diff --git a/pwd.c b/pwd.c index 0c0c695..a9999a1 100644 --- a/pwd.c +++ b/pwd.c @@ -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); } -- cgit v1.2.3