From 801b9dc12300f1860def5a9cd3c7ca987a2c8104 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Wed, 7 Oct 2009 18:54:31 +0000 Subject: fix the case where the string passed to WRITE_STRING() is an expression git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@999 ef36b2f9-881f-0410-afb5-c4e39611909c --- common/nslcd-prot.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/nslcd-prot.h') diff --git a/common/nslcd-prot.h b/common/nslcd-prot.h index bab5596..ce61106 100644 --- a/common/nslcd-prot.h +++ b/common/nslcd-prot.h @@ -95,8 +95,8 @@ static void debug_dump(const void *ptr,size_t size) WRITE_TYPE(fp,tmpint32,int32_t) #define WRITE_STRING(fp,str) \ - DEBUG_PRINT("WRITE_STRING: var="__STRING(str)" string=\"%s\"",str); \ - if (str==NULL) \ + DEBUG_PRINT("WRITE_STRING: var="__STRING(str)" string=\"%s\"",(str)); \ + if ((str)==NULL) \ { \ WRITE_INT32(fp,0); \ } \ @@ -104,7 +104,7 @@ static void debug_dump(const void *ptr,size_t size) { \ WRITE_INT32(fp,strlen(str)); \ if (tmpint32>0) \ - { WRITE(fp,str,tmpint32); } \ + { WRITE(fp,(str),tmpint32); } \ } #define WRITE_STRINGLIST(fp,arr) \ -- cgit v1.2.3