summaryrefslogtreecommitdiff
path: root/banned.h
blob: 1a3e52657060a35d869244b32963e613d035374d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef BANNED_H
#define BANNED_H

/*
 * This header lists functions that have been banned from our code base,
 * because they're too easy to misuse (and even if used correctly,
 * complicate audits). Including this header turns them into compile-time
 * errors.
 */

#define BANNED(func) sorry_##func##_is_a_banned_function

#undef strcpy
#define strcpy(x,y) BANNED(strcpy)

#endif /* BANNED_H */