]> granicus.if.org Git - php/commitdiff
- size_t may be shorter than long and definitely is not signed. Note that the
authorGustavo André dos Santos Lopes <cataphract@php.net>
Sun, 4 Mar 2012 19:30:01 +0000 (19:30 +0000)
committerGustavo André dos Santos Lopes <cataphract@php.net>
Sun, 4 Mar 2012 19:30:01 +0000 (19:30 +0000)
  z modifier was only added in C99, so we can't use it.

main/streams/xp_socket.c

index f23137f5a763b539acfa39ba58ad579a3070a544..7c3a553102404c7cd41f2d0285e79cb1baab2f84 100644 (file)
@@ -510,7 +510,9 @@ static inline int parse_unix_address(php_stream_xport_param *xparam, struct sock
                 * 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);