]> granicus.if.org Git - php/commitdiff
- Removed EOLs from error messages
authorfoobar <sniper@php.net>
Thu, 18 Aug 2005 12:37:24 +0000 (12:37 +0000)
committerfoobar <sniper@php.net>
Thu, 18 Aug 2005 12:37:24 +0000 (12:37 +0000)
ext/ftp/ftp.c

index b60929c43660b523a28be18577f01c7159c2b18b..38d972c48da7090c7c4b94d1c24147c4dd9dd708 100644 (file)
@@ -148,7 +148,7 @@ ftp_open(const char *host, short port, long timeout_sec TSRMLS_DC)
        size = sizeof(ftp->localaddr);
        memset(&ftp->localaddr, 0, size);
        if (getsockname(ftp->fd, (struct sockaddr*) &ftp->localaddr, &size) == -1) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "getsockname failed: %s (%d)\n", strerror(errno), errno);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "getsockname failed: %s (%d)", strerror(errno), errno);
                goto bail;
        }
 
@@ -808,7 +808,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
 
        if (resumepos > 0) {
                if (resumepos > 2147483647) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater then 2147483647 bytes.\n");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater then 2147483647 bytes.");
                        goto bail;
                }
                sprintf(arg, "%u", resumepos);
@@ -905,7 +905,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, i
 
        if (startpos > 0) {
                if (startpos > 2147483647) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater then 2147483647 bytes.\n");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater then 2147483647 bytes.");
                        goto bail;
                }
                sprintf(arg, "%u", startpos);
@@ -1384,7 +1384,7 @@ ftp_getdata(ftpbuf_t *ftp TSRMLS_DC)
        sa = (struct sockaddr *) &ftp->localaddr;
        /* bind/listen */
        if ((fd = socket(sa->sa_family, SOCK_STREAM, 0)) == -1) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "socket() failed: %s (%d)\n", strerror(errno), errno);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "socket() failed: %s (%d)", strerror(errno), errno);
                goto bail;
        }
 
@@ -1399,7 +1399,7 @@ ftp_getdata(ftpbuf_t *ftp TSRMLS_DC)
                tv.tv_sec = ftp->timeout_sec;
                tv.tv_usec = 0;
                if (php_connect_nonb(fd, (struct sockaddr*) &ftp->pasvaddr, size, &tv) == -1) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_connect_nonb() failed: %s (%d)\n", strerror(errno), errno);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_connect_nonb() failed: %s (%d)", strerror(errno), errno);
                        goto bail;
                }
 
@@ -1417,17 +1417,17 @@ ftp_getdata(ftpbuf_t *ftp TSRMLS_DC)
        size = php_sockaddr_size(&addr);
 
        if (bind(fd, (struct sockaddr*) &addr, size) == -1) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "bind() failed: %s (%d)\n", strerror(errno), errno);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "bind() failed: %s (%d)", strerror(errno), errno);
                goto bail;
        }
 
        if (getsockname(fd, (struct sockaddr*) &addr, &size) == -1) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "getsockname() failed: %s (%d)\n", strerror(errno), errno);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "getsockname() failed: %s (%d)", strerror(errno), errno);
                goto bail;
        }
 
        if (listen(fd, 5) == -1) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "listen() failed: %s (%d)\n", strerror(errno), errno);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "listen() failed: %s (%d)", strerror(errno), errno);
                goto bail;
        }
 
@@ -1702,7 +1702,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ
                 * since php is 32 bit by design, we bail out with warning
                 */
                if (resumepos > 2147483647) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater then 2147483648 bytes.\n");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files greater then 2147483648 bytes.");
                        goto bail;
                }
                sprintf(arg, "%u", resumepos);
@@ -1820,7 +1820,7 @@ ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type
        }
        if (startpos > 0) {
                if (startpos > 2147483647) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater then 2147483647 bytes.\n");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP cannot handle files with a size greater then 2147483647 bytes.");
                        goto bail;
                }
                sprintf(arg, "%u", startpos);