From 9b4871054d01a47b4c546952a0948553413840d6 Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 22 Jan 2007 22:56:12 +0000 Subject: Every file in this commit makes a call to a function which returns a value. Each file also didn't check the return value. This commit changes it so that every single non-checked call in these files is checked. --- (limited to 'noncore/net/ftplib/ftplib.c') diff --git a/noncore/net/ftplib/ftplib.c b/noncore/net/ftplib/ftplib.c index 421f855..efcd6f0 100644 --- a/noncore/net/ftplib/ftplib.c +++ b/noncore/net/ftplib/ftplib.c @@ -958,7 +958,8 @@ GLOBALDEF int FtpWrite(void *buf, int len, netbuf *nData) i = writeline(buf, len, nData); else { - socket_wait(nData); + if (socket_wait(nData) < 0) + fprintf(stderr, "FtpWrite: socket_wait failed with %s\n", nData->ctrl->response); i = net_write(nData->handle, buf, len); } if (i == -1) @@ -1339,7 +1340,10 @@ GLOBALDEF void FtpQuit(netbuf *nControl) { if (nControl->dir != FTPLIB_CONTROL) return; - FtpSendCmd("QUIT",'2',nControl); + if (FtpSendCmd("QUIT",'2',nControl) == 1) { + if (ftplib_debug > 2) + fprintf(stderr, "FtpQuit: FtpSendCmd(QUIT) failed\n"); + } net_close(nControl->handle); free(nControl->buf); free(nControl); -- cgit v0.9.0.2