diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-05-12 17:49:12 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-05-12 18:03:23 +0200 |
commit | af678af0d5c9ef3d8afdc0789b33dd0c40b6d6e5 (patch) | |
tree | 4d786cd3fecdbb370f1ceee5daecd3aa62fc205b /lib/string.h | |
parent | 286e2011d22ea6914d5f2db5de3f11911a1fb663 (diff) | |
parent | 8e433d6a529a883d566dc1d5a4afe0f1e2750baf (diff) |
Merge remote-tracking branch 'origin/master' into int-new
Diffstat (limited to 'lib/string.h')
-rw-r--r-- | lib/string.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/string.h b/lib/string.h index 218f7b1c..9af49b9e 100644 --- a/lib/string.h +++ b/lib/string.h @@ -24,4 +24,12 @@ void buffer_puts(buffer *buf, const char *str); int patmatch(const byte *pat, const byte *str); +static inline char *xbasename(const char *str) +{ + char *s = strrchr(str, '/'); + return s ? s+1 : (char *) str; +} + +#define ROUTER_ID_64_LENGTH 23 + #endif |