From: Igor Gnatenko Date: Fri, 23 Sep 2016 09:24:28 +0000 (+0200) Subject: libsmartcols: use const qualifier for scols_table_get_termwidth X-Git-Tag: v2.29-rc1~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0140aa138bd0d84d24870044a458ef3a98d6a3a;p=thirdparty%2Futil-linux.git libsmartcols: use const qualifier for scols_table_get_termwidth Signed-off-by: Igor Gnatenko --- diff --git a/libsmartcols/src/libsmartcols.h.in b/libsmartcols/src/libsmartcols.h.in index b946d5b168..de2f271cfe 100644 --- a/libsmartcols/src/libsmartcols.h.in +++ b/libsmartcols/src/libsmartcols.h.in @@ -257,7 +257,7 @@ enum { extern int scols_table_set_termforce(struct libscols_table *tb, int force); extern int scols_table_get_termforce(const struct libscols_table *tb); extern int scols_table_set_termwidth(struct libscols_table *tb, size_t width); -extern size_t scols_table_get_termwidth(struct libscols_table *tb); +extern size_t scols_table_get_termwidth(const struct libscols_table *tb); /* table_print.c */ diff --git a/libsmartcols/src/table.c b/libsmartcols/src/table.c index eb09980774..fcb53b64aa 100644 --- a/libsmartcols/src/table.c +++ b/libsmartcols/src/table.c @@ -1148,7 +1148,7 @@ int scols_table_set_termwidth(struct libscols_table *tb, size_t width) * * Returns: terminal width or a negative value in case of an error. */ -size_t scols_table_get_termwidth(struct libscols_table *tb) +size_t scols_table_get_termwidth(const struct libscols_table *tb) { return tb->termwidth; }