Rewrite to avoid casts.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 22:52:39 +0000 (22:52 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 22:52:39 +0000 (22:52 +0000)
lib/readtokens.c

index 438441c..2ccf6a9 100644 (file)
@@ -96,7 +96,10 @@ readtoken (FILE *stream,
       saved_delim = delim;
       memset (isdelim, 0, sizeof isdelim);
       for (j = 0; j < n_delim; j++)
-       isdelim[(unsigned char) delim[j]] = 1;
+       {
+         unsigned char ch = delim[j];
+         isdelim[ch] = 1;
+       }
     }
 
   /* FIXME: don't fool with this caching.  Use strchr instead.  */