summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorRob Landley2006-06-18 20:20:07 +0000
committerRob Landley2006-06-18 20:20:07 +0000
commitea224be6aa8fed5486376d3021a4cb911e935106 (patch)
tree38d6c5d2d53841e3f4e2702521e3b03235c51017 /util-linux
parent14d7065ef1eb836d20e13bc25d1b13f0e76185ac (diff)
downloadbusybox-ea224be6aa8fed5486376d3021a4cb911e935106.zip
busybox-ea224be6aa8fed5486376d3021a4cb911e935106.tar.gz
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')
-rw-r--r--util-linux/hexdump.c49
1 files changed, 3 insertions, 46 deletions
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index e2cbcaf..17854cb 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -5,27 +5,12 @@
* Copyright (c) 1989
* The Regents of the University of California. All rights reserved.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Original copyright notice is retained at the end of this file.
+ * Licensed under GPLv2 or later, see file License in this tarball for details.
*/
+#include "busybox.h"
#include <getopt.h>
-#include <stdlib.h>
#include <string.h>
-#include "busybox.h"
#include "dump.h"
static void bb_dump_addfile(char *name)
@@ -37,7 +22,7 @@ static void bb_dump_addfile(char *name)
fp = bb_xfopen(name, "r");
while ((buf = bb_get_chomped_line_from_file(fp)) != NULL) {
- p = (char *) bb_skip_whitespace(buf);
+ p = skip_whitespace(buf);
if (*p && (*p != '#')) {
bb_dump_add(p);
@@ -116,31 +101,3 @@ int hexdump_main(int argc, char **argv)
return(bb_dump_dump(argv));
}
-/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */