> Date: Wed, 3 Jul 2013 16:55:46 +0200 (CEST)
> From: Stefan Fritsch <[email protected]>
>
> format string fixes: long
>
> ---
> sys/arch/i386/i386/esm.c | 2 +-
> sys/kern/kern_descrip.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git sys/arch/i386/i386/esm.c sys/arch/i386/i386/esm.c
> index c90b2c4..3dff69e 100644
> --- sys/arch/i386/i386/esm.c
> +++ sys/arch/i386/i386/esm.c
> @@ -880,7 +880,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap
> *devmap,
> }
>
> for (j = 0; j < nsensors; j++) {
> - snprintf(s[j].desc, sizeof(s[j].desc), "%s %d",
> + snprintf(s[j].desc, sizeof(s[j].desc), "%s %ld",
> sensor_map[i].name, sensor_map[i].arg + j);
> }
> break;
Looking at this one, it makes more sense to make the "arg" member of
"struct esm_sensor_map" an int. That will result in some space
savings if we'd ever bring this driver to amd64.
> diff --git sys/kern/kern_descrip.c sys/kern/kern_descrip.c
> index 50eda54..bc63a86 100644
> --- sys/kern/kern_descrip.c
> +++ sys/kern/kern_descrip.c
> @@ -1061,7 +1061,7 @@ closef(struct file *fp, struct proc *p)
>
> #ifdef DIAGNOSTIC
> if (fp->f_count < 2)
> - panic("closef: count (%d) < 2", fp->f_count);
> + panic("closef: count (%ld) < 2", fp->f_count);
> #endif
> fp->f_count--;
>
> @@ -1097,7 +1097,7 @@ fdrop(struct file *fp, struct proc *p)
>
> #ifdef DIAGNOSTIC
> if (fp->f_count != 0)
> - panic("fdrop: count (%d) != 0", fp->f_count);
> + panic("fdrop: count (%ld) != 0", fp->f_count);
> #endif
>
> if (fp->f_ops)
ok kettenis@