Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham f40d49b704 Rework the new type-check in sresize so that it doesn't cause a
compile warning ('left-hand operand of comma expression has no
effect'), which of course becomes fatal under -Werror.

(This would have been instantly noticeable to people compiling with
the old-fashioned Makefile.gtk, which does include -Wall -Werror, but
those of us using the new autoconf makefile hadn't noticed.)

[originally from svn r9582]
2012-07-19 04:29:50 +00:00
Simon Tatham c10a8dee07 Enhance my 'sresize' macro so that it type-checks the pointer you pass
_in_ to it, as well as the one it returns. Why have I never thought of
doing that before?!

[originally from svn r9539]
2012-05-18 19:51:11 +00:00
Jacob Nevins eec73ea3b6 Missing argument in MALLOC_LOG version of snrealloc() macro.
[originally from svn r6075]
2005-07-06 18:26:41 +00:00
Simon Tatham 893d187b81 Additional robustness to SFTP packet parsing and memory allocation.
[originally from svn r5358]
2005-02-20 10:30:05 +00:00
Simon Tatham d36a4c3685 Introduced wrapper macros snew(), snewn() and sresize() for the
malloc functions, which automatically cast to the same type they're
allocating the size of. Should prevent any future errors involving
mallocing the size of the wrong structure type, and will also make
life easier if we ever need to turn the PuTTY core code from real C
into C++-friendly C. I haven't touched the Mac frontend in this
checkin because I couldn't compile or test it.

[originally from svn r3014]
2003-03-29 16:14:26 +00:00
Simon Tatham 3730ada5ce Run entire source base through GNU indent to tidy up the varying
coding styles of the various contributors! Woohoo!

[originally from svn r1098]
2001-05-06 14:35:20 +00:00
Simon Tatham ea2e1dd9ae Dave Hinton's debugging patch.
[originally from svn r1079]
2001-04-28 09:24:19 +00:00
Simon Tatham d5240d4157 Make memory management uniform: _everything_ now goes through the
smalloc() macros and thence to the safemalloc() functions in misc.c.
This should allow me to plug in a debugging allocator and track
memory leaks and segfaults and things.

[originally from svn r818]
2000-12-12 10:33:13 +00:00