Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
59a431d6
Commit
59a431d6
authored
Jan 22, 2008
by
Chong Yidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(pop_stat, pop_last): Fix last fix.
parent
702123a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
lib-src/pop.c
lib-src/pop.c
+4
-11
No files found.
lib-src/pop.c
View file @
59a431d6
...
...
@@ -381,25 +381,18 @@ pop_stat (server, count, size)
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
);
...
...
@@ -933,7 +926,7 @@ pop_last (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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment