From f5e2a36f2382585af829bb6da0542adbe12c6425 Mon Sep 17 00:00:00 2001 From: lyh250-666 Date: Wed, 11 Sep 2024 06:29:35 +0000 Subject: [PATCH] feat:update --- source/libs/command/src/command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 0e5f2f4cbd..70a9b39229 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -345,12 +345,12 @@ static const char* encryptAlgorithmStr(int8_t encryptAlgorithm) { } int32_t formatDurationOrKeep(char* buffer, int32_t timeInMinutes) { - int len = 0; + int32_t len = 0; if (timeInMinutes % 1440 == 0) { - int days = timeInMinutes / 1440; + int32_t days = timeInMinutes / 1440; len = sprintf(buffer, "%dd", days); } else if (timeInMinutes % 60 == 0) { - int hours = timeInMinutes / 60; + int32_t hours = timeInMinutes / 60; len = sprintf(buffer, "%dh", hours); } else { len = sprintf(buffer, "%dm", timeInMinutes);