Skip to content

Commit

Permalink
fix all clock exercise MAX_STR_LEN places to use sizeof("##:##"), fol…
Browse files Browse the repository at this point in the history
…lowup of #927
  • Loading branch information
toy committed Nov 11, 2023
1 parent 9605db0 commit ffbe734
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```c
#include <stdbool.h>

#define MAX_STR_LEN 14 // "##:##\0" for int values
#define MAX_STR_LEN sizeof("##:##")

typedef struct
{
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/clock/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdbool.h>

#define MAX_STR_LEN (5 + 1) // "##:##\0"
#define MAX_STR_LEN sizeof("##:##")

typedef struct {
char text[MAX_STR_LEN];
Expand Down

0 comments on commit ffbe734

Please sign in to comment.