[php-src] master: streams: voidify parse_unix_address
| From: | Gina Peter Banyard | Date: | Sun, 22 Nov 2026 04:11:46 +0000 |
| Subject: | [php-src] master: streams: voidify parse_unix_address | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-144016@lists.php.net to get a copy of this message | ||
Author: Gina Peter Banyard (Girgias)
Date: 2026-11-22T04:11:28Z
Commit: https://github.com/php/php-src/commit/cb90f9a237757209ecd2e67a7e0c950f36ba6ea1
Raw diff: https://github.com/php/php-src/commit/cb90f9a237757209ecd2e67a7e0c950f36ba6ea1.diff
streams: voidify parse_unix_address
It always returns 1 and the return value of the function wasn't used.
Changed paths:
M main/streams/xp_socket.c
Diff:
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index 221552056420..a363f807053b 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -600,7 +600,7 @@ static const php_stream_ops php_stream_unixdg_socket_ops = {
/* network socket operations */
#ifdef AF_UNIX
-static inline int parse_unix_address(php_stream *stream, php_stream_xport_param *xparam,
+static inline void parse_unix_address(php_stream *stream, php_stream_xport_param *xparam,
struct sockaddr_un *unix_addr)
{
memset(unix_addr, 0, sizeof(*unix_addr));
@@ -626,8 +626,6 @@ static inline int parse_unix_address(php_stream *stream, php_stream_xport_param
}
memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen);
-
- return 1;
}
#endif