Create backup file when writing new xml file?

Linus Torvalds torvalds at linux-foundation.org
Sun Feb 16 16:02:44 UTC 2014


On Sun, Feb 16, 2014 at 3:46 PM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> the patch has a small issue at windows.c,
> but it does build without the extra { at:
>
> if (wpath && wnewpath) {

Oops. I obviously never tested the Windows build, and that curly brace
is obviously extraneous.

It came from first looking at the other cases (that free the
allocation inside the normal "if (wpath) {" thing, but then deciding
that "Hey, there's nothing wrong with calling 'free()' on a NULL
pointer", simplifying the code, but leaving the (now extraneous) curly
brace.

Dirk, please just take that obvious fix. I'm sure you'll see it in
your windows cross-build..

             Linus


More information about the subsurface mailing list