Fix lp[] initialization
authorWouter Verhelst <w@uter.be>
Mon, 16 May 2011 19:06:46 +0000 (21:06 +0200)
committerWouter Verhelst <w@uter.be>
Mon, 16 May 2011 19:06:46 +0000 (21:06 +0200)
commitc7b48ee522e483fe7316015342797e4cad162dbf
treeb9c16719b4ec43c61b6e5fd4cf88a0278639ebe4
parentc07eb13471ed5627521fb5194842cc0a2fbd651d
Fix lp[] initialization

Originally, the s variable was a pointer which was allocated with
calloc() every time we went through the loop. Now, it's a stack variable
which gets memset() back to zero instead, and is copied to the array.

This change was done for an unrelated reason (which is why we didn't
change this assignment back then), but with the current code it's more
efficient and less error-prone if we assign values to the pointers when
we declare the lp[] array, rather than when we go through the loop. So
do that, then.
nbd-server.c