diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-30 16:18:20 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-30 16:18:20 +0000 | 
| commit | fe232cf8197963decb8b68e4a62de3734a7d5cde (patch) | |
| tree | 12374d17ae7a16e9a07588ff5edff7b4e39f92f5 /lib/termtable.h | |
| parent | 4a19f832b46b6ea97fd7932f857a53ae18a6bfaa (diff) | |
lib: printf bugfixes & improvement
* Fix bad format specifier in thread.[ch]
* Move PRINTF_ATTRIBUTE macro to zebra.h
* Use PRINTF_ATTRIBUTE on termtable printers
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/termtable.h')
| -rw-r--r-- | lib/termtable.h | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/termtable.h b/lib/termtable.h index 6953002e90..9ecb41659e 100644 --- a/lib/termtable.h +++ b/lib/termtable.h @@ -20,6 +20,8 @@  #ifndef _TERMTABLE_H_  #define _TERMTABLE_H_ +#include <zebra.h> +  enum ttable_align {  	LEFT,  	RIGHT, @@ -131,7 +133,8 @@ void ttable_cell_del(struct ttable_cell *cell);   * columns were specified   */  struct ttable_cell *ttable_insert_row(struct ttable *tt, unsigned int row, -				      const char *format, ...); +				      const char *format, ...) +				      PRINTF_ATTRIBUTE(3, 4);  /**   * Inserts a new row at the end of the table.   * @@ -156,7 +159,8 @@ struct ttable_cell *ttable_insert_row(struct ttable *tt, unsigned int row,   * @return pointer to the first cell in the created row, or NULL if not enough   * columns were specified   */ -struct ttable_cell *ttable_add_row(struct ttable *tt, const char *format, ...); +struct ttable_cell *ttable_add_row(struct ttable *tt, const char *format, ...) +				   PRINTF_ATTRIBUTE(2, 3);  /**   * Removes a row from the table.  | 
