From 6d6a4b7ddae7c38bfb231161a12410b925f60646 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 25 Jul 2005 21:05:52 +0000 Subject: [PATCH] Cast unsigned char*slotbuf passed as char* --- servers/slapd/back-bdb/alock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/alock.c b/servers/slapd/back-bdb/alock.c index 1410413e9e..92fc243edc 100644 --- a/servers/slapd/back-bdb/alock.c +++ b/servers/slapd/back-bdb/alock.c @@ -234,7 +234,7 @@ alock_read_slot ( alock_info_t * info, if (slot_data->al_appname) free (slot_data->al_appname); slot_data->al_appname = calloc (1, ALOCK_MAX_APPNAME); - strncpy (slot_data->al_appname, slotbuf+32, ALOCK_MAX_APPNAME-1); + strncpy (slot_data->al_appname, (char *)slotbuf+32, ALOCK_MAX_APPNAME-1); (slot_data->al_appname) [ALOCK_MAX_APPNAME-1] = '\0'; return 0; @@ -259,7 +259,7 @@ alock_write_slot ( alock_info_t * info, alock_write_iattr (slotbuf+16, slot_data->al_stamp); alock_write_iattr (slotbuf+24, slot_data->al_pid); - strncpy (slotbuf+32, slot_data->al_appname, ALOCK_MAX_APPNAME-1); + strncpy ((char *)slotbuf+32, slot_data->al_appname, ALOCK_MAX_APPNAME-1); slotbuf[ALOCK_SLOT_SIZE-1] = '\0'; res = lseek (info->al_fd, -- 2.39.5