* NEWS: Mention these SELinux changes.
[coreutils/ericb.git] / src / c99-to-c89.diff
blob4e1aa4aa3fb7284b27d72774f4252a053db63915
1 Index: src/remove.c
2 ===================================================================
3 RCS file: /fetish/cu/src/remove.c,v
4 retrieving revision 1.158
5 diff --git a/src/remove.c b/src/remove.c
6 index 4728bdd..7477da5 100644
7 --- a/src/remove.c 2007-03-23 21:49:33.000000000 +0100
8 +++ b/src/remove.c 2007-03-25 09:58:29.000000000 +0200
9 @@ -254,9 +254,10 @@ pop_dir (Dirstack_state *ds)
11 size_t n_lengths = obstack_object_size (&ds->len_stack) / sizeof (size_t);
12 size_t *length = obstack_base (&ds->len_stack);
13 + size_t top_len;
15 assert (n_lengths > 0);
16 - size_t top_len = length[n_lengths - 1];
17 + top_len = length[n_lengths - 1];
18 assert (top_len >= 2);
20 /* Pop the specified length of file name. */
21 @@ -388,10 +389,11 @@ AD_stack_top (Dirstack_state const *ds)
22 static void
23 AD_stack_pop (Dirstack_state *ds)
25 + struct AD_ent *top;
26 assert (0 < AD_stack_height (ds));
28 /* operate on Active_dir. pop and free top entry */
29 - struct AD_ent *top = AD_stack_top (ds);
30 + top = AD_stack_top (ds);
31 if (top->unremovable)
32 hash_free (top->unremovable);
33 obstack_blank (&ds->Active_dir, -(int) sizeof (struct AD_ent));
34 @@ -873,6 +875,7 @@ prompt (int fd_cwd, Dirstack_state const
35 break;
38 + {
39 char const *quoted_name = quote (full_filename (filename));
41 if (0 < write_protected)
42 @@ -912,6 +915,7 @@ prompt (int fd_cwd, Dirstack_state const
43 : _("%s: remove %s %s? ")),
44 program_name, file_type (sbuf), quoted_name);
46 + }
48 if (!yesno ())
49 return RM_USER_DECLINED;
50 @@ -1512,6 +1516,7 @@ rm_1 (Dirstack_state *ds, char const *fi
51 return RM_ERROR;
54 + {
55 struct stat st;
56 cache_stat_init (&st);
57 cycle_check_init (&ds->cycle_check_state);
58 @@ -1534,6 +1539,7 @@ rm_1 (Dirstack_state *ds, char const *fi
59 AD_push_initial (ds);
60 AD_INIT_OTHER_MEMBERS ();
62 + {
63 enum RM_status status = remove_entry (AT_FDCWD, ds, filename,
64 DT_UNKNOWN, &st, x);
65 if (status == RM_NONEMPTY_DIR)
66 @@ -1552,6 +1558,8 @@ rm_1 (Dirstack_state *ds, char const *fi
67 ds_clear (ds);
68 return status;
70 + }
73 /* Remove all files and/or directories specified by N_FILES and FILE.
74 Apply the options in X. */
75 Index: src/rm.c
76 ===================================================================
77 RCS file: /fetish/cu/src/rm.c,v
78 retrieving revision 1.140
79 diff --git a/src/rm.c b/src/rm.c
80 index 364a21c..7a24014 100644
81 --- a/src/rm.c
82 +++ b/src/rm.c
83 @@ -355,6 +355,7 @@ main (int argc, char **argv)
84 quote ("/"));
87 + {
88 size_t n_files = argc - optind;
89 char const *const *file = (char const *const *) argv + optind;
91 @@ -368,7 +369,10 @@ main (int argc, char **argv)
92 if (!yesno ())
93 exit (EXIT_SUCCESS);
95 + {
96 enum RM_status status = rm (n_files, file, &x);
97 assert (VALID_STATUS (status));
98 exit (status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS);
99 + }
102 Index: src/shred.c
103 ===================================================================
104 RCS file: /fetish/cu/src/shred.c,v
105 retrieving revision 1.130
106 diff -u -p -r1.130 shred.c
107 --- a/src/shred.c 3 Sep 2006 02:53:16 -0000 1.130
108 +++ b/src/shred.c 3 Oct 2006 13:48:24 -0000
109 @@ -464,7 +464,7 @@ dopass (int fd, char const *qname, off_t
110 out. Thus, it shouldn't give up on bad blocks. This
111 code works because lim is always a multiple of
112 SECTOR_SIZE, except at the end. */
113 - verify (sizeof r % SECTOR_SIZE == 0);
114 + { verify (sizeof r % SECTOR_SIZE == 0); }
115 if (errnum == EIO && 0 <= size && (soff | SECTOR_MASK) < lim)
117 size_t soff1 = (soff | SECTOR_MASK) + 1;