summaryrefslogtreecommitdiff
path: root/ext/ftp
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-24 02:35:34 +0200
committerAnatol Belski <ab@php.net>2014-08-24 02:35:34 +0200
commit70de6180d5a022806212d2b6eebbba48af827940 (patch)
tree5967f49d9fb27fd7d45da1fe83acfb072e290a12 /ext/ftp
parent86674b5837bffe4486714f9661620020ee498f3b (diff)
downloadphp-git-70de6180d5a022806212d2b6eebbba48af827940.tar.gz
fixes to %pd format usage
Diffstat (limited to 'ext/ftp')
-rw-r--r--ext/ftp/ftp.c10
-rw-r--r--ext/ftp/php_ftp.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 330f6f09e0..5b0fea6db9 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -624,7 +624,7 @@ ftp_alloc(ftpbuf_t *ftp, const php_int_t size, zend_string **response)
return 0;
}
- snprintf(buffer, sizeof(buffer) - 1, "%ld", size);
+ snprintf(buffer, sizeof(buffer) - 1, ZEND_INT_FMT, size);
if (!ftp_putcmd(ftp, "ALLO", buffer)) {
return 0;
@@ -811,7 +811,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
ftp->data = data;
if (resumepos > 0) {
- snprintf(arg, sizeof(arg), "%ld", resumepos);
+ snprintf(arg, sizeof(arg), ZEND_INT_FMT, resumepos);
if (!ftp_putcmd(ftp, "REST", arg)) {
goto bail;
}
@@ -903,7 +903,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, p
ftp->data = data;
if (startpos > 0) {
- snprintf(arg, sizeof(arg), "%ld", startpos);
+ snprintf(arg, sizeof(arg), ZEND_INT_FMT, startpos);
if (!ftp_putcmd(ftp, "REST", arg)) {
goto bail;
}
@@ -1729,7 +1729,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ
}
if (resumepos>0) {
- snprintf(arg, sizeof(arg), "%ld", resumepos);
+ snprintf(arg, sizeof(arg), ZEND_INT_FMT, resumepos);
if (!ftp_putcmd(ftp, "REST", arg)) {
goto bail;
}
@@ -1843,7 +1843,7 @@ ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type
goto bail;
}
if (startpos > 0) {
- snprintf(arg, sizeof(arg), "%ld", startpos);
+ snprintf(arg, sizeof(arg), ZEND_INT_FMT, startpos);
if (!ftp_putcmd(ftp, "REST", arg)) {
goto bail;
}
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index cb4cd37a00..41b8e12861 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -1401,7 +1401,7 @@ PHP_FUNCTION(ftp_set_option)
RETURN_TRUE;
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%pd'", option);
RETURN_FALSE;
break;
}
@@ -1430,7 +1430,7 @@ PHP_FUNCTION(ftp_get_option)
RETURN_BOOL(ftp->autoseek);
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%pd'", option);
RETURN_FALSE;
break;
}