Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
86
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
5216852e
Commit
5216852e
authored
7 years ago
by
Sven Meier
Committed by
Adam Wujek
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
utc_leap_test: changed exit values to positive values for shell handling
parent
ed7f98c4
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
userspace/tools/utc_leap_test.c
+7
-7
7 additions, 7 deletions
userspace/tools/utc_leap_test.c
with
7 additions
and
7 deletions
userspace/tools/utc_leap_test.c
+
7
−
7
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
)
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment