For me I dislike these statements, but would put parenthesis around the comparison `delimLen = (delim != NULL) ? blah : blah;`

I would also reverse the logic to favour positive `delimLen = (delim == NULL ? 0; strlen(delim);`