[GH-ISSUE #1790] Remove unnecessary null pointer checks #773

Open
opened 2026-10-13 20:28:24 +00:00 by bsakaguchi · 0 comments
Owner
Originally created by @elfring on GitHub (Aug 16, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1790 [An extra null pointer check is not needed in functions](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like the following. - [QtServiceSysPrivate](https://github.com/amnezia-vpn/amnezia-client/blob/16d92ddb7c526abe49a979bc184c056ddb6280bb/service/src/qtservice_unix.cpp#L306-L307 "Destructor for QtServiceSysPrivate") - [PingHelper::stop](https://github.com/amnezia-vpn/amnezia-client/blob/16d92ddb7c526abe49a979bc184c056ddb6280bb/client/mozilla/pinghelper.cpp#L73-L76 "PingHelper::stop function") - [WireguardUtilsLinux::deleteInterface](https://github.com/amnezia-vpn/amnezia-client/blob/16d92ddb7c526abe49a979bc184c056ddb6280bb/client/platforms/linux/daemon/wireguardutilslinux.cpp#L185-L188 "WireguardUtilsLinux::deleteInterface function")
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#773
No description provided.