]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - src/trackfds.h
Minor documentation updates.
[coloredstderr/coloredstderr.git] / src / trackfds.h
index 70751d760c68bb6ee3ad2fe924348f1ee6d3ee52..56490adf1ad37b504e88cc0c62fc86e0d2cd8282 100644 (file)
@@ -100,7 +100,7 @@ static void init_from_environment(void) {
 #ifdef DEBUG
     debug("  getenv(\"%s\"): \"%s\"\n", ENV_NAME_FDS, env);
 #endif
-    /* Environment is read-only. */
+    /* Environment must be treated read-only. */
     char env_copy[strlen(env) + 1];
     strcpy(env_copy, env);
 
@@ -132,6 +132,7 @@ static void init_from_environment(void) {
             break;
         }
 
+        /* Replace ',' to null-terminate number for atoi(). */
         *x = 0;
 
         int fd = atoi(last);
@@ -184,7 +185,7 @@ static char *update_environment_buffer_entry(char *x, int fd) {
     /* Write comma after number. */
     x += length;
     *x++ = ',';
-    /* Make sure the string is always zero terminated. */
+    /* Make sure the string is always null-terminated. */
     *x = 0;
 
     return x;