[BACK]Return to errstr.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / openssl

Diff for /src/usr.bin/openssl/errstr.c between version 1.10 and 1.11

version 1.10, 2023/03/06 14:32:06 version 1.11, 2023/07/23 11:20:11
Line 68 
Line 68 
 #include <openssl/lhash.h>  #include <openssl/lhash.h>
 #include <openssl/ssl.h>  #include <openssl/ssl.h>
   
 static struct {  
         int stats;  
 } cfg;  
   
 static const struct option errstr_options[] = {  static const struct option errstr_options[] = {
         {  
                 .name = "stats",  
                 .desc = "Print debugging statistics for the hash table",  
                 .type = OPTION_FLAG,  
                 .opt.flag = &cfg.stats,  
         },  
         { NULL },          { NULL },
 };  };
   
 static void  static void
 errstr_usage()  errstr_usage(void)
 {  {
         fprintf(stderr, "usage: errstr [-stats] errno ...\n");          fprintf(stderr, "usage: errstr errno ...\n");
         options_usage(errstr_options);  
 }  }
   
 int  int
Line 103 
Line 92 
                 exit(1);                  exit(1);
         }          }
   
         memset(&cfg, 0, sizeof(cfg));  
   
         if (options_parse(argc, argv, errstr_options, NULL, &argsused) != 0) {          if (options_parse(argc, argv, errstr_options, NULL, &argsused) != 0) {
                 errstr_usage();                  errstr_usage();
                 return (1);                  return (1);
         }  
   
         if (cfg.stats) {  
                 BIO *out;  
   
                 if ((out = BIO_new_fp(stdout, BIO_NOCLOSE)) == NULL) {  
                         fprintf(stderr, "Out of memory");  
                         return (1);  
                 }  
   
                 lh_ERR_STRING_DATA_node_stats_bio(ERR_get_string_table(), out);  
                 lh_ERR_STRING_DATA_stats_bio(ERR_get_string_table(), out);  
                 lh_ERR_STRING_DATA_node_usage_stats_bio(  
                             ERR_get_string_table(), out);  
   
                 BIO_free_all(out);  
         }          }
   
         for (i = argsused; i < argc; i++) {          for (i = argsused; i < argc; i++) {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11