On Thu, Jul 04, 2013 at 06:39:03PM +0200, Stefan Fritsch wrote:
> diff --git sys/netinet/ip_output.c sys/netinet/ip_output.c
> index b59accf..43a0551 100644
> --- sys/netinet/ip_output.c
> +++ sys/netinet/ip_output.c
> @@ -267,7 +267,7 @@ reroute:
>       if (mtag != NULL) {
>  #ifdef DIAGNOSTIC
>               if (mtag->m_tag_len != sizeof (struct tdb_ident))
> -                     panic("ip_output: tag of length %d (should be %d",
> +                     panic("ip_output: tag of length %hu (should be %zu",
>                           mtag->m_tag_len, sizeof (struct tdb_ident));
>  #endif
>               tdbi = (struct tdb_ident *)(mtag + 1);
> diff --git sys/netinet6/ip6_forward.c sys/netinet6/ip6_forward.c
> index 6d7f971..1dff149 100644
> --- sys/netinet6/ip6_forward.c
> +++ sys/netinet6/ip6_forward.c
> @@ -160,7 +160,7 @@ reroute:
>       if (mtag != NULL) {
>  #ifdef DIAGNOSTIC
>               if (mtag->m_tag_len != sizeof (struct tdb_ident))
> -                     panic("ip6_forward: tag of length %d (should be %d",
> +                     panic("ip6_forward: tag of length %hu (should be %zu",
>                           mtag->m_tag_len, sizeof (struct tdb_ident));
>  #endif
>               tdbi = (struct tdb_ident *)(mtag + 1);
> diff --git sys/netinet6/ip6_output.c sys/netinet6/ip6_output.c
> index f405b31..baf4103 100644
> --- sys/netinet6/ip6_output.c
> +++ sys/netinet6/ip6_output.c
> @@ -232,7 +232,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, 
> struct route_in6 *ro,
>       if (mtag != NULL) {
>  #ifdef DIAGNOSTIC
>               if (mtag->m_tag_len != sizeof (struct tdb_ident))
> -                     panic("ip6_output: tag of length %d (should be %d",
> +                     panic("ip6_output: tag of length %hu (should be %zu",
>                           mtag->m_tag_len, sizeof (struct tdb_ident));
>  #endif
>               tdbi = (struct tdb_ident *)(mtag + 1);

netinet and netinet6 is OK bluhm@

> diff --git sys/nfs/nfs_socket.c sys/nfs/nfs_socket.c
> index e0f28e4..e1f7b3d 100644
> --- sys/nfs/nfs_socket.c
> +++ sys/nfs/nfs_socket.c
> @@ -600,7 +600,7 @@ tryagain:
>                       } while (error == EWOULDBLOCK);
>                       if (!error && auio.uio_resid > 0) {
>                           log(LOG_INFO,
> -                              "short receive (%d/%d) from nfs server %s\n",
> +                              "short receive (%zd/%zd) from nfs server %s\n",
>                                sizeof(u_int32_t) - auio.uio_resid,
>                                sizeof(u_int32_t),
>                                rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);

This should be %zu/%zu

> @@ -631,7 +631,7 @@ tryagain:
>                                error == ERESTART);
>                       if (!error && auio.uio_resid > 0) {
>                           log(LOG_INFO,
> -                             "short receive (%d/%d) from nfs server %s\n",
> +                             "short receive (%zu/%u) from nfs server %s\n",
>                               len - auio.uio_resid, len,
>                               rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
>                           error = EPIPE;
> -- 
> 1.7.6

Note that in nfs is another len that should be %u.

                            log(LOG_ERR, "%s (%d) from nfs server %s\n",
                                "impossible packet length",
                                len,
                                rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);

bluhm

Reply via email to