Merge "Modernise code to use override specifier"
diff --git a/libc/kernel/tools/clean_header.py b/libc/kernel/tools/clean_header.py
index 7c802c2..b79c9b6 100755
--- a/libc/kernel/tools/clean_header.py
+++ b/libc/kernel/tools/clean_header.py
@@ -172,7 +172,12 @@
             dst_file = os.path.join(dst_dir, path)
             src_file = os.path.join(src_dir, path)
             new_data = cleanupFile(dst_file, src_file, path)
-            print new_data
+            # Use sys.stdout.write instead of a simple print statement to avoid
+            # sending an extra new line character to stdout.  Running this
+            # program in non-update mode and redirecting stdout to a file should
+            # yield the same result as using update mode, where new_data is
+            # written directly to a file.
+            sys.stdout.write(new_data)
 
         sys.exit(0)
 
@@ -187,8 +192,8 @@
         if not new_data:
             continue
 
-        b.readFile(path)
-        r = b.editFile(path, new_data)
+        b.readFile(dst_file)
+        r = b.editFile(dst_file, new_data)
         if r == 0:
             r = "unchanged"
         elif r == 1: