]> git.ipfire.org Git - people/ms/systemd.git/blobdiff - util.c
add new hexchar() call
[people/ms/systemd.git] / util.c
diff --git a/util.c b/util.c
index 654b93d79c084ceb25b944aa3e62a1112204303a..b166f328b2e50a4736cda93676b96fc097d0ed0a 100644 (file)
--- a/util.c
+++ b/util.c
@@ -547,3 +547,9 @@ char *file_in_same_dir(const char *path, const char *filename) {
 
         return r;
 }
+
+char hexchar(int x) {
+        static const char table[16] = "0123456789abcdef";
+
+        return table[x & 15];
+}