A minor change to the HAVE_GETPGRP code.
authorWayne Davison <wayned@samba.org>
Fri, 28 Jan 2005 23:00:58 +0000 (23:00 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 28 Jan 2005 23:00:58 +0000 (23:00 +0000)
progress.c

index 0cb5060a260fcaa772f9ec21d3b34052336cf409..cda9178b136a6817b4853dc67f7c0debd3d0f5b9 100644 (file)
@@ -26,6 +26,12 @@ extern int am_server;
 
 #define PROGRESS_HISTORY_SECS 5
 
+#if GETPGRP_VOID
+#define GETPGRP_ARG
+#else
+#define GETPGRP_ARG 0
+#endif
+
 struct progress_history {
        struct timeval time;
        OFF_T ofs;
@@ -124,13 +130,8 @@ void show_progress(OFF_T ofs, OFF_T size)
                return;
 
 #if HAVE_GETPGRP && HAVE_TCGETPGRP
-       if (pgrp == -1) {
-# if GETPGRP_VOID
-               pgrp = getpgrp();
-# else
-               pgrp = getpgrp(0);
-# endif
-       }
+       if (pgrp == -1)
+               pgrp = getpgrp(GETPGRP_ARG);
 #endif
 
        gettimeofday(&now, NULL);