static const struct pakfire_arch* pakfire_arch_find(const char* name) {
for (const struct pakfire_arch* arch = PAKFIRE_ARCHES; arch->name; arch++) {
- if (strcmp(arch->name, name) == 0)
+ if (pakfire_string_equals(arch->name, name))
return arch;
}
return -EINVAL;
// Every architecture is compatible with itself
- if (strcmp(name, compatible_arch) == 0)
+ if (pakfire_string_equals(name, compatible_arch))
return 1;
const struct pakfire_arch* arch = pakfire_arch_find(name);
return 0;
for (unsigned int i = 0; arch->compatible[i]; i++) {
- if (strcmp(arch->compatible[i], compatible_arch) == 0)
+ if (pakfire_string_equals(arch->compatible[i], compatible_arch))
return 1;
}
const char* native_arch = pakfire_arch_native();
// All hosts support noarch natively
- if (strcmp(name, "noarch") == 0)
+ if (pakfire_string_equals(name, "noarch"))
return native_arch;
// Check if those two architectures are compatible
pakfire_string_rstrip(line);
// Look for the "enabled" line
- if (strcmp("enabled", line) == 0) {
+ if (pakfire_string_equals("enabled", line)) {
enabled = 1;
// Store the interpreter for later
} else if (pakfire_string_startswith(line, "magic ")) {
const char* m = line + strlen("magic ");
- if (strcmp(magic, m) == 0)
+ if (pakfire_string_equals(magic, m))
match = 1;
}
}