Assorted code cleanups
- Clear up
-Wcast-function-type
warnings fromNotImplemented()
- Remove unused empty
NoopDDA()
function - Remove unused
EventSwap
functions & dispatch vector -
DetachStdio
: check thatopen
&dup2
functions succeed - Remove no-op
OsInitAllocator()
- Avoid memory leak if
-ls
specified multiple times on command line - Add
FSallocarray
for array allocation with overflow check - Make
FScalloc
take two args like standard calloc - Replace
alloc
+bzero
pairs withFScalloc
calls - Replace obsolete
bzero
call with standardmemset
call - Add
FSreallocarray
for array reallocation with overflow check - Get rid of
fsalloc
/fsrealloc
/fsfree
wrapper macros - print error messages if syslog support is built but disabled
- Mark
FatalError
as_X_NORETURN
- Add
alloc_size
&malloc
attributes to allocation functions -
QueryExtents
: Avoid memory leak in error path -
QueryBitmaps
: Avoid memory leak in error path -
SetFontCatalogue
: handle allocation failure -
WriteToClient
: handle allocation failure
Edited by Alan Coopersmith