diff options
author | Pierre Joye <pajoye@php.net> | 2006-11-03 16:46:19 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2006-11-03 16:46:19 +0000 |
commit | 8ad0c6d543f5161c5a42536002884a30c153fefd (patch) | |
tree | 961388a6f097141242ea3c8744a4c1d1c77be72b /ext/zip/lib/zip_error.c | |
parent | c002606a8888a0b85b7095c8809b136a815e0bab (diff) | |
download | php-git-8ad0c6d543f5161c5a42536002884a30c153fefd.tar.gz |
- MFH:
- fix possible leak in statName and statIndex
- add addEmptyDir() method
- add zip_stat_init,zip_clear_error and zip_file_clear_error
- add tests
- Fix protos (Hannes)
- setComment return value on success (Hannes)
Diffstat (limited to 'ext/zip/lib/zip_error.c')
-rw-r--r-- | ext/zip/lib/zip_error.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/zip/lib/zip_error.c b/ext/zip/lib/zip_error.c index 33a8f3374a..6d2cd00904 100644 --- a/ext/zip/lib/zip_error.c +++ b/ext/zip/lib/zip_error.c @@ -2,7 +2,7 @@ $NiH: zip_error.c,v 1.7 2005/06/09 19:57:09 dillo Exp $ zip_error.c -- struct zip_error helper functions - Copyright (C) 1999, 2003, 2004, 2005 Dieter Baron and Thomas Klausner + Copyright (C) 1999-2006 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <nih@giga.or.at> @@ -43,6 +43,15 @@ void +_zip_error_clear(struct zip_error *err) +{ + err->zip_err = ZIP_ER_OK; + err->sys_err = 0; +} + + + +void _zip_error_copy(struct zip_error *dst, struct zip_error *src) { dst->zip_err = src->zip_err; @@ -78,7 +87,7 @@ _zip_error_get(struct zip_error *err, int *zep, int *sep) void _zip_error_init(struct zip_error *err) { - err->zip_err = 0; + err->zip_err = ZIP_ER_OK; err->sys_err = 0; err->str = NULL; } |