Fix issues 11 and 12 reported by Martin Ettl.

This commit is contained in:
David R. Hanson 2014-11-08 13:17:55 -07:00
parent 57047a2712
commit 3b3f01b410
2 changed files with 1 additions and 3 deletions

View File

@ -97,7 +97,7 @@ memmove(void *dp, const void *sp, size_t n)
{
unsigned char *cdp, *csp;
if (n<=0)
if (n==0)
return 0;
cdp = dp;
csp = (unsigned char *)sp;

View File

@ -313,8 +313,6 @@ Symbol mksymbol(int sclass, const char *name, Type ty) {
/* vtoa - return string for the constant v of type ty */
char *vtoa(Type ty, Value v) {
char buf[50];
ty = unqual(ty);
switch (ty->op) {
case INT: return stringd(v.i);