aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/strings.c6
-rw-r--r--util-linux/fdflush.c8
-rw-r--r--util-linux/fdformat.c12
-rw-r--r--util-linux/freeramdisk.c6
4 files changed, 16 insertions, 16 deletions
diff --git a/miscutils/strings.c b/miscutils/strings.c
index d0a092421..111aa94ba 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -99,9 +99,9 @@ PIPE:
99 status=EXIT_FAILURE; 99 status=EXIT_FAILURE;
100 } 100 }
101 } while ( --argc > 0 ); 101 } while ( --argc > 0 );
102#ifdef CONFIG_FEATURE_CLEAN_UP 102
103 free(string); 103 if (ENABLE_FEATURE_CLEAN_UP) free(string);
104#endif 104
105 bb_fflush_stdout_and_exit(status); 105 bb_fflush_stdout_and_exit(status);
106} 106}
107 107
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c
index c3fcf3325..f3afea320 100644
--- a/util-linux/fdflush.c
+++ b/util-linux/fdflush.c
@@ -35,15 +35,15 @@ extern int fdflush_main(int argc, char **argv)
35{ 35{
36 int fd, result; 36 int fd, result;
37 37
38 if (argc <= 1) 38 if (argc != 2)
39 bb_show_usage(); 39 bb_show_usage();
40 40
41 fd = bb_xopen(argv[1], 0); 41 fd = bb_xopen(argv[1], 0);
42 42
43 result = ioctl(fd, FDFLUSH, 0); 43 result = ioctl(fd, FDFLUSH, 0);
44#ifdef CONFIG_FEATURE_CLEAN_UP 44
45 close(fd); 45 if (ENABLE_FEATURE_CLEAN_UP) close(fd);
46#endif 46
47 if (result) { 47 if (result) {
48 bb_perror_nomsg_and_die(); 48 bb_perror_nomsg_and_die();
49 } 49 }
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index bd4527581..768105159 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -147,14 +147,14 @@ int fdformat_main(int argc,char **argv)
147 /* There is no point in freeing blocks at the end of a program, because 147 /* There is no point in freeing blocks at the end of a program, because
148 all of the program's space is given back to the system when the process 148 all of the program's space is given back to the system when the process
149 terminates.*/ 149 terminates.*/
150#ifdef CONFIG_FEATURE_CLEAN_UP 150
151 free(data); 151 if (ENABLE_FEATURE_CLEAN_UP) free(data);
152#endif 152
153 print_and_flush("done\n", NULL); 153 print_and_flush("done\n", NULL);
154 } 154 }
155#ifdef CONFIG_FEATURE_CLEAN_UP 155
156 close(fd); 156 if (ENABLE_FEATURE_CLEAN_UP) close(fd);
157#endif 157
158 /* Don't bother closing. Exit does 158 /* Don't bother closing. Exit does
159 * that, so we can save a few bytes */ 159 * that, so we can save a few bytes */
160 return EXIT_SUCCESS; 160 return EXIT_SUCCESS;
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index e5061dc34..cfea35bea 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -47,9 +47,9 @@ freeramdisk_main(int argc, char **argv)
47 fd = bb_xopen(argv[1], O_RDWR); 47 fd = bb_xopen(argv[1], O_RDWR);
48 48
49 result = ioctl(fd, BLKFLSBUF); 49 result = ioctl(fd, BLKFLSBUF);
50#ifdef CONFIG_FEATURE_CLEAN_UP 50
51 close(fd); 51 if (ENABLE_FEATURE_CLEAN_UP) close(fd);
52#endif 52
53 if (result < 0) { 53 if (result < 0) {
54 bb_perror_msg_and_die("failed ioctl on %s", argv[1]); 54 bb_perror_msg_and_die("failed ioctl on %s", argv[1]);
55 } 55 }