Skip to content
Snippets Groups Projects
Commit c2d7d285 authored by Brad King's avatar Brad King
Browse files

ERR: Using KWSYSPE_PIPE_BUFFER_SIZE in place of separate bufferSize constant for consistency.

parent 8a6c73ab
No related branches found
No related tags found
No related merge requests found
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment