svn commit: r203777 - in user/eri/pf45/head: contrib/pf/pfctl
sys/contrib/pf/net
Ermal Luçi
eri at FreeBSD.org
Thu Feb 11 09:55:46 UTC 2010
Author: eri
Date: Thu Feb 11 09:55:45 2010
New Revision: 203777
URL: http://svn.freebsd.org/changeset/base/203777
Log:
Cast to proper type.
Requested-by: Jilles Tjoelker
Modified:
user/eri/pf45/head/contrib/pf/pfctl/parse.y
user/eri/pf45/head/contrib/pf/pfctl/pfctl_parser.c
user/eri/pf45/head/sys/contrib/pf/net/if_pfsync.c
Modified: user/eri/pf45/head/contrib/pf/pfctl/parse.y
==============================================================================
--- user/eri/pf45/head/contrib/pf/pfctl/parse.y Thu Feb 11 08:50:21 2010 (r203776)
+++ user/eri/pf45/head/contrib/pf/pfctl/parse.y Thu Feb 11 09:55:45 2010 (r203777)
@@ -709,7 +709,7 @@ varstring : numberstring varstring {
numberstring : NUMBER {
char *s;
- if (asprintf(&s, "%lld", (int64_t)$1) == -1) {
+ if (asprintf(&s, "%lld", (long long)$1) == -1) {
yyerror("string: asprintf");
YYERROR;
}
@@ -2843,7 +2843,7 @@ host : STRING {
| STRING '/' NUMBER {
char *buf;
- if (asprintf(&buf, "%s/%lld", $1, $3) == -1)
+ if (asprintf(&buf, "%s/%lld", $1, (long long)$3) == -1)
err(1, "host: asprintf");
free($1);
if (($$ = host(buf)) == NULL) {
@@ -2859,7 +2859,7 @@ host : STRING {
/* ie. for 10/8 parsing */
#ifdef __FreeBSD__
- if (asprintf(&buf, "%lld/%lld", (int64_t)$1, (int64_t)$3) == -1)
+ if (asprintf(&buf, "%lld/%lld", (long long)$1, (long long)$3) == -1)
#else
if (asprintf(&buf, "%lld/%lld", $1, $3) == -1)
#endif
Modified: user/eri/pf45/head/contrib/pf/pfctl/pfctl_parser.c
==============================================================================
--- user/eri/pf45/head/contrib/pf/pfctl/pfctl_parser.c Thu Feb 11 08:50:21 2010 (r203776)
+++ user/eri/pf45/head/contrib/pf/pfctl/pfctl_parser.c Thu Feb 11 09:55:45 2010 (r203777)
@@ -576,7 +576,7 @@ print_status(struct pf_status *s, int op
for (i = 0; i < SCNT_MAX; i++) {
printf(" %-25s %14lld ", pf_scounters[i],
#ifdef __FreeBSD__
- (int64_t)s->scounters[i]);
+ (long long)s->scounters[i]);
#else
s->scounters[i]);
#endif
Modified: user/eri/pf45/head/sys/contrib/pf/net/if_pfsync.c
==============================================================================
--- user/eri/pf45/head/sys/contrib/pf/net/if_pfsync.c Thu Feb 11 08:50:21 2010 (r203776)
+++ user/eri/pf45/head/sys/contrib/pf/net/if_pfsync.c Thu Feb 11 09:55:45 2010 (r203777)
@@ -2805,7 +2805,7 @@ pfsync_q_ins(struct pf_state *st, int q)
#if 1 || defined(PFSYNC_DEBUG)
if (sc->sc_len < PFSYNC_MINPKT)
#ifdef __FreeBSD__
- panic("pfsync pkt len is too low %ld", sc->sc_len);
+ panic("pfsync pkt len is too low %zu", sc->sc_len);
#else
panic("pfsync pkt len is too low %d", sc->sc_len);
#endif
More information about the svn-src-user
mailing list