Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/raidctl With char bug[SIZE] using sizeof(bug[0]) is ki...
details: https://anonhg.NetBSD.org/src/rev/ee9cdff6645f
branches: trunk
changeset: 357692:ee9cdff6645f
user: kre <kre%NetBSD.org@localhost>
date: Tue Nov 21 16:19:31 2017 +0000
description:
With char bug[SIZE] using sizeof(bug[0]) is kind of boring, use
sizeof(bug) instead...
diffstat:
sbin/raidctl/rf_configure.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 9c41766f3ea5 -r ee9cdff6645f sbin/raidctl/rf_configure.c
--- a/sbin/raidctl/rf_configure.c Tue Nov 21 15:22:06 2017 +0000
+++ b/sbin/raidctl/rf_configure.c Tue Nov 21 16:19:31 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_configure.c,v 1.29 2017/11/20 22:16:23 kre Exp $ */
+/* $NetBSD: rf_configure.c,v 1.30 2017/11/21 16:19:31 kre Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rf_configure.c,v 1.29 2017/11/20 22:16:23 kre Exp $");
+__RCSID("$NetBSD: rf_configure.c,v 1.30 2017/11/21 16:19:31 kre Exp $");
#endif
@@ -258,7 +258,7 @@
}
strlcpy(&cfgPtr->devnames[r][c][0], b,
- sizeof(cfgPtr->devnames[r][c][0]));
+ sizeof(cfgPtr->devnames[r][c]));
}
}
@@ -285,7 +285,7 @@
}
strlcpy(&cfgPtr->spare_names[r][0], b,
- sizeof(cfgPtr->spare_names[r][0]));
+ sizeof(cfgPtr->spare_names[r]));
}
/* scan the file for the block related to layout */
Home |
Main Index |
Thread Index |
Old Index