diff options
author | pgen <p.gen.progs@gmail.com> | 2024-01-22 17:30:12 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2024-01-22 17:34:52 +0100 |
commit | 704fa191b444aecc01aac875be453e79db2cac37 (patch) | |
tree | c07168589bfa7e8be33e089a7800f1185981dd20 | |
parent | 0ed7710955e3dfe99b9447b33993488d0d90645c (diff) |
Fix a compiler warning.
-rw-r--r-- | ctxopt.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -7,6 +7,7 @@ /* ################################################################### */ #include <errno.h> +#include <stddef.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> @@ -1270,7 +1271,7 @@ get_word(char *str, char *buf, size_t len) /* Get the word. */ /*"""""""""""""" */ - while (*s && !isspace(*s) && s - str < len) + while (*s && !isspace(*s) && s - str < (ptrdiff_t)len) s++; strncpy(buf, str, s - str); |