pot value

Not sure about this. So if I do not stomp on the NULL this still applies about the atoi()? I don't need it?

You still need atoi(). But, you need to stop stomping on the NULL, so that string really is a string, so that it is valid input to atoi().