chiark / gitweb /
core/execute: make arguments constant if possible
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 6 Feb 2018 03:17:50 +0000 (12:17 +0900)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:58:49 +0000 (07:58 +0200)
Also make functions static if possible.

src/basic/time-util.h

index cac23e0ec792cb61459335d8df2f7d916c4c0d1e..bb8213bed5a2438fecf524cca0dc09b3e9b15723 100644 (file)
@@ -104,12 +104,12 @@ triple_timestamp* triple_timestamp_from_realtime(triple_timestamp *ts, usec_t u)
 #define TRIPLE_TIMESTAMP_HAS_CLOCK(clock)                               \
         IN_SET(clock, CLOCK_REALTIME, CLOCK_REALTIME_ALARM, CLOCK_MONOTONIC, CLOCK_BOOTTIME, CLOCK_BOOTTIME_ALARM)
 
-static inline bool dual_timestamp_is_set(dual_timestamp *ts) {
+static inline bool dual_timestamp_is_set(const dual_timestamp *ts) {
         return ((ts->realtime > 0 && ts->realtime != USEC_INFINITY) ||
                 (ts->monotonic > 0 && ts->monotonic != USEC_INFINITY));
 }
 
-static inline bool triple_timestamp_is_set(triple_timestamp *ts) {
+static inline bool triple_timestamp_is_set(const triple_timestamp *ts) {
         return ((ts->realtime > 0 && ts->realtime != USEC_INFINITY) ||
                 (ts->monotonic > 0 && ts->monotonic != USEC_INFINITY) ||
                 (ts->boottime > 0 && ts->boottime != USEC_INFINITY));