diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-10-18 18:25:57 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-10-18 18:25:57 -0600 |
commit | 721a587c7965e284b8a281d2286a2a436b5b8424 (patch) | |
tree | 0bf4992f0d2ea93c31abec7b2768018c28f707c7 /pico | |
parent | 3165f59b344fb4d56d161541f294754d56bcb372 (diff) | |
download | alpine-721a587c7965e284b8a281d2286a2a436b5b8424.tar.xz |
* Fixes to warnings given by gcc 10.
Diffstat (limited to 'pico')
-rw-r--r-- | pico/buffer.c | 2 | ||||
-rw-r--r-- | pico/composer.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pico/buffer.c b/pico/buffer.c index 741c969f..a38bac21 100644 --- a/pico/buffer.c +++ b/pico/buffer.c @@ -334,7 +334,7 @@ sgetline(char **ibuf, int *nchars, char *obuf, int blen) retval = FIOEOF; } else{ - len = obuf + blen; + len = obuf + blen - 1; while (*cbuf != CR && *cbuf != LF && *cbuf != '\0'){ if(bufp < len){ *bufp++ = *cbuf++; diff --git a/pico/composer.c b/pico/composer.c index a20314b5..dcce3b79 100644 --- a/pico/composer.c +++ b/pico/composer.c @@ -3665,7 +3665,7 @@ call_builder(struct headerentry *entry, int *mangled, char **err) sbuflen += (6*term.t_ncol); line = line->next; } - + sbuflen++; if((sbuf=(char *)malloc(sbuflen * sizeof(*sbuf))) == NULL){ emlwrite("Can't malloc space to expand address", NULL); return(-1); |