Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix ahc_print_registers some more.
details: https://anonhg.NetBSD.org/src/rev/c8bc9dff28a7
branches: trunk
changeset: 546111:c8bc9dff28a7
user: fvdl <fvdl%NetBSD.org@localhost>
date: Sun Apr 20 18:57:41 2003 +0000
description:
Fix ahc_print_registers some more.
diffstat:
sys/dev/ic/aic7xxx.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 76588c6bf99d -r c8bc9dff28a7 sys/dev/ic/aic7xxx.c
--- a/sys/dev/ic/aic7xxx.c Sun Apr 20 18:50:38 2003 +0000
+++ b/sys/dev/ic/aic7xxx.c Sun Apr 20 18:57:41 2003 +0000
@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: aic7xxx.c,v 1.98 2003/04/20 18:31:16 fvdl Exp $
+ * $Id: aic7xxx.c,v 1.99 2003/04/20 18:57:41 fvdl Exp $
*
* //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $
*
@@ -6525,22 +6525,22 @@
u_int printed_mask;
char line[1024];
- memset(line, 0, sizeof line);
+ line[0] = 0;
if (cur_column != NULL && *cur_column >= wrap_point) {
printf("\n");
*cur_column = 0;
}
- sprintf(line+strlen(line), "%s[0x%x]", name, value);
+ printed = snprintf(line, sizeof(line), "%s[0x%x]", name, value);
if (table == NULL) {
- printed = snprintf(line, sizeof line, " ");
+ printed += snprintf(&line[printed], (sizeof line) - printed,
+ " ");
printf("%s", line);
if (cur_column != NULL)
*cur_column += printed;
return (printed);
}
printed_mask = 0;
- printed = 0;
while (printed_mask != 0xFF) {
int entry;
Home |
Main Index |
Thread Index |
Old Index