Const correctness 33/229233/1
authorMichal Bloch <m.bloch@samsung.com>
Fri, 27 Mar 2020 19:52:10 +0000 (20:52 +0100)
committerMichal Bloch <m.bloch@samsung.com>
Mon, 30 Mar 2020 11:14:22 +0000 (13:14 +0200)
Change-Id: I138ad4f5b3f76006c88319a5c204d674de1d9cd9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
include/fd_info.h
src/libdlogutil/fdi_logger.c
src/libdlogutil/fdi_pipe.c

index 929ce1e..47981f7 100644 (file)
@@ -63,7 +63,7 @@ struct fd_ops {
        int (*getsize)(struct fd_info *fdi, unsigned int *val);
 
        /// Check whether there will be no more logs on this FD
-       bool (*eof)(struct fd_info *fdi);
+       bool (*eof)(const struct fd_info *fdi);
 
        // Whether to filter logs on the client
        bool should_filter;
index b31ee75..544eac3 100644 (file)
@@ -230,7 +230,7 @@ static int logger_prepare_print(struct fd_info *fdi, int dump, bool monitor, dlo
        return 0;
 }
 
-static bool logger_eof(struct fd_info *fdi)
+static bool logger_eof(const struct fd_info *fdi)
 {
        assert(fdi);
        struct logger_priv_data *lpd = (struct logger_priv_data *)fdi->priv_data;
index 32882ee..41fcc81 100644 (file)
@@ -282,7 +282,7 @@ static const dlogutil_entry_s *pipe_peek_entry(const struct fd_info *fdi)
        return (const dlogutil_entry_s *)(ppd->buff + ppd->offset);
 }
 
-static bool pipe_eof(struct fd_info *fdi)
+static bool pipe_eof(const struct fd_info *fdi)
 {
        assert(fdi);
        const struct pipe_priv_data *const ppd = (const struct pipe_priv_data *)fdi->priv_data;