fix inconsistent tabs and spaces
This commit is contained in:
parent
1ee0b7e2a3
commit
07c0aec7d8
1 changed files with 12 additions and 12 deletions
|
@ -55,27 +55,27 @@ static int called_passcb = 0;
|
||||||
static int pass_cb(char *buf, int size, int rwflag, void *u)
|
static int pass_cb(char *buf, int size, int rwflag, void *u)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
||||||
called_passcb++;
|
called_passcb++;
|
||||||
|
|
||||||
if(!isatty(fileno(stdin)))
|
if(!isatty(fileno(stdin)))
|
||||||
{
|
{
|
||||||
if(fgets(buf, size, stdin) == NULL)
|
if(fgets(buf, size, stdin) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
tmp = strpbrk(buf, "\r\n");
|
tmp = strpbrk(buf, "\r\n");
|
||||||
if(tmp != NULL)
|
if(tmp != NULL)
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
return strlen(buf);
|
return strlen(buf);
|
||||||
}
|
}
|
||||||
tmp = getpass("Enter passphrase for private key: ");
|
tmp = getpass("Enter passphrase for private key: ");
|
||||||
len = strlen(tmp);
|
len = strlen(tmp);
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (len > size)
|
if (len > size)
|
||||||
len = size;
|
len = size;
|
||||||
memcpy(buf, tmp, len);
|
memcpy(buf, tmp, len);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ read_challenge(FILE *f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fgets((char *)buf, sizeof(buf), stdin);
|
fgets((char *)buf, sizeof(buf), stdin);
|
||||||
|
|
||||||
tmp = strpbrk((char *)buf, "\r\n");
|
tmp = strpbrk((char *)buf, "\r\n");
|
||||||
if(tmp != NULL)
|
if(tmp != NULL)
|
||||||
|
|
Loading…
Reference in a new issue