CSIEscape, STREscape: use size_t for buffer length
authorHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 16 Oct 2019 09:38:43 +0000 (12:38 +0300)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sun, 10 Nov 2019 21:45:54 +0000 (22:45 +0100)
st.c

diff --git a/st.c b/st.c
index 50226d1..0c1acd4 100644 (file)
--- a/st.c
+++ b/st.c
@@ -135,7 +135,7 @@ typedef struct {
 /* ESC '[' [[ [<priv>] <arg> [;]] <mode> [<mode>]] */
 typedef struct {
        char buf[ESC_BUF_SIZ]; /* raw string */
-       int len;               /* raw string length */
+       size_t len;            /* raw string length */
        char priv;
        int arg[ESC_ARG_SIZ];
        int narg;              /* nb of args */
@@ -147,7 +147,7 @@ typedef struct {
 typedef struct {
        char type;             /* ESC type ... */
        char buf[STR_BUF_SIZ]; /* raw string */
-       int len;               /* raw string length */
+       size_t len;            /* raw string length */
        char *args[STR_ARG_SIZ];
        int narg;              /* nb of args */
 } STREscape;
@@ -1803,7 +1803,7 @@ csihandle(void)
 void
 csidump(void)
 {
-       int i;
+       size_t i;
        uint c;
 
        fprintf(stderr, "ESC[");
@@ -1921,7 +1921,7 @@ strparse(void)
 void
 strdump(void)
 {
-       int i;
+       size_t i;
        uint c;
 
        fprintf(stderr, "ESC%c", strescseq.type);