diff options
author | Thomas White <taw@physics.org> | 2021-07-21 13:26:37 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-07-21 15:34:33 +0200 |
commit | 7e5536832b22036a634a74e16073b4762a416e29 (patch) | |
tree | 25799eb139d235f524a80c53fb25d0c9f64eb6f1 /src/time-accounts.c | |
parent | 760f17f56b7f79f67a9029cbe7cc55a0acccd3b9 (diff) |
Reduce variable scope where possible
Diffstat (limited to 'src/time-accounts.c')
-rw-r--r-- | src/time-accounts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time-accounts.c b/src/time-accounts.c index 679eb5f1..77ab9b5d 100644 --- a/src/time-accounts.c +++ b/src/time-accounts.c @@ -77,13 +77,13 @@ void time_accounts_free(TimeAccounts *accs) static int find_account(TimeAccounts *accs, enum timeaccount acc) { int i; - static int warned_toomany = 0; for ( i=0; i<accs->n_accs; i++ ) { if ( accs->accs[i] == acc ) return i; } if ( i == MAX_ACCOUNTS ) { + static int warned_toomany = 0; if ( !warned_toomany ) printf("Too many time accounts used!\n"); warned_toomany = 1; return MAX_ACCOUNTS; |