diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2003-06-03 12:51:40 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2003-06-03 12:51:40 +0000 |
commit | 5f6a2902bcfd03976baf4360e5a1ea749a4d0700 (patch) | |
tree | 24420aafdef612d32c1c8988146120967c29f6ce /sbin/isakmpd/sa.c | |
parent | 1fb7088aa35b34099638abe7575434151652e4e5 (diff) |
Cleanup. Use 'sizeof variable' instead of magic constants.
Diffstat (limited to 'sbin/isakmpd/sa.c')
-rw-r--r-- | sbin/isakmpd/sa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c index 9e7722dd965..fcfb535f95c 100644 --- a/sbin/isakmpd/sa.c +++ b/sbin/isakmpd/sa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sa.c,v 1.70 2003/05/18 20:39:25 ho Exp $ */ +/* $OpenBSD: sa.c,v 1.71 2003/06/03 12:51:39 ho Exp $ */ /* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */ /* @@ -461,7 +461,7 @@ sa_dump (int cls, int level, char *header, struct sa *sa) for (i = 0; i < 2; i++) if (proto->spi[i]) { - snprintf (spi_header, 80, "%s: spi[%d]", header, i); + snprintf (spi_header, sizeof spi_header, "%s: spi[%d]", header, i); LOG_DBG_BUF ((cls, level, spi_header, proto->spi[i], proto->spi_sz[i])); } @@ -480,7 +480,7 @@ report_spi (FILE *fd, const u_int8_t *buf, size_t sz, int spi) for (i = j = 0; i < sz;) { - snprintf (s + j, SBUFSZ - j, "%02x", buf[i++]); + snprintf (s + j, sizeof s - j, "%02x", buf[i++]); j += 2; if (i % 4 == 0) { |