Source-Changes-HG archive

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

[src/trunk]: src/sys/stand use NAME_MAX instead of MAXNAMLEN



details:   https://anonhg.NetBSD.org/src/rev/ef441af1c9ef
branches:  trunk
changeset: 769926:ef441af1c9ef
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Sep 27 01:08:55 2011 +0000

description:
use NAME_MAX instead of MAXNAMLEN

diffstat:

 sys/stand/ls.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 69207b221706 -r ef441af1c9ef sys/stand/ls.c
--- a/sys/stand/ls.c    Tue Sep 27 01:07:38 2011 +0000
+++ b/sys/stand/ls.c    Tue Sep 27 01:08:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ls.c,v 1.16 2009/03/18 10:22:45 cegger Exp $   */
+/*     $NetBSD: ls.c,v 1.17 2011/09/27 01:08:55 christos Exp $ */
 
 /*-
  * Copyright (c) 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)ls.c       8.1 (Berkeley) 6/11/93";
 #else
-__RCSID("$NetBSD: ls.c,v 1.16 2009/03/18 10:22:45 cegger Exp $");
+__RCSID("$NetBSD: ls.c,v 1.17 2011/09/27 01:08:55 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -96,7 +96,7 @@
                    dp += ((DP *)dp)->d_reclen) {
                        if (((DP *)dp)->d_fileno == 0)
                                continue;
-                       if (((DP *)dp)->d_namlen > MAXNAMLEN+1) {
+                       if (((DP *)dp)->d_namlen > NAME_MAX + 1) {
                                printf("Corrupt file name length!  Run fsck soon!\n");
                                return;
                        }



Home | Main Index | Thread Index | Old Index