diff options
author | Max Kellermann <max@duempel.org> | 2013-10-19 16:40:40 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-19 16:40:40 +0200 |
commit | 7ece8ff85c97535a9979cc4e2fb319084dbb1f6f (patch) | |
tree | ba00d0cd5100ac2414c300e9d202f94c1b03128a /src/Permission.cxx | |
parent | a4effeb3f9be39122e2a08e8179f6a9500189a81 (diff) | |
download | mpd-7ece8ff85c97535a9979cc4e2fb319084dbb1f6f.tar.gz mpd-7ece8ff85c97535a9979cc4e2fb319084dbb1f6f.tar.xz mpd-7ece8ff85c97535a9979cc4e2fb319084dbb1f6f.zip |
Permission: remove nullptr check
Both callers pass non-nullptr.
Diffstat (limited to '')
-rw-r--r-- | src/Permission.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Permission.cxx b/src/Permission.cxx index daf24e184..95a164fc4 100644 --- a/src/Permission.cxx +++ b/src/Permission.cxx @@ -29,6 +29,7 @@ #include <glib.h> +#include <assert.h> #include <string.h> static constexpr char PERMISSION_PASSWORD_CHAR = '@'; @@ -45,12 +46,11 @@ static unsigned permission_default; static unsigned parsePermissions(const char *string) { + assert(string != nullptr); + unsigned permission = 0; gchar **tokens; - if (!string) - return 0; - tokens = g_strsplit(string, PERMISSION_SEPERATOR, 0); for (unsigned i = 0; tokens[i] != NULL; ++i) { char *temp = tokens[i]; |