[systemd-devel] [PATCH] sd-daemon: fix cppcheck warnings
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Mon Dec 17 02:42:54 PST 2012
On 10/15/2012 10:24 PM, Lennart Poettering wrote:
> On Mon, 15.10.12 21:05, Sami Kerola (kerolasa at iki.fi) wrote:
>
>> Found with 'cppcheck --enable=all --inconclusive --std=posix' while
>> working with util-linux, which has a copy of this file.
[snip]
>> @@ -358,10 +358,10 @@ _sd_export_ int sd_is_socket_unix(int fd, int type, int listening, const char *p
>> return 0;
>>
>> if (path) {
>> - if (length<= 0)
>> + if (length == 0)
>> length = strlen(path);
>>
>> - if (length<= 0)
>> + if (length == 0)
>> /* Unnamed socket */
>> return l == offsetof(struct sockaddr_un, sun_path);
>>
Applied this part, it was fine.
Zbyszek
More information about the systemd-devel
mailing list