]> git.proxmox.com Git - pve-cluster.git/commitdiff
path_is_lockdir: optimize away a strlen call
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 3 Jun 2015 11:55:54 +0000 (13:55 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 3 Jun 2015 15:02:32 +0000 (17:02 +0200)
data/src/cfs-utils.c

index d25b85897deda225d5589171178c3c3ec7565237..2c916217797d21d15ecf464b6be553db3c9261ca 100644 (file)
@@ -332,5 +332,5 @@ path_is_lockdir(const char *path)
 {
        while (*path == '/') path++;
 
-       return (strncmp(path, "priv/lock/", 10) == 0) && (strlen(path) > 10);
+       return (strncmp(path, "priv/lock/", 10) == 0) && path[10];
 }