aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/dir_writer.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-24 16:36:20 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-24 16:47:49 +0100
commit162142b7930248d83a77e8d8f4eba5896d5b267a (patch)
treef65796333f80b4f710a19f5fcb6770d6aedbafe6 /lib/sqfs/dir_writer.c
parentdea3b64dd11a3a3391bd9d8f8c26f20392e7eb3c (diff)
Cleanup libsquashfs invalid argument error codes
- Add an explicit "you're holding it wrong" error code. - Consistently return error codes and not have some special places where -1 is returned. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/dir_writer.c')
-rw-r--r--lib/sqfs/dir_writer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqfs/dir_writer.c b/lib/sqfs/dir_writer.c
index 8703b77..673c103 100644
--- a/lib/sqfs/dir_writer.c
+++ b/lib/sqfs/dir_writer.c
@@ -130,7 +130,7 @@ int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer, const char *name,
return type;
if (name[0] == '\0')
- return SQFS_ERROR_CORRUPTED;
+ return SQFS_ERROR_ARG_INVALID;
ent = alloc_flex(sizeof(*ent), 1, strlen(name));
if (ent == NULL)