Message ID | 1d096fa9bb8dda34871a3774b6fbcd8631581fda.1716979680.git.echaudro@redhat.com |
---|---|
State | Accepted |
Commit | 11e48b8ca2115d73ce53d3d85fc0e55435d7a80e |
Headers | show |
Series | Coverity fixes. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/intel-ovs-compilation | success | test: success |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
On 5/29/24 12:53, Eelco Chaudron wrote: > The sFlow library uses a uint32_t to configure timeout ticks, but > stores this value as a time_t. Although this doesn't cause functional > issues, it wastes space and confuses Coverity, potentially indicating > a Y2K38 problem when storing uint32_t values in time_t. This patch > updates the internal data structures to use uint32_t variables. > > Fixes: c72e245a0e2c ("Add InMon's sFlow Agent library to the build system.") > Acked-by: Mike Pattrick <mkp@redhat.com> > Signed-off-by: Eelco Chaudron <echaudro@redhat.com> > --- Recheck-request: github-robot
On 29 May 2024, at 12:53, Eelco Chaudron wrote: > The sFlow library uses a uint32_t to configure timeout ticks, but > stores this value as a time_t. Although this doesn't cause functional > issues, it wastes space and confuses Coverity, potentially indicating > a Y2K38 problem when storing uint32_t values in time_t. This patch > updates the internal data structures to use uint32_t variables. > > Fixes: c72e245a0e2c ("Add InMon's sFlow Agent library to the build system.") > Acked-by: Mike Pattrick <mkp@redhat.com> > Signed-off-by: Eelco Chaudron <echaudro@redhat.com> > --- > lib/sflow_api.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/sflow_api.h b/lib/sflow_api.h > index eb23e2acd..f4bfa5ead 100644 > --- a/lib/sflow_api.h > +++ b/lib/sflow_api.h > @@ -148,7 +148,7 @@ typedef struct _SFLPoller { > /* MIB fields */ > SFLDataSource_instance dsi; > u_int32_t sFlowCpReceiver; > - time_t sFlowCpInterval; > + u_int32_t sFlowCpInterval; > /* public fields */ > struct _SFLAgent *agent; /* pointer to my agent */ > void *magic; /* ptr to pass back in getCountersFn() */ > @@ -156,7 +156,7 @@ typedef struct _SFLPoller { > u_int32_t bridgePort; /* port number local to bridge */ > /* private fields */ > SFLReceiver *myReceiver; > - time_t countersCountdown; > + u_int32_t countersCountdown; > u_int32_t countersSampleSeqNo; > } SFLPoller; > > -- > 2.44.0 Recheck-request: github-robot
On 5/30/24 09:28, Eelco Chaudron wrote: > > > On 29 May 2024, at 12:53, Eelco Chaudron wrote: > >> The sFlow library uses a uint32_t to configure timeout ticks, but >> stores this value as a time_t. Although this doesn't cause functional >> issues, it wastes space and confuses Coverity, potentially indicating >> a Y2K38 problem when storing uint32_t values in time_t. This patch >> updates the internal data structures to use uint32_t variables. >> >> Fixes: c72e245a0e2c ("Add InMon's sFlow Agent library to the build system.") >> Acked-by: Mike Pattrick <mkp@redhat.com> >> Signed-off-by: Eelco Chaudron <echaudro@redhat.com> >> --- >> lib/sflow_api.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/lib/sflow_api.h b/lib/sflow_api.h >> index eb23e2acd..f4bfa5ead 100644 >> --- a/lib/sflow_api.h >> +++ b/lib/sflow_api.h >> @@ -148,7 +148,7 @@ typedef struct _SFLPoller { >> /* MIB fields */ >> SFLDataSource_instance dsi; >> u_int32_t sFlowCpReceiver; >> - time_t sFlowCpInterval; >> + u_int32_t sFlowCpInterval; >> /* public fields */ >> struct _SFLAgent *agent; /* pointer to my agent */ >> void *magic; /* ptr to pass back in getCountersFn() */ >> @@ -156,7 +156,7 @@ typedef struct _SFLPoller { >> u_int32_t bridgePort; /* port number local to bridge */ >> /* private fields */ >> SFLReceiver *myReceiver; >> - time_t countersCountdown; >> + u_int32_t countersCountdown; >> u_int32_t countersSampleSeqNo; >> } SFLPoller; >> >> -- >> 2.44.0 > > Recheck-request: github-robot > GitHub claims that the issue is fixed. Let's try again. Recheck-request: github-robot
diff --git a/lib/sflow_api.h b/lib/sflow_api.h index eb23e2acd..f4bfa5ead 100644 --- a/lib/sflow_api.h +++ b/lib/sflow_api.h @@ -148,7 +148,7 @@ typedef struct _SFLPoller { /* MIB fields */ SFLDataSource_instance dsi; u_int32_t sFlowCpReceiver; - time_t sFlowCpInterval; + u_int32_t sFlowCpInterval; /* public fields */ struct _SFLAgent *agent; /* pointer to my agent */ void *magic; /* ptr to pass back in getCountersFn() */ @@ -156,7 +156,7 @@ typedef struct _SFLPoller { u_int32_t bridgePort; /* port number local to bridge */ /* private fields */ SFLReceiver *myReceiver; - time_t countersCountdown; + u_int32_t countersCountdown; u_int32_t countersSampleSeqNo; } SFLPoller;