aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2008-06-23 21:27:37 +0000
committerGuy Harris <guy@alum.mit.edu>2008-06-23 21:27:37 +0000
commit3d2c418ba79dafce8593899c23f55bb1488381fe (patch)
treec9f23dfca7bd80633f27d26049a3e3a7f461f802
parentddb5a7a13f184e2273540ffa257b15ebbdffc9af (diff)
Rename an argument to avoid colliding with pipe().
svn path=/trunk/; revision=25556
-rw-r--r--capture_sync.c8
-rw-r--r--capture_sync.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/capture_sync.c b/capture_sync.c
index 3c537c0f29..f8c836dfc2 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -1047,22 +1047,22 @@ static gboolean pipe_data_available(int pipe) {
/* Read a line from a pipe, similar to fgets */
int
-sync_pipe_gets_nonblock(int pipe, char *bytes, int max) {
+sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max) {
int newly;
int offset = -1;
while(offset < max - 1) {
offset++;
- if (! pipe_data_available(pipe))
+ if (! pipe_data_available(pipe_fd))
break;
- newly = read(pipe, &bytes[offset], 1);
+ newly = read(pipe_fd, &bytes[offset], 1);
if (newly == 0) {
/* EOF - not necessarily an error */
break;
} else if (newly < 0) {
/* error */
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG,
- "read from pipe %d: error(%u): %s", pipe, errno, strerror(errno));
+ "read from pipe %d: error(%u): %s", pipe_fd, errno, strerror(errno));
return newly;
} else if (bytes[offset] == '\n') {
break;
diff --git a/capture_sync.h b/capture_sync.h
index a498043454..26a6b7afe4 100644
--- a/capture_sync.h
+++ b/capture_sync.h
@@ -81,7 +81,7 @@ sync_interface_stats_close(int *read_fd, int *fork_child, gchar **msg);
/** Read a line from a pipe, similar to fgets. Non-blocking. */
extern int
-sync_pipe_gets_nonblock(int pipe, char *bytes, int max);
+sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
#endif /* capture_sync.h */