aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-02-19 23:38:29 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-02-19 23:42:44 +0100
commit45b9021eb83d513fa7cf59b47b591e9a22d80d83 (patch)
treea9104029d6bb941ac704acf4f72a07b19f123213
parentb3e7a888c9546340e2470ba99d8e499d6e569dcb (diff)
oc2g: Cleanup of get_hwversion_desc
Remove unused variables, wrong return type values, etc. Change-Id: I5565b904c72a9ac1775818416f05c64722d366b2
-rw-r--r--src/osmo-bts-oc2g/misc/oc2gbts_bid.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_bid.c b/src/osmo-bts-oc2g/misc/oc2gbts_bid.c
index 6eaa9c6..c2cd483 100644
--- a/src/osmo-bts-oc2g/misc/oc2gbts_bid.c
+++ b/src/osmo-bts-oc2g/misc/oc2gbts_bid.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include "oc2gbts_bid.h"
@@ -106,7 +107,6 @@ void oc2gbts_rev_get(char *rev_maj, char *rev_min)
const char* get_hwversion_desc()
{
- int rev;
int model;
size_t len;
static char model_name[64] = {0, };
@@ -114,14 +114,9 @@ const char* get_hwversion_desc()
char rev_maj = 0, rev_min = 0;
- int rc = 0;
oc2gbts_rev_get(&rev_maj, &rev_min);
- if (rc < 0)
- return rc;
- if (rev >= 0) {
- len += snprintf(model_name + len, sizeof(model_name) - len,
- " Rev %d.%d", (uint8_t)rev_maj, (uint8_t)rev_min);
- }
+ len += snprintf(model_name + len, sizeof(model_name) - len,
+ " Rev %" PRIu8 ".%" PRIu8, (uint8_t)rev_maj, (uint8_t)rev_min);
model = oc2gbts_model_get();
if (model >= 0) {