Browse Source

- using const for test_plausibility()

- check_datetime(), variable r should be unsigned
development
Andreas Romeyke 8 months ago
parent
commit
3d6f10fd7b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/tagrules/check_datetime.c

+ 2
- 2
src/tagrules/check_datetime.c View File

@ -20,7 +20,7 @@
* @param sec sec
* @return 0 if success, otherwise -1
*/
int test_plausibility (int * year, int * month, int * day, int * hour, int * min, int * sec) {
int test_plausibility (const int * year, const int * month, const int * day, const int * hour, const int * min, const int * sec) {
#ifdef DEBUG
printf ("found: y=%d m=%d d=%d h=%d m=%d s=%d\n", *year, *month, *day, *hour, *min, *sec);
#endif
@ -75,7 +75,7 @@ ret_t check_datetime(ctiff_t * ctif ) {
int hour=0;
int min=0;
int sec=0;
int r = 0;
unsigned int r = 0;
for (uint32 i=0; i<count; i++) {
if ((datetime[i] == '\0') && (i != 19)) { /* \0 at 20th byte allowed */
r = i+1;


Loading…
Cancel
Save