replace magic number with hash function
change get_full_path(char *path, char *buf) behavior
1. do not break when the result is "/" int the middle of path
2. remove unnecessarily control flow