]> granicus.if.org Git - neomutt/commitdiff
add comment about safety of cast
authorMichael Elkins <me@mutt.org>
Sat, 7 Aug 2010 13:42:51 +0000 (06:42 -0700)
committerMichael Elkins <me@mutt.org>
Sat, 7 Aug 2010 13:42:51 +0000 (06:42 -0700)
pop_lib.c

index 4290873218f728551715cb2de75085eeb7542014..d8cc9eaa1cc3d684590a2ae889f8cd1001c52b3f 100644 (file)
--- 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);