diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-07-26 14:15:58 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-07-26 14:15:58 -0600 |
commit | 36b77661542a63c4579943951d143c8cc9c99460 (patch) | |
tree | 07858a2130d5d46ac7eef9587e09be8080e43a3d /pith/conf.c | |
parent | 7c946bfafe961c1dda51d19b5c29a5600ef1e5ec (diff) | |
download | alpine-36b77661542a63c4579943951d143c8cc9c99460.tar.xz |
* several changes to reduce warnings, including adding sys/ioctl.h
in system.h.
Diffstat (limited to 'pith/conf.c')
-rw-r--r-- | pith/conf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pith/conf.c b/pith/conf.c index 7f450be8..40fdbcdb 100644 --- a/pith/conf.c +++ b/pith/conf.c @@ -4690,8 +4690,8 @@ set_news_spec_current_val(int expand, int cmdline) char buf[MAXPATH]; newsvar->global_val.l = (char **)fs_get(2 * sizeof(char *)); - snprintf(buf, sizeof(buf), "{%.*s/nntp}#news.[]", sizeof(buf)-20, - ps_global->VAR_NNTP_SERVER[0]); + snprintf(buf, sizeof(buf), "{%.*s/nntp}#news.[]", MAXPATH-20, + ps_global->VAR_NNTP_SERVER[0]); /* MAXPATH = sizeof(buf) */ newsvar->global_val.l[0] = cpystr(buf); newsvar->global_val.l[1] = NULL; set_current_val(newsvar, expand, cmdline); @@ -7627,9 +7627,10 @@ copy_localfile_to_remotefldr(RemType remotetype, char *local, char *remote, void panic1(char *message, char *arg) { - char buf1[1001], buf2[1001]; +#define SIZEOFBUF 1001 + char buf1[SIZEOFBUF], buf2[SIZEOFBUF]; - snprintf(buf1, sizeof(buf1), "%.*s", MAX(sizeof(buf1) - 1 - strlen(message), 0), arg); + snprintf(buf1, sizeof(buf1), "%.*s", MAX(SIZEOFBUF - 1 - strlen(message), 0), arg); snprintf(buf2, sizeof(buf2), message, buf1); alpine_panic(buf2); } |