summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_io_util.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2018-01-04 13:45:11 +0800
committerXinchen Hui <laruence@gmail.com>2018-01-04 13:45:11 +0800
commit4a4602c45c8dcd70538de3ebbe5c6829e5ca6fcf (patch)
tree3725689ea9e318ee1fc5ef34a6a83f62bc943802 /ext/zip/lib/zip_io_util.c
parent76d0e3d514ba47ad29c06e97efc16fef41e8186b (diff)
parent0e3dede07c6677ed5cc60ddad3f7552f83b45a4b (diff)
downloadphp-git-4a4602c45c8dcd70538de3ebbe5c6829e5ca6fcf.tar.gz
Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src: Happy new year (Update copyright to 2018) Happy new year (Update copyright to 2018) Revert "Enable ODBC tests on AppVeyor" Enable ODBC tests on AppVeyor Skip on Travis-CI Extend skip section 2018 missing changelog entries + fix version and date missing changelog entries 2018 Trailing whitespaces
Diffstat (limited to 'ext/zip/lib/zip_io_util.c')
-rw-r--r--ext/zip/lib/zip_io_util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/zip/lib/zip_io_util.c b/ext/zip/lib/zip_io_util.c
index b16927defb..f955070b39 100644
--- a/ext/zip/lib/zip_io_util.c
+++ b/ext/zip/lib/zip_io_util.c
@@ -1,10 +1,10 @@
/*
zip_io_util.c -- I/O helper functions
Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
-
+
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
@@ -17,7 +17,7 @@
3. The names of the authors may not be used to endorse or promote
products derived from this software without specific prior
written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -64,7 +64,7 @@ zip_uint8_t *
_zip_read_data(zip_buffer_t *buffer, zip_source_t *src, size_t length, bool nulp, zip_error_t *error)
{
zip_uint8_t *r;
-
+
if (length == 0 && !nulp) {
return NULL;
}
@@ -77,7 +77,7 @@ _zip_read_data(zip_buffer_t *buffer, zip_source_t *src, size_t length, bool nulp
if (buffer) {
zip_uint8_t *data = _zip_buffer_get(buffer, length);
-
+
if (data == NULL) {
zip_error_set(error, ZIP_ER_MEMORY, 0);
free(r);
@@ -124,7 +124,7 @@ int
_zip_write(zip_t *za, const void *data, zip_uint64_t length)
{
zip_int64_t n;
-
+
if ((n = zip_source_write(za->src, data, length)) < 0) {
_zip_error_set_from_source(&za->error, za->src);
return -1;
@@ -133,6 +133,6 @@ _zip_write(zip_t *za, const void *data, zip_uint64_t length)
zip_error_set(&za->error, ZIP_ER_WRITE, EINTR);
return -1;
}
-
+
return 0;
}