Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/tools



Date:	Thursday April 20, 2000 @ 21:51
Author:	ahn

Update of /home/netrek/cvsroot/Vanilla/tools
In directory swashbuckler.fortress.real-time.com:/var/tmp/cvs-serv8326

Modified Files:
	ltd_convert.c 
Log Message:
forgot O_WRONLY.  Changed NULL to '\0' for GCC.


****************************************

Index: Vanilla/tools/ltd_convert.c
diff -u Vanilla/tools/ltd_convert.c:1.1 Vanilla/tools/ltd_convert.c:1.2
--- Vanilla/tools/ltd_convert.c:1.1	Thu Apr 20 21:30:07 2000
+++ Vanilla/tools/ltd_convert.c	Thu Apr 20 21:51:23 2000
@@ -1,5 +1,5 @@
 /*
- * $Id: ltd_convert.c,v 1.1 2000/04/21 02:30:07 ahn Exp $
+ * $Id: ltd_convert.c,v 1.2 2000/04/21 02:51:23 ahn Exp $
  *
  * ahn@users.sourceforge.net
  *
@@ -39,7 +39,7 @@
 
 #else
 
-const char rcsid[] = "$Id: ltd_convert.c,v 1.1 2000/04/21 02:30:07 ahn Exp $";
+const char rcsid[] = "$Id: ltd_convert.c,v 1.2 2000/04/21 02:51:23 ahn Exp $";
 
 void error(const char *fmt, ...) {
 
@@ -80,7 +80,7 @@
   printf("Continue? ");
 
   fgets(buf, 10, stdin);
-  buf[10] = NULL;
+  buf[10] = '\0';
 
   if (strcmp(buf, "yes\n")) {
 
@@ -155,7 +155,7 @@
   if (ofd != -1)
     error("out file %s already exists", argv[2]);
 
-  ofd = open(argv[2], O_EXCL|O_CREAT|O_APPEND, 0644);
+  ofd = open(argv[2], O_WRONLY|O_EXCL|O_CREAT|O_APPEND, 0644);
 
   if (ofd == -1)
     error("can't write to %s", argv[2]);
@@ -167,8 +167,8 @@
 
     printf("  Converting [%s]\n", old_entry.name);
 
-    new_entry.name[0] = NULL;
-    new_entry.password[0] = NULL;
+    new_entry.name[0] = '\0';
+    new_entry.password[0] = '\0';
 
     ltd_reset_struct(new_entry.stats.ltd);