[libvirt] [PATCH 1/7] datatypes: avoid redundant __FUNCTION__
Eric Blake
eblake at redhat.com
Fri Jan 14 22:37:58 UTC 2011
On 01/14/2011 02:45 PM, Matthias Bolte wrote:
> 2011/1/14 Eric Blake <eblake at redhat.com>:
>> virLibConnError already includes __FUNCTION__ in its output, so we
>> were redundant. Furthermore, clang warns that __FUNCTION__ is not
>> a string literal (at least __FUNCTION__ will never contain %, so
>> it was not a security risk).
>
>> @@ -344,8 +344,16 @@ virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
>> virDomainPtr ret = NULL;
>> char uuidstr[VIR_UUID_STRING_BUFLEN];
>>
>> - if ((!VIR_IS_CONNECT(conn)) || (name == NULL) || (uuid == NULL)) {
>> - virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
>> + if (!VIR_IS_CONNECT(conn)) {
>> + virLibConnError(VIR_ERR_INVALID_ARG, _("no connection"));
>> + return(NULL);
>> + }
>
> Small cosmetic nit: "return isn't a function". I know you just keep in
> line with the existing style in this file :)
>
> ACK.
I removed the spurious () on any return in a hunk within my original
patch, then pushed (there are still bogus return() in the rest of the
file, but that can be for another day).
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110114/403c704b/attachment-0001.sig>
More information about the libvir-list
mailing list