summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-02 22:51:50 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-02 22:52:09 -0400
commit44a6b1b68029833893f6e9cee35aa27a974038f6 (patch)
tree170b79abd66a206598ac095156a6c4012d0583f4 /src/journal/journald-server.h
parent2f79c10e9aef916efbcf29315eea8c25d0a50ac4 (diff)
Add __attribute__((const, pure, format)) in various places
I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls.
Diffstat (limited to 'src/journal/journald-server.h')
-rw-r--r--src/journal/journald-server.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
index 86f7145292..129f7e8ab4 100644
--- a/src/journal/journald-server.h
+++ b/src/journal/journald-server.h
@@ -137,13 +137,13 @@ const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigned len
int config_parse_storage(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-const char *storage_to_string(Storage s);
-Storage storage_from_string(const char *s);
+const char *storage_to_string(Storage s) _const_;
+Storage storage_from_string(const char *s) _pure_;
int config_parse_split_mode(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-const char *split_mode_to_string(SplitMode s);
-SplitMode split_mode_from_string(const char *s);
+const char *split_mode_to_string(SplitMode s) _const_;
+SplitMode split_mode_from_string(const char *s) _pure_;
void server_fix_perms(Server *s, JournalFile *f, uid_t uid);
bool shall_try_append_again(JournalFile *f, int r);