summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-11-24 21:41:38 +0000
committerJim Meyering <jim@meyering.net>2000-11-24 21:41:38 +0000
commit3d6852f7fa85d83ad085d90587a4dc3015e5b963 (patch)
treed6e94bd0138cc56fc0731883fa329a5f8e23c882
parentdd82647d0c69a1f3f14b5455b06f4b3a968144d3 (diff)
downloadcoreutils-3d6852f7fa85d83ad085d90587a4dc3015e5b963.tar.xz
Declare a pointer parameters to be `const' as appropriate.
-rw-r--r--src/dd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dd.c b/src/dd.c
index f2c5c36ed..3400094cb 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -755,7 +755,7 @@ buggy_lseek_support (int fdesc)
nonzero. */
static void
-skip (int fdesc, char *file, uintmax_t records, size_t blocksize,
+skip (int fdesc, char const *file, uintmax_t records, size_t blocksize,
unsigned char *buf)
{
off_t o;
@@ -791,10 +791,10 @@ skip (int fdesc, char *file, uintmax_t records, size_t blocksize,
/* Copy NREAD bytes of BUF, with no conversions. */
static void
-copy_simple (unsigned char *buf, int nread)
+copy_simple (unsigned char const *buf, int nread)
{
int nfree; /* Number of unused bytes in `obuf'. */
- unsigned char *start = buf; /* First uncopied char in BUF. */
+ const unsigned char *start = buf; /* First uncopied char in BUF. */
do
{
@@ -818,7 +818,7 @@ copy_simple (unsigned char *buf, int nread)
replacing the newline with trailing spaces). */
static void
-copy_with_block (unsigned char *buf, size_t nread)
+copy_with_block (unsigned char const *buf, size_t nread)
{
size_t i;
@@ -850,7 +850,7 @@ copy_with_block (unsigned char *buf, size_t nread)
with a newline). */
static void
-copy_with_unblock (unsigned char *buf, size_t nread)
+copy_with_unblock (unsigned char const *buf, size_t nread)
{
size_t i;
unsigned char c;
@@ -944,8 +944,8 @@ dd_copy (void)
0+0 records out
*/
- skip (STDOUT_FILENO, output_file, seek_record, output_blocksize,
- obuf);
+ skip (STDOUT_FILENO, output_file, seek_record, output_blocksize,
+ obuf);
}
if (max_records == 0)