mirror of
https://github.com/clearlinux/swupd-server.git
synced 2026-10-04 07:58:32 +00:00
Change strcmp to strncmp for consistency
Signed-off-by: John Andersen <john.s.andersen@intel.com> Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
This commit is contained in:
+9
-9
@@ -44,15 +44,15 @@ static void runtime_state_heuristics(struct file *file)
|
||||
{
|
||||
/* these are shipped directories that are not themselves state,
|
||||
* rather only their contents are state */
|
||||
if ((strcmp(file->filename, "/usr/src/debug") == 0) ||
|
||||
(strcmp(file->filename, "/dev") == 0) ||
|
||||
(strcmp(file->filename, "/home") == 0) ||
|
||||
(strcmp(file->filename, "/proc") == 0) ||
|
||||
(strcmp(file->filename, "/root") == 0) ||
|
||||
(strcmp(file->filename, "/run") == 0) ||
|
||||
(strcmp(file->filename, "/sys") == 0) ||
|
||||
(strcmp(file->filename, "/tmp") == 0) ||
|
||||
(strcmp(file->filename, "/var") == 0)) {
|
||||
if ((strncmp(file->filename, "/usr/src/debug", 14) == 0) ||
|
||||
(strncmp(file->filename, "/dev", 4) == 0) ||
|
||||
(strncmp(file->filename, "/home", 5) == 0) ||
|
||||
(strncmp(file->filename, "/proc", 5) == 0) ||
|
||||
(strncmp(file->filename, "/root", 5) == 0) ||
|
||||
(strncmp(file->filename, "/run", 4) == 0) ||
|
||||
(strncmp(file->filename, "/sys", 4) == 0) ||
|
||||
(strncmp(file->filename, "/tmp", 4) == 0) ||
|
||||
(strncmp(file->filename, "/var", 4) == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user