aboutsummaryrefslogtreecommitdiff
path: root/src/modules/sdlog2/logbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/sdlog2/logbuffer.c')
-rw-r--r--src/modules/sdlog2/logbuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/sdlog2/logbuffer.c b/src/modules/sdlog2/logbuffer.c
index b3243f7b5..2da67d8a9 100644
--- a/src/modules/sdlog2/logbuffer.c
+++ b/src/modules/sdlog2/logbuffer.c
@@ -1,7 +1,6 @@
/****************************************************************************
*
- * Copyright (c) 2013 PX4 Development Team. All rights reserved.
- * Author: Anton Babushkin <anton.babushkin@me.com>
+ * Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -75,8 +74,9 @@ bool logbuffer_write(struct logbuffer_s *lb, void *ptr, int size)
// bytes available to write
int available = lb->read_ptr - lb->write_ptr - 1;
- if (available < 0)
+ if (available < 0) {
available += lb->size;
+ }
if (size > available) {
// buffer overflow