]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - battlestar/parse.c
Remove extra semicolon.
[bsdgames-darwin.git] / battlestar / parse.c
index 605c4886d9712b876693be8a77b248819de6d55f..60700bc3f029fa1e00f3dbd058ff910c29f9ef6e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.16 2020/02/05 20:11:54 fox Exp $   */
+/*     $NetBSD: parse.c,v 1.17 2020/02/06 22:09:43 fox Exp $   */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)parse.c    8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: parse.c,v 1.16 2020/02/05 20:11:54 fox Exp $");
+__RCSID("$NetBSD: parse.c,v 1.17 2020/02/06 22:09:43 fox Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -120,7 +120,7 @@ parse(void)
                        for (i = n + 1; i < wordcount; i++) {
                                wordtype[i - 1] = wordtype[i];
                                wordvalue[i - 1] = wordvalue[i];
-                               snprintf(words[i - 1], WORDLEN, "%s", words[i]);
+                               strlcpy(words[i - 1], words[i], WORDLEN);
                        }
                        wordcount--;
                }
@@ -140,7 +140,7 @@ parse(void)
                        for (i = n + 1; i < wordcount; i++) {
                                wordtype[i - 1] = wordtype[i];
                                wordvalue[i - 1] = wordvalue[i];
-                               snprintf(words[i - 1], WORDLEN, "%s", words[i]);
+                               strlcpy(words[i - 1], words[i], WORDLEN);
                        }
                        wordcount--;
                }
@@ -164,7 +164,7 @@ parse(void)
                                wordtype[n + 1] = wordtype[n - 1];
                                wordtype[n - 1] = OBJECT;
                                strcpy(tmpword, words[n - 1]);
-                               snprintf(words[n - 1], WORDLEN, "%s", words[n + 1]);
+                               strlcpy(words[n - 1], words[n + 1], WORDLEN);
                                strcpy(words[n + 1], tmpword);
                                flag = 1;
                }
@@ -177,7 +177,7 @@ parse(void)
                                for (i = n + 1; i < wordcount; i++) {
                                        wordtype[i - 1] = wordtype[i + 1];
                                        wordvalue[i - 1] = wordvalue[i + 1];
-                                       snprintf(words[i - 1], WORDLEN, "%s", words[i + 1]);
+                                       strlcpy(words[i - 1], words[i + 1], WORDLEN);
                                }
                                wordcount--;
                                wordcount--;