Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
-#define NO_SHORTNAMES /* Tell config not to load remap.h */
#include <config.h>
#else
#define MAIL_USE_POP
errno = 0;
*count = strtol (&fromserver[4], &end_ptr, 10);
/* Check validity of string-to-integer conversion. */
- if (fromserver[4] == 0 || *end_ptr != 0 || errno)
+ if (fromserver + 4 == end_ptr || *end_ptr != ' ' || errno)
{
strcpy (pop_error, "Unexpected response from POP server in pop_stat");
pop_trash (server);
return (-1);
}
- fromserver = index (&fromserver[4], ' ');
- if (! fromserver)
- {
- strcpy (pop_error,
- "Badly formatted response from server in pop_stat");
- pop_trash (server);
- return (-1);
- }
+ fromserver = end_ptr;
errno = 0;
*size = strtol (fromserver + 1, &end_ptr, 10);
- if (*(fromserver + 1) == 0 || *end_ptr != 0 || errno)
+ if (fromserver + 1 == end_ptr || errno)
{
strcpy (pop_error, "Unexpected response from POP server in pop_stat");
pop_trash (server);
int count;
errno = 0;
count = strtol (&fromserver[4], &end_ptr, 10);
- if (fromserver[4] == 0 || *end_ptr != 0 || errno)
+ if (fromserver + 4 == end_ptr || errno)
{
strcpy (pop_error, "Unexpected response from server in pop_last");
pop_trash (server);
* Function: pop_trash
*
* Purpose: Like pop_close or pop_quit, but doesn't deallocate the
- * memory associated with the server. It is legal to call
+ * memory associated with the server. It is valid to call
* pop_close or pop_quit after this function has been called.
*/
static void