Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
halosghost authored and HalosGhost committed May 24, 2019
1 parent cacc30c commit 6b5beb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/win_oper.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ char *title_read(int wid)

memset(title_string, 0, title_len+2);
if ( title_len && sprintf(title_string, "%s\n", title) < 0 ) {
syslog(LOg_ERR, "failed to store title string in %s\n", __func__);
syslog(LOG_ERR, "failed to store title string in %s\n", __func__);
}

free(title);
Expand All @@ -120,15 +120,15 @@ char *class_read(int wid)
char **classes=get_class(wid);
size_t class0_len = strlen(classes[0]), class1_len = strlen(classes[1]);
char *class_string=malloc(class0_len + class1_len + 3);
if ( !title_string ) {
if ( !class_string ) {
syslog(LOG_ERR, "failed to allocate in %s: %s\n", __func__, strerror(ENOMEM));
}

if ( class0_len && sprintf(class_string, "%s\n", classes[0]) < 0) {
syslog(LOG_ERR, "failed to store first class in %s\n", __func__);
}
if ( class1_len && sprintf(class_string + class0_len + 1, "%s\n", classes[1]) < 0) {
syslog(LOg_ERR, "failed to store second class in %s\n", __func__);
syslog(LOG_ERR, "failed to store second class in %s\n", __func__);
}

free(classes[0]);
Expand Down

0 comments on commit 6b5beb5

Please sign in to comment.