Frédéric BERNON writes: > Hi Group, > > Isn't it necessary to add in sockets.c a line like : > > memset( sockets, 0, sizeof(sockets)); > > Because the "sockets" array doesn't seems to be initialized, > and it can cause a problem to alloc_socket(...) when we look > for an free entry in this table. The declaration is : > > static struct lwip_socket sockets[NUM_SOCKETS];
No, it's not needed. The object should already be initialized. See comp.lang.c FAQ (1.30): http://c-faq.com/decl/initval.html Don Krueger ====================================================================== This electronic message transmission and any attachments are confidential and/or proprietary and may constitute legally privileged information of Meso Scale Diagnostics, LLC. The information is intended for solely the use of Mailing list for lwIP users ([email protected]). If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance of this information is strictly prohibited. You are not authorized to retain it in any form nor to re-transmit it, and you should destroy this email immediately. If you have received this electronic transmission in error, please notify us by telephone (240-631-2522) or by electronic mail to the sender of this email, Krueger, Don ([EMAIL PROTECTED]), immediately. ===================================================================== _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
