Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: third_party/leveldatabase/chromium_logger.h

Issue 802533002: Remove GG_VA_COPY in favor of va_copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« base/port.h ('K') | « third_party/cld/base/port.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 5 #ifndef THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
6 #define THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 6 #define THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 t.day_of_month, 47 t.day_of_month,
48 t.hour, 48 t.hour,
49 t.minute, 49 t.minute,
50 t.second, 50 t.second,
51 t.millisecond, 51 t.millisecond,
52 static_cast<uint64>(thread_id)); 52 static_cast<uint64>(thread_id));
53 53
54 // Print the message 54 // Print the message
55 if (p < limit) { 55 if (p < limit) {
56 va_list backup_ap; 56 va_list backup_ap;
57 GG_VA_COPY(backup_ap, ap); 57 va_copy(backup_ap, ap);
58 p += vsnprintf(p, limit - p, format, backup_ap); 58 p += vsnprintf(p, limit - p, format, backup_ap);
59 va_end(backup_ap); 59 va_end(backup_ap);
60 } 60 }
61 61
62 // Truncate to available space if necessary 62 // Truncate to available space if necessary
63 if (p >= limit) { 63 if (p >= limit) {
64 if (iter == 0) { 64 if (iter == 0) {
65 continue; // Try again with larger buffer 65 continue; // Try again with larger buffer
66 } else { 66 } else {
67 p = limit - 1; 67 p = limit - 1;
(...skipping 14 matching lines...) Expand all
82 } 82 }
83 } 83 }
84 84
85 private: 85 private:
86 scoped_ptr<base::File> file_; 86 scoped_ptr<base::File> file_;
87 }; 87 };
88 88
89 } // namespace leveldb 89 } // namespace leveldb
90 90
91 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 91 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
OLDNEW
« base/port.h ('K') | « third_party/cld/base/port.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698