fix indent

This commit is contained in:
Fumitoshi UKAI
2003-01-11 15:55:10 +00:00
parent 03fa645498
commit 567bdbc0cb

21
ftp.c
View File

@@ -1,4 +1,4 @@
/* $Id: ftp.c,v 1.21 2003/01/11 15:54:09 ukai Exp $ */
/* $Id: ftp.c,v 1.22 2003/01/11 15:55:10 ukai Exp $ */
#include <stdio.h>
#include <pwd.h>
#include <Str.h>
@@ -119,8 +119,7 @@ ftp_login(FTP ftp)
struct sockaddr_in sockname;
int socknamelen = sizeof(sockname);
if (!getsockname(sock, (struct sockaddr *)&sockname,
&socknamelen)) {
if (!getsockname(sock, (struct sockaddr *)&sockname, &socknamelen)) {
struct hostent *sockent;
tmp = Strnew_charp(ftp->pass);
@@ -265,11 +264,11 @@ static int
ftp_quit(FTP ftp)
{
/*
int status;
ftp_command(ftp, "QUIT", NULL, &status);
ftp_close(ftp);
if (status != 221)
return -1;
* int status;
* ftp_command(ftp, "QUIT", NULL, &status);
* ftp_close(ftp);
* if (status != 221)
* return -1;
*/
ftp_command(ftp, "QUIT", NULL, NULL);
ftp_close(ftp);
@@ -337,8 +336,7 @@ openFTPStream(ParsedURL *pu, URLFile *uf)
if (current_ftp.host) {
if (!strcmp(current_ftp.host, pu->host) &&
current_ftp.port == pu->port &&
!strcmp(current_ftp.user, user)) {
current_ftp.port == pu->port && !strcmp(current_ftp.user, user)) {
ftp_command(&current_ftp, "NOOP", NULL, &status);
if (status != 200)
ftp_close(&current_ftp);
@@ -425,8 +423,7 @@ readFTPDir(ParsedURL *pu)
if (current_ftp.data == NULL)
return NULL;
tmp = ftp_command(&current_ftp, "SYST", NULL, &status);
if (strstr(tmp->ptr, "UNIX") != NULL ||
!strncmp(tmp->ptr + 4, "Windows_NT", 10)) /* :-) */
if (strstr(tmp->ptr, "UNIX") != NULL || !strncmp(tmp->ptr + 4, "Windows_NT", 10)) /* :-) */
sv_type = UNIXLIKE_SERVER;
else
sv_type = SERVER_NONE;