aboutsummaryrefslogtreecommitdiffstats
path: root/progress.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-14 00:53:43 +0000
committerWayne Davison <wayned@samba.org>2005-02-14 00:53:43 +0000
commit4f5b0756df0dfc925b9576db47ecce949c378e18 (patch)
tree770662e2442bc1f022e592d46a4489948f8be2ac /progress.c
parentfe1c19dcdfa000c2461e85ed7bf712de49904377 (diff)
downloadandroid_external_rsync-4f5b0756df0dfc925b9576db47ecce949c378e18.tar.gz
android_external_rsync-4f5b0756df0dfc925b9576db47ecce949c378e18.tar.bz2
android_external_rsync-4f5b0756df0dfc925b9576db47ecce949c378e18.zip
John E. Malmberg convinced me to standardize on #ifs for defined
values instead of non-zero.
Diffstat (limited to 'progress.c')
-rw-r--r--progress.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/progress.c b/progress.c
index cda9178b..22e0955e 100644
--- a/progress.c
+++ b/progress.c
@@ -26,7 +26,7 @@ extern int am_server;
#define PROGRESS_HISTORY_SECS 5
-#if GETPGRP_VOID
+#ifdef GETPGRP_VOID
#define GETPGRP_ARG
#else
#define GETPGRP_ARG 0
@@ -121,7 +121,7 @@ void end_progress(OFF_T size)
void show_progress(OFF_T ofs, OFF_T size)
{
struct timeval now;
-#if HAVE_GETPGRP && HAVE_TCGETPGRP
+#if defined HAVE_GETPGRP && defined HAVE_TCGETPGRP
static pid_t pgrp = -1;
pid_t tc_pgrp;
#endif
@@ -129,7 +129,7 @@ void show_progress(OFF_T ofs, OFF_T size)
if (am_server)
return;
-#if HAVE_GETPGRP && HAVE_TCGETPGRP
+#if defined HAVE_GETPGRP && defined HAVE_TCGETPGRP
if (pgrp == -1)
pgrp = getpgrp(GETPGRP_ARG);
#endif
@@ -165,7 +165,7 @@ void show_progress(OFF_T ofs, OFF_T size)
ph_list[newest_hpos].ofs = ofs;
}
-#if HAVE_GETPGRP && HAVE_TCGETPGRP
+#if defined HAVE_GETPGRP && defined HAVE_TCGETPGRP
tc_pgrp = tcgetpgrp(STDOUT_FILENO);
if (tc_pgrp != pgrp && tc_pgrp != -1)
return;