remove sprint Reference: /n/atom/patch/applied/nixdevarchnosprint Date: Sun Aug 16 06:21:11 CES 2015 Signed-off-by: quanstro@quanstro.net --- /sys/src/nix/k10/devarch.c Sun Aug 16 06:21:02 2015 +++ /sys/src/nix/k10/devarch.c Sun Aug 16 06:21:04 2015 @@ -226,7 +226,7 @@ static long archread(Chan *c, void *a, long n, vlong offset) { - char *buf, *p; + char *buf, *p, *e; int port; u16int *sp; u32int *lp; @@ -276,6 +276,7 @@ if((buf = malloc(n)) == nil) error(Enomem); p = buf; + e = buf+n; n = n/Linelen; offset = offset/Linelen; @@ -285,8 +286,7 @@ for(map = iomap.map; n > 0 && map != nil; map = map->next){ if(offset-- > 0) continue; - sprint(p, "%#8ux %#8ux %-16.16s\n", map->start, map->end-1, map->tag); - p += Linelen; + p = seprint(p, e, "%#8ux %#8ux %-16.16s\n", map->start, map->end-1, map->tag); n--; } unlock(&iomap);