diff options
-rw-r--r-- | include/package.h | 1 | ||||
-rw-r--r-- | src/manifest.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/package.h b/include/package.h index 0db73d3..e8fbeec 100644 --- a/include/package.h +++ b/include/package.h @@ -1,6 +1,7 @@ #ifndef SPM_PACKAGE_H #define SPM_PACKAGE_H +#define SPM_PACKAGE_MIN_DELIM 2 #define SPM_PACKAGE_EXTENSION ".tar.gz" #define SPM_PACKAGE_MEMBER_SIZE 0xff #define SPM_PACKAGE_MEMBER_ORIGIN_SIZE PATH_MAX diff --git a/src/manifest.c b/src/manifest.c index cc45346..1b2b600 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -4,7 +4,6 @@ #include "spm.h" #include <fnmatch.h> #include "url.h" -#define PACKAGE_MIN_DELIM 2 /** * Compare `ManifestPackage` packages (lazily) @@ -25,7 +24,7 @@ int manifest_package_cmp(ManifestPackage *a, ManifestPackage *b) { void manifest_package_separator_swap(char **name) { // Replace unwanted separators in the package name with placeholder to prevent splitting on the wrong one - int delim_count = num_chars((*name), SPM_PACKAGE_MEMBER_SEPARATOR) - PACKAGE_MIN_DELIM; + int delim_count = num_chars((*name), SPM_PACKAGE_MEMBER_SEPARATOR) - SPM_PACKAGE_MIN_DELIM; if (delim_count < 0) { return; |