From ab003f7d4aff847bdf3f836331c58ecb663a859f Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 14 Jul 2024 03:25:52 -0600 Subject: [PATCH] strcmp(1): commenting --- src/strcmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/strcmp.c b/src/strcmp.c index 4b6bf3c..c9d56b0 100644 --- a/src/strcmp.c +++ b/src/strcmp.c @@ -37,8 +37,10 @@ int main(int argc, char *argv[]) { for (; *argv[1] != '\0'; ++argv[1]) { for (i = 2; i < argc; ++i) { - if (*argv[i-1] > *argv[i]) { + /* a former string has a greater byte value */ + if (*argv[i-1] > *argv[i]) { return 1; + /* a latter string has a greater byte value */ } else if (*argv[i-1] < *argv[i]++) { return -1; /* actually 255 */ }