diff options
author | Rob Landley <rob@landley.net> | 2006-06-18 20:20:07 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-18 20:20:07 +0000 |
commit | ea224be6aa8fed5486376d3021a4cb911e935106 (patch) | |
tree | 38d6c5d2d53841e3f4e2702521e3b03235c51017 /util-linux/hexdump.c | |
parent | 14d7065ef1eb836d20e13bc25d1b13f0e76185ac (diff) | |
download | busybox-w32-ea224be6aa8fed5486376d3021a4cb911e935106.tar.gz busybox-w32-ea224be6aa8fed5486376d3021a4cb911e935106.tar.bz2 busybox-w32-ea224be6aa8fed5486376d3021a4cb911e935106.zip |
skip_whitespace() shouldn't claim its return value is const, it doesn't know
that and callers wind up typecasting it back.
Diffstat (limited to 'util-linux/hexdump.c')
-rw-r--r-- | util-linux/hexdump.c | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index e2cbcaf89..17854cb18 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c | |||
@@ -5,27 +5,12 @@ | |||
5 | * Copyright (c) 1989 | 5 | * Copyright (c) 1989 |
6 | * The Regents of the University of California. All rights reserved. | 6 | * The Regents of the University of California. All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * Licensed under GPLv2 or later, see file License in this tarball for details. |
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | * Original copyright notice is retained at the end of this file. | ||
23 | */ | 9 | */ |
24 | 10 | ||
11 | #include "busybox.h" | ||
25 | #include <getopt.h> | 12 | #include <getopt.h> |
26 | #include <stdlib.h> | ||
27 | #include <string.h> | 13 | #include <string.h> |
28 | #include "busybox.h" | ||
29 | #include "dump.h" | 14 | #include "dump.h" |
30 | 15 | ||
31 | static void bb_dump_addfile(char *name) | 16 | static void bb_dump_addfile(char *name) |
@@ -37,7 +22,7 @@ static void bb_dump_addfile(char *name) | |||
37 | fp = bb_xfopen(name, "r"); | 22 | fp = bb_xfopen(name, "r"); |
38 | 23 | ||
39 | while ((buf = bb_get_chomped_line_from_file(fp)) != NULL) { | 24 | while ((buf = bb_get_chomped_line_from_file(fp)) != NULL) { |
40 | p = (char *) bb_skip_whitespace(buf); | 25 | p = skip_whitespace(buf); |
41 | 26 | ||
42 | if (*p && (*p != '#')) { | 27 | if (*p && (*p != '#')) { |
43 | bb_dump_add(p); | 28 | bb_dump_add(p); |
@@ -116,31 +101,3 @@ int hexdump_main(int argc, char **argv) | |||
116 | 101 | ||
117 | return(bb_dump_dump(argv)); | 102 | return(bb_dump_dump(argv)); |
118 | } | 103 | } |
119 | /* | ||
120 | * Copyright (c) 1989 The Regents of the University of California. | ||
121 | * All rights reserved. | ||
122 | * | ||
123 | * Redistribution and use in source and binary forms, with or without | ||
124 | * modification, are permitted provided that the following conditions | ||
125 | * are met: | ||
126 | * 1. Redistributions of source code must retain the above copyright | ||
127 | * notice, this list of conditions and the following disclaimer. | ||
128 | * 2. Redistributions in binary form must reproduce the above copyright | ||
129 | * notice, this list of conditions and the following disclaimer in the | ||
130 | * documentation and/or other materials provided with the distribution. | ||
131 | * 3. Neither the name of the University nor the names of its contributors | ||
132 | * may be used to endorse or promote products derived from this software | ||
133 | * without specific prior written permission. | ||
134 | * | ||
135 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
136 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
137 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
138 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
139 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
140 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
141 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
142 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
143 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
144 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
145 | * SUCH DAMAGE. | ||
146 | */ | ||