diff options
-rw-r--r-- | libloragw/src/loragw_spi.native.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libloragw/src/loragw_spi.native.c b/libloragw/src/loragw_spi.native.c index 56c9d94..4720603 100644 --- a/libloragw/src/loragw_spi.native.c +++ b/libloragw/src/loragw_spi.native.c @@ -56,7 +56,7 @@ Maintainer: Sylvain Miermont #define SPI_SPEED 8000000 #define SPI_DEV_PATH "/dev/spidev0.0" //#define SPI_DEV_PATH "/dev/spidev32766.0" -char* spi_dev_path = SPI_DEV_PATH; +char spi_dev_path[60] = SPI_DEV_PATH; /* -------------------------------------------------------------------------- */ /* --- PUBLIC FUNCTIONS DEFINITION ------------------------------------------ */ @@ -64,7 +64,7 @@ char* spi_dev_path = SPI_DEV_PATH; /* set SPI device */ int lgw_spi_set_path(const char *path) { if (path) { - strncpy(spi_dev_path, path, sizeof(path)-1); + strncpy(spi_dev_path, path, sizeof(spi_dev_path)-1); return LGW_SPI_SUCCESS; } else { |