summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-09-07 11:27:18 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-09-07 11:27:18 +0000
commit66eedd7647e72bca1a5e283aa2831b85277e789f (patch)
tree71e297dcd37af4f778f74c6cd4d60c1428c9d838
parentd21d4bc4201a0165ecfe2165c9e32ed32b92a5e2 (diff)
In copycols() remove useless code that modifies the uninitialized
sp variable. Its value is not used, it is overwritten later on. found by clang -Wuninitialized; OK deraadt@
-rw-r--r--sys/dev/rasops/rasops_bitops.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/rasops/rasops_bitops.h b/sys/dev/rasops/rasops_bitops.h
index f7ca9e39ff0..f8194b98961 100644
--- a/sys/dev/rasops/rasops_bitops.h
+++ b/sys/dev/rasops/rasops_bitops.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rasops_bitops.h,v 1.6 2010/08/28 12:48:14 miod Exp $ */
+/* $OpenBSD: rasops_bitops.h,v 1.7 2017/09/07 11:27:17 bluhm Exp $ */
/* $NetBSD: rasops_bitops.h,v 1.6 2000/04/12 14:22:30 pk Exp $ */
/*-
@@ -237,10 +237,8 @@ NAME(copycols)(void *cookie, int row, int src, int dst, int num)
rnum = 32 - lnum;
db = dst & 31;
- if ((src -= db) < 0) {
- sp--;
+ if ((src -= db) < 0)
src += 32;
- }
while (height--) {
sp = srp;