projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a0bb48
)
sim: sh: clean up time(NULL) call
author
Mike Frysinger
<vapier@gentoo.org>
Sun, 7 Nov 2021 01:06:47 +0000
(21:06 -0400)
committer
Mike Frysinger
<vapier@gentoo.org>
Sun, 7 Nov 2021 01:06:47 +0000
(21:06 -0400)
Casting 0 to a pointer via (long *) doesn't work on LLP64 targets:
error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
It's also unnecessary here. We can simply pass NULL like every other
bit of code does.
sim/sh/interp.c
patch
|
blob
|
history
diff --git
a/sim/sh/interp.c
b/sim/sh/interp.c
index c1b05ddf620cc3e720caa04b113b449f9087bee2..c502b21b49f2a9f5d93a294d72b8b720cbdfa438 100644
(file)
--- a/
sim/sh/interp.c
+++ b/
sim/sh/interp.c
@@
-761,7
+761,7
@@
IOMEM (int addr, int write, int value)
static int
get_now (void)
{
- return time (
(long *) 0
);
+ return time (
NULL
);
}
static int