I'd try to reuse strncpy() so that any optimizations need to be done in as few places as possible.
Save strlen() and just append the 0.
Just do strlen() + 1, heh.
Or do Uwe's thing (without the parentheses around d and s, and with the loop body on a separate line, coding standards...) if you are terribly worried about performance here. Or just import from some existing C library, no need to reinvent the wheel, and some of these functions can be quite tricky to get right ;-)
Segher