Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
5216852e
Commit
5216852e
authored
Sep 12, 2017
by
Sven Meier
Committed by
Adam Wujek
Aug 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utc_leap_test: changed exit values to positive values for shell handling
parent
ed7f98c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
utc_leap_test.c
userspace/tools/utc_leap_test.c
+7
-7
No files found.
userspace/tools/utc_leap_test.c
View file @
5216852e
...
...
@@ -221,21 +221,21 @@ int main(int argc, char **argv)
printf
(
"pre leap61 handling correct
\n
"
);
}
else
{
printf
(
"pre leap61 handling failed
\n
"
);
return
-
1
;
exit
(
1
)
;
}
}
else
if
(
j
==
1
)
{
if
((
hours
==
23
)
&&
(
minutes
==
59
)
&&
(
seconds
==
50
)
&&
(
offset
==
37
)
&&
(
leap59
==
1
)
&&
(
leap61
==
0
))
{
printf
(
"pre leap59 handling correct
\n
"
);
}
else
{
printf
(
"pre leap59 handling failed
\n
"
);
return
-
2
;
exit
(
2
)
;
}
}
else
{
if
((
hours
==
23
)
&&
(
minutes
==
59
)
&&
(
seconds
==
50
)
&&
(
offset
==
37
)
&&
(
leap59
==
0
)
&&
(
leap61
==
0
))
{
printf
(
"pre no-leap handling correct
\n
"
);
}
else
{
printf
(
"pre no-leap handling failed
\n
"
);
return
-
3
;
exit
(
3
)
;
}
}
...
...
@@ -255,25 +255,25 @@ int main(int argc, char **argv)
printf
(
"post leap61 handling correct
\n\n
"
);
}
else
{
printf
(
"post leap61 handling failed
\n\n
"
);
return
-
1
;
exit
(
1
)
;
}
}
else
if
(
j
==
1
)
{
if
((
hours
==
0
)
&&
(
minutes
==
0
)
&&
(
seconds
==
11
)
&&
(
offset
==
36
)
&&
(
leap59
==
0
)
&&
(
leap61
==
0
))
{
printf
(
"post leap59 handling correct
\n\n
"
);
}
else
{
printf
(
"post leap59 handling failed
\n\n
"
);
return
-
2
;
exit
(
2
)
;
}
}
else
{
if
((
hours
==
0
)
&&
(
minutes
==
0
)
&&
(
seconds
==
10
)
&&
(
offset
==
37
)
&&
(
leap59
==
0
)
&&
(
leap61
==
0
))
{
printf
(
"post no-leap handling correct
\n\n
"
);
}
else
{
printf
(
"post no-leap handling failed
\n\n
"
);
return
-
3
;
exit
(
3
)
;
}
}
}
printf
(
"all leap handling tests passed
\n\n
"
);
return
0
;
exit
(
0
)
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment