Browse Source

[core] add const to some etag prototypes

personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent
commit
0dccda28ad
  1. 4
      src/etag.c
  2. 4
      src/etag.h

4
src/etag.c

@ -6,7 +6,7 @@
#include <sys/stat.h>
#include <string.h>
int etag_is_equal(buffer *etag, const char *line, int weak_ok) {
int etag_is_equal(const buffer *etag, const char *line, int weak_ok) {
enum {
START = 0,
CHECK,
@ -143,7 +143,7 @@ int etag_is_equal(buffer *etag, const char *line, int weak_ok) {
return 0;
}
int etag_create(buffer *etag, struct stat *st,etag_flags_t flags) {
int etag_create(buffer *etag, const struct stat *st, etag_flags_t flags) {
if (0 == flags) return 0;
buffer_clear(etag);

4
src/etag.h

@ -8,8 +8,8 @@ struct stat; /* declaration */
typedef enum { ETAG_USE_INODE = 1, ETAG_USE_MTIME = 2, ETAG_USE_SIZE = 4 } etag_flags_t;
int etag_is_equal(buffer *etag, const char *matches, int weak_ok);
int etag_create(buffer *etag, struct stat *st, etag_flags_t flags);
int etag_is_equal(const buffer *etag, const char *matches, int weak_ok);
int etag_create(buffer *etag, const struct stat *st, etag_flags_t flags);
int etag_mutate(buffer *mut, buffer *etag);

Loading…
Cancel
Save