Use strpfx() helper where appropriate

This commit is contained in:
Tobias Brunner
2013-07-08 18:49:30 +02:00
parent f460facdca
commit d27f225d9a
11 changed files with 28 additions and 29 deletions
+2 -2
View File
@@ -182,8 +182,8 @@ METHOD(os_info_t, get_setting, chunk_t,
size_t i = 0;
chunk_t value;
if (!strneq(name, "/etc/", 5) && !strneq(name, "/proc/", 6) &&
!strneq(name, "/sys/", 5) && !strneq(name, "/var/", 5))
if (!strpfx(name, "/etc/") && !strpfx(name, "/proc/") &&
!strpfx(name, "/sys/") && !strpfx(name, "/var/"))
{
/**
* In order to guarantee privacy, only settings from the