Re: sysinfo: delete unnecessary white space of sysinfo.

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

 



On 06/28/2011 07:47 PM, Minoru Usui wrote:
>> Maybe we should use c_isspace() instead of open-coding this.  And how is
>> backslash a space?
> 
> I'll replace above block to c_isspace().
> 
> BTW, I copied its block from virSkipSpaces().

Ah, that explains your original design choices.

> It seems meaningful virSkipSpaces() treats backslash as space,
> but I think backslash is not space generally.
> 
> Is it OK that virSkipSpaces() treats backslash as space?

I would argue no - most clients of virSkipSpaces want to skip just
spaces, and only clients parsing xend output want to skip backslashes as
well.  I think it may be better to provide a new function for xend use,
and fix virSkipSpaces to only skip real spaces.

> Doesn't it need to rename something and define another virSkipSpaces()
> which doesn't treat backslash as space?

Exactly.  Maybe:

virSkipSpaces(const char **str) -> new behavior
virSkipSpaceAndBackslash(const char **str) -> existing behavior, but
used only by xen code

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]