diff options
author | kientzle <kientzle@FreeBSD.org> | 2005-05-21 19:38:19 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2005-05-21 19:38:19 +0000 |
commit | d665dce5d09b64996b824cbcbb8180e845cc6364 (patch) | |
tree | ce278d2a957dddb17e5efc0fa9797bbfce23a7d3 /lib | |
parent | f8806c995e8e8776cb039a32dad5ee4516c18331 (diff) | |
download | FreeBSD-src-d665dce5d09b64996b824cbcbb8180e845cc6364.zip FreeBSD-src-d665dce5d09b64996b824cbcbb8180e845cc6364.tar.gz |
Correct return values in myopen() and myclose() in Example code.
Bug: docs/79318
Thanks to: Derek Tattersall
MFC after: 7 days
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_read.3 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read.3 b/lib/libarchive/archive_read.3 index bf8f621..83851f9 100644 --- a/lib/libarchive/archive_read.3 +++ b/lib/libarchive/archive_read.3 @@ -389,7 +389,7 @@ myopen(struct archive *a, void *client_data) struct mydata *mydata = client_data; mydata->fd = open(mydata->name, O_RDONLY); - return (mydata->fd >= 0); + return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL); } int @@ -399,7 +399,7 @@ myclose(struct archive *a, void *client_data) if (mydata->fd > 0) close(mydata->fd); - return (0); + return (ARCHIVE_OK); } .Ed .Sh RETURN VALUES |