From b594ee2b2a1b9c0c5823a7af279488f113f91be4 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 19 Jul 2010 14:48:37 -0400 Subject: [PATCH] Removed warnings from nfssvc.c nfssvc.c:184: warning: comparison between signed and unsigned integer expressions nfssvc.c: In function 'nfssvc_setvers': nfssvc.c:254: warning: comparison between signed and unsigned integer expressions nfssvc.c: In function 'nfssvc_threads': nfssvc.c:280: warning: comparison between signed and unsigned integer expressions Signed-off-by: Steve Dickson --- utils/nfsd/nfssvc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c index 60232b8..34c67ca 100644 --- a/utils/nfsd/nfssvc.c +++ b/utils/nfsd/nfssvc.c @@ -181,7 +181,7 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port) } snprintf(buf, sizeof(buf), "%d\n", sockfd); - if (write(fd, buf, strlen(buf)) != strlen(buf)) { + if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) { /* * this error may be common on older kernels that don't * support IPv6, so turn into a debug message. @@ -251,7 +251,7 @@ nfssvc_setvers(unsigned int ctlbits, int minorvers4) } xlog(D_GENERAL, "Writing version string to kernel: %s", buf); snprintf(ptr+off, sizeof(buf) - off, "\n"); - if (write(fd, buf, strlen(buf)) != strlen(buf)) + if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) xlog(L_ERROR, "Setting version failed: errno %d (%m)", errno); close(fd); @@ -277,7 +277,7 @@ nfssvc_threads(unsigned short port, const int nrservs) snprintf(buf, sizeof(buf), "%d\n", nrservs); n = write(fd, buf, strlen(buf)); close(fd); - if (n != strlen(buf)) + if (n != (ssize_t)strlen(buf)) return -1; else return 0; -- 2.39.5