hi przemek,
netiosrv.c reads:
440 if( connsd != HB_NO_SOCKET )
441 {
442 BOOL fOK = FALSE;
443 BYTE msgbuf[ 64 ];
444
445 conn = s_consrvNew( connsd, lsd->rootPath );
446
447 if( s_srvRecvAll( conn, msgbuf, NETIO_MSGLEN ) == NETIO_MSGLEN &&
it feels better to, instead of the magic 64, to either use some
formula that includes NETIO_MSGLEN (say 2 * NETIO_MSGLEN + 16, if
there is such a formula, or just <some> * NETIO_MSGLEN), or after the
declaration, assert() that msgbuf needs to be this-and-this in size in
relation to NETIO_MSGLEN.
my reason for that is that 64 is a "magic constant", "far" in context
from where and how it's being used, and using netio_msglen in there
gives it some context, and is easier to figure out what it is for, and
what the constraints for it's size are.
--
[-]
mkdir /nonexistent
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour