shithub: puzzles

Download patch

ref: b5756838f326db5c579d2413599bb9a1c77e6f42
parent: 48f9d92f6fefe45e74ca69d4b11fdcfa27e47a4b
author: Simon Tatham <anakin@pobox.com>
date: Mon Mar 11 15:58:28 EDT 2013

Remove a redundant and also erroneous memset.

(If you're going to memset a struct to 0 before filling in the fields
you care about, do use sizeof the struct rather than sizeof the
pointer; but also, if you're filling in _every_ field, there's no need
to bother anyway.)

[originally from svn r9773]

--- a/lightup.c
+++ b/lightup.c
@@ -657,7 +657,6 @@
 {
     int x,y;
 
-    memset(lld, 0, sizeof(lld));
     lld->ox = lld->minx = lld->maxx = ox;
     lld->oy = lld->miny = lld->maxy = oy;
     lld->include_origin = origin;