manual: check the correct variable in SIOCATMARK example [BZ #33093]

* manual/socket.texi (Out-of-Band Data): Check the atmark variable which
is set by the ioctl instead of the undefined result variable.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
Collin Funk 2025-10-04 00:52:57 -07:00
parent b96031cb56
commit fcfbc3ee31
1 changed files with 1 additions and 1 deletions

View File

@ -2999,7 +2999,7 @@ discard_until_mark (int socket)
success = ioctl (socket, SIOCATMARK, &atmark);
if (success < 0)
perror ("ioctl");
if (result)
if (atmark)
return;
/* @r{Otherwise, read a bunch of ordinary data and discard it.}