dtdocbook: Coverity 86763
[oweals/cde.git] / cde / programs / dtsession / SmRestore.c
index 011b3765f1d7ff2794d4288e451f0cde4b24ac72..5b1dfd526da194d63455b800b37ad98627467c26 100644 (file)
@@ -64,9 +64,6 @@
 #endif /* _SUN_OS */
 #include <sys/types.h>
 #include <stdlib.h>
-#ifdef __apollo
-#include <X11/apollosys.h>        /* for pid_t struct in hp-ux sys/types.h */
-#endif
 #include <sys/socket.h>
 #include <sys/wait.h>
 #include <netinet/in.h>
 #include "SmDB.h"
 #include "SmProp.h"
 
-#ifndef __osf__
 #include <X11/Xlibint.h>
-#endif /* __osf__ */
 
 /*
  * Local variables
@@ -134,7 +129,7 @@ static char * savedDisplay = NULL;
 
 #define SM_MAX_ARGS MAXLINE
 
-#if defined (SVR4) || defined (__osf__)
+#if defined (SVR4)
 #define REMOTE_CMD_STRING "rsh %s -n %s &"
 #else
 #define REMOTE_CMD_STRING "remsh %s -n %s &"
@@ -906,11 +901,11 @@ RestoreResources( Boolean errorHandlerInstalled, ... )
        setegid(smGD.runningGID);
 #endif
 #endif
-#if defined(__osf__) || defined(CSRG_BASED)
+#if defined(CSRG_BASED)
         setsid();
 #else
        (void) setpgrp();
-#endif /* __osf__ */
+#endif /* CSRG_BASED */
 
        MarkFileDescriptors (3, F_SETFD, 1);
 
@@ -1386,7 +1381,7 @@ RestoreSettings( void )
                /*
                 * This is only involked when there is auto repeats set for
                 * specific keys only.  It is VERY SLOW code so unless you
-                * have to save off auto repeats for single keys - DONT
+                * have to save off auto repeats for single keys - DON'T
                 */
                while(tmpKey != NULL)
                {
@@ -1797,7 +1792,7 @@ RestoreIndependentResources( void )
  *  If this is the first DT 3.0 session for a DT 2.0 user then we will
  *  also launch the helpviewer. If this is the first DT 3.0 session for a
  *  DT 2.0 user then we will also run convertVS.sh to change all
- *  occurances of /usr/bin/X11/hpterm to .../dt/bin/hpterm,
+ *  occurrences of /usr/bin/X11/hpterm to .../dt/bin/hpterm,
  *  /usr/bin/X11/xterm to .../dt/bin/xterm and
  *  /usr/bin/X11/xload to .../dt/bin/xload.
  *
@@ -3630,11 +3625,11 @@ StartLocalClient (
 
        _DtEnvControl(DT_ENV_RESTORE_PRE_DT);
 
-#if defined(__osf__) || defined(CSRG_BASED)
+#if defined(CSRG_BASED)
         setsid();
 #else
        (void)setpgrp();
-#endif /* __osf__ */
+#endif /* CSRG_BASED */
        
        MarkFileDescriptors (3, F_SETFD, 1);
 
@@ -3866,11 +3861,11 @@ ForkWM( void )
 #endif
        _DtEnvControl(DT_ENV_RESTORE_PRE_DT);
 
-#if defined(__osf__) || defined(CSRG_BASED)
+#if defined(CSRG_BASED)
         setsid();
 #else
         (void)setpgrp();
-#endif /* __osf__ */
+#endif /* CSRG_BASED */
 
        MarkFileDescriptors (3, F_SETFD, 1);
 
@@ -3951,11 +3946,11 @@ KillParent( void )
     /*
      * Disassociate from parent
      */
-#if defined(__osf__) || defined(CSRG_BASED)
+#if defined(CSRG_BASED)
     setsid();
 #else
     setpgrp();
-#endif /* __osf__ */
+#endif /* CSRG_BASED */
 }
 
 
@@ -4836,7 +4831,7 @@ MarkFileDescriptors (
 #ifdef _SUN_OS
                open_max = NOFILE;
 #else
-#if defined(USL) || defined(__uxp__) || defined(_AIX)
+#if defined(_AIX)
                open_max = FOPEN_MAX;
 #else
                open_max = FD_SETSIZE;