Commit bd20b0f5 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix wasteful comparison of 1 byte with strcmp.

parent 7f82d9dc
...@@ -4792,7 +4792,7 @@ int isDBLAxis(/*const char *units,*/ const char *longname) ...@@ -4792,7 +4792,7 @@ int isDBLAxis(/*const char *units,*/ const char *longname)
static static
int unitsIsMeter(const char *units) int unitsIsMeter(const char *units)
{ {
return (*units == 'm' && (strcmp(units, "m") == 0 || strncmp(units, "meter", 5) == 0)); return (units[0] == 'm' && (!units[1] || strncmp(units, "meter", 5) == 0));
} }
static static
......
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