Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips/stand/sgivol Use strncmp() when looking up ...



details:   https://anonhg.NetBSD.org/src/rev/239518ca3536
branches:  trunk
changeset: 517880:239518ca3536
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Nov 20 23:09:45 2001 +0000

description:
Use strncmp() when looking up volume files.

diffstat:

 sys/arch/sgimips/stand/sgivol/sgivol.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 1d071400435a -r 239518ca3536 sys/arch/sgimips/stand/sgivol/sgivol.c
--- a/sys/arch/sgimips/stand/sgivol/sgivol.c    Tue Nov 20 23:07:16 2001 +0000
+++ b/sys/arch/sgimips/stand/sgivol/sgivol.c    Tue Nov 20 23:09:45 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sgivol.c,v 1.2 2001/11/20 23:07:17 thorpej Exp $       */
+/*     $NetBSD: sgivol.c,v 1.3 2001/11/20 23:09:45 thorpej Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -272,7 +272,8 @@
 
        printf("Reading file %s\n", vfilename);
        for (i = 0; i < 15; ++i) {
-               if (strcmp(vfilename, volhdr->voldir[i].name) == NULL)
+               if (strncmp(vfilename, volhdr->voldir[i].name,
+                   sizeof(volhdr->voldir[i].name)) == NULL)
                        break;
        }
        if (i >= 15) {



Home | Main Index | Thread Index | Old Index