diff options
-rw-r--r-- | TSRM/tsrm_win32.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index e8ec18650a..466d2f27b2 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -599,10 +599,8 @@ TSRM_API int shmget(int key, int size, int flags) return -1; } - snprintf(shm_segment, sizeof(shm_segment)-1, "TSRM_SHM_SEGMENT:%d", key); - snprintf(shm_info, sizeof(shm_info)-1, "TSRM_SHM_DESCRIPTOR:%d", key); - shm_segment[sizeof(shm_segment)-1] = '\0'; - shm_info[sizeof(shm_info)-1] = '\0'; + snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key); + snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key); shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment); info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info); |