lkml.org 
[lkml]   [2008]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 04/13] PCI: acpiphp: remove 'name' parameter
On Tue, Sep 09, 2008 at 04:00:22AM -0600, Alex Chiang wrote:
> We do not need to manage our own name parameter, especially since
> the PCI core can change it on our behalf, in the case of duplicate
> slot names.

Looks good, just a question ...

> acpiphp_slot->slot = slot;
> - snprintf(slot->name, sizeof(slot->name), "%u", slot->acpi_slot->sun);
> + scnprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun);
>

What's the difference between snprintf and scnprintf?

And why were we bothering to use snprintf anyway? For when we fall into a
parallel universe where a u32 can have more than twenty digits?

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."


\
 
 \ /
  Last update: 2008-09-09 16:41    [W:0.158 / U:2.608 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site