[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] svn_client_list4: accept `NULL` patterns

From: Patrick Steinhardt <patrick.steinhardt_at_elegosoft.com>
Date: Wed, 9 Nov 2016 11:27:47 +0100

Hi,

while continuing my work on the obstructed checkout patch I just
updated to the new `svn_client_list4` call, which introduced a
new `patterns` parameter. I initially run into a `NULL` pointer
derefeernce, as I expected that the patterns parameter may also
be `NULL`, as it is often the case for parameters which are not
in use.

The attached patch changes the function to accept a `NULL`
argument for `parameters` in addition to an empty array, which is
mostly a convenience/consistency thing for callers of the new
function.

Regards
Patrick

[[[
svn_client_list4: accept `NULL` patterns

The recently introduced `svn_client_list4` introduced a new
parameter `patterns`, which can be used to filter listed paths.
When an empty pattern array is passed to the function, all paths
are being reported.

In the case where a caller does not want to filter the list,
he first has to create an empty array. Improve usability by also
allowing a caller to pass in a `NULL` pointer instead of an empty
array.

* subversion/libsvn_repos/list.c:
  (matches_any): Return `TRUE` if `patterns` is `NULL`
]]]

-- 
Patrick Steinhardt, Entwickler
elego Software Solutions GmbH, http://www.elego.de
Gebäude 12 (BIG), Gustav-Meyer-Allee 25, 13355 Berlin, Germany
Sitz der Gesellschaft: Berlin, USt-IdNr.: DE 163214194
Handelsregister: Amtsgericht Charlottenburg HRB 77719
Geschäftsführer: Olaf Wagner

Received on 2016-11-09 11:28:00 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.