diff options
author | Guillem Jover <guillem@debian.org> | 2011-11-27 23:53:15 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2011-12-08 22:54:14 +0100 |
commit | e5dbbbb6770c7b432bcfd35dae8d2ff86bd03ed6 (patch) | |
tree | ec336bb674b27baff182cf8078533d5faabc7d8d /src/enquiry.c | |
parent | 3c3a1adfa0a1a4217587ac06b1bad799d1bbbb2d (diff) | |
download | dpkg-e5dbbbb6770c7b432bcfd35dae8d2ff86bd03ed6.tar.gz |
dpkg: Change --print-foreign-architectures to print an entry per line
Printing just a line with space separated entries makes both the code
to print and to parse slightly more complicated. The worst part comes
from parsing as the standard stream input operations require delimited
buffers, and as such if those buffers would not be enough truncation
would happen.
Diffstat (limited to 'src/enquiry.c')
-rw-r--r-- | src/enquiry.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/enquiry.c b/src/enquiry.c index 2b45db3c3..1d7326f40 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -480,7 +480,6 @@ int print_foreign_arches(const char *const *argv) { struct dpkg_arch *arch; - const char *sep = ""; if (*argv) badusage(_("--%s takes no arguments"), cipaction->olong); @@ -488,10 +487,9 @@ print_foreign_arches(const char *const *argv) for (arch = dpkg_arch_get_list(); arch; arch = arch->next) { if (arch->type != arch_foreign) continue; - printf("%s%s", sep, arch->name); - sep = " "; + + printf("%s\n", arch->name); } - printf("\n"); m_output(stdout, _("<standard output>")); |