From 61677f9c3f23caee8590e68fcc0aea66fba845f7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 18 Apr 2016 18:30:09 -0700 Subject: [PATCH] Call the buffer for the magic number "magic". It's not guaranteed to be a C string, so don't call it "str". Change-Id: I614ccf4f87b9f6f58d9b72596827224006f1de30 Reviewed-on: https://code.wireshark.org/review/14998 Reviewed-by: Guy Harris --- wiretap/mplog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wiretap/mplog.c b/wiretap/mplog.c index 9e06a417d9..cfb3d015b6 100644 --- a/wiretap/mplog.c +++ b/wiretap/mplog.c @@ -224,15 +224,15 @@ mplog_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *pkthdr, wtap_open_return_val mplog_open(wtap *wth, int *err, gchar **err_info _U_) { gboolean ok; - guint8 str[6]; + guint8 magic[6]; - ok = wtap_read_bytes(wth->fh, str, 6, err, err_info); + ok = wtap_read_bytes(wth->fh, magic, 6, err, err_info); if (!ok) { if (*err != WTAP_ERR_SHORT_READ) return WTAP_OPEN_ERROR; return WTAP_OPEN_NOT_MINE; } - if (memcmp(str, "MPCSII", 6) != 0) + if (memcmp(magic, "MPCSII", 6) != 0) return WTAP_OPEN_NOT_MINE; wth->file_encap = WTAP_ENCAP_ISO14443;