From: Hal Murray Date: Wed, 28 Oct 2009 17:32:36 +0000 (-0400) Subject: refclock_shm.c: X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b0649d620dd0c78217cd73a6ccb2a6031a96a17;p=thirdparty%2Fntp.git refclock_shm.c: Fix for bug-1357: bogus assert in refclock_shm bk: 4ae88034qdkalk4qwdZLF8RRBal0PA --- diff --git a/ntpd/refclock_shm.c b/ntpd/refclock_shm.c index 3370ae043d..d2fe2c5847 100644 --- a/ntpd/refclock_shm.c +++ b/ntpd/refclock_shm.c @@ -113,7 +113,10 @@ struct shmTime *getShmTime (int unit) { #ifndef SYS_WINNT int shmid=0; - assert (unit<10); /* MAXUNIT is 4, so should never happen */ + /* 0x4e545030 is NTP0. + * Big units will give non-ascii but that's OK + * as long as everybody does it the same way. + */ shmid=shmget (0x4e545030+unit, sizeof (struct shmTime), IPC_CREAT|(unit<2?0700:0777)); if (shmid==-1) { /*error */