chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add __attribute__((const, pure, format)) in various places
[elogind.git]
/
src
/
shared
/
util.c
diff --git
a/src/shared/util.c
b/src/shared/util.c
index f9ec14aff4f6b112a58c99498de562b349f38e5f..5d01802ed925ecdaff0f1fbd5e86d0866735a758 100644
(file)
--- a/
src/shared/util.c
+++ b/
src/shared/util.c
@@
-1449,7
+1449,7
@@
char *ascii_strlower(char *t) {
return t;
}
return t;
}
-static bool ignore_file_allow_backup(const char *filename) {
+
_pure_
static bool ignore_file_allow_backup(const char *filename) {
assert(filename);
return
assert(filename);
return
@@
-1512,7
+1512,7
@@
int fd_cloexec(int fd, bool cloexec) {
return 0;
}
return 0;
}
-static bool fd_in_set(int fd, const int fdset[], unsigned n_fdset) {
+
_pure_
static bool fd_in_set(int fd, const int fdset[], unsigned n_fdset) {
unsigned i;
assert(n_fdset == 0 || fdset);
unsigned i;
assert(n_fdset == 0 || fdset);
@@
-2770,7
+2770,7
@@
int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, struct
return ret;
}
return ret;
}
-static int is_temporary_fs(struct statfs *s) {
+
_pure_
static int is_temporary_fs(struct statfs *s) {
assert(s);
return
F_TYPE_CMP(s->f_type, TMPFS_MAGIC) ||
assert(s);
return
F_TYPE_CMP(s->f_type, TMPFS_MAGIC) ||