diff --git a/sys/src/9/imx8/devrtc.c b/sys/src/9/imx8/devrtc.c index 87b4c5533..a30c6cfef 100644 --- a/sys/src/9/imx8/devrtc.c +++ b/sys/src/9/imx8/devrtc.c @@ -177,7 +177,7 @@ rtcwrite(Chan* c, void* buf, long n, vlong off) if(n >= sizeof(sbuf)) error(Ebadarg); strncpy(sbuf, buf, n); - sbuf[n] = '\0' + sbuf[n] = '\0'; for(cp = sbuf; *cp != '\0'; cp++) if(*cp >= '0' && *cp <= '9') break;