change log for rtems (2010-08-24)

rtems-vc at rtems.org rtems-vc at rtems.org
Tue Aug 24 13:10:18 UTC 2010


 *ralf*:
2010-08-24	Ralf Corsépius <ralf.corsepius at rtems.org>

	* libmisc/untar/untar.c: Return if open fails.
	Use ssize_t for read() return value.

M 1.2590  cpukit/ChangeLog
M   1.14  cpukit/libmisc/untar/untar.c

diff -u rtems/cpukit/ChangeLog:1.2589 rtems/cpukit/ChangeLog:1.2590
--- rtems/cpukit/ChangeLog:1.2589	Tue Aug 24 07:04:43 2010
+++ rtems/cpukit/ChangeLog	Tue Aug 24 08:06:23 2010
@@ -1,11 +1,13 @@
-2010-09-24	Ralf Corsépius <ralf.corsepius at rtems.org>
+2010-08-24	Ralf Corsépius <ralf.corsepius at 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 at rtems.org>
+2010-08-24	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* libcsupport/include/sys/utsname.h: Remove times().
 	Remove unnecessary includes.

diff -u rtems/cpukit/libmisc/untar/untar.c:1.13 rtems/cpukit/libmisc/untar/untar.c:1.14
--- rtems/cpukit/libmisc/untar/untar.c:1.13	Tue Jul 27 13:11:42 2010
+++ rtems/cpukit/libmisc/untar/untar.c	Tue Aug 24 08:06:24 2010
@@ -254,7 +254,7 @@
 {
    int            fd;
    char           *bufr;
-   size_t         n;
+   ssize_t        n;
    char           fname[100];
    char           linkname[100];
    int            sum;
@@ -265,15 +265,17 @@
    unsigned long  size;
    unsigned char  linkflag;
 
-
    retval = UNTAR_SUCCESSFUL;
+
+   if ((fd = open(tar_name, O_RDONLY)) < 0) {
+       return UNTAR_FAIL;
+   }
+
    bufr = (char *)malloc(512);
-   if (bufr == NULL)
-   {
+   if (bufr == NULL) {
       return(UNTAR_FAIL);
    }
-
-   fd = open(tar_name, O_RDONLY);
+   
    while (1)
    {
       /* Read the header */



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100824/55c5a29e/attachment-0001.html>


More information about the vc mailing list