~vcs-imports/putty/master

« back to all changes in this revision

Viewing changes to unix/gtkcols.c

  • Committer: Simon Tatham
  • Date: 2018-12-01 17:04:44 UTC
  • Revision ID: git-v1:66b776ae6e177049486676b404b7ffdae3756768
Add some more miscellaneous asserts.

These clarify matters for static checkers (not to mention humans), and
seem inexpensive enough not to worry about adding.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * gtkcols.c - implementation of the `Columns' GTK layout container.
3
3
 */
4
4
 
 
5
#include <assert.h>
5
6
#include <gtk/gtk.h>
6
7
#include "defs.h"
7
8
#include "gtkcompat.h"
662
663
 
663
664
        childwidth = get_width(child);
664
665
        colspan = child->colspan ? child->colspan : ncols-child->colstart;
 
666
        assert(colspan > 0);
665
667
 
666
668
#ifdef COLUMNS_WIDTH_DIAGNOSTICS
667
669
        printf("compute_width(%p): ", cols);