]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/commitdiff
Minor documentation updates.
authorSimon Ruderich <simon@ruderich.org>
Thu, 13 Jun 2013 20:15:09 +0000 (22:15 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 13 Jun 2013 20:15:09 +0000 (22:15 +0200)
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
 #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);
 
     char env_copy[strlen(env) + 1];
     strcpy(env_copy, env);
 
@@ -132,6 +132,7 @@ static void init_from_environment(void) {
             break;
         }
 
             break;
         }
 
+        /* Replace ',' to null-terminate number for atoi(). */
         *x = 0;
 
         int fd = atoi(last);
         *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++ = ',';
     /* 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;
     *x = 0;
 
     return x;