summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-10-23 12:07:16 +0200
committerAnatol Belski <ab@php.net>2015-10-27 17:07:51 +0100
commit0e50a4c0086b628ce76de2156d33133595703082 (patch)
treec51a2f0becbc14b6c353d25e1761dd6eb760e1e2 /TSRM
parentc133515811c2a53039f0df1538c0f14c49aa0307 (diff)
downloadphp-git-0e50a4c0086b628ce76de2156d33133595703082.tar.gz
correct snprintf usage
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_win32.c6
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);