From f6d148f6e7b399221de28808d9a4167dfb77e37c Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 25 Mar 2011 00:37:52 +0000 Subject: [PATCH] volser: More renaming of putshort and putint32 Commit 2d6bc153689f14f8690878b15d9fb711a56b0546 renamed the putshort and putint32 macros in dumpstuff.c to avoid conflicts with macros that are defined in resolv.h. However, an almost identical copy of that code also exists in vol-dump.c Rename putshort and putint32 there too. Change-Id: I9b98f99fb5c2b24b57e2bc480c891aa86b6df344 Reviewed-on: http://gerrit.openafs.org/4317 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/volser/vol-dump.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/volser/vol-dump.c b/src/volser/vol-dump.c index 680e828ad..eb561f167 100644 --- a/src/volser/vol-dump.c +++ b/src/volser/vol-dump.c @@ -78,8 +78,8 @@ #include "volint.h" #include "dump.h" -#define putint32(p, v) *p++ = v>>24, *p++ = v>>16, *p++ = v>>8, *p++ = v -#define putshort(p, v) *p++ = v>>8, *p++ = v +#define afs_putint32(p, v) *p++ = v>>24, *p++ = v>>16, *p++ = v>>8, *p++ = v +#define afs_putshort(p, v) *p++ = v>>8, *p++ = v int VolumeChanged; /* needed by physio - leave alone */ int verbose = 0; @@ -322,8 +322,8 @@ DumpDouble(int dumpfd, char tag, afs_uint32 value1, char tbuffer[9]; byte *p = (unsigned char *)tbuffer; *p++ = tag; - putint32(p, value1); - putint32(p, value2); + afs_putint32(p, value1); + afs_putint32(p, value2); res = write(dumpfd, tbuffer, 9); return ((res == 9) ? 0 : VOLSERDUMPERROR); @@ -335,7 +335,7 @@ DumpInt32(int dumpfd, char tag, afs_uint32 value) char tbuffer[5]; byte *p = (unsigned char *)tbuffer; *p++ = tag; - putint32(p, value); + afs_putint32(p, value); return ((write(dumpfd, tbuffer, 5) == 5) ? 0 : VOLSERDUMPERROR); } @@ -364,7 +364,7 @@ DumpArrayInt32(int dumpfd, char tag, afs_uint32 * array, int code = 0; byte *p = (unsigned char *)tbuffer; *p++ = tag; - putshort(p, nelem); + afs_putshort(p, nelem); code = write(dumpfd, tbuffer, 3); if (code != 3) return VOLSERDUMPERROR; @@ -372,7 +372,7 @@ DumpArrayInt32(int dumpfd, char tag, afs_uint32 * array, p = (unsigned char *)tbuffer; v = *array++; /*this was register */ - putint32(p, v); + afs_putint32(p, v); code = write(dumpfd, tbuffer, 4); if (code != 4) return VOLSERDUMPERROR; -- 2.39.5