projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various tweaks to header comments to remind me which bits are meant to be
[u/mdw/putty]
/
misc.c
diff --git
a/misc.c
b/misc.c
index
78d829a
..
1bd556e
100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-1,3
+1,7
@@
+/*
+ * Platform-independent routines shared between all PuTTY programs.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@@
-181,6
+185,8
@@
void bufchain_add(bufchain *ch, const void *data, int len)
{
const char *buf = (const char *)data;
{
const char *buf = (const char *)data;
+ if (len == 0) return;
+
ch->buffersize += len;
if (ch->tail && ch->tail->buflen < BUFFER_GRANULE) {
ch->buffersize += len;
if (ch->tail && ch->tail->buflen < BUFFER_GRANULE) {