aboutsummaryrefslogtreecommitdiff
path: root/lib/common
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-06-24 16:07:45 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-06-25 17:48:49 +0200
commita32b5a9c793e4f4a4577837b73e783386842db02 (patch)
tree314f42e3302a33a7d3da80689862bc6e1bce179c /lib/common
parent3f887a1acc6129210d1ad4a484842bd411a85c7a (diff)
Remove casual un-const casting in various places
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/common')
-rw-r--r--lib/common/comp_lzo.c2
-rw-r--r--lib/common/hardlink.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/common/comp_lzo.c b/lib/common/comp_lzo.c
index b6496b2..e327d06 100644
--- a/lib/common/comp_lzo.c
+++ b/lib/common/comp_lzo.c
@@ -206,7 +206,7 @@ static void lzo_get_configuration(const sqfs_compressor_t *base,
static sqfs_object_t *lzo_create_copy(const sqfs_object_t *cmp)
{
- lzo_compressor_t *other = (lzo_compressor_t *)cmp;
+ const lzo_compressor_t *other = (const lzo_compressor_t *)cmp;
lzo_compressor_t *lzo;
lzo = calloc(1, sizeof(*lzo) + other->buf_size);
diff --git a/lib/common/hardlink.c b/lib/common/hardlink.c
index 63621a4..a3ba4f7 100644
--- a/lib/common/hardlink.c
+++ b/lib/common/hardlink.c
@@ -73,7 +73,7 @@ fail_insert:
static int compare_inum(const void *lhs, const void *rhs)
{
- sqfs_u32 l = *((sqfs_u32 *)lhs), r = *((sqfs_u32 *)rhs);
+ sqfs_u32 l = *((const sqfs_u32 *)lhs), r = *((const sqfs_u32 *)rhs);
return l < r ? -1 : (l > r ? 1 : 0);
}