diff options
-rw-r--r-- | usr.bin/rsync/extern.h | 6 | ||||
-rw-r--r-- | usr.bin/rsync/sender.c | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/rsync/extern.h b/usr.bin/rsync/extern.h index afc6d728316..de907484505 100644 --- a/usr.bin/rsync/extern.h +++ b/usr.bin/rsync/extern.h @@ -1,4 +1,4 @@ -/* $Id: extern.h,v 1.16 2019/02/16 17:59:33 deraadt Exp $ */ +/* $Id: extern.h,v 1.17 2019/02/16 23:16:54 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -199,9 +199,7 @@ struct ident { struct download; struct upload; -#ifndef MIN -# define MIN(_x1, _x2) ((_x1) < (_x2) ? (_x1) : (_x2)) -#endif +#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) #define LOG0(_sess, _fmt, ...) \ rsync_log((_sess), __FILE__, __LINE__, -1, (_fmt), ##__VA_ARGS__) diff --git a/usr.bin/rsync/sender.c b/usr.bin/rsync/sender.c index f60dbe55371..252345fd980 100644 --- a/usr.bin/rsync/sender.c +++ b/usr.bin/rsync/sender.c @@ -1,4 +1,4 @@ -/* $Id: sender.c,v 1.11 2019/02/16 17:59:33 deraadt Exp $ */ +/* $Id: sender.c,v 1.12 2019/02/16 23:16:54 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -407,8 +407,8 @@ rsync_sender(struct sess *sess, int fdin, * put is in the token phase. */ - sz = MIN(MAX_CHUNK, - up.stat.curlen - up.stat.curpos); + sz = MINIMUM(MAX_CHUNK, + up.stat.curlen - up.stat.curpos); if (!io_lowbuffer_alloc(sess, &wbuf, &wbufsz, &wbufmax, sizeof(int32_t))) { ERRX1(sess, "io_lowbuffer_alloc"); |