Module Name:    src
Committed By:   kre
Date:           Sun Feb 11 01:08:57 UTC 2024

Modified Files:
        src/usr.bin/kdump: kdump.c

Log Message:
PR bin/57918

Redo the previous correctly, the test should be whether or not only the
bottom 32 bits are set, rather than whether any of bits 32..63 are set.
This makes no difference if u_long (or unsigned long long) is 64 bits,
it is the same test in that case, but if u_long were 128 bits there is
a notable difference (though for the particular issue observed in the PR,
it is likely to work either way).


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/usr.bin/kdump/kdump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/kdump/kdump.c
diff -u src/usr.bin/kdump/kdump.c:1.141 src/usr.bin/kdump/kdump.c:1.142
--- src/usr.bin/kdump/kdump.c:1.141	Sat Feb 10 12:53:36 2024
+++ src/usr.bin/kdump/kdump.c	Sun Feb 11 01:08:57 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: kdump.c,v 1.141 2024/02/10 12:53:36 christos Exp $	*/
+/*	$NetBSD: kdump.c,v 1.142 2024/02/11 01:08:57 kre Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)kdump.c	8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: kdump.c,v 1.141 2024/02/10 12:53:36 christos Exp $");
+__RCSID("$NetBSD: kdump.c,v 1.142 2024/02/11 01:08:57 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -580,7 +580,7 @@ ioctldecode(u_long cmd)
 	char dirbuf[4], *dir = dirbuf;
 	int c;
 
-	if (0xffffffff00000000ULL & cmd) {
+	if (~0xffffffffULL & cmd) {
 		output_long(cmd, 1);
 		return;
 	}

Reply via email to