diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-21 19:06:26 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-21 19:06:26 -0400 |
commit | dd756c9798dddb0b1604776e5f69bce975c23a86 (patch) | |
tree | f4e27ff524a0be28602fdfd15f726fb60f525412 /ntpshm.c | |
parent | 82c5bd422dca07ed949707d48268389b1bf72184 (diff) | |
download | gpsd-dd756c9798dddb0b1604776e5f69bce975c23a86.tar.gz |
Move a declaration so it doesn't follow executable code.
Diffstat (limited to 'ntpshm.c')
-rw-r--r-- | ntpshm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -109,6 +109,7 @@ static /*@null@*/ volatile struct shmTime *getShmTime(int unit) { int shmid; unsigned int perms; + volatile struct shmTime *p; // set the SHM perms the way ntpd does if (unit < 2) { // we are root, be careful @@ -126,7 +127,7 @@ static /*@null@*/ volatile struct shmTime *getShmTime(int unit) (int)perms, strerror(errno)); return NULL; } - volatile struct shmTime *p = (struct shmTime *)shmat(shmid, 0, 0); + p = (struct shmTime *)shmat(shmid, 0, 0); /*@ -mustfreefresh */ if ((int)(long)p == -1) { gpsd_report(LOG_ERROR, "NTPD shmat failed: %s\n", |