VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/libzip/zip_error_strerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/libzip/zip_error_strerror.c')
-rw-r--r--src/Common/libzip/zip_error_strerror.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/Common/libzip/zip_error_strerror.c b/src/Common/libzip/zip_error_strerror.c
index bdc1e44c..6baf900f 100644
--- a/src/Common/libzip/zip_error_strerror.c
+++ b/src/Common/libzip/zip_error_strerror.c
@@ -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
@@ -40,8 +40,7 @@
ZIP_EXTERN const char *
-zip_error_strerror(zip_error_t *err)
-{
+zip_error_strerror(zip_error_t *err) {
const char *zs, *ss;
char buf[128], *s;
@@ -54,7 +53,7 @@ zip_error_strerror(zip_error_t *err)
}
else {
zs = _zip_err_str[err->zip_err];
-
+
switch (_zip_err_type[err->zip_err]) {
case ZIP_ET_SYS:
ss = strerror(err->sys_err);
@@ -72,14 +71,10 @@ zip_error_strerror(zip_error_t *err)
if (ss == NULL)
return zs;
else {
- if ((s=(char *)malloc(strlen(ss)
- + (zs ? strlen(zs)+2 : 0) + 1)) == NULL)
+ if ((s = (char *)malloc(strlen(ss) + (zs ? strlen(zs) + 2 : 0) + 1)) == NULL)
return _zip_err_str[ZIP_ER_MEMORY];
-
- sprintf(s, "%s%s%s",
- (zs ? zs : ""),
- (zs ? ": " : ""),
- ss);
+
+ sprintf(s, "%s%s%s", (zs ? zs : ""), (zs ? ": " : ""), ss);
err->str = s;
return s;