summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-07-24 14:14:17 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2018-07-24 14:14:17 -0400
commit4b17aefe753a8d62ccd491b6a39dabdc69e91445 (patch)
tree24ac6046387efe0e2bf28ecbab99373bce473db0
parent29d17e4773334ae60ffac7ea7f92d507c23b70f6 (diff)
downloadbinutils-gdb-4b17aefe753a8d62ccd491b6a39dabdc69e91445.tar.gz
Fix indentation in scoped_mmap.h
gdb/ChangeLog: * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/common/scoped_mmap.h39
2 files changed, 24 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 11f78c59c58..f26fc43d60d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
+
+ * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
+
2018-07-24 Tom Tromey <tom@tromey.com>
* utils.c (malloc, realloc, free): Don't declare.
diff --git a/gdb/common/scoped_mmap.h b/gdb/common/scoped_mmap.h
index 739cc7044af..6070c37c409 100644
--- a/gdb/common/scoped_mmap.h
+++ b/gdb/common/scoped_mmap.h
@@ -35,34 +35,35 @@ public:
scoped_mmap () noexcept : m_mem (MAP_FAILED), m_length (0) {}
scoped_mmap (void *addr, size_t length, int prot, int flags, int fd,
off_t offset) noexcept : m_length (length)
- {
- m_mem = mmap (addr, m_length, prot, flags, fd, offset);
- }
+ {
+ m_mem = mmap (addr, m_length, prot, flags, fd, offset);
+ }
+
~scoped_mmap ()
- {
- if (m_mem != MAP_FAILED)
- munmap (m_mem, m_length);
- }
+ {
+ if (m_mem != MAP_FAILED)
+ munmap (m_mem, m_length);
+ }
DISABLE_COPY_AND_ASSIGN (scoped_mmap);
void *release () noexcept
- {
- void *mem = m_mem;
- m_mem = MAP_FAILED;
- m_length = 0;
- return mem;
- }
+ {
+ void *mem = m_mem;
+ m_mem = MAP_FAILED;
+ m_length = 0;
+ return mem;
+ }
void reset (void *addr, size_t length, int prot, int flags, int fd,
off_t offset) noexcept
- {
- if (m_mem != MAP_FAILED)
- munmap (m_mem, m_length);
+ {
+ if (m_mem != MAP_FAILED)
+ munmap (m_mem, m_length);
- m_length = length;
- m_mem = mmap (addr, m_length, prot, flags, fd, offset);
- }
+ m_length = length;
+ m_mem = mmap (addr, m_length, prot, flags, fd, offset);
+ }
size_t size () const noexcept { return m_length; }
void *get () const noexcept { return m_mem; }