chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bus: implement bus_label_unescape_n()
[elogind.git]
/
src
/
shared
/
bus-label.h
diff --git
a/src/shared/bus-label.h
b/src/shared/bus-label.h
index c27c8517fd41b9fafec99e6b6ae313b2fe895805..ed1dc4e0a7788b69483a3fc337ff27996579d913 100644
(file)
--- a/
src/shared/bus-label.h
+++ b/
src/shared/bus-label.h
@@
-21,5
+21,12
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <stdlib.h>
+#include <string.h>
+
char *bus_label_escape(const char *s);
char *bus_label_escape(const char *s);
-char *bus_label_unescape(const char *f);
+char *bus_label_unescape_n(const char *f, size_t l);
+
+static inline char *bus_label_unescape(const char *f) {
+ return bus_label_unescape_n(f, f ? strlen(f) : 0);
+}