krb5 commit: Quiet kpropd.c signed/unsigned comparison warnings

Greg Hudson ghudson at MIT.EDU
Thu Jan 24 14:19:50 EST 2013


https://github.com/krb5/krb5/commit/1876508ebe5db0c529a729f12023db2a23df1dbc
commit 1876508ebe5db0c529a729f12023db2a23df1dbc
Author: Nicolas Williams <nico at cryptonector.com>
Date:   Thu Oct 25 12:36:26 2012 -0500

    Quiet kpropd.c signed/unsigned comparison warnings
    
    [ghudson at mit.edu: simplify slightly]

 src/slave/kpropd.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/slave/kpropd.c b/src/slave/kpropd.c
index e0a8031..b75be63 100644
--- a/src/slave/kpropd.c
+++ b/src/slave/kpropd.c
@@ -1441,8 +1441,8 @@ recv_database(context, fd, database_fd, confmsg)
     int database_fd;
     krb5_data *confmsg;
 {
-    krb5_ui_4       database_size; /* This must be 4 bytes */
-    int     received_size, n;
+    krb5_ui_4       database_size, received_size;
+    int             n;
     char            buf[1024];
     krb5_data       inbuf, outbuf;
     krb5_error_code retval;
@@ -1522,7 +1522,7 @@ recv_database(context, fd, database_fd, confmsg)
                      "while writing database block starting at offset %d",
                      received_size);
             send_error(context, fd, errno, buf);
-        } else if (n != outbuf.length) {
+        } else if ((unsigned int)n != outbuf.length) {
             snprintf(buf, sizeof(buf),
                      "incomplete write while writing database block starting at \noffset %d (%d written, %d expected)",
                      received_size, n, outbuf.length);


More information about the cvs-krb5 mailing list