From 751c53678d0b8558a05f7f88b5c62674cd91522e Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Mon, 14 Oct 2013 14:13:42 +0000 Subject: [PATCH] Use sizeof instead of size constant when passing buffers to getcwd(). git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@394 13b04d17-f746-0410-82c6-800466cd88b0 --- source/functions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/functions.c b/source/functions.c index 512a306..6e7838d 100644 --- a/source/functions.c +++ b/source/functions.c @@ -4101,7 +4101,7 @@ BUILT_IN_FUNCTION(function_fexist, words) #endif else { - getcwd(FileBuf, BIG_BUFFER_SIZE); + getcwd(FileBuf, sizeof FileBuf); strlcat(FileBuf, "/", sizeof FileBuf); strlcat(FileBuf, filename, sizeof FileBuf); } @@ -4150,7 +4150,7 @@ BUILT_IN_FUNCTION(function_fsize, words) #endif else { - getcwd(FileBuf, BIG_BUFFER_SIZE); + getcwd(FileBuf, sizeof FileBuf); strlcat(FileBuf, "/", sizeof FileBuf); strlcat(FileBuf, filename, sizeof FileBuf); } @@ -5475,7 +5475,7 @@ BUILT_IN_FUNCTION(function_ftime, words) #endif else { - getcwd(FileBuf, BIG_BUFFER_SIZE); + getcwd(FileBuf, sizeof FileBuf); strlcat(FileBuf, "/", sizeof FileBuf); strlcat(FileBuf, filename, sizeof FileBuf); }