Use strncpy() instead of sprintf() in calculate_path().

Also reformat calculate_path() using the standard format.
1 file changed