safe_create_leading_directories(): rename local variable

Rename "pos" to "next_component", because now it always points at the next component of the path name that has to be processed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Jan 6, 2014 at 14:45 UTC 26c8ae2a577cd283ab9fa8ab5e5f0ced568dc034
1 file changed +5 -5
sha1_file.c
+5 -5
@@ -107,18 +107,18 @@ int mkdir_in_gitdir(const char *path)
107
108 int safe_create_leading_directories(char *path)
109 {
110 - char *pos = path + offset_1st_component(path);
110 + char *next_component = path + offset_1st_component(path);
111
112 - while (pos) {
112 + while (next_component) {
113 struct stat st;
114 - char *slash = strchr(pos, '/');
114 + char *slash = strchr(next_component, '/');
115
116 if (!slash)
117 break;
118 while (*(slash + 1) == '/')
119 slash++;
120 - pos = slash + 1;
121 - if (!*pos)
120 + next_component = slash + 1;
121 + if (!*next_component)
122 break;
123
124 *slash = '\0';