diff options
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -97,7 +97,7 @@ int create_info_file(pull_request *pr, const char *pr_root) { int len; int buf_len; int j = 0; - char *info; + char *filename; char *info_buf; FILE *fp; struct tm tm; @@ -107,7 +107,7 @@ int create_info_file(pull_request *pr, const char *pr_root) { log(LOG_ERR,"Pull request is NULL."); return 0; } - /* Is the PR directory NULL? */ + /* Is the PR root NULL? */ if (pr_root == NULL) { log(LOG_ERR,"Pull request root is NULL."); return 0; @@ -117,7 +117,7 @@ int create_info_file(pull_request *pr, const char *pr_root) { len = strlen(pr_root) + strlen("/info"); buf_len = get_info_len(pr); - info = calloc(len+1, sizeof(char)); + filename = calloc(len+1, sizeof(char)); info_buf = calloc(buf_len+1, sizeof(char)); j = sprintf(info_buf, "title: %s\n", pr->title); @@ -139,12 +139,12 @@ int create_info_file(pull_request *pr, const char *pr_root) { } /* Append /info to the PR root. */ - sprintf(info, "%s/info", pr_root); + sprintf(filename, "%s/info", pr_root); /* Is there already an info file? */ - if (access(info, F_OK) == 0) { + if (access(filename, F_OK) == 0) { long size = 0; - char *buf = read_file(info, &size); + char *buf = read_file(filename, &size); log(LOG_NOTICE, "Info file already exists."); @@ -153,7 +153,7 @@ int create_info_file(pull_request *pr, const char *pr_root) { /* Are the contents of the info file the same? */ if (strcmp(info_buf, buf) == 0) { log(LOG_NOTICE, "New info file is the same as the existing one."); - free(info); + free(filename); free(info_buf); free(buf); return 2; @@ -166,7 +166,7 @@ int create_info_file(pull_request *pr, const char *pr_root) { } /* Open the info file. */ - fp = fopen(info, "w"); + fp = fopen(filename, "w"); /* Did we fail to open the file? */ if (fp == NULL) { |