[PATCH 2/2] Use fseeko and ftello just for the sake of LFS correctness

Cristian Rodríguez crrodriguez at opensuse.org
Mon Nov 5 18:09:46 PST 2012


No bug involved.
---
 src/libply/ply-key-file.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libply/ply-key-file.c b/src/libply/ply-key-file.c
index 72264e1..7a0c531 100644
--- a/src/libply/ply-key-file.c
+++ b/src/libply/ply-key-file.c
@@ -173,7 +173,7 @@ ply_key_file_load_group (ply_key_file_t *key_file,
       ply_key_file_entry_t *entry;
       char *key;
       char *value;
-      long offset;
+      off_t offset;
       int first_byte;
 
       key = NULL;
@@ -196,13 +196,13 @@ ply_key_file_load_group (ply_key_file_t *key_file,
         }
       ungetc (first_byte, key_file->fp);
 
-      offset = ftell (key_file->fp);
+      offset = ftello (key_file->fp);
       items_matched = fscanf (key_file->fp, " %a[^= \t\n] = %a[^\n] ", &key, &value);
 
       if (items_matched != 2)
         {
           if (items_matched == 1)
-            fseek (key_file->fp, offset, SEEK_SET);
+            fseeko (key_file->fp, offset, SEEK_SET);
 
           free (key);
           free (value);
-- 
1.8.0



More information about the plymouth mailing list