summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessUNIX.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-07-07 17:03:56 (GMT)
committerBrad King <brad.king@kitware.com>2004-07-07 17:03:56 (GMT)
commit6df06682a530e99550123f461acd93bae133378b (patch)
tree2274cd7b0e966506c536e4e45d05800769112a36 /Source/kwsys/ProcessUNIX.c
parent86195caf6ad23d6528748ad3879394b8709513c5 (diff)
downloadCMake-6df06682a530e99550123f461acd93bae133378b.zip
CMake-6df06682a530e99550123f461acd93bae133378b.tar.gz
CMake-6df06682a530e99550123f461acd93bae133378b.tar.bz2
ERR: Using KWSYSPE_PIPE_BUFFER_SIZE in place of separate bufferSize constant for consistency.
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r--Source/kwsys/ProcessUNIX.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 500743f..d24f515 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -1738,8 +1738,7 @@ static void kwsysProcessKill(pid_t process_id)
#else
char fname[4096];
#endif
- const int bufferSize = 1024;
- char buffer[1025]; /* should be buffersize +1 but fails to build on hp cc*/
+ char buffer[KWSYSPE_PIPE_BUFFER_SIZE+1];
struct dirent* d;
/* Each process has a directory in /proc whose name is the pid.
@@ -1762,7 +1761,7 @@ static void kwsysProcessKill(pid_t process_id)
FILE* f = fopen(fname, "r");
if(f)
{
- int nread = fread(buffer, 1, bufferSize, f);
+ int nread = fread(buffer, 1, KWSYSPE_PIPE_BUFFER_SIZE, f);
buffer[nread] = '\0';
if(nread > 0)
{