aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2013-03-11 19:58:28 +0000
committerSimon Tatham <anakin@pobox.com>2013-03-11 19:58:28 +0000
commitb5756838f326db5c579d2413599bb9a1c77e6f42 (patch)
treeb0cbcc34c700088434fbe13ccf713c7a7f04c96f
parent48f9d92f6fefe45e74ca69d4b11fdcfa27e47a4b (diff)
downloadpuzzles-b5756838f326db5c579d2413599bb9a1c77e6f42.zip
puzzles-b5756838f326db5c579d2413599bb9a1c77e6f42.tar.gz
puzzles-b5756838f326db5c579d2413599bb9a1c77e6f42.tar.bz2
puzzles-b5756838f326db5c579d2413599bb9a1c77e6f42.tar.xz
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]
-rw-r--r--lightup.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lightup.c b/lightup.c
index 5beacc7..9131428 100644
--- a/lightup.c
+++ b/lightup.c
@@ -657,7 +657,6 @@ static void list_lights(game_state *state, int ox, int oy, int origin,
{
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;