Skip to content

core: clarify suspicious condition with parentheses#521

Merged
evverx merged 1 commit intoavahi:masterfrom
evverx:cppcheck-suspicious-cond
Nov 10, 2023
Merged

core: clarify suspicious condition with parentheses#521
evverx merged 1 commit intoavahi:masterfrom
evverx:cppcheck-suspicious-cond

Conversation

@evverx
Copy link
Copy Markdown
Collaborator

@evverx evverx commented Nov 10, 2023

Fixes the following cppcheck warning:

avahi-core/server.c:1798:8: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
    if ((ret = avahi_service_name_join(n, sizeof(n), name, type, domain) < 0))
       ^

It makes avahi_server_get_group_of_service set the error code correctly.

Closes #205

Fixes the following cppcheck warning:
```
avahi-core/server.c:1798:8: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
    if ((ret = avahi_service_name_join(n, sizeof(n), name, type, domain) < 0))
       ^
```

It makes avahi_server_get_group_of_service set the error code correctly.

Closes avahi#205
@evverx evverx changed the title core: clarify suspicious condition with with parentheses core: clarify suspicious condition with parentheses Nov 10, 2023
@evverx evverx force-pushed the cppcheck-suspicious-cond branch from d9c782e to 5f5f578 Compare November 10, 2023 18:29
@evverx evverx merged commit 16b6397 into avahi:master Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server.c:1718]: (style) Suspicious condition

2 participants