Module Name: src Committed By: dholland Date: Thu Nov 25 04:33:30 UTC 2010
Modified Files: src/usr.bin/stat: stat.c Log Message: Improve previous with comments. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/stat/stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/stat/stat.c diff -u src/usr.bin/stat/stat.c:1.29 src/usr.bin/stat/stat.c:1.30 --- src/usr.bin/stat/stat.c:1.29 Wed Nov 24 22:57:53 2010 +++ src/usr.bin/stat/stat.c Thu Nov 25 04:33:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.c,v 1.29 2010/11/24 22:57:53 dholland Exp $ */ +/* $NetBSD: stat.c,v 1.30 2010/11/25 04:33:30 dholland Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if !defined(lint) -__RCSID("$NetBSD: stat.c,v 1.29 2010/11/24 22:57:53 dholland Exp $"); +__RCSID("$NetBSD: stat.c,v 1.30 2010/11/25 04:33:30 dholland Exp $"); #endif #if ! HAVE_NBTOOL_CONFIG_H @@ -1013,6 +1013,7 @@ (void)snprintf(tmp, sizeof(tmp), "%d", size); (void)strcat(lfmt, tmp); } + /* Seconds: time_t cast to long long. */ (void)strcat(lfmt, "lld"); /* @@ -1024,6 +1025,8 @@ /* * We can "print" at most nine digits of precision. The * rest we will pad on at the end. + * + * Nanoseconds: long. */ (void)snprintf(tmp, sizeof(tmp), "%dld", prec > 9 ? 9 : prec); (void)strcat(lfmt, tmp);