diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2009-10-07 20:54:31 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2009-10-07 20:54:31 +0200 |
commit | 801b9dc12300f1860def5a9cd3c7ca987a2c8104 (patch) | |
tree | 934f83eae72de9367ba3dd2859ba296d44355d46 /common/nslcd-prot.h | |
parent | f974e2337977119ad9d5781a0fe88579f73215b0 (diff) |
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
Diffstat (limited to 'common/nslcd-prot.h')
-rw-r--r-- | common/nslcd-prot.h | 6 |
1 files changed, 3 insertions, 3 deletions
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) \ |