]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
drop now-useless have_tpath bool
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 26 Sep 2013 13:14:50 +0000 (08:14 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 26 Sep 2013 13:14:50 +0000 (08:14 -0500)
(Which will also break failure-to-build in the !HAVE_LIBGNUTLS
case)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c

index d3f5b0d0b396aa4969c91fc8f6d0660c7741f6a0..1b3f2f5fc72f02a1192973720d9b6977d9377fa1 100644 (file)
@@ -881,7 +881,6 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[])
        int i;
        unsigned char md_value[SHA_DIGEST_LENGTH];
        char *tpath;
-       bool have_tpath = false;
 #endif
 
        process_lock();
@@ -916,7 +915,6 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[])
                goto out_free_contents;
        }
 
-       have_tpath = true;
        ret = sha1sum_file(tpath, md_value);
        if (ret < 0) {
                ERROR("Error getting sha1sum of %s", tpath);
@@ -944,12 +942,10 @@ bool prepend_lxc_header(char *path, const char *t, char *const argv[])
                fprintf(f, "\n");
        }
 #if HAVE_LIBGNUTLS
-       if (have_tpath) {
-               fprintf(f, "# Template script checksum (SHA-1): ");
-               for (i=0; i<SHA_DIGEST_LENGTH; i++)
-                       fprintf(f, "%02x", md_value[i]);
-               fprintf(f, "\n");
-       }
+       fprintf(f, "# Template script checksum (SHA-1): ");
+       for (i=0; i<SHA_DIGEST_LENGTH; i++)
+               fprintf(f, "%02x", md_value[i]);
+       fprintf(f, "\n");
 #endif
        if (fwrite(contents, 1, flen, f) != flen) {
                SYSERROR("Writing original contents");