summaryrefslogtreecommitdiffstats
path: root/fish/glob.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-03 11:10:13 -0400
committerJim Meyering <meyering@redhat.com>2009-08-03 17:17:57 +0200
commit2f1a50d81671810256dce0852e6b1e0810ac44af (patch)
treec6058422a2f177f7c55ddaa22e329699a9d21e20 /fish/glob.c
parent72c829395bb6a4800516d4f535e18af48195585b (diff)
downloadlibguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.tar.gz
libguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.tar.xz
libguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.zip
Convert all TABs-as-indentation to spaces.
Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'fish/glob.c')
-rw-r--r--fish/glob.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/fish/glob.c b/fish/glob.c
index 581bc286..2731b2f9 100644
--- a/fish/glob.c
+++ b/fish/glob.c
@@ -69,46 +69,46 @@ do_glob (const char *cmd, int argc, char *argv[])
if (argv[i][0] == '/') {
pp = guestfs_glob_expand (g, argv[i]);
if (pp == NULL) { /* real error in glob_expand */
- fprintf (stderr, _("glob: guestfs_glob_expand call failed: %s\n"),
- argv[i]);
- goto error0;
+ fprintf (stderr, _("glob: guestfs_glob_expand call failed: %s\n"),
+ argv[i]);
+ goto error0;
}
/* If there were no matches, then we add a single element list
* containing just the original argv[i] string.
*/
if (pp[0] == NULL) {
- char **pp2;
-
- pp2 = realloc (pp, sizeof (char *) * 2);
- if (pp2 == NULL) {
- perror ("realloc");
- free (pp);
- goto error0;
- }
- pp = pp2;
-
- pp[0] = strdup (argv[i]);
- if (pp[0] == NULL) {
- perror ("strdup");
- free (pp);
- goto error0;
- }
- pp[1] = NULL;
+ char **pp2;
+
+ pp2 = realloc (pp, sizeof (char *) * 2);
+ if (pp2 == NULL) {
+ perror ("realloc");
+ free (pp);
+ goto error0;
+ }
+ pp = pp2;
+
+ pp[0] = strdup (argv[i]);
+ if (pp[0] == NULL) {
+ perror ("strdup");
+ free (pp);
+ goto error0;
+ }
+ pp[1] = NULL;
}
}
/* Doesn't begin with '/' */
else {
pp = malloc (sizeof (char *) * 2);
if (pp == NULL) {
- perror ("malloc");
- goto error0;
+ perror ("malloc");
+ goto error0;
}
pp[0] = strdup (argv[i]);
if (pp[0] == NULL) {
- perror ("strdup");
- free (pp);
- goto error0;
+ perror ("strdup");
+ free (pp);
+ goto error0;
}
pp[1] = NULL;
}
@@ -130,8 +130,8 @@ do_glob (const char *cmd, int argc, char *argv[])
static void
glob_issue (char *cmd, int argc,
- char ***globs, int *posn, int *count,
- int *r)
+ char ***globs, int *posn, int *count,
+ int *r)
{
int i;
char *argv[argc+1];