From 90f6ab2eceada8987fc6e5017ae415eade165c00 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 01:47:40 +0200 Subject: Use tabs for indentation, not spaces. Signed-off-by: Ralf Baechle --- ax25/access.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'ax25/access.c') diff --git a/ax25/access.c b/ax25/access.c index 6fac554..1363238 100644 --- a/ax25/access.c +++ b/ax25/access.c @@ -82,23 +82,23 @@ char *generate_rand_pw(int len) if (len > PASSSIZE) len = PASSSIZE; - for (i = 0; i < len; i++) { - j = conv_random(10+26*2, 0); - if (j < 10) { - pass[i] = j + '0'; - continue; - } - j -= 10; - if (j < 26) { - pass[i] = j + 'A'; + for (i = 0; i < len; i++) { + j = conv_random(10+26*2, 0); + if (j < 10) { + pass[i] = j + '0'; continue; - } - j -= 26; - pass[i] = j + 'a'; - } - pass[len] = 0; + } + j -= 10; + if (j < 26) { + pass[i] = j + 'A'; + continue; + } + j -= 26; + pass[i] = j + 'a'; + } + pass[len] = 0; - return pass; + return pass; } /*--------------------------------------------------------------------------*/ @@ -357,7 +357,7 @@ char *read_pwd (struct passwd *pw, int *pwtype) for (p = pass; *p && !isspace(*p & 0xff); p++) ; *p = 0; - if ( (*pwtype & PW_MD5) && !Strcasecmp(p_buf, "md5") ) { + if ( (*pwtype & PW_MD5) && !Strcasecmp(p_buf, "md5") ) { fclose(f); *pwtype = PW_MD5; goto found; @@ -391,6 +391,6 @@ found: end: *pwtype = (((*pwtype) & PW_CLEARTEXT) ? PW_CLEARTEXT : 0); - /* ^ may allow cleartext? - then cleartext, else deny */ + /* ^ may allow cleartext? - then cleartext, else deny */ return 0; } -- cgit v1.2.3