dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / RoamMenuWindow.C
index c0b7357a47c6e844e12f7057dd3417ac9b5a27d8..75764df982bc628c8129a1ddcc464c865fcec701 100644 (file)
@@ -16,7 +16,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
 #include <unistd.h>
 #include <sys/param.h>
 
-#ifdef __uxp__
-#include <string.h>
-#endif
-
-#if !defined(USL) && !defined(__uxp__)
 #include <strings.h>
-#endif
 #include <errno.h>
 #include <unistd.h>
 #include <sys/utsname.h>
@@ -465,7 +459,7 @@ RoamMenuWindow::RoamMenuWindow (char *name) : MenuWindow ("dtmail", True)
       _last_sorted_by = (SortBy) atoi(value);
 
     free((void*) value);
-    if (NULL != buffer) XtFree(buffer);
+    XtFree(buffer);
 
 }
 
@@ -4248,6 +4242,8 @@ RoamMenuWindow::syncViewAndStoreCallback(
     RoamMenuWindow * rmw = (RoamMenuWindow *)client_data;
 
     bval = rmw->syncViewAndStore(op, path, args);
+    
+    va_end(args);
     return(bval);
 }
 
@@ -5113,7 +5109,7 @@ RoamMenuWindow::inList(char *filename, DtVirtArray<ContainerMenuCmd *> *list)
     for (int i=0; i < list->length(); i++)
     {
        cmd = (*list)[i];
-       if (strcmp(filename, cmd->containerName()) == 0)
+       if (filename && strcmp(filename, cmd->containerName()) == 0)
          return(i);
     }
     return(-1);