* this function will return a sub-path name under directory. * * @param directory the parent directory. * @param filename the filename. * * @return the subdir pointer in filename */
| 722 | * @return the subdir pointer in filename |
| 723 | */ |
| 724 | const char *dfs_subdir(const char *directory, const char *filename) |
| 725 | { |
| 726 | const char *dir; |
| 727 | |
| 728 | if (strlen(directory) == strlen(filename)) /* it's a same path */ |
| 729 | return NULL; |
| 730 | |
| 731 | dir = filename + strlen(directory); |
| 732 | if ((*dir != '/') && (dir != filename)) |
| 733 | { |
| 734 | dir --; |
| 735 | } |
| 736 | |
| 737 | return dir; |
| 738 | } |
| 739 | RTM_EXPORT(dfs_subdir); |
| 740 | |
| 741 | /** |
no outgoing calls
no test coverage detected