Commit f0604b95 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

unitsIsPressure: replace memcmp by strncmp

parent f7e6c445
......@@ -942,8 +942,8 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@ENABLE_CDI_LIB_FALSE@install-exec-local:
@ENABLE_CDI_LIB_FALSE@uninstall-local:
@ENABLE_CDI_LIB_FALSE@install-exec-local:
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
......
......@@ -3090,11 +3090,11 @@ bool unitsIsPressure(const char *units)
{
bool status = false;
if ( memcmp(units, "millibar", 8) == 0 ||
memcmp(units, "mb", 2) == 0 ||
memcmp(units, "hectopas", 8) == 0 ||
memcmp(units, "hPa", 3) == 0 ||
memcmp(units, "Pa", 2) == 0 )
if ( strncmp(units, "millibar", 8) == 0 ||
strncmp(units, "mb", 2) == 0 ||
strncmp(units, "hectopas", 8) == 0 ||
strncmp(units, "hPa", 3) == 0 ||
strncmp(units, "Pa", 2) == 0 )
{
status = true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment