/n/sources/plan9/sys/src/cmd/usb/usbd/../lib/dev.c:482,493 - ../lib/dev.c:481,494
int
devctl(Dev *dev, char *fmt, ...)
{
- char buf[128];
+ char *s;
+ int r;
va_list arg;
- char *e;
va_start(arg, fmt);
- e = vseprint(buf, buf+sizeof(buf), fmt, arg);
+ s = vsmprint(fmt, arg);
va_end(arg);
- return write(dev->cfd, buf, e-buf);
+ r = write(dev->cfd, s, strlen(s));
+ free(s);
+ return r;
}
|