From 439ca67c06d1ea0ee5a4d334ff9396c9f77ff715 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 16 Jul 2019 18:32:51 +0200 Subject: [PATCH] PVS V519: setting the same variable twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3967f1c77c89d1aa9d040d8ff7a8593daca8f8b2 Reviewed-on: https://review.haiku-os.org/c/1603 Reviewed-by: Stephan Aßmus --- src/add-ons/kernel/drivers/disk/nvme/libnvme/nvme_ctrlr.c | 1 - .../kernel/file_systems/userlandfs/server/kernel_emu.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/add-ons/kernel/drivers/disk/nvme/libnvme/nvme_ctrlr.c b/src/add-ons/kernel/drivers/disk/nvme/libnvme/nvme_ctrlr.c index cdaa3b7b6c..1c0c9abd60 100644 --- a/src/add-ons/kernel/drivers/disk/nvme/libnvme/nvme_ctrlr.c +++ b/src/add-ons/kernel/drivers/disk/nvme/libnvme/nvme_ctrlr.c @@ -196,7 +196,6 @@ static void nvme_ctrlr_set_intel_supported_features(struct nvme_ctrlr *ctrlr) { bool *supported_feature = ctrlr->feature_supported; - supported_feature[NVME_INTEL_FEAT_MAX_LBA] = true; supported_feature[NVME_INTEL_FEAT_MAX_LBA] = true; supported_feature[NVME_INTEL_FEAT_NATIVE_MAX_LBA] = true; supported_feature[NVME_INTEL_FEAT_POWER_GOVERNOR_SETTING] = true; diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/kernel_emu.cpp b/src/add-ons/kernel/file_systems/userlandfs/server/kernel_emu.cpp index 4d9f2300ee..fad3657faf 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/kernel_emu.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/server/kernel_emu.cpp @@ -89,7 +89,7 @@ UserlandFS::KernelEmu::new_path(const char *path, char **copy) strcpy(copiedPath, path); // append a dot, if desired if (appendDot) { - copiedPath[len] = '.'; + copiedPath[len - 1] = '.'; copiedPath[len] = '\0'; } *copy = copiedPath;