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

Ray Strode halfline at gmail.com
Wed Nov 7 11:45:52 PST 2012


Sure, pushed.

On Mon, Nov 5, 2012 at 9:09 PM, Cristian Rodríguez
<crrodriguez at opensuse.org> wrote:
> 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
>
> _______________________________________________
> plymouth mailing list
> plymouth at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/plymouth


More information about the plymouth mailing list