mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-23 07:04:45 +08:00
2010-08-24 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/untar/untar.c: Return if open fails. Use ssize_t for read() return value.
This commit is contained in:
+4
-2
@@ -1,11 +1,13 @@
|
||||
2010-09-24 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
2010-08-24 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libmisc/untar/untar.c: Return if open fails.
|
||||
Use ssize_t for read() return value.
|
||||
* posix/src/aio_cancel.c: Spray pthread_mutex_unlocks.
|
||||
* posix/src/aio_read.c: aio_nbytes is always >= 0.
|
||||
* posix/src/aio_write.c: aio_nbytes is always >= 0.
|
||||
Fix typo in comment.
|
||||
|
||||
2010-09-24 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
2010-08-24 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libcsupport/include/sys/utsname.h: Remove times().
|
||||
Remove unnecessary includes.
|
||||
|
||||
@@ -254,7 +254,7 @@ Untar_FromFile(
|
||||
{
|
||||
int fd;
|
||||
char *bufr;
|
||||
size_t n;
|
||||
ssize_t n;
|
||||
char fname[100];
|
||||
char linkname[100];
|
||||
int sum;
|
||||
@@ -265,15 +265,17 @@ Untar_FromFile(
|
||||
unsigned long size;
|
||||
unsigned char linkflag;
|
||||
|
||||
|
||||
retval = UNTAR_SUCCESSFUL;
|
||||
bufr = (char *)malloc(512);
|
||||
if (bufr == NULL)
|
||||
{
|
||||
return(UNTAR_FAIL);
|
||||
|
||||
if ((fd = open(tar_name, O_RDONLY)) < 0) {
|
||||
return UNTAR_FAIL;
|
||||
}
|
||||
|
||||
fd = open(tar_name, O_RDONLY);
|
||||
bufr = (char *)malloc(512);
|
||||
if (bufr == NULL) {
|
||||
return(UNTAR_FAIL);
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
/* Read the header */
|
||||
|
||||
Reference in New Issue
Block a user