Diff

Differences From Artifact [3f7bad2ab6]:

To Artifact [9ca8af3757]:


   202    202   
   203    203   	return(0);
   204    204   }
   205    205   
   206    206   /* Initialize process */
   207    207   static int filed_init(unsigned int cache_size) {
   208    208   	static int called = 0;
          209  +	ssize_t read_ret = 0;
   209    210   	unsigned int random_value = 0;
   210    211   	int cache_ret;
   211    212   	int random_fd;
   212    213   
   213    214   	if (called) {
   214    215   		return(0);
   215    216   	}
................................................................................
   230    231   	if (cache_ret != 0) {
   231    232   		return(cache_ret);
   232    233   	}
   233    234   
   234    235   	/* Initialize random number generator */
   235    236   	random_fd = open("/dev/urandom", O_RDONLY);
   236    237   	if (random_fd >= 0) {
   237         -		read(random_fd, &random_value, sizeof(random_value));
          238  +		read_ret = read(random_fd, &random_value, sizeof(random_value));
   238    239   
   239    240   		close(random_fd);
   240    241   	}
   241    242   
   242    243   	random_value ^= getpid();
   243    244   	random_value ^= getuid();
   244    245   	random_value ^= time(NULL);
   245    246   
   246    247   	srandom(random_value);
   247    248   
   248    249   	return(0);
          250  +
          251  +	/* NOTREACH: Read may fail or succeed, we don't actually care */
          252  +	read_ret = read_ret;
   249    253   }
   250    254   
   251    255   /* Listen on a particular address/port */
   252    256   static int filed_listen(const char *address, unsigned int port) {
   253    257   	struct sockaddr_in6 addr_v6;
   254    258   	struct sockaddr_in addr_v4;
   255    259   	struct sockaddr *addr;