Skip to content

Commit

Permalink
Merge pull request #490 from davidvossel/master
Browse files Browse the repository at this point in the history
xml schema change cleanup
  • Loading branch information
davidvossel committed Apr 7, 2014
2 parents 98e60d8 + 9d630dd commit a951f4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/common/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static void __xml_schema_add(
char dummy[1024];
CRM_ASSERT(name);
CRM_ASSERT(location);
sscanf(name, "%[^-]-%f", &dummy, &version);
sscanf(name, "%[^-]-%f", dummy, &version);
known_schemas[last].version = version;
known_schemas[last].name = strdup(name);
known_schemas[last].location = strdup(location);
Expand Down
8 changes: 4 additions & 4 deletions xml/best-match.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ for rng in $candidates; do
v=$(echo $rng | sed -e "s/${base}-//" -e 's/.rng//')
: comparing $v with $target

rc=$(echo "$v > ${best}" | bc)
if [ $rc = 1 ]; then
echo | awk -v n1="$v" -v n2="${best}" '{if (n1>n2) printf ("true"); else printf ("false");}' | grep -q "true"
if [ $? -eq 0 ]; then
: $v beats the previous ${best} for $target
if [ ${target} = next ]; then
best=$v
else
rc=$(echo "$v < ${target}" | bc)
if [ $rc = 1 ]; then
echo | awk -v n1="$v" -v n2="${target}" '{if (n1<n2) printf ("true"); else printf ("false");}' | grep -q "true"
if [ $? -eq 0 ]; then
: $v is still less than $target, using
best=$v
fi
Expand Down

0 comments on commit a951f4b

Please sign in to comment.