]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/port/rebootcmd.c
kernel: fix more malloc/smalloc errors
[plan9front.git] / sys / src / 9 / port / rebootcmd.c
index 5918649039f7e6f24cd790aea884b8d16e9062b7..6c6adf95b218b5e134415372f55e3b99e939c24c 100644 (file)
@@ -38,10 +38,7 @@ setbootcmd(int argc, char *argv[])
        char *buf, *p, *ep;
        int i;
 
-       buf = malloc(1024);
-       if(buf == nil)
-               error(Enomem);
-       p = buf;
+       p = buf = smalloc(1024);
        ep = buf + 1024;
        for(i=0; i<argc; i++)
                p = seprint(p, ep, "%q ", argv[i]);