diff options
| author | Bruce Momjian | 2005-05-25 21:40:43 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2005-05-25 21:40:43 +0000 |
| commit | b492c3acccb3f8c97559ddfc2a25f25953a026d2 (patch) | |
| tree | a9c42aa2bd86a88a849ffaa005766ffe3dee762a /src/bin | |
| parent | 13b729ca5267b58005f1ca9c873a86c2b0db3591 (diff) | |
Add parentheses to macros when args are used in computations. Without
them, the executation behavior could be unexpected.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index c08665c2e5d..8e84503b36d 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -17,7 +17,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.63 2005/01/25 22:44:31 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.64 2005/05/25 21:40:41 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -43,11 +43,11 @@ #ifdef HAVE_LIBZ #include <zlib.h> #define GZCLOSE(fh) gzclose(fh) -#define GZWRITE(p, s, n, fh) gzwrite(fh, p, n * s) -#define GZREAD(p, s, n, fh) gzread(fh, p, n * s) +#define GZWRITE(p, s, n, fh) gzwrite(fh, p, (n) * (s)) +#define GZREAD(p, s, n, fh) gzread(fh, p, (n) * (s)) #else #define GZCLOSE(fh) fclose(fh) -#define GZWRITE(p, s, n, fh) (fwrite(p, s, n, fh) * s) +#define GZWRITE(p, s, n, fh) (fwrite(p, s, n, fh) * (s)) #define GZREAD(p, s, n, fh) fread(p, s, n, fh) #define Z_DEFAULT_COMPRESSION -1 |
