Rename the variable 'compress' to 'do_compress', in analogy with 'do_encrypt'.

---
 suspend.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Index: suspend/suspend.c
===================================================================
--- suspend.orig/suspend.c      2007-08-16 15:46:40.000000000 +0200
+++ suspend/suspend.c   2007-08-16 15:48:04.000000000 +0200
@@ -58,10 +58,10 @@ static unsigned long pref_image_size = I
 static int suspend_loglevel = SUSPEND_LOGLEVEL;
 static char compute_checksum;
 #ifdef CONFIG_COMPRESS
-static char compress;
+static char do_compress;
 static long long compr_diff;
 #else
-#define compress 0
+#define do_compress 0
 #define compr_diff 0
 #endif
 #ifdef CONFIG_ENCRYPT
@@ -134,7 +134,7 @@ static struct config_par parameters[] = 
        {
                .name = "compress",
                .fmt = "%c",
-               .ptr = &compress,
+               .ptr = &do_compress,
        },
 #endif
 #ifdef CONFIG_ENCRYPT
@@ -331,7 +331,7 @@ static int prepare(struct swap_map_handl
 
        block = (struct buf_block *)(handle->write_buffer + disp);
 #ifdef CONFIG_COMPRESS
-       if (compress) {
+       if (do_compress) {
                lzo_uint cnt;
 
                lzo1x_1_compress(buf, page_size, (lzo_bytep)block->data, &cnt,
@@ -619,7 +619,7 @@ int write_image(int snapshot_fd, int res
        if (error < (int)page_size)
                return error < 0 ? error : -EFAULT;
        printf("%s: Image size: %lu kilobytes\n", my_name, header->size / 1024);
-       if (!enough_swap(snapshot_fd, header->size) && !compress) {
+       if (!enough_swap(snapshot_fd, header->size) && !do_compress) {
                fprintf(stderr, "%s: Not enough free swap\n", my_name);
                return -ENOSPC;
        }
@@ -634,7 +634,7 @@ int write_image(int snapshot_fd, int res
        if (compute_checksum)
                header->image_flags |= IMAGE_CHECKSUM;
 
-       if (compress) {
+       if (do_compress) {
                header->image_flags |= IMAGE_COMPRESSED;
                /*
                 * The formula below follows from the worst-case expansion
@@ -720,7 +720,7 @@ Save_image:
        }
 
        if (!error) {
-               if (compress) {
+               if (do_compress) {
                        double delta = header->size - compr_diff;
 
                        printf("%s: Compression ratio %4.2lf\n", my_name,
@@ -1366,8 +1366,8 @@ int main(int argc, char *argv[])
        if (compute_checksum != 'y' && compute_checksum != 'Y')
                compute_checksum = 0;
 #ifdef CONFIG_COMPRESS
-       if (compress != 'y' && compress != 'Y')
-               compress = 0;
+       if (do_compress != 'y' && do_compress != 'Y')
+               do_compress = 0;
 #endif
 #ifdef CONFIG_ENCRYPT
        if (do_encrypt != 'y' && do_encrypt != 'Y')
@@ -1396,7 +1396,7 @@ int main(int argc, char *argv[])
 
        mem_size = 3 * page_size + buffer_size;
 #ifdef CONFIG_COMPRESS
-       if (compress)
+       if (do_compress)
                mem_size += LZO1X_1_MEM_COMPRESS;
 #endif
 #ifdef CONFIG_ENCRYPT

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to