comparison scp.c @ 1277:07ee7736397e

add the idiomatic do/while(0) in the macro SCREWUP
author Francois Perrad <francois.perrad@gadz.org>
date Thu, 31 Dec 2015 17:34:17 +0100
parents bdc28287f077
children 750ec4ec4cbe
comparison
equal deleted inserted replaced
1276:9169e4e7cbee 1277:07ee7736397e
839 char ch, *cp, *np, *targ, *why, *vect[1], buf[2048]; 839 char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];
840 struct timeval tv[2]; 840 struct timeval tv[2];
841 841
842 #define atime tv[0] 842 #define atime tv[0]
843 #define mtime tv[1] 843 #define mtime tv[1]
844 #define SCREWUP(str) { why = str; goto screwup; } 844 #define SCREWUP(str) do { why = str; goto screwup; } while (0)
845 845
846 setimes = targisdir = 0; 846 setimes = targisdir = 0;
847 mask = umask(0); 847 mask = umask(0);
848 if (!pflag) 848 if (!pflag)
849 (void) umask(mask); 849 (void) umask(mask);