Skip to content

Commit 42b20c2

Browse files
committed
fix: use strcmp for empty string check
1 parent fe6f97b commit 42b20c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/appimagetool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,14 +923,14 @@ main (int argc, char *argv[])
923923
char buf[1024];
924924
gchar **parts = g_strsplit (github_repository, "/", 2);
925925
char* channel;
926-
if (github_ref != "" && strstr(github_ref, "/continuous/")) {
926+
if (strcmp(github_ref, "") != 0 && strstr(github_ref, "/continuous/")) {
927927
channel = "latest";
928928
} else {
929929
channel = "continuous";
930930
}
931931
int is_zsync_write_success = snprintf(buf, buffer_size, "gh-releases-zsync|%s|%s|%s|%s*-%s.AppImage.zsync", parts[0], parts[1], channel, app_name_for_filename, arch);
932932
if (is_zsync_write_success < 0) {
933-
printf("Writing updateinformation failed. zsync information is too long. (> 1024)\n");
933+
printf("Writing updateinformation failed. zsync information is too long. (> %d)\n", buffer_size);
934934
exit(is_zsync_write_success);
935935
}
936936
updateinformation = buf;

0 commit comments

Comments
 (0)