소스 검색

const correctness on function pointer

Rich Felker 13 년 전
부모
커밋
f7adc39e37
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/time/clock_gettime.c

+ 1 - 1
src/time/clock_gettime.c

@@ -5,7 +5,7 @@
 #include "libc.h"
 
 int __vdso_clock_gettime(clockid_t, struct timespec *) __attribute__((weak));
-static int (*cgt)(clockid_t, struct timespec *) = __vdso_clock_gettime;
+static int (*const cgt)(clockid_t, struct timespec *) = __vdso_clock_gettime;
 
 int __clock_gettime(clockid_t clk, struct timespec *ts)
 {