Message ID | 1427061825-27470-10-git-send-email-emil.l.velikov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, 2015-03-22 at 22:03 +0000, Emil Velikov wrote: > The valies are unsigned long, thus we should use %lu. > > Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> > --- > xf86drmHash.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/xf86drmHash.c b/xf86drmHash.c > index 12baa62..887d6a7 100644 > --- a/xf86drmHash.c > +++ b/xf86drmHash.c > @@ -119,7 +119,7 @@ static unsigned long HashHash(unsigned long key) > > hash %= HASH_SIZE; > #if DEBUG > - printf( "Hash(%d) = %d\n", key, hash); > + printf( "Hash(%lu) = %lu\n", key, hash); > #endif > return hash; > } > @@ -221,8 +221,9 @@ int drmHashInsert(void *t, unsigned long key, void *value) > bucket->value = value; > bucket->next = table->buckets[hash]; > table->buckets[hash] = bucket; > -#if DEBUG > printf("Inserted %d at %d/%p\n", key, hash, bucket); > +#if DEBUG > + printf("Inserted %lu at %lu/%p\n", key, hash, bucket); > #endif ^^ This change looks funny in the patch. I assume you just replace the printf call? If that's so LGTM Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> > return 0; /* Added to table */ > }
diff --git a/xf86drmHash.c b/xf86drmHash.c index 12baa62..887d6a7 100644 --- a/xf86drmHash.c +++ b/xf86drmHash.c @@ -119,7 +119,7 @@ static unsigned long HashHash(unsigned long key) hash %= HASH_SIZE; #if DEBUG - printf( "Hash(%d) = %d\n", key, hash); + printf( "Hash(%lu) = %lu\n", key, hash); #endif return hash; } @@ -221,8 +221,9 @@ int drmHashInsert(void *t, unsigned long key, void *value) bucket->value = value; bucket->next = table->buckets[hash]; table->buckets[hash] = bucket; -#if DEBUG printf("Inserted %d at %d/%p\n", key, hash, bucket); +#if DEBUG + printf("Inserted %lu at %lu/%p\n", key, hash, bucket); #endif return 0; /* Added to table */ }
The valies are unsigned long, thus we should use %lu. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> --- xf86drmHash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)