lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 13 Aug 2019 16:07:26 -0600
From:   Jonathan Corbet <corbet@....net>
To:     Sam Ravnborg <sam@...nborg.org>
Cc:     Jonathan Neuschäfer <j.neuschaefer@....net>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        dri-devel@...ts.freedesktop.org,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        linux-kernel@...r.kernel.org, David Airlie <airlied@...ux.ie>,
        Sean Paul <sean@...rly.run>
Subject: Re: Best practice for embedded code samles? [Was: drm/drv: Use //
 for comments in example code]

On Sun, 11 Aug 2019 23:32:15 +0200
Sam Ravnborg <sam@...nborg.org> wrote:

> I wonder if there is a better way to embed a code sample
> than reverting to // style comments.
> 
> As the kernel do not like // comments we should try to avoid them in
> examples.

If you're embedding a code sample *into a code comment* then I suspect
this is about as good as it gets.  The alternative is to put it in as a
plain literal text block.  That would lose the syntax highlighting; I
think that's an entirely bearable cost, but others seem to feel
differently about it.

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ