You probably want this instead:

```c
repo = strchr(url, ':');
if (repo) repo++;
```

The way it reads now, if you gave it a bad URL (like `git@something-something/else`), `repo` would be set to 1, and the test just after this wouldn't work.