diff options
| author | Sadeep Madurange <smadurange@users.noreply.github.com> | 2022-01-04 18:53:23 +0800 |
|---|---|---|
| committer | Sadeep Madurange <smadurange@users.noreply.github.com> | 2022-01-04 18:53:23 +0800 |
| commit | fc1e8330d73b0c2f197a885ec736ed8f98572a7d (patch) | |
| tree | 830a142024c4a5bc76688a6cd3f97d2c1a4b05d0 /5 | |
| parent | 92508d66648bbb3602cf1cac34d0faf422f32829 (diff) | |
| download | k&r-exercises-fc1e8330d73b0c2f197a885ec736ed8f98572a7d.tar.gz | |
5.8
Diffstat (limited to '5')
| -rw-r--r-- | 5/8.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -37,13 +37,13 @@ void month_day(int year, int yearday, int *pmonth, int *pday) { int i, leap; if (year < 0) { - *pmonth = *pday = 0; + *pmonth = *pday = -1; printf("error: invalid year\n"); return; } if (yearday < 1) { - *pmonth = *pday = 0; + *pmonth = *pday = -1; printf("error: invalid yearday\n"); return; } |
