Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/mille Avoid non-literal format strings.



details:   https://anonhg.NetBSD.org/src/rev/776f87a16f09
branches:  trunk
changeset: 768752:776f87a16f09
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Aug 26 09:01:07 2011 +0000

description:
Avoid non-literal format strings.

diffstat:

 games/mille/save.c    |   6 +++---
 games/mille/varpush.c |  10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r 4291e4289d14 -r 776f87a16f09 games/mille/save.c
--- a/games/mille/save.c        Fri Aug 26 07:56:00 2011 +0000
+++ b/games/mille/save.c        Fri Aug 26 09:01:07 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: save.c,v 1.15 2010/04/04 00:08:49 christos Exp $       */
+/*     $NetBSD: save.c,v 1.16 2011/08/26 09:01:07 tron Exp $   */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)save.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: save.c,v 1.15 2010/04/04 00:08:49 christos Exp $");
+__RCSID("$NetBSD: save.c,v 1.16 2011/08/26 09:01:07 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -113,7 +113,7 @@
                return FALSE;
 
        if ((outfd = creat(buf, 0644)) < 0) {
-               error(strerror(errno));
+               error("%s", strerror(errno));
                return FALSE;
        }
        mvwaddstr(Score, ERR_Y, ERR_X, buf);
diff -r 4291e4289d14 -r 776f87a16f09 games/mille/varpush.c
--- a/games/mille/varpush.c     Fri Aug 26 07:56:00 2011 +0000
+++ b/games/mille/varpush.c     Fri Aug 26 09:01:07 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: varpush.c,v 1.10 2009/05/25 23:34:50 dholland Exp $    */
+/*     $NetBSD: varpush.c,v 1.11 2011/08/26 09:01:07 tron Exp $        */
 
 /*
  * Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)varpush.c  8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: varpush.c,v 1.10 2009/05/25 23:34:50 dholland Exp $");
+__RCSID("$NetBSD: varpush.c,v 1.11 2011/08/26 09:01:07 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -70,12 +70,12 @@
        };
 
        if (((func)(file, vec, sizeof(vec) / sizeof(vec[0]))) < 0) {
-               error(strerror(errno));
+               error("%s", strerror(errno));
                return FALSE;
        }
        if (func == readv) {
                if ((read(file, (void *) &temp, sizeof temp)) < 0) {
-                       error(strerror(errno));
+                       error("%s", strerror(errno));
                        return FALSE;
                }
                Topcard = &Deck[temp];
@@ -96,7 +96,7 @@
        } else {
                temp = Topcard - Deck;
                if ((write(file, (void *) &temp, sizeof temp)) < 0) {
-                       error(strerror(errno));
+                       error("%s", strerror(errno));
                        return FALSE;
                }
        }



Home | Main Index | Thread Index | Old Index