space after the if and around operators, but no redundant space.  Pull the opening brace up to this line (provided it fits in 80 characters):

```
  if (str->len == 0) {
```