Patchwork [5,of,9] f: use modern octal number formatting

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Feb. 10, 2016, 1:58 p.m.
Message ID <17ae1dbb1e98f71d5e28.1455112723@feefifofum>
Download mbox | patch
Permalink /patch/13092/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Katsunori FUJIWARA - Feb. 10, 2016, 1:58 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1455111868 -32400
#      Wed Feb 10 22:44:28 2016 +0900
# Node ID 17ae1dbb1e98f71d5e286f66de7a2216b39362f3
# Parent  6e1aaaef3a730cb2cb43df55d005b833f9b7377f
f: use modern octal number formatting

This is fixing for 'legacy octal syntax; use "0o" prefix instead of
"0"' check-code rule.

check-code has overlooked this, because a file isn't recognized as one
to be checked (this problem is fixed by subsequent patch).

Patch

diff --git a/tests/f b/tests/f
--- a/tests/f
+++ b/tests/f
@@ -64,7 +64,7 @@  def visit(opts, filenames, outfile):
             if opts.size and not isdir:
                 facts.append('size=%s' % stat.st_size)
             if opts.mode and not islink:
-                facts.append('mode=%o' % (stat.st_mode & 0777))
+                facts.append('mode=%o' % (stat.st_mode & 0o777))
             if opts.links:
                 facts.append('links=%s' % stat.st_nlink)
             if opts.newer: