From e308619ea32a9fe07fbc3feee11913e903eb5001 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 25 Mar 2015 00:02:37 +0100 Subject: [PATCH] Add a few comments --- tests/pdu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/pdu.c b/tests/pdu.c index c2ac737..c6c0efa 100644 --- a/tests/pdu.c +++ b/tests/pdu.c @@ -65,11 +65,13 @@ static int _pdu_decode(char const * pdu, char const * number, fputs("pdu: Unable to decode PDU\n", stderr); return -1; } + /* check the number */ if(strcmp(buf, number) != 0) { fputs("pdu: Did not match the number\n", stderr); ret = 1; } + /* check the timestamp */ localtime_r(×tamp, &t); strftime(buf, sizeof(buf), "%d/%m/%Y %H:%M:%S", &t); if(strcmp(buf, datetime) != 0) @@ -77,11 +79,13 @@ static int _pdu_decode(char const * pdu, char const * number, fputs("pdu: Did not match the date\n", stderr); ret = 2; } + /* check the encoding */ if(e != encoding) { fputs("pdu: Did not match the encoding\n", stderr); ret = 3; } + /* check the message */ if(strcmp(p, message) != 0) { fputs("pdu: Did not match the message\n", stderr);