chiark / gitweb /
tripe.h: Make job index be unsigned int, not unsigned short.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 8 Dec 2008 10:41:08 +0000 (10:41 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 8 Dec 2008 20:11:31 +0000 (20:11 +0000)
This is mainly (a) because we don't actually save space by using a
short, and (b) because it shuts up a compiler warning.

The warning is annoying.  The compiler complains that it has proven that
an assertion is always true.  Of course, it's nice when it can prove my
assertions, but they're /meant/ to be provably true!

This particular instance is particularly annoying, since it's only
/trivially/ true in the sense the compiler is warning about as a result
of a coincidence of data-type ranges, which may not hold on other
architectures -- on which the assertion is nontrivial but still
important.

Duh.

server/tripe.h

index bf59977417ec90085da825d4c8193f5350255c2f..43d2bdf9e701c47a11c3580e43dc76d0e8549454 100644 (file)
@@ -434,7 +434,7 @@ typedef struct admin_service {
 typedef struct admin_svcop {
   admin_bgop bg;                       /* Background operation header */
   struct admin *prov;                  /* Client servicing this job */
-  unsigned short index;                        /* This job's index */
+  unsigned index;                      /* This job's index */
   struct admin_svcop *next, *prev;     /* Links for provider's jobs */
 } admin_svcop;