Skip to content

Check write return value and handle errors - #4075

Open
Umeaboy wants to merge 2 commits into
X11Libre:masterfrom
Umeaboy:patch-1
Open

Umeaboy wants to merge 2 commits into
X11Libre:masterfrom
Umeaboy:patch-1

Conversation

@Umeaboy

@Umeaboy Umeaboy commented Nov 5, 2026

Copy link
Copy Markdown

Handle write failure by checking return value and printing error.

Handle write failure by checking return value and printing error.
@Umeaboy

Umeaboy commented Nov 5, 2026

Copy link
Copy Markdown
Author

Can we push this?
It would fix a warning during compilation.

if (written != (ssize_t)sizeof(xise_req)) {
perror("write failed");
}
return 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this returns goes in if branch, otherwise test will fail unconditionally

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to adjust my code.

@Umeaboy Umeaboy left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight adjustment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants