Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/mkubootimage Fix signed/unsigned comparison



details:   https://anonhg.NetBSD.org/src/rev/a5b1fa2374d6
branches:  trunk
changeset: 846931:a5b1fa2374d6
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Dec 04 14:09:47 2019 +0000

description:
Fix signed/unsigned comparison

diffstat:

 usr.bin/mkubootimage/mkubootimage.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 97b4252e3ebb -r a5b1fa2374d6 usr.bin/mkubootimage/mkubootimage.c
--- a/usr.bin/mkubootimage/mkubootimage.c       Wed Dec 04 13:52:27 2019 +0000
+++ b/usr.bin/mkubootimage/mkubootimage.c       Wed Dec 04 14:09:47 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.25 2019/12/04 11:21:34 jmcneill Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.26 2019/12/04 14:09:47 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkubootimage.c,v 1.25 2019/12/04 11:21:34 jmcneill Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.26 2019/12/04 14:09:47 jmcneill Exp $");
 
 #include <sys/mman.h>
 #include <sys/stat.h>
@@ -433,7 +433,7 @@
        }
 
        if (update_image) {
-               if (lseek(kernel_fd, hdrlen, SEEK_SET) != hdrlen) {
+               if (lseek(kernel_fd, hdrlen, SEEK_SET) != (off_t)hdrlen) {
                        perror("seek failed");
                        return errno;
                }



Home | Main Index | Thread Index | Old Index