From 0fb00e2586c84da109cbdd583285a23b76342180 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Mon, 28 Dec 2009 09:47:17 +0000 Subject: WRITE_STRINGLIST(): properly handle the case where the list is null (result of change in r1028) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1037 ef36b2f9-881f-0410-afb5-c4e39611909c --- common/nslcd-prot.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'common') diff --git a/common/nslcd-prot.h b/common/nslcd-prot.h index ce61106..abfb4cb 100644 --- a/common/nslcd-prot.h +++ b/common/nslcd-prot.h @@ -108,16 +108,24 @@ static void debug_dump(const void *ptr,size_t size) } #define WRITE_STRINGLIST(fp,arr) \ - /* first determin length of array */ \ - for (tmp3int32=0;(arr)[tmp3int32]!=NULL;tmp3int32++) \ - /*noting*/ ; \ - /* write number of strings */ \ - DEBUG_PRINT("WRITE_STRLST: var="__STRING(arr)" num=%d",(int)tmp3int32); \ - WRITE_TYPE(fp,tmp3int32,int32_t); \ - /* write strings */ \ - for (tmp2int32=0;tmp2int32