aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/csource.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-01-06 15:26:40 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-01-06 15:26:40 +0100
commit053171eaf2a06b5550d958f518178bb303d68496 (patch)
tree52150f19518ef861ab2e9e924223f71722aed42e /pkg/csource/csource.go
parent7b28cc9307f002965b2a348be4645e9a43204153 (diff)
pkg/csource: fix build of generated files
On another machine both clang and gcc produce: test.c:163:32: error: invalid suffix "+procid" on integer constant *(uint32_t*)0x20001004 = 0x25dfdbfe+procid*4; Not sure why this wasn't caught on buildbot.
Diffstat (limited to 'pkg/csource/csource.go')
-rw-r--r--pkg/csource/csource.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go
index c25f8b760..bede09122 100644
--- a/pkg/csource/csource.go
+++ b/pkg/csource/csource.go
@@ -386,7 +386,7 @@ func (ctx *context) constArgToStr(arg prog.ExecArgConst) string {
val = fmt.Sprintf("0x%x", v)
}
if ctx.opts.Procs > 1 && arg.PidStride != 0 {
- val += fmt.Sprintf("+procid*%v", arg.PidStride)
+ val += fmt.Sprintf(" + procid*%v", arg.PidStride)
}
if arg.BigEndian {
val = fmt.Sprintf("htobe%v(%v)", arg.Size*8, val)