Author: mav
Date: Thu Feb  1 21:04:10 2018
New Revision: 328732
URL: https://svnweb.freebsd.org/changeset/base/328732

Log:
  MFC r320522 (by imp):
  Fix sign of resid and add a mostly useless cast to cope with signed vs
  unsigned check warnings from traditional unix code construsts bogusly
  flagged as potentially unsafe.

Modified:
  stable/11/sbin/nvmecontrol/wdc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/nvmecontrol/wdc.c
==============================================================================
--- stable/11/sbin/nvmecontrol/wdc.c    Thu Feb  1 19:57:21 2018        
(r328731)
+++ stable/11/sbin/nvmecontrol/wdc.c    Thu Feb  1 21:04:10 2018        
(r328732)
@@ -105,7 +105,7 @@ wdc_do_dump(int fd, char *tmpl, const char *suffix, ui
        int fd2;
        uint8_t *buf;
        uint32_t len, offset;
-       ssize_t resid;
+       size_t resid;
 
        wdc_append_serial_name(fd, tmpl, MAXPATHLEN, suffix);
 
@@ -142,7 +142,7 @@ wdc_do_dump(int fd, char *tmpl, const char *suffix, ui
                                resid = len;
                        first = 0;
                }
-               if (write(fd2, buf, resid) != resid)
+               if (write(fd2, buf, resid) != (ssize_t)resid)
                        err(1, "write");
                offset += resid;
                len -= resid;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to