]> git.ipfire.org Git - location/libloc.git/commitdiff
database: Drop unused offset variable in objects
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Aug 2022 13:05:29 +0000 (13:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Aug 2022 13:05:29 +0000 (13:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.c

index 106cedec4b91ded814d88e2d43801eb55cb27939..2d6fa683062997792d8d878cb9908eeaf4dba4bf 100644 (file)
@@ -52,7 +52,6 @@
 
 struct loc_database_objects {
        char* data;
-       off_t offset;
        size_t length;
        size_t count;
 };
@@ -274,12 +273,10 @@ static int loc_database_mmap(struct loc_database* db) {
 /*
        Maps arbitrary objects from the database into memory.
 */
-static int loc_database_map_objects(struct loc_database* db,
-               struct loc_database_objects* objects, const size_t size,
-               off_t offset, size_t length) {
+static int loc_database_map_objects(struct loc_database* db, struct loc_database_objects* objects,
+               const size_t size, const off_t offset, const size_t length) {
        // Store parameters
        objects->data   = db->data + offset;
-       objects->offset = offset;
        objects->length = length;
        objects->count  = objects->length / size;