From 432ec3e69fb9846dcf84f03c72f63e28ed9c34fd Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 10 Jun 2016 09:59:59 -0500 Subject: [PATCH] storage: Return const char * --- src/storage.c | 3 ++- src/storage.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/storage.c b/src/storage.c index 1c032e6c..4270d6ec 100644 --- a/src/storage.c +++ b/src/storage.c @@ -192,7 +192,8 @@ static char *get_network_file_path(const char *type, const char *ssid) return path; } -char *storage_network_ssid_from_path(const char *path, enum security *type) +const char *storage_network_ssid_from_path(const char *path, + enum security *type) { const char *filename = strrchr(path, '/'); const char *c, *end; diff --git a/src/storage.h b/src/storage.h index db61bd3a..3c93a019 100644 --- a/src/storage.h +++ b/src/storage.h @@ -31,7 +31,8 @@ ssize_t read_file(void *buffer, size_t len, const char *path_fmt, ...) ssize_t write_file(const void *buffer, size_t len, const char *path_fmt, ...) __attribute__((format(printf, 3, 4))); -char *storage_network_ssid_from_path(const char *path, enum security *type); +const char *storage_network_ssid_from_path(const char *path, + enum security *type); struct l_settings *storage_network_open(const char *type, const char *ssid); int storage_network_touch(const char *type, const char *ssid);