Raymond Toy pushed to branch issue-132-ansi-test-rename-files at cmucl / cmucl
Commits:
c0e48e6c by Raymond Toy at 2022-09-03T21:21:49-07:00
Used grep -a to find unexpected changes
Without -a, grep doesn't find any changes, making the test pass. Use
-a to treat the file as text (which is mostly is, except for unicode
characters/strings) so that we can find if there unexpected successes
or failures.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -80,7 +80,7 @@ linux:ansi-test:
script:
- cd ansi-test
- make LISP="../dist/bin/lisp -batch -noinit -nositeinit"
- - grep 'No unexpected \(successes\|failures\)' test.out
+ - grep -a 'No unexpected \(successes\|failures\)' test.out
linux:benchmark:
stage: benchmark
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/c0e48e6c63680ca24ff3358…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/c0e48e6c63680ca24ff3358…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-120-software-type-in-c at cmucl / cmucl
Commits:
51d4f25b by Raymond Toy at 2022-09-02T16:00:01-07:00
Simplify code and use strdup to copy the strings
Reorder the code for os_software_version to keep all the
UNAME_RELEASE_AND_VERSION code together. When
UNAME_RELEASE_AND_VERSION is not set, use strdup to copy the release.
In os_software_type, use strdup to copy the OS name, instead of
malloc+strcpy.
- - - - -
1 changed file:
- src/lisp/os-common.c
Changes:
=====================================
src/lisp/os-common.c
=====================================
@@ -740,19 +740,15 @@ os_software_version()
int version_length;
#if defined(UNAME_RELEASE_AND_VERSION)
version_length = strlen(uts.release) + strlen(uts.version) + 2;
-#else
- version_length = strlen(uts.version) + 1;
-#endif
version = malloc(version_length);
if (version) {
-#if defined(UNAME_RELEASE_AND_VERSION)
strcpy(version, uts.release);
strcat(version, " ");
strcat(version, uts.version);
+ }
#else
- strcpy(version, uts.version);
+ version = strdup(uts.version);
#endif
- }
}
return version;
@@ -768,10 +764,7 @@ os_software_type()
status = uname(&uts);
if (status == 0) {
- os_name = malloc(strlen(uts.sysname) + 1);
- if (os_name) {
- strcpy(os_name, uts.sysname);
- }
+ os_name = strdup(uts.sysname);
}
return os_name;
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/51d4f25b5c61298d978e7df…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/51d4f25b5c61298d978e7df…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl
Commits:
a6ef2b38 by Raymond Toy at 2022-09-02T10:21:26-07:00
Use strdup to copy the author field.
- - - - -
1 changed file:
- src/lisp/os-common.c
Changes:
=====================================
src/lisp/os-common.c
=====================================
@@ -782,10 +782,7 @@ os_file_author(const char *path)
}
if (result) {
- author = malloc(strlen(result->pw_name) + 1);
- if (author) {
- strcpy(author, result->pw_name);
- }
+ author = strdup(result->pw_name);
}
if (buf) {
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a6ef2b384cc21b539b90aba…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a6ef2b384cc21b539b90aba…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl
Commits:
288e8373 by Raymond Toy at 2022-09-01T16:30:52-07:00
Fix typo in allocation for author
The closing paren is in the wrong place so we didn't allocate enough
memory to hold the author field.
- - - - -
1 changed file:
- src/lisp/os-common.c
Changes:
=====================================
src/lisp/os-common.c
=====================================
@@ -786,7 +786,7 @@ os_file_author(const char *path)
fprintf(stderr, "Allocate %d bytes for author\n",
strlen(result->pw_name + 1));
- author = malloc(strlen(result->pw_name + 1));
+ author = malloc(strlen(result->pw_name) + 1);
if (author) {
fprintf(stderr, "author = %p\n", author);
strcpy(author, result->pw_name);
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/288e837309e3792ba4aaf76…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/288e837309e3792ba4aaf76…
You're receiving this email because of your account on gitlab.common-lisp.net.