diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-09-05 23:46:36 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-09-05 23:46:36 +0000 |
commit | acc9f0ab7d4c1f6c8be046cf900f0d019f8ebfa0 (patch) | |
tree | c0fd1385069fc014378c1036390f58accf936453 /cpukit/libmisc/untar | |
parent | 2007-09-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-acc9f0ab7d4c1f6c8be046cf900f0d019f8ebfa0.tar.bz2 |
2007-09-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/untar/untar.c, libmisc/untar/untar.h: Clean up prototype.
Diffstat (limited to 'cpukit/libmisc/untar')
-rw-r--r-- | cpukit/libmisc/untar/untar.c | 13 | ||||
-rw-r--r-- | cpukit/libmisc/untar/untar.h | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c index c264e409a9..7f2c55d1fd 100644 --- a/cpukit/libmisc/untar/untar.c +++ b/cpukit/libmisc/untar/untar.c @@ -98,8 +98,8 @@ _rtems_octal2ulong( * * * Inputs: * * * - * const char * tar_buf - Pointer to TAR buffer. * - * size_t size - Length of TAR buffer. * + * void * tar_buf - Pointer to TAR buffer. * + * size_t size - Length of TAR buffer. * * * * * * Output: * @@ -111,11 +111,12 @@ _rtems_octal2ulong( **************************************************************************/ int Untar_FromMemory( - const char *tar_buf, - size_t size + void *tar_buf, + size_t size ) { FILE *fp; + const char *tar_ptr = (const char *)tar_buf; const char *bufr; size_t n; char fname[100]; @@ -140,7 +141,7 @@ Untar_FromMemory( } /* Read the header */ - bufr = &tar_buf[ptr]; + bufr = &tar_ptr[ptr]; ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) { @@ -199,7 +200,7 @@ Untar_FromMemory( for (i=0; i<nblocks; i++) { len = ((sizeToGo < 512L)?(sizeToGo):(512L)); - n = fwrite(&tar_buf[ptr], 1, len, fp); + n = fwrite(&tar_ptr[ptr], 1, len, fp); if (n != len) { printk("untar: Error during write\n"); diff --git a/cpukit/libmisc/untar/untar.h b/cpukit/libmisc/untar/untar.h index 8e3fdf55e4..2e370f5add 100644 --- a/cpukit/libmisc/untar/untar.h +++ b/cpukit/libmisc/untar/untar.h @@ -24,7 +24,7 @@ extern "C" { #define UNTAR_INVALID_HEADER 3 -int Untar_FromMemory(const char *tar_buf, size_t size); +int Untar_FromMemory(void *tar_buf, size_t size); int Untar_FromFile(const char *tar_name); /************************************************************************** |