aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils/host.c4
-rw-r--r--src/libstrongswan/utils/identification.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c
index aab0f092f..bde7dc142 100644
--- a/src/libstrongswan/utils/host.c
+++ b/src/libstrongswan/utils/host.c
@@ -149,6 +149,10 @@ static int print(FILE *stream, const struct printf_info *info,
break;
}
}
+ if (info->left)
+ {
+ return fprintf(stream, "%-*s", info->width, buffer);
+ }
return fprintf(stream, "%*s", info->width, buffer);
}
diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c
index ae444b466..c06c8069e 100644
--- a/src/libstrongswan/utils/identification.c
+++ b/src/libstrongswan/utils/identification.c
@@ -938,6 +938,10 @@ static int print(FILE *stream, const struct printf_info *info,
snprintf(buf, sizeof(buf), "(unknown ID type: %d)", this->type);
break;
}
+ if (info->left)
+ {
+ return fprintf(stream, "%-*s", info->width, buf);
+ }
return fprintf(stream, "%*s", info->width, buf);
}