X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_string.c;h=efe5a7df29394f4f81109b00e4dc446ce242a75b;hb=b20b234c37cae136df988f94a5461cf7a073cc9e;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..efe5a7d 100644 --- a/palacios/src/palacios/vmm_string.c +++ b/palacios/src/palacios/vmm_string.c @@ -60,17 +60,6 @@ #include - -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 NEED_MEMSET void* memset(void* s, int c, size_t n) { @@ -206,8 +195,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 +259,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;