diff options
author | avg <avg@FreeBSD.org> | 2010-06-11 19:27:21 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2010-06-11 19:27:21 +0000 |
commit | 324886002f85f17304dae0b8970911d2c9f1a6f4 (patch) | |
tree | 2f7c2ec32c10d5bc3aea11e8861a695b7dd807b2 /sys/dev/acpica/acpi_thermal.c | |
parent | a674331779d7d47acd30342c7763589ace0b1fea (diff) | |
download | FreeBSD-src-324886002f85f17304dae0b8970911d2c9f1a6f4.zip FreeBSD-src-324886002f85f17304dae0b8970911d2c9f1a6f4.tar.gz |
fix a few cases where a string is passed via format argument instead of
via %s
Most of the cases looked harmless, but this is done for the sake of
correctness. In one case it even allowed to drop an intermediate buffer.
Found by: clang
MFC after: 2 week
Diffstat (limited to 'sys/dev/acpica/acpi_thermal.c')
-rw-r--r-- | sys/dev/acpica/acpi_thermal.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index 962fdb7..515a742 100644 --- a/sys/dev/acpica/acpi_thermal.c +++ b/sys/dev/acpica/acpi_thermal.c @@ -1171,7 +1171,6 @@ static int acpi_tz_cooling_thread_start(struct acpi_tz_softc *sc) { int error; - char name[16]; ACPI_LOCK(thermal); if (sc->tz_cooling_proc_running) { @@ -1182,10 +1181,9 @@ acpi_tz_cooling_thread_start(struct acpi_tz_softc *sc) ACPI_UNLOCK(thermal); error = 0; if (sc->tz_cooling_proc == NULL) { - snprintf(name, sizeof(name), "acpi_cooling%d", - device_get_unit(sc->tz_dev)); error = kproc_create(acpi_tz_cooling_thread, sc, - &sc->tz_cooling_proc, RFHIGHPID, 0, name); + &sc->tz_cooling_proc, RFHIGHPID, 0, "acpi_cooling%d", + device_get_unit(sc->tz_dev)); if (error != 0) { device_printf(sc->tz_dev, "could not create thread - %d", error); ACPI_LOCK(thermal); |