check all bytes for equality
| 1054 | |
| 1055 | // check all bytes for equality |
| 1056 | static int constant_compare(const byte* a, const byte* b, int len) |
| 1057 | { |
| 1058 | int good = 0; |
| 1059 | int bad = 0; |
| 1060 | |
| 1061 | for (int i = 0; i < len; i++) { |
| 1062 | if (a[i] == b[i]) |
| 1063 | good++; |
| 1064 | else |
| 1065 | bad++; |
| 1066 | } |
| 1067 | |
| 1068 | if (good == len) |
| 1069 | return 0; |
| 1070 | else |
| 1071 | return 0 - bad; // failure |
| 1072 | } |
| 1073 | |
| 1074 | |
| 1075 | // check bytes for pad value |
no outgoing calls
no test coverage detected