Skip to content

Commit f6d4792

Browse files
author
Gonzalo Diaz
committed
[REFACTOR] [Hacker Rank] Warmup: Time Conversion solved ✅. Triying to fix sonarlint detected issues.
1 parent 116977a commit f6d4792

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/exercises/src/hackerrank/warmup/time_conversion.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <stdlib.h>
99
#include <string.h>
1010

11+
const unsigned int TIME_SIZE = 11; // hh:mm:ssXX 10 + 1 for null terminator
12+
1113
char *HACKERRANK_WARMUP_getFirst(const char *s, unsigned long n) {
1214
return HACKERRANK_WARMUP_getStringFragment(s, strlen(s), 0, n);
1315
}
@@ -44,8 +46,6 @@ char *HACKERRANK_WARMUP_timeConversion(const char *s) {
4446
return NULL;
4547
}
4648

47-
const unsigned int TIME_SIZE = 11; // hh:mm:ssXX 10 + 1 for null terminator
48-
4949
char *meridian = HACKERRANK_WARMUP_getLast(s, 2);
5050
char *hour_str = HACKERRANK_WARMUP_getFirst(s, 2);
5151

0 commit comments

Comments
 (0)