cataphract Sun, 04 Mar 2012 19:30:01 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=323897
Log:
- size_t may be shorter than long and definitely is not signed. Note that the
z modifier was only added in C99, so we can't use it.
Changed paths:
U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c
U php/php-src/trunk/main/streams/xp_socket.c
Modified: php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-04
19:17:49 UTC (rev 323896)
+++ php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-04
19:30:01 UTC (rev 323897)
@@ -514,7 +514,9 @@
* BUT, to get into this branch of code, the name is too long,
* so we don't care. */
xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1;
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path
exceeded the maximum allowed length of %ld bytes and was truncated",
sizeof(unix_addr->sun_path));
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE,
+ "socket path exceeded the maximum allowed length of %lu
bytes "
+ "and was truncated", (unsigned
long)sizeof(unix_addr->sun_path));
}
memcpy(unix_addr->sun_path, xparam->inputs.name,
xparam->inputs.namelen);
Modified: php/php-src/branches/PHP_5_4/main/streams/xp_socket.c
===================================================================
--- php/php-src/branches/PHP_5_4/main/streams/xp_socket.c 2012-03-04
19:17:49 UTC (rev 323896)
+++ php/php-src/branches/PHP_5_4/main/streams/xp_socket.c 2012-03-04
19:30:01 UTC (rev 323897)
@@ -510,7 +510,9 @@
* BUT, to get into this branch of code, the name is too long,
* so we don't care. */
xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1;
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path
exceeded the maximum allowed length of %ld bytes and was truncated",
sizeof(unix_addr->sun_path));
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE,
+ "socket path exceeded the maximum allowed length of %lu
bytes "
+ "and was truncated", (unsigned
long)sizeof(unix_addr->sun_path));
}
memcpy(unix_addr->sun_path, xparam->inputs.name,
xparam->inputs.namelen);
Modified: php/php-src/trunk/main/streams/xp_socket.c
===================================================================
--- php/php-src/trunk/main/streams/xp_socket.c 2012-03-04 19:17:49 UTC (rev
323896)
+++ php/php-src/trunk/main/streams/xp_socket.c 2012-03-04 19:30:01 UTC (rev
323897)
@@ -510,7 +510,9 @@
* BUT, to get into this branch of code, the name is too long,
* so we don't care. */
xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1;
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path
exceeded the maximum allowed length of %ld bytes and was truncated",
sizeof(unix_addr->sun_path));
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE,
+ "socket path exceeded the maximum allowed length of %lu
bytes "
+ "and was truncated", (unsigned
long)sizeof(unix_addr->sun_path));
}
memcpy(unix_addr->sun_path, xparam->inputs.name,
xparam->inputs.namelen);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php