]> git.proxmox.com Git - mirror_qemu.git/blobdiff - util/buffer.c
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160914-1' into staging
[mirror_qemu.git] / util / buffer.c
index 8b27c08aaca25c3523ca7671144ffe1d64b4d5ce..d8bb8745343dc58004dbb69549f8796bba33dbf8 100644 (file)
  *
  */
 
+#include "qemu/osdep.h"
+#include "qemu/host-utils.h"
 #include "qemu/buffer.h"
 #include "trace.h"
 
 #define BUFFER_MIN_INIT_SIZE     4096
 #define BUFFER_MIN_SHRINK_SIZE  65536
 
-/* define the factor alpha for the expentional smoothing
+/* define the factor alpha for the exponential smoothing
  * that is used in the average size calculation. a shift
  * of 7 results in an alpha of 1/2^7. */
 #define BUFFER_AVG_SIZE_SHIFT       7
@@ -44,7 +46,7 @@ static void buffer_adj_size(Buffer *buffer, size_t len)
                         old, buffer->capacity);
 
     /* make it even harder for the buffer to shrink, reset average size
-     * to currenty capacity if it is larger than the average. */
+     * to current capacity if it is larger than the average. */
     buffer->avg_size = MAX(buffer->avg_size,
                            buffer->capacity << BUFFER_AVG_SIZE_SHIFT);
 }