From ad9225bdd34230e13333be5d4c29e4f96abc9b2b Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 4 Jan 2018 20:12:48 +1100 Subject: Update copyrights for 2018. --- Projects/TempDataLogger/TempDataLogger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Projects/TempDataLogger/TempDataLogger.c') diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c index 1dc267a6f..d9e429455 100644 --- a/Projects/TempDataLogger/TempDataLogger.c +++ b/Projects/TempDataLogger/TempDataLogger.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2017. + Copyright (C) Dean Camera, 2018. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted -- cgit v1.2.3 From 106f0eee17bbe837c9f94bdcf13d28e2952f1aef Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 17 Jun 2018 16:13:46 +1000 Subject: Fix warning about possible string truncation in the TempDataLogger project. --- Projects/TempDataLogger/TempDataLogger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Projects/TempDataLogger/TempDataLogger.c') diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c index d9e429455..816c32698 100644 --- a/Projects/TempDataLogger/TempDataLogger.c +++ b/Projects/TempDataLogger/TempDataLogger.c @@ -125,7 +125,7 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK) char LineBuffer[100]; uint16_t BytesWritten; - BytesWritten = sprintf(LineBuffer, "%02d/%02d/20%02d, %02d:%02d:%02d, %d Degrees\r\n", + BytesWritten = snprintf(LineBuffer, sizeof(LineBuffer), "%02d/%02d/20%02d, %02d:%02d:%02d, %d Degrees\r\n", CurrentTimeDate.Day, CurrentTimeDate.Month, CurrentTimeDate.Year, CurrentTimeDate.Hour, CurrentTimeDate.Minute, CurrentTimeDate.Second, Temperature_GetTemperature()); @@ -168,12 +168,12 @@ int main(void) /** Opens the log file on the Dataflash's FAT formatted partition according to the current date */ void OpenLogFile(void) { - char LogFileName[12]; + char LogFileName[16]; /* Get the current date for the filename as "DDMMYY.csv" */ TimeDate_t CurrentTimeDate; RTC_GetTimeDate(&CurrentTimeDate); - sprintf(LogFileName, "%02d%02d%02d.csv", CurrentTimeDate.Day, CurrentTimeDate.Month, CurrentTimeDate.Year); + snprintf(LogFileName, sizeof(LogFileName), "%02d%02d%02d.csv", CurrentTimeDate.Day, CurrentTimeDate.Month, CurrentTimeDate.Year); /* Mount the storage device, open the file */ f_mount(0, &DiskFATState); -- cgit v1.2.3 From 101ed6b74e0d6549e53a7c8216147af37ffc70df Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 8 Jan 2019 19:59:41 +1100 Subject: Documentation: Update copyrights to 2019. --- Projects/TempDataLogger/TempDataLogger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Projects/TempDataLogger/TempDataLogger.c') diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c index 816c32698..463098bd6 100644 --- a/Projects/TempDataLogger/TempDataLogger.c +++ b/Projects/TempDataLogger/TempDataLogger.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2018. + Copyright (C) Dean Camera, 2019. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2019 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted -- cgit v1.2.3