[Pkg-dspam-misc] Patch to include a directory with files with parameters.

Matthijs Mohlmann matthijs at cacholong.nl
Thu Nov 10 16:25:51 UTC 2005

José Luis Tallón wrote:
> Matthijs Mohlmann wrote:
>>I managed to fix it. Please review the attached patch. And after a few
>>hours I'll upload it to the svn repository.
> Looks allright, except that you really don't check the error to see if
> it really was a file which we tried to open as opposed to a dir.
I don't know if I fixed that fully, but there is now some more checking.

> Regarding the final '\n', i suggest this instead:
> ---
> // look for a linefeed at the end...
> char* ptr=strrchr(path,'\n');
> // ... and nuke it if found
> if( ptr )*ptr='\0';
ah, didn't know there was a function strrchr (know your string operations)

> --------
> then you can avoid unconditionally using "strlen(path)-1" everywhere.
> strncpy is good :-)
> Looks fine -- sorry, don't have the time to test it right now.

Thanks for checking the patch, I'll put it in svn later tonight.
Including postinst and postrm scripts for mysql and postgresql.


Matthijs Mohlmann

More information about the Pkg-dspam-misc mailing list