Skip to content

Commit

Permalink
Bug 1118245 - enable clang-format on fuzz, r=ttaubert
Browse files Browse the repository at this point in the history
--HG--
extra : amend_source : 050c509a45bc0c599d9890eda0465b90fe419be7
  • Loading branch information
franziskuskiefer committed Oct 28, 2016
1 parent 7d55a90 commit 2a57b5c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions automation/taskcluster/scripts/run_clang_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ else
top=$(dirname $0)/../../..
dirs=( \
"$top/cmd" \
"$top/fuzz" \
"$top/lib/base" \
"$top/lib/certdb" \
"$top/lib/certhigh" \
Expand Down
16 changes: 8 additions & 8 deletions fuzz/nssfuzz/registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#define registry_h__

#include <map>
#include "nss.h"
#include "FuzzerInternal.h"
#include "nss.h"

class Registry {
public:
static void Add(std::string name, fuzzer::UserCallback func,
uint16_t max_len, std::string desc) {
static void Add(std::string name, fuzzer::UserCallback func, uint16_t max_len,
std::string desc) {
assert(!Has(name));
GetInstance().targets_[name] = TargetData(func, max_len, desc);
}
Expand All @@ -40,7 +40,7 @@ class Registry {

static std::vector<std::string> Names() {
std::vector<std::string> names;
for (auto &it : GetInstance().targets_) {
for (auto& it : GetInstance().targets_) {
names.push_back(it.first);
}
return names;
Expand All @@ -63,9 +63,9 @@ class Registry {
std::map<std::string, TargetData> targets_;
};

#define REGISTER_FUZZING_TARGET(name, func, max_len, desc) \
static void __attribute__ ((constructor)) RegisterFuzzingTarget() { \
Registry::Add(name, func, max_len, desc); \
#define REGISTER_FUZZING_TARGET(name, func, max_len, desc) \
static void __attribute__((constructor)) RegisterFuzzingTarget() { \
Registry::Add(name, func, max_len, desc); \
}

#endif // registry_h__
#endif // registry_h__
2 changes: 1 addition & 1 deletion fuzz/nssfuzz/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ class NSSDatabase {
~NSSDatabase() { NSS_Shutdown(); }
};

#endif // shared_h__
#endif // shared_h__

0 comments on commit 2a57b5c

Please sign in to comment.