Commit 56698177 by Serge Hallyn

drop now-useless have_tpath bool

(Which will also break failure-to-build in the !HAVE_LIBGNUTLS case) Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 85db5535
...@@ -881,7 +881,6 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[]) ...@@ -881,7 +881,6 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[])
int i; int i;
unsigned char md_value[SHA_DIGEST_LENGTH]; unsigned char md_value[SHA_DIGEST_LENGTH];
char *tpath; char *tpath;
bool have_tpath = false;
#endif #endif
process_lock(); process_lock();
...@@ -916,7 +915,6 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[]) ...@@ -916,7 +915,6 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[])
goto out_free_contents; goto out_free_contents;
} }
have_tpath = true;
ret = sha1sum_file(tpath, md_value); ret = sha1sum_file(tpath, md_value);
if (ret < 0) { if (ret < 0) {
ERROR("Error getting sha1sum of %s", tpath); ERROR("Error getting sha1sum of %s", tpath);
...@@ -944,12 +942,10 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[]) ...@@ -944,12 +942,10 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[])
fprintf(f, "\n"); fprintf(f, "\n");
} }
#if HAVE_LIBGNUTLS #if HAVE_LIBGNUTLS
if (have_tpath) { fprintf(f, "# Template script checksum (SHA-1): ");
fprintf(f, "# Template script checksum (SHA-1): "); for (i=0; i<SHA_DIGEST_LENGTH; i++)
for (i=0; i<SHA_DIGEST_LENGTH; i++) fprintf(f, "%02x", md_value[i]);
fprintf(f, "%02x", md_value[i]); fprintf(f, "\n");
fprintf(f, "\n");
}
#endif #endif
if (fwrite(contents, 1, flen, f) != flen) { if (fwrite(contents, 1, flen, f) != flen) {
SYSERROR("Writing original contents"); SYSERROR("Writing original contents");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment