devrtc: fix mistake.

This commit is contained in:
cinap_lenrek 2022-07-21 00:44:34 +00:00
parent 4063334e6f
commit 3cc07dddfb

View file

@ -177,7 +177,7 @@ rtcwrite(Chan* c, void* buf, long n, vlong off)
if(n >= sizeof(sbuf)) if(n >= sizeof(sbuf))
error(Ebadarg); error(Ebadarg);
strncpy(sbuf, buf, n); strncpy(sbuf, buf, n);
sbuf[n] = '\0' sbuf[n] = '\0';
for(cp = sbuf; *cp != '\0'; cp++) for(cp = sbuf; *cp != '\0'; cp++)
if(*cp >= '0' && *cp <= '9') if(*cp >= '0' && *cp <= '9')
break; break;