Avoid some potential divide by zero errors that Clang reports.
svn path=/trunk/; revision=41923
This commit is contained in:
parent
a42cb82d65
commit
523cbecd1a
|
@ -804,7 +804,7 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree)
|
|||
/* ToDo: consider recoding slightly ... */
|
||||
for (r=0; r < row_count;r++) {
|
||||
for (c=0;(c < global_disp_col_count) && (((r*global_disp_col_count)+c) < length);c++) {
|
||||
if ((c % (global_disp_col_count/2)) == 0) {
|
||||
if ((global_disp_col_count > 1) && (c % (global_disp_col_count/2)) == 0) {
|
||||
ptr += g_snprintf(ptr, (gulong)(sizeof string - strlen(string)), " ");
|
||||
}
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ dissect_enttec_dmx_data(tvbuff_t *tvb, guint offset, proto_tree *tree)
|
|||
dmx_epstr = ep_strbuf_new_label(NULL);
|
||||
for (r=0; r < row_count;r++) {
|
||||
for (c=0;(c < global_disp_col_count) && (((r*global_disp_col_count)+c) < ui);c++) {
|
||||
if ((c % (global_disp_col_count/2)) == 0) {
|
||||
if ((global_disp_col_count > 1) && (c % (global_disp_col_count/2)) == 0) {
|
||||
ep_strbuf_append_c(dmx_epstr, ' ');
|
||||
}
|
||||
v = dmx_data[(r*global_disp_col_count)+c];
|
||||
|
|
Loading…
Reference in New Issue