diff options
author | Jim Meyering <jim@meyering.net> | 1993-10-16 14:47:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-10-16 14:47:43 +0000 |
commit | 6a06c02f213c9b13cf47e983f1dfd64b1ca178d9 (patch) | |
tree | 7130c5ddbcbb540aa15b39ff9f1774bfee7f29e5 | |
parent | 20905f2c93b659dc8908044132b8336439d8e8ee (diff) | |
download | coreutils-6a06c02f213c9b13cf47e983f1dfd64b1ca178d9.tar.xz |
(main): When argc == 1, don't try to xmalloc (0).
-rw-r--r-- | src/pr.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -469,7 +469,9 @@ main (argc, argv) program_name = argv[0]; n_files = 0; - file_names = (char **) xmalloc ((argc - 1) * sizeof (char *)); + file_names = (argc > 1 + ? (char **) xmalloc ((argc - 1) * sizeof (char *)) + : NULL); while (1) { |