change log for rtems (2010-08-28)

rtems-vc at rtems.org rtems-vc at rtems.org
Sat Aug 28 20:10:53 UTC 2010


 *joel*:
2010-08-28	Joel Sherrill <joel.sherrilL at OARcorp.com>

	* libfs/src/pipe/pipe.c: Remove unreachable line flagged by Coverity as
	dead code.

M 1.2616  cpukit/ChangeLog
M    1.8  cpukit/libfs/src/pipe/pipe.c

diff -u rtems/cpukit/ChangeLog:1.2615 rtems/cpukit/ChangeLog:1.2616
--- rtems/cpukit/ChangeLog:1.2615	Fri Aug 27 13:06:46 2010
+++ rtems/cpukit/ChangeLog	Sat Aug 28 14:48:41 2010
@@ -1,3 +1,8 @@
+2010-08-28	Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+	* libfs/src/pipe/pipe.c: Remove unreachable line flagged by Coverity as
+	dead code.
+
 2010-08-27	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* libcsupport/src/ctermid.c: Add comment explaining that this use of

diff -u rtems/cpukit/libfs/src/pipe/pipe.c:1.7 rtems/cpukit/libfs/src/pipe/pipe.c:1.8
--- rtems/cpukit/libfs/src/pipe/pipe.c:1.7	Fri Jul  9 13:39:36 2010
+++ rtems/cpukit/libfs/src/pipe/pipe.c	Sat Aug 28 14:48:41 2010
@@ -48,7 +48,6 @@
     }
     /* Just try once... */
     return -1;
-    sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
   }
 
   /* Non-blocking open to avoid waiting for writers */


 *joel*:
Just comment out line.

M    1.9  cpukit/libfs/src/pipe/pipe.c

diff -u rtems/cpukit/libfs/src/pipe/pipe.c:1.8 rtems/cpukit/libfs/src/pipe/pipe.c:1.9
--- rtems/cpukit/libfs/src/pipe/pipe.c:1.8	Sat Aug 28 14:48:41 2010
+++ rtems/cpukit/libfs/src/pipe/pipe.c	Sat Aug 28 14:49:47 2010
@@ -48,6 +48,7 @@
     }
     /* Just try once... */
     return -1;
+    /* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
   }
 
   /* Non-blocking open to avoid waiting for writers */


 *joel*:
2010-08-28	Joel Sherrill <joel.sherrill at oarcorp.com>

	PR 1694/shell
	* libmisc/shell/main_setenv.c: Address memory leak identified by
	Coverity.

M 1.2617  cpukit/ChangeLog
M    1.3  cpukit/libmisc/shell/main_setenv.c

diff -u rtems/cpukit/ChangeLog:1.2616 rtems/cpukit/ChangeLog:1.2617
--- rtems/cpukit/ChangeLog:1.2616	Sat Aug 28 14:48:41 2010
+++ rtems/cpukit/ChangeLog	Sat Aug 28 15:10:00 2010
@@ -1,3 +1,9 @@
+2010-08-28	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	PR 1694/shell
+	* libmisc/shell/main_setenv.c: Address memory leak identified by
+	Coverity.
+
 2010-08-28	Joel Sherrill <joel.sherrilL at OARcorp.com>
 
 	* libfs/src/pipe/pipe.c: Remove unreachable line flagged by Coverity as

diff -u rtems/cpukit/libmisc/shell/main_setenv.c:1.2 rtems/cpukit/libmisc/shell/main_setenv.c:1.3
--- rtems/cpukit/libmisc/shell/main_setenv.c:1.2	Sun Nov 29 06:12:39 2009
+++ rtems/cpukit/libmisc/shell/main_setenv.c	Sat Aug 28 15:10:00 2010
@@ -24,44 +24,41 @@
   int   arg;
   char* p;
 
-  if (argc <= 2)
-  {
-    printf ("error: no variable or string\n");
+  if (argc <= 2) {
+    printf("error: no variable or string\n");
     return 1;
   }
 
   env = argv[1];
 
   for (arg = 2; arg < argc; arg++)
-    len += strlen (argv[arg]);
+    len += strlen(argv[arg]);
 
   len += argc - 2 - 1;
 
-  string = malloc (len + 1);
+  string = malloc(len + 1);
 
-  if (!string)
-  {
-    printf ("error: no memory\n");
+  if (!string) {
+    printf("error: no memory\n");
     return 1;
   }
 
-  for (arg = 2, p = string; arg < argc; arg++)
-  {
-    strcpy (p, argv[arg]);
-    p += strlen (argv[arg]);
-    if (arg < (argc - 1))
-    {
+  for (arg = 2, p = string; arg < argc; arg++) {
+    strcpy(p, argv[arg]);
+    p += strlen(argv[arg]);
+    if (arg < (argc - 1)) {
       *p = ' ';
       p++;
     }
   }
 
-  if (setenv (env, string, 1) < 0)
-  {
-    printf ("error: %s\n", strerror (errno));
+  if (setenv(env, string, 1) < 0) {
+    printf( "error: %s\n", strerror(errno) );
+    free( string );
     return 1;
   }
 
+  free( string );
   return 0;
 }
 



--

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/20100828/844f87e5/attachment-0001.html>


More information about the vc mailing list