Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libsa Swap arguments to strncmp() so that the thing ...
details: https://anonhg.NetBSD.org/src/rev/3f948258345c
branches: trunk
changeset: 353035:3f948258345c
user: uwe <uwe%NetBSD.org@localhost>
date: Tue Apr 18 07:44:20 2017 +0000
description:
Swap arguments to strncmp() so that the thing we are testing, the
section name, comes first; and so that the length of the string
constant is right next to that constant.
diffstat:
sys/lib/libsa/loadfile_elf32.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 1c6a009097d2 -r 3f948258345c sys/lib/libsa/loadfile_elf32.c
--- a/sys/lib/libsa/loadfile_elf32.c Tue Apr 18 06:39:54 2017 +0000
+++ b/sys/lib/libsa/loadfile_elf32.c Tue Apr 18 07:44:20 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile_elf32.c,v 1.39 2017/04/18 06:39:54 uwe Exp $ */
+/* $NetBSD: loadfile_elf32.c,v 1.40 2017/04/18 07:44:20 uwe Exp $ */
/*
* Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -482,8 +482,8 @@
case SHT_PROGBITS:
if (boot_load_ctf && shstr) {
/* got a CTF section? */
- if (strncmp(".SUNW_ctf",
- &shstr[shp[i].sh_name], 10) == 0) {
+ if (strncmp(&shstr[shp[i].sh_name],
+ ".SUNW_ctf", 10) == 0) {
goto havesym;
}
}
Home |
Main Index |
Thread Index |
Old Index