From: Alan Cox Date: Fri, 22 May 2015 23:11:32 +0000 (+0100) Subject: utsname: small fixes X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1f7d8750ddd0ff4646ca24edd86a70d2fb273b35;p=FUZIX.git utsname: small fixes --- diff --git a/Library/libs/utsname.c b/Library/libs/utsname.c index 201f0967..fcca92ef 100644 --- a/Library/libs/utsname.c +++ b/Library/libs/utsname.c @@ -22,15 +22,15 @@ int uname(struct utsname *utsbuf) x[0] = utsbuf->release; x[1] = utsbuf->sysname; x[2] = utsbuf->version; - x[2] = utsbuf->machine; + x[3] = utsbuf->machine; + x[4] = NULL; bytes -= sizeof(struct _uzisysinfoblk); while(xp = x[ct++]) { do { - *xp++=*p++; + *xp++=*p; bytes--; - } - while(*p && bytes); + } while(*p++ && bytes > 0); } return 0; }