[PATCH] remove condition that never triggers
Marcus Meissner
marcus at jet.franken.de
Sat Jan 26 02:32:41 CST 2008
Hi,
spotted by Coverity, truncpos2 cannot be 0 in the last else
branch, so remove the code the checks for it. (CID 604)
Ciao, Marcus
---
programs/wordpad/registry.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/wordpad/registry.c b/programs/wordpad/registry.c
index 196e7d1..aef152a 100644
--- a/programs/wordpad/registry.c
+++ b/programs/wordpad/registry.c
@@ -187,7 +187,7 @@ static void format_filelist_filename(LPWSTR file, LPWSTR out)
else if(truncpos1 == truncpos2 || !truncpos2)
lstrcatW(out, file);
else
- truncate_path(file, out, truncpos1, truncpos2 ? truncpos2 : (pos_basename-1));
+ truncate_path(file, out, truncpos1, truncpos2);
}
void registry_read_filelist(HWND hMainWnd)
--
1.5.2.4
More information about the wine-patches
mailing list