# HG changeset patch
# User dcoudert
# Date 1330089870 -3600
# Node ID 805a1438ce565d4caf03be0a9dd3e2c57dcd649c
# Parent 343b4781c9dc5c80eb93588b789baacbc345d300
additional corrections for patch 11754
diff --git a/sage/graphs/graph_decompositions/rankwidth/rw.c b/sage/graphs/graph_decompositions/rankwidth/rw.c
--- a/sage/graphs/graph_decompositions/rankwidth/rw.c
+++ b/sage/graphs/graph_decompositions/rankwidth/rw.c
@@ -222,7 +222,7 @@
int init_rw(uint_fast8_t n)
{
// If sizeof(uint_fast8_t) * (1ul << n) overflows, it wraps around to 0, since size_t and unsigned long are unsigned integer types.
- if(n > MAX_VERTICES || n && !(sizeof(uint_fast8_t) * (1ul << n)))
+ if( (n > MAX_VERTICES) || ( (n>0) && !(sizeof(uint_fast8_t) * (1ul << n)) ) )
return(-1);
num_vertices = n;
diff --git a/sage/graphs/graph_decompositions/rankwidth/rw.h b/sage/graphs/graph_decompositions/rankwidth/rw.h
--- a/sage/graphs/graph_decompositions/rankwidth/rw.h
+++ b/sage/graphs/graph_decompositions/rankwidth/rw.h
@@ -25,7 +25,8 @@
// Use data type uint_leastN_t. N is an upper limit on the size of the graphs that can be handled. N=32 seems to be a good compromise for now (the code works well with other values of N).
// uint_leastN_t is faster than uint_fastN_t here, since the bottleneck is cache misses.
-#ifndef subset_t
+#ifndef __RANKWIDTH_H_SUBSET_T__
+#define __RANKWIDTH_H_SUBSET_T__
typedef uint_least32_t subset_t;
#endif