Message ID | 20241002150939.1425455-1-brahmajit.xyz@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/1] fs: smb: server: Fix building with GCC 15 | expand |
diff --git a/fs/smb/server/smb_common.c b/fs/smb/server/smb_common.c index 5b8d75e78ffb..2b512f65df0c 100644 --- a/fs/smb/server/smb_common.c +++ b/fs/smb/server/smb_common.c @@ -18,8 +18,9 @@ #include "mgmt/share_config.h" /*for shortname implementation */ -static const char basechars[43] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_-!@#$%"; -#define MANGLE_BASE (sizeof(basechars) / sizeof(char) - 1) +static const char *basechars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_-!@#$%"; +#define BASE_LEN (strlen(basechars)) +#define MANGLE_BASE (BASE_LEN - 1) #define MAGIC_CHAR '~' #define PERIOD '.' #define mangle(V) ((char)(basechars[(V) % MANGLE_BASE]))