Re: [PATCH 12/29] ncr5380: Cleanup host info() methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 2, 2014 at 8:56 AM, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
+static void prepare_info(struct Scsi_Host *instance)
+{
+       struct NCR5380_hostdata *hostdata = shost_priv(instance);
+
+       snprintf(hostdata->info, sizeof(hostdata->info),

[...]

+                "");
+       hostdata->info[sizeof(hostdata->info) - 1] = '\0';

snprintf() will make sure the string is zero-terminated, so doing this manually
is not needed.

This applies to all three occurrences.

 }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux