]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
log: fix some whitespace 7904/head
authorSage Weil <sage@redhat.com>
Thu, 3 Mar 2016 14:41:45 +0000 (09:41 -0500)
committerSage Weil <sage@redhat.com>
Thu, 3 Mar 2016 14:42:54 +0000 (09:42 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/log/Log.cc

index 982510949977a3d5d63d89ddce79f4818e862fe1..24d83b6015ca5d0ed7f1979e0e5d4e4499c6444d 100644 (file)
@@ -281,9 +281,10 @@ void Log::_flush(EntryQueue *t, EntryQueue *requeue, bool crash)
 
       char *buf;
       size_t buf_size = 80 + e->size();
-      bool need_dynamic = buf_size >= 0x10000; //avoids >64K buffers allocation at stack
+      bool need_dynamic = buf_size >= 0x10000; //avoids >64K buffers
+                                              //allocation at stack
       char buf0[need_dynamic ? 1 : buf_size];
-      if(need_dynamic) {
+      if (need_dynamic) {
         buf = new char[buf_size];
       } else {
         buf = buf0;
@@ -296,7 +297,8 @@ void Log::_flush(EntryQueue *t, EntryQueue *requeue, bool crash)
                        (unsigned long)e->m_thread, e->m_prio);
 
       buflen += e->snprintf(buf + buflen, buf_size - buflen - 1);
-      if (buflen > buf_size - 1) { //paranoid check, buf was declared to hold everything
+      if (buflen > buf_size - 1) { //paranoid check, buf was declared
+                                  //to hold everything
         buflen = buf_size - 1;
         buf[buflen] = 0;
       }
@@ -312,9 +314,10 @@ void Log::_flush(EntryQueue *t, EntryQueue *requeue, bool crash)
         buf[buflen] = '\n';
         int r = safe_write(m_fd, buf, buflen+1);
         if (r < 0)
-          cerr << "problem writing to " << m_log_file << ": " << cpp_strerror(r) << std::endl;
+          cerr << "problem writing to " << m_log_file << ": " << cpp_strerror(r)
+              << std::endl;
       }
-      if(need_dynamic)
+      if (need_dynamic)
         delete[] buf;
     }
     if (do_graylog2 && m_graylog) {