There is no reason why cid_eq takes a non-const argument, so make it const.

Signed-off-by: Vladimir Oltean <olte...@gmail.com>
---
 util.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/util.h b/util.h
index 739c8fda0548..5a22c4a79401 100644
--- a/util.h
+++ b/util.h
@@ -84,7 +84,8 @@ char *cid2str(struct ClockIdentity *id);
  * @param b  Second clock identity.
  * @return   1 if identities are equal, 0 otherwise.
  */
-static inline int cid_eq(struct ClockIdentity *a, struct ClockIdentity *b)
+static inline int cid_eq(const struct ClockIdentity *a,
+                        const struct ClockIdentity *b)
 {
        return memcmp(a, b, sizeof(*a)) == 0;
 }
-- 
2.25.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to