X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_string.c;h=77cee8241c5c45e464b73b14f549bd08d0a7b7df;hb=04e582f922cfa2e9fb7304e1987a3d2298c43868;hp=71077829c4bccc893995a73d952b44c5e91ee86a;hpb=d2720fdaa2bb5588049e1fec7eb66960ca928b2d;p=palacios.git diff --git a/palacios/src/palacios/vmm_string.c b/palacios/src/palacios/vmm_string.c index 7107782..77cee82 100644 --- a/palacios/src/palacios/vmm_string.c +++ b/palacios/src/palacios/vmm_string.c @@ -64,10 +64,10 @@ static float e = 0.00000001; double v3_ceil(double x) { - if ((double)(x - (int)x) == 0) { - return (int)x; - } - return (int)(x + e) + 1; + if ((double)(x - (int)x) == 0) { + return (int)x; + } + return (int)(x + e) + 1; } @@ -206,8 +206,8 @@ char *strncat(char *s1, const char *s2, size_t limit) t1 = s1; while (*s1) s1++; while (i < limit) { - if(*s2 == '\0') break; - *s1++ = *s2++; + if(*s2 == '\0') break; + *s1++ = *s2++; } *s1 = '\0'; return t1; @@ -270,9 +270,9 @@ int atoi(const char *buf) int ret = 0; while (*buf >= '0' && *buf <= '9') { - ret *= 10; - ret += *buf - '0'; - buf++; + ret *= 10; + ret += *buf - '0'; + buf++; } return ret;