It's probably a bad idea to rm the directory if snprintf() truncated the name; either the command is pointless because there's no such directory or there really is a directory there and it's not the one you meant to delete !
Either you're confident snprintf() can't need to truncate, in which case you might as well use sprintf(), or you should check against truncation ... then again, you should probably also check the return was > 10 (else something else has gone wrong).
```
int ret = snprintf(...);
if (ret > 10 && ret < CF_BUFSIZE) { system(cmd); }
```