Okay, what follows is a discussion of an extremely minor style point that stems from observing that you don't need to be testing the `user_from_url` value in the `if` conditional here since it is tested again immediately after.

I think the flow of this code could probably be written to be easier to follow. Right now you have:

```c
effective_username = userpass->username;
if (!userpass->username && user_from_url)
    effective_username = user_from_url;
if (!effective_username)
    return -1;
```

That tests three different variables (at least from the reader's perspective) and does up to two different assignments. To my eye, it is simpler to write:

```c
effective_username = userpass->username;
if (!effective_username)
    effective_username = user_from_url;
if (!effective_username)
    return -1;
```

For me, that clarifies that this is a code flow that is a cascade picking the `effective_username` value. However, once you make that clarification, I think it can be even easier to understand by going to:

```c
if (userpass->username)
    effective_username = userpass->username;
else if (user_from_url)
    effective_username = user_from_url;
else
    return -1;
```

Now you are just making a single assignment based on the first non-NULL value and the order of checking is very clear. I feel like this last direct approach is the easiest on future readers of the code and distills the logic to the core of the rules.