Replaced strerror(errno) with SERRNO where possible.
diff --git a/st.c b/st.c
index 8237d78..f9ac1f7 100644
--- a/st.c
+++ b/st.c
@@ -1226,7 +1226,7 @@ ttynew(void) {
                                  open(opt_io, O_WRONLY | O_CREAT, 0666);
                        if(iofd < 0) {
                                fprintf(stderr, "Error opening %s:%s\n",
-                                       opt_io, strerror(errno));
+                                       opt_io, SERRNO);
                        }
                }
        }
@@ -2239,7 +2239,7 @@ void
 tprinter(char *s, size_t len) {
        if(iofd != -1 && xwrite(iofd, s, len) < 0) {
                fprintf(stderr, "Error writing in %s:%s\n",
-                       opt_io, strerror(errno));
+                       opt_io, SERRNO);
                close(iofd);
                iofd = -1;
        }

Reply via email to