diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-12-03 17:19:04 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-12-03 17:19:04 +0100 |
| commit | 0f39612c19a4865dcaf5963590b985d4f29c4bd3 (patch) | |
| tree | df8e275e97d30cfa5bc6ee947f03c98276868a63 /2/part1.c | |
| parent | 3da231113ccdd1b777028a4990dd035d07facdd5 (diff) | |
Style fixes
Diffstat (limited to '2/part1.c')
| -rw-r--r-- | 2/part1.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3,13 +3,13 @@ #include <stdlib.h> #include <string.h> -bool is_valid_password(char * pass, char * policy) +bool is_valid_password(char *pass, char *policy) { int min = atoi(policy); - char * minP = strchr(policy, '-'); + char *minP = strchr(policy, '-'); int max = atoi(++minP); char c = *(strchr(minP, ' ') + 1); - char * p = pass; + char *p = pass; int occ = 0; do { if (*p == c) { @@ -22,7 +22,7 @@ bool is_valid_password(char * pass, char * policy) int main() { - FILE * file = fopen("input", "r"); + FILE *file = fopen("input", "r"); char buffer[128] = { 0 }; int valid = 0; while (fgets(buffer, 128, file)) { |
