Skip to content

Commit

Permalink
chroma: sqsh_archive_open now accepts a second err parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Aug 2, 2023
1 parent 85b4d3d commit 6360535
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
3 changes: 2 additions & 1 deletion include/sqsh_chrome.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ struct SqshInode;
* @brief opens a sqsh archive.
*
* @param[in] path The path to the sqsh archive.
* @param[out] err Pointer to an int where the error code will be stored.
*
* @return The sqsh archive context on success, NULL on error.
*/
struct SqshArchive *sqsh_archive_open(const char *path);
struct SqshArchive *sqsh_archive_open(const char *path, int *err);

/**
* @memberof SqshArchive
Expand Down
12 changes: 2 additions & 10 deletions lib/chrome/archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,8 @@
#include "../../include/sqsh_archive.h"

struct SqshArchive *
sqsh_archive_open(const char *path) {
int rv = 0;

struct SqshArchive *archive = sqsh_archive_new(path, NULL, &rv);
if (rv < 0) {
sqsh_archive_free(archive);
return NULL;
}

return archive;
sqsh_archive_open(const char *path, int *err) {
return sqsh_archive_new(path, NULL, err);
}

int
Expand Down

0 comments on commit 6360535

Please sign in to comment.