summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Elkins <me@sigpipe.org>2010-08-07 06:42:51 -0700
committerMichael Elkins <me@sigpipe.org>2010-08-07 06:42:51 -0700
commita54462e3d9a372f17b19c022b578c5e014a14e98 (patch)
tree1c8ac7d5b9bb7de9aacd6dbf508920b264cdb264
parentee44a49b09e74cec42beff8ef9662d6460e1b191 (diff)
add comment about safety of cast
-rw-r--r--pop_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pop_lib.c b/pop_lib.c
index 42908732..d8cc9eaa 100644
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -498,6 +498,7 @@ int pop_fetch_data (POP_DATA *pop_data, char *query, progress_t *progressbar,
strfcpy (inbuf + lenbuf, p, sizeof (buf));
pos += chunk;
+ /* cast is safe since we break out of the loop when chunk<=0 */
if ((size_t)chunk >= sizeof (buf))
{
lenbuf += strlen (p);