mbuf: fix type of private size in detach
authorAndy Green <andy@warmcat.com>
Tue, 22 May 2018 01:24:27 +0000 (09:24 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 22 May 2018 14:27:15 +0000 (16:27 +0200)
commitad3781066261848c163e700c3c5baa16fecc2247
tree8c9edca2aaab4e231e2898cfc18eae078e076b3c
parentf37a2e7c747b0758fcd8390482aeeac490f688b5
mbuf: fix type of private size in detach

GCC 8.1 warned:

In function 'rte_pktmbuf_detach':
rte_mbuf.h:1583:17: warning: conversion from 'uint32_t'
{aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'}
may change value [-Wconversion]
  m->priv_size = priv_size;
                 ^~~~~~~~~

The temp priv_size is declared as a uint32_t.  But it
only deals in uint16_t.  m->priv_size is a uint16_t.
Change it to a uint16_t.

Fixes: 355e6735b3 ("mbuf: fix cloning with private mbuf data")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_mbuf/rte_mbuf.h