Commit 7ece8ff8 authored by Max Kellermann's avatar Max Kellermann

Permission: remove nullptr check

Both callers pass non-nullptr.
parent a4effeb3
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment