[Git][cmucl/cmucl][issue-130-file-author-in-c] Address review comments
Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl Commits: 818a0d5b by Raymond Toy at 2022-09-19T18:22:05-07:00 Address review comments Use alien::null-alien to check for C NULL ptr. Remove debugging print from os_file_author. - - - - - 2 changed files: - src/code/filesys.lisp - src/lisp/os-common.c Changes: ===================================== src/code/filesys.lisp ===================================== @@ -1087,10 +1087,9 @@ optionally keeping some of the most recent old versions." (alien:extern-alien "os_file_author" (function (alien:* c-call:c-string) c-call:c-string)) (unix::%name->file name))) - (unless (zerop (sap-int (alien:alien-sap author))) + (unless (alien:null-alien author) (alien:cast author c-call:c-string))) - (when author - (alien:free-alien author))))))) + (alien:free-alien author)))))) ;;;; DIRECTORY. ===================================== src/lisp/os-common.c ===================================== @@ -774,8 +774,6 @@ os_file_author(const char *path) } } exit: - fprintf(stderr, "buffer, initial = %p %p\n", buffer, initial); - if (buffer != initial) { free(buffer); } View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/818a0d5b5372b0846cc19242... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/818a0d5b5372b0846cc19242... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)