Correct return values in myopen() and myclose() in Example code.

Bug: docs/79318
Thanks to: Derek Tattersall
MFC after: 7 days
This commit is contained in:
Tim Kientzle 2005-05-21 19:38:19 +00:00
parent 846e187c43
commit 21805f33bf

View File

@ -389,7 +389,7 @@ myopen(struct archive *a, void *client_data)
struct mydata *mydata = client_data; struct mydata *mydata = client_data;
mydata->fd = open(mydata->name, O_RDONLY); mydata->fd = open(mydata->name, O_RDONLY);
return (mydata->fd >= 0); return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL);
} }
int int
@ -399,7 +399,7 @@ myclose(struct archive *a, void *client_data)
if (mydata->fd > 0) if (mydata->fd > 0)
close(mydata->fd); close(mydata->fd);
return (0); return (ARCHIVE_OK);
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES