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:	Sun, 10 Feb 2008 14:19:06 +0100
From:	"Jesper Juhl" <jesper.juhl@...il.com>
To:	"Marcin Slusarz" <marcin.slusarz@...il.com>
Cc:	"Ingo Molnar" <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	"Andrew Morton" <akpm@....com.au>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Jason Wessel" <jason.wessel@...driver.com>
Subject: Re: [3/6] kgdb: core

On 10/02/2008, Marcin Slusarz <marcin.slusarz@...il.com> wrote:
> On Sun, Feb 10, 2008 at 08:13:31AM +0100, Ingo Molnar wrote:
...
> > +
> > +             if (CACHE_FLUSH_IS_SAFE) {
> > +                     if (current->mm && addr < TASK_SIZE) {
> > +                             flush_cache_range(current->mm->mmap_cache,
> > +                                             addr, addr + BREAK_INSTR_SIZE);
> > +                     } else {
> > +                             flush_icache_range(addr, addr +
> > +                                             BREAK_INSTR_SIZE);
> > +                     }
> > +             }
> unneeded braces (here and in many other places)
>

While they are not strictly needed, I for one would argue they should
probably stay.

if (foo)
  bar();

is not always safe in case bar() is a macro.

if (foo) {
  bar();
}

is always safe and is more robust when the code gets changed later
since you don't accidentally end up with someone mistakenly turning it
into

if (foo)
  bar();
  baz();


-- 
Jesper Juhl <jesper.juhl@...il.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ