Browse Source

Make some arg const + add autoconf check

Yann Weber 7 years ago
parent
commit
e371b34f7d
3 changed files with 4 additions and 2 deletions
  1. 2
    0
      configure.ac
  2. 1
    1
      src/include/ttail_search.h
  3. 1
    1
      src/ttail_search.c

+ 2
- 0
configure.ac View File

@@ -27,6 +27,8 @@ AC_CONFIG_MACRO_DIR([m4])
27 27
 
28 28
 # Checks for programs.
29 29
 AC_GNU_SOURCE
30
+AC_C_INLINE
31
+AC_C_CONST
30 32
 AC_PROG_CC
31 33
 AM_PROG_CC_C_O 
32 34
 AC_PROG_MAKE_SET

+ 1
- 1
src/include/ttail_search.h View File

@@ -91,6 +91,6 @@ const char* ttail_logline_subst(ttail_t*, const char*);
91 91
  *@return <0 if a<b, >0 if a>b and 0 if a == b
92 92
  *@todo checks
93 93
  */
94
-int ttail_tm_cmp(struct tm*, struct tm*);
94
+int ttail_tm_cmp(const struct tm*, const struct tm*);
95 95
 
96 96
 #endif

+ 1
- 1
src/ttail_search.c View File

@@ -72,7 +72,7 @@ const char* ttail_logline_subst(ttail_t* t, const char* logline)
72 72
 	return logline + pmatch[0].rm_eo;
73 73
 }
74 74
 
75
-int ttail_tm_cmp(struct tm *ta, struct tm *tb)
75
+int ttail_tm_cmp(const struct tm *ta, const struct tm *tb)
76 76
 {
77 77
 	int r;
78 78
 	r = ta->tm_year - tb->tm_year;

Loading…
Cancel
Save