Skip to content

Commit

Permalink
Use simpler check in MODIFY_USER
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell committed May 29, 2024
1 parent 10127ee commit cbc53fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -54742,12 +54742,11 @@ modify_user (const gchar * user_id, gchar **name, const gchar *new_name,
if (allowed_methods && (allowed_methods->len > 2))
return -3;

if (allowed_methods && (allowed_methods->len == 0))
if (allowed_methods && (allowed_methods->len <= 0))
allowed_methods = NULL;

if (allowed_methods
&& ((g_ptr_array_index (allowed_methods, 0) == NULL)
|| (strlen (g_ptr_array_index (allowed_methods, 0)) == 0)))
&& (strlen (g_ptr_array_index (allowed_methods, 0)) == 0))
allowed_methods = NULL;

if (allowed_methods
Expand Down

0 comments on commit cbc53fa

Please sign in to comment.