bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnumach clean part 1 redo


From: Samuel Thibault
Subject: Re: Gnumach clean part 1 redo
Date: Sun, 5 Nov 2006 19:54:56 +0100
User-agent: Mutt/1.5.12-2006-07-14

Hi,

That's commited, thanks for the tedious work!

Just a few remarks.

First, the position of #include <string.h>.  Please have it consistent
:) In CVS, in committed before other #includes, but after #include
<sys/types.h>.

Then, the ChangeLog.  You should mention each function actually, so that
people looking for "their" function breakage may easily find the guilty
commit.  When running cvs diff, use -p too, for putting function names.

--- device/cirbuf.c     25 Feb 1997 21:28:13 -0000      1.1.1.1
+++ device/cirbuf.c     5 Nov 2006 16:42:02 -0000
@@ -30,11 +30,11 @@
  *     Circular buffers for TTY
  */
 
+#include <string.h>
+
 #include <device/cirbuf.h>
 #include <kern/kalloc.h>
 
-
-
 /* read at c_cf, write at c_cl */

Beware of such useless "blank" fixup.  Always read your patch for
tracking those.

@@ -56,7 +58,7 @@
  * in the bootstrap procedure.
  */
 int    (*romgetc)() = 0;
-void   (*romputc)() = 0;
+void (*romputc)() = 0;


That one too.


@@ -149,7 +151,7 @@
        kmem_alloc_pages(object, 0,
                         *kernel_p, *kernel_p + size,
                         VM_PROT_READ | VM_PROT_WRITE);
-       bzero(*kernel_p, size);         /*Zero fill*/
+       memset(kernel_p, 0, size);         /*Zero fill*/
 

Beware of this: kernel_p and *kernel_p are not the same!

                else {
-                   bcopy(src,
-                         dst + 10 * i,
+                   memcpy(dst + 10 * i,
+                         src, 
                          10 * (8 - i));

Please try to keep indentation consistent: this should rather be

                else {
-                   bcopy(src,
-                         dst + 10 * i,
+                   memcpy(dst + 10 * i,
+                          src, 
                           10 * (8 - i));

Samuel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]